You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the radial bar, I want to add an event listener to onclick of the legend, but I want to disable toggleDataSeries behavior when clicking the legend. In the first step, I add event listener by
Then event listener does not work anymore because the legend is not clickable. Can I have event listener enabled and toggleDataSeries disabled in the same time?
d-amit, SheriefAlaa, PierrickP, jkohlin, lampewebdev and 3 more
changed the title [-]To have event listener enabled and toggleDataSeries disabled in the same time[/-][+]To have event listener enabled and toggleDataSeries disabled for legend in the same time[/+]on Aug 8, 2019
I have the same problem.
I want to hide all the ofter legend besides the clicked legend and I got the code working like that:
legendClick: functionlegendClick(chartContext,seriesIndex,config){const{ series }=config.config;constselectedSeriesItemName=series[seriesIndex].name;series.forEach((seriesItem)=>{constcurrentSeriesItemName=seriesItem.name;if(currentSeriesItemName!==selectedSeriesItemName){chartContext.hideSeries(currentSeriesItemName);}});chartContext.showSeries(selectedSeriesItemName);},
but still the toggleDataSeries must be true so my function is fired.
Activity
[-]To Disable toggle[/-][+]To have event listener enabled and toggleDataSeries disabled in the same time[/+][-]To have event listener enabled and toggleDataSeries disabled in the same time[/-][+]To have event listener enabled and toggleDataSeries disabled for legend in the same time[/+]jkohlin commentedon Mar 18, 2020
Have the same issue. I'd like to handle the toggle myself among other things when I click the legend.
lampewebdev commentedon May 11, 2020
I have the same problem.
I want to hide all the ofter legend besides the clicked legend and I got the code working like that:
but still the
toggleDataSeries
must be true so my function is fired.I would like to stop the toggle and instead of just run my function
junedchhipa commentedon Nov 1, 2020
Sorry for the very late response. Fixed it.