[Chartjs]-Chart works uncorrectly chart.js

2๐Ÿ‘

โœ…

I was watching the CodeSandbox that you gave, and I see that you have the tooltips intersect with value : false and that I think it will use the tooltip mode all the time, and not when you want soo try to put it like this and see if it works:

tooltips: {
      mode: "index",
      intersect: true
    },

Sugestion:
Add this to renderLi(refering to CodeSandbox sample)

onMouseOver={() => {
      this.setState({ selectedIdx: key });
      this.props.itemKey(key);
    }}

2๐Ÿ‘

I added chart to global scope. If chart exists and is not equal null โ‡’ it will be destroyed. Corresponding flickering was vanished

if (window.eChart && window.eChart !== null) {
  window.eChart.destroy();
}

Leave a comment