// origin data
const data = [ {name: '1s', value: 5} ]
// update
const data = [ {name: '1s', value: 5}, {name: '2s', value: 7}]
As you know, I am not expecting re-render the whole chart, especially with initial animation.
And I can't find any API about this situation.
Another ugly solution is make animation disable, but I still can't find any api about it.
You can set the prop isAnimationActive to be false to disable all animation in the Bar/Line/Area...
Now, the data updating animation is equal to initial animation, later we will support updating animation too.
Now, we use isAnimationActive to control if the animation is valid, later we will add a prop to control data updating animation.
And I'm not clear what do you mean when you say rerender the whole chart.
@jasonHzq
yeah, I just mean the pass the new data props to Chart Component, and its reaction(animation) just like render a new Chart.But I know it only re-render the Data Component(Line/Bar/...).
thx a lot ! great work!
Kinda hacky but it seems to work. Thank you @jasonHzq !
Most helpful comment
You can set the prop
isAnimationActiveto be false to disable all animation in the Bar/Line/Area...Now, the data updating animation is equal to initial animation, later we will support updating animation too.
Now, we use
isAnimationActiveto control if the animation is valid, later we will add a prop to control data updating animation.And I'm not clear what do you mean when you say rerender the whole chart.