react-apexcharts icon indicating copy to clipboard operation
react-apexcharts copied to clipboard

incorrect colors with one group

Open evless opened this issue 4 years ago • 3 comments

I came across problem in linecharts when I used graphs with one group for sync. If I add one more graph I will get incorrect colors in every graph. If I do dynamic key for graphs it will work correct, but I think it's very bad decision. I did live example: https://codesandbox.io/s/react-update-example-forked-u46ic

evless avatar Nov 10 '20 12:11 evless

Same issue here. What do you mean by doing "dynamic key" to get it working? I'm so desperate to have a quick solution even if not the best decision. :)

youhackme avatar Feb 04 '22 15:02 youhackme

Same issue here. What do you mean by doing "dynamic key" to get it working? I'm so desperate to have a quick solution even if not the best decision. :)

@youhackme Put key={Math.random()} on each graph so they will fully rerender when graphs list update. Downside is that they will fully rerender loosing zoom state and replaying mount animation.

nekitk avatar Feb 07 '22 09:02 nekitk

@nekitk Thanks buddy. I ended up solving it that way.

youhackme avatar Feb 07 '22 15:02 youhackme