Opened 12 years ago
Closed 5 years ago
#9605 closed enhancement (fixed)
Custom shape render for chart data
Reported by: | Scott Andrews | Owned by: | dylan |
---|---|---|---|
Priority: | high | Milestone: | 1.11 |
Component: | Charting | Version: | 1.3.1 |
Keywords: | charting, shape, callback | Cc: | |
Blocked By: | Blocking: |
Description
When rendering a chart, it is only possible to specify a theme for a given series. In the chart, I need to be able to customize the representation of a specific data point in the chart and render it differently then the standard theme.
I was able to accomplish this by adding a callback hook inside the chart render lifecycle after the shape is created. The callback can override properties of the shape as desired. An optional map of extra params is passed alongside the shape to provide context of the rendering. In this case, the raw value of the datapoint, and the index position in the dataset.
There is likely a cleaner implementation then what I have provided, however, the basic functionality is critical to our project.
Attachments (1)
Change History (4)
Changed 12 years ago by
Attachment: | charting-shape-callback.diff added |
---|
comment:1 Changed 11 years ago by
Milestone: | tbd → future |
---|
comment:2 Changed 5 years ago by
Milestone: | future → 1.11 |
---|---|
Owner: | changed from Eugene Lazutkin to dylan |
Status: | new → assigned |
This would have been very useful to land years ago. I will review for 1.11.
comment:3 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Pushing TBD tickets to future to clear them from the 1.4 queue, please assign a real milestone if you start working on these tickets.