v2 Line chart with individual point colors?
See original GitHub issueHi there,
I’m wondering whether it is possible to have points on a line chart with each a different color (background/border).
Not sure whether this would be something that could be done via a dataset’s metaDataset?
It’s possible to grab a particular point’s color in the metaDataset via chart.data.datasets[0].metaDataset._points[0]._view.backgroundColor
, but how would I be able to specify each point’s individual color? (preferrably upon instantiation of the chart already)
Thanks in advance for your feedback!
Kind regards, David
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Vary the colors of same-series data markers in a chart
Set varying colors of data markers (bars, columns, lines, pie or doughnut slices, dots, and other shapes) automatically in an Office chart.
Read more >ChartJS - Different color per data point - Stack Overflow
Here is how you might use scriptable options on a line chart (based on the example in the docs). On this chart negative...
Read more >Excel Multi-colored Line Charts - My Online Training Hub
The chart below contains 3 lines; red, yellow and green. They are sitting on top of one another to give the appearance of...
Read more >How to color code individual data points in line chart
Is there a way to color code the data points in each series to indicate which part of the day the reading was...
Read more >How to vary colors by point for chart in Excel? - ExtendOffice
If you create a single-series column, bar or line chart, all the data points in the data series are displayed the same color....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @etimberg,
thanks for your quick reply!
I should have mentioned I gave this a go already… This looks like the perfect solution, however that doesn’t seem to work though: is this broken in Chart.js 2.0-dev?
Quick example:
…just gives me a chart with 4 gray points.
Thanks in advance for your feedback!
Kind regards, David
No worries!
👍
…I hadn’t tried that one yet: it works perfectly, thanks for your help!