Skip to content

Commit

Permalink
Merge pull request #31 from ghislaine-laios/master
Browse files Browse the repository at this point in the history
Hi @ghislaine-laios. I checked the behaviour an it completely fixes the animation issue. Great job! Thanks for taking the time πŸ™
  • Loading branch information
hugocxl authored Apr 13, 2024
2 parents bb8a85f + f43c473 commit a285aa5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/use-echarts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ export function useECharts<T extends HTMLElement>({
useEffect(() => {
if (!echartsInstance) return

echartsInstance.clear()
return () => echartsInstance.clear()
}, [echartsInstance])

useEffect(() => {
if (!echartsInstance) return

echartsInstance.setOption(
{
series,
Expand Down

0 comments on commit a285aa5

Please sign in to comment.