react-c3
react-c3 copied to clipboard
Allow data to be updated
C3 has the ability to load data using the <chart>.load function.
Because the data in react-c3 is in a property, it cannot be modified and the entire component must be re-rendered.
Looking at react-rt-chart, it seems the way to do this is to use state instead of props.
Hey @adamlwgriffiths - thanks for the info.
It looks like you are correct, we are using generate on every re-render. I'll check out the c3 docs for load and see how we can do it that way (probably just check if this.chart is not null; if it's not we've already generated it and we should use load. We might even be able to get by without using state.
At least I think that's how it should work. I'll do a little investigation - PR's are also welcome!