Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

[FEATURE] create bar chart with +1 color AND have legend for it.

Open zeewelc opened this issue 8 years ago • 1 comments

Try to achieve something like this:

http://res.cloudinary.com/jackdenied/image/upload/v1531140966/Screenshot_2018-07-09_13.53.20_apcret.png

Now, I know I can do the bar colors, eg by creating array, 5 colors in dark green, 6 in light green,

but then yet - how i can create legend for these 2 colors in this library?

So far I created kind of "hack" with 2 datasets and 0 values, that partly solves it and may help to visualise issue

https://codepen.io/zeewelc/pen/OwLxrL

But this is not good solultion, bars are in different position, also tooltip showing hidden (0) values..

Is there something better that can be done for such requirement?

zeewelc avatar Jul 09 '18 12:07 zeewelc

Please ask questions on StackOverflow: https://stackoverflow.com/questions/tagged/chart.js

benmccann avatar Jul 09 '18 16:07 benmccann