chartjs-plugin-stacked100 icon indicating copy to clipboard operation
chartjs-plugin-stacked100 copied to clipboard

Not updating when passing new data

Open nilssonan opened this issue 7 years ago • 6 comments

Using stacked horizontal bars. When updating datasets bars are not redrawing. If i disable the plugin the bars updates as expected.

nilssonan avatar Nov 16 '17 13:11 nilssonan

Hi @nilssonan ,

Thanks for your report, and sorry for the delay. I've fixed this issue :) Could you try after update the plugin?

y-takey avatar Nov 19 '17 00:11 y-takey

I'm not sure if this is related, however, when I update the data, my data order is being reversed from the original dataset order.

smcguinness avatar Nov 29 '17 22:11 smcguinness

Hi @smcguinness , Thank you, It seems related to #12 probably. Could you retry it?

y-takey avatar Nov 30 '17 02:11 y-takey

It appears to still be happening to me. I'm in the middle of a prod deploy, however, I'll do better and get an example to make sure I can isolate the issue before making you waste additional time looking at it. Thanks for jumping on this and #12! 💯

smcguinness avatar Nov 30 '17 03:11 smcguinness

JSFiddle

I couldn't recreate it outside of my project as you can see from the Fiddle above, though it is still happening in my project. Caveat is I'm using React-Chart-2.0 and not the pure ChartJS implementation. I'd say it could be related to something else - at least that is my best guess until I find otherwise.

Feel free to close this and if I discover more, I'll open another issue. Thanks!

smcguinness avatar Nov 30 '17 04:11 smcguinness

Calling chartInstance.update() on a chart with stacked100: { enable: true, replaceTooltipLabel: false } enabled causes the chart to revert to a normal bar chart; it's no longer stacked.

av01d avatar Apr 22 '20 13:04 av01d