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

Data update redraws the whole chart (v2)

Open andrewoh531 opened this issue 9 years ago • 6 comments

I'm not sure exactly what I did but previously my chart was being updated when a data point changed. Now whenever a data point is updated the whole chart is redrawn. I was using v2 charts off jhudson8's account and now it seems like the repo's been moved to under reactjs.

I'm wondering if there was a recent change in the v2 branch or if there's a flag I can set to have data update the chart rather than redraw it. It's not a biggie but the visual experience is much nicer when a single data point animates to its new position rather than the whole chart redraw itself.

andrewoh531 avatar Aug 29 '16 01:08 andrewoh531

I've tried pulling down previous commits and it seems like a change from this commit causes the graph to redraw itself: https://github.com/reactjs/react-chartjs/commit/771a788f44450d2e1968b063c2c319de60599d39

andrewoh531 avatar Aug 29 '16 08:08 andrewoh531

@andrewoh531 did you find a solution to this or did you go with an older version?

dmason30 avatar Sep 06 '16 09:09 dmason30

@dmason30 I'm using the version prior to the 771a788 commit

andrewoh531 avatar Sep 06 '16 21:09 andrewoh531

@andrewoh531 I ended up controlling the render through shouldComponentUpdate in the component i am using this in needed the recent fix. I'll wait to see if the dev decides to do anything.

dmason30 avatar Sep 06 '16 22:09 dmason30

I'd love to have this feature back as well.

afraser avatar Dec 08 '16 15:12 afraser

Hi everyone, is this still an issue ?

Jareechang avatar Jan 13 '18 23:01 Jareechang