react-apexcharts
react-apexcharts copied to clipboard
hiding apex chart series with name not working
Hello Contributor
I am trying to hide series using the hideSeries method and came across an issue. **Issue details ** suppose my initial chart has the following series
series: [{
name: 'Net Profit',
data: [44, 55, 57, 56, 61, 58, 63, 60, 66]
}, {
name: 'Revenue',
data: [76, 85, 101, 98, 87, 105, 91, 114, 94]
}, {
name: 'Free Cash Flow',
data: [35, 41, 36, 26, 45, 48, 52, 53, 41]
}],
I'll hide the series name 'Revenue' and I have a button which will update the series as follows but I still would like to remember that the 'Revenue' series is hidden in the new chart.
series: [{
name: 'Net Profit',
data: [44, 55, 57, 56, 61, 58, 63, 60, 66]
},{
name: 'Expenditure',
data: [7, 8, 11, 8, 7, 10, 9, 11, 4]
}, {
name: 'Revenue',
data: [76, 85, 101, 98, 87, 105, 91, 114, 94]
}, {
name: 'Free Cash Flow',
data: [35, 41, 36, 26, 45, 48, 52, 53, 41]
}],
After using chart.hideSeries('Revenue') in the updated chart it is hiding the 'Expenditure' chart instead of Revenue chart.
My assumption is that it is actually hiding the chart with index number
I'll be very grateful if you could help me fix this issue
This seems to break with [email protected].