Opened 10 years ago

Closed 4 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)

charting-shape-callback.diff (842 bytes) - added by Scott Andrews 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Scott Andrews

comment:1 Changed 10 years ago by bill

Milestone: tbdfuture

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.

comment:2 Changed 4 years ago by dylan

Milestone: future1.11
Owner: changed from Eugene Lazutkin to dylan
Status: newassigned

This would have been very useful to land years ago. I will review for 1.11.

comment:3 Changed 4 years ago by dylan

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.