Skip to content

Commit

Permalink
Merge pull request #10 from ace-han/master
Browse files Browse the repository at this point in the history
update data before options to support Chart.js v3 (beta.11)
  • Loading branch information
xr0master authored Feb 24, 2021
2 parents 41cde79 + 6a75aae commit 9d45b70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReactChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const ReactChart = ({
const CHART_ID = useMemo(() => generateID('Chart'), []);

useEffect(() => {
chartInstance.current.options = options;
chartInstance.current.data = data;
chartInstance.current.options = options;

chartInstance.current.update(updateMode);
}, [data, options]);
Expand Down

0 comments on commit 9d45b70

Please sign in to comment.