Apexcharts.js: toggleSeries not working on Pie Chart

Created on 8 Jan 2019  路  7Comments  路  Source: apexcharts/apexcharts.js

Codepen

https://codepen.io/Micene09/pen/REJBWW

Explanation

Labels and serie names are correctly defined but, toggleSeries is not working and the serie selected in the example provided never disappear.
Looking at the debugger, seems that there is something wrong about a data:realIndex attribute...

feature-request

Most helpful comment

Alright, I will add this to the roadmap

All 7 comments

toggleSeries is intended to hide/show series in a multi-series chart.
Currently, pie/donut charts of ApexCharts are not multi-series. Those are just dataPoints of a single series.
Also, if you notice that in axis charts (line/column), clicking on legend hides/shows the series, but not in the case of pie/donuts.
Hence, toggleSeries will not work in those charts.

Maybe, in the future, we will implement it based on the feedback.

So, the only way to make it work should be remove the dataPoint from the original serie and updateSeries...

Yes, I was going to suggest that 馃榾

Generally works but, i have 2 charts (pie + bar) with an external-shared Legend.
In this use-case, it works good for data and legend but colors are misaligned...

It's just a work-around...and i hope you will fix this issue soon.

Alright, I will add this to the roadmap

Any update on when this will be implemented?

I agree this would be nice and good looking.

Can anyone perhaps give me a working example of how to use the updateSeries in React?

When I try to simply setState, I get an error in console, although the series and the graph is updated correctly.

can't access property "getAttribute", t.parentNode is null
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ordago picture ordago  路  3Comments

piyushSinghalDemo picture piyushSinghalDemo  路  3Comments

Sumon-miazi picture Sumon-miazi  路  3Comments

rudeayelo picture rudeayelo  路  3Comments

cstlaurent picture cstlaurent  路  3Comments