Highcharts has the ability to use an array of object as values for data points.
Paraphrased from the Highcharts documentation. (eg https://api.highcharts.com/highcharts/series.line.data)
series.*.data
An array of data points for the series.
1. An array of numerical values.
2. An array of objects with named values.
This allows for some per-point settings, such as color, to be specified.
Please add the capability to use an "array of objects" as the data sequence.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Screen Shot 2018-08-15 at 09.40.36.png | 13.22 KB | john cook |
| #2 | Screen Shot 2018-08-15 at 09.40.11.png | 9.28 KB | john cook |
| #2 | 2992740-2.patch | 1.02 KB | john cook |
Comments
Comment #2
john cook commentedI've created a patch to allow the data points to be "objects".
By changing the first data set in the example module to:
'data' => [['y' => 250, 'color' => '#cc00cc'], 350, 400, 200],It allows the following graphs (notice the magenta – #cc00cc – point and slice):

Comment #3
john cook commentedComment #5
andileco commentedComment #6
andileco commented