apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.26k stars 1.3k forks source link

Pie and Donut chart error while hovering on legend instead highlighting #4710

Open chojnicki opened 2 weeks ago

chojnicki commented 2 weeks ago

Description

While hovering over pie chart legend by default it should highlight corresponding series on chart. Instead there is error repeated every cursor move.

Uncaught TypeError: Cannot read properties of undefined (reading 'toString')

To avoid it for now I can disable this functionality:

legend: {
  onItemHover: {
    highlightDataSeries: false,
  },
},

I know there is no issue with my config because same issue is on official site.

Steps to Reproduce

  1. Go to any pie chart example like https://apexcharts.com/javascript-chart-demos/pie-charts/simple-pie-chart/
  2. Move cursor over legent.
  3. Viola!

Expected Behavior

Pie chunk should highlight.

Actual Behavior

Errors in console and no effect.

Screenshots

Screenshot from 2024-09-17 14-42-34

Reproduction Link

https://apexcharts.com/javascript-chart-demos/pie-charts/simple-pie-chart/

nithin-pb commented 2 weeks ago

facing the same issue, downgrading to 3.52.0 is fixed this issue for me, it looks like only in the latest version

nadar commented 1 week ago

Yes we have the same problem :-(

nadar commented 1 week ago

i think this is fixed and should be released soon: https://github.com/apexcharts/apexcharts.js/issues/4683

eviltik commented 2 days ago

fix available in the latest version 3.54.0, thx !