Open iranjith opened 7 years ago
I am unable to disable legend based on the click of another legend in LineBar with focus chart. Below is the code which i am trying to achieve that which is not working in any of the events.
legend: { "dispatch": { legendClick:function(val,i){ console.log(val) }, stateChange:function (val,i) { if(val.disabled[1]==true){ val.disabled[3]=true; } } },
In the legendClick event i am getting current legend item and in stateChange setting disabled to true for a specific legend is not working.
You can use radioButtonMode in order to choose only one of the legend
legend": { "radioButtonMode": true }
hope it helps
I am unable to disable legend based on the click of another legend in LineBar with focus chart. Below is the code which i am trying to achieve that which is not working in any of the events.
In the legendClick event i am getting current legend item and in stateChange setting disabled to true for a specific legend is not working.