chart not updating
bradbeatson opened this issue · comments
`import React from 'react';
import { Chart } from 'react-charts'
function MyChart(props) {
// Use any data object you want
const data = React.useMemo(
() => props.data,
[props.data]
)
const axes = React.useMemo(
() => props.axes,
[props.axes]
)
return (
<div
style={{
width: '400px',
height: '300px'
}}
>
<Chart
data={props.data}
axes={axes}
tooltip
/>
</div>
)
}
export default MyChart;`
updating the props.data value does not update the chart. What am I missing?
Due to a massive overhaul and rewrite of React Charts to TypeScript and a massively upgraded public API, this issue is being bulk closed for triage. The latest version can be tested via the react-charts@beta
tag. Documentation is in the process of being upgraded, but thankfully, everything is fully typed now, so you can explore the API that way for now.
If, after testing or playing with the v3 beta, you believe your issue is still not addressed or relevant, feel free to open a new issue.