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
And i am getting dublicated labels in the legend. So i tried to use generateLabels() callback so i can generate an array of unique labels. But when on click nothing happens, so i tried to use the onClick().
I tried to use like this in the onClick(): this.chart.getDatasetMeta(index).hidden = true
Or this.chart.getDatasetMeta(index).data[index].hidden = true
and then this.update()
But it doesnt hide the bar and bugs and hides all the generated labels
Would appreciate some help , i have been stuck for very long time.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have datasets with dublicated labels in a stacked bar chart:
And i am getting dublicated labels in the legend. So i tried to use
generateLabels()
callback so i can generate an array of unique labels. But when on click nothing happens, so i tried to use theonClick()
.I tried to use like this in the
onClick():
this.chart.getDatasetMeta(index).hidden = true
Or
this.chart.getDatasetMeta(index).data[index].hidden = true
and then
this.update()
But it doesnt hide the bar and bugs and hides all the generated labels
Would appreciate some help , i have been stuck for very long time.
Beta Was this translation helpful? Give feedback.
All reactions