You must be logged in to post your query.
Home › Forums › Chart Support › Multiple data point colours on chart legend
Tagged: linechart legend
Hello.
I have used CanvasJS to create a line chart. The line chart has a single line with multiple data points, however, the data point colour changes to orange to signify a positive trend. Blue data points are used to signify a decreasing trend. Grey data points signify normal occurrence.
How can I add these 3 different colour data points to my chart legend so that the audience understands what the Grey, Orange and Blue data points mean? E.g.I would like the legend to contain:
– Orange ‘Increasing Performance’ – Blue ‘Decreasing Performance’ – Grey ‘Normal’
Is this possible?
I’ve added sample code to Google Drive to better explain.
https://drive.google.com/file/d/1JKx_AZtuxqRLGukP0zJMOolpqfx6KBAL/view?usp=sharing
Many thanks.
@tgriffiths,
Legends are generally shown in dataseries level except pie, donut, funnel & pyramid charts. However, you can add dummy dataseries to achieve your requirement. Please take a look at this updated sample project.
—- Manoj Mohan Team CanvasJS
Many thanks, Manoj. This is most helpful.
You must be logged in to reply to this topic. Login/Register