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
{{ message }}
Repository navigation
[Bug]: Labels stay visible after closing pie-part via HTML legend #1158
When using a custom legend (html) and closing elements in pie charts, the labels on the chart stay visible.
I'm having the same issue with my react-chart-js code. I cant seem to find a way to address the labels on the chart to vanish when the arc itselfs gets hidden.
My code for the legendclick:
`
const handleLegendClick = (e,datasetIndex,ref) => {
This opens an closes the pie element, but the label stays visible when the piece of the pie is closed.
Standard legend also hides the label after closing it.
changed the title [-][Bug]: Labels stay visible after closing pie-part via HMTL legend[/-][+][Bug]: Labels stay visible after closing pie-part via HTML legend[/+]on Mar 16, 2023
Closing: this is about how Chart.js itself behaves or is configured, while react-chartjs-2 passes data, options and plugins to Chart.js as they are. The Chart.js docs cover it: https://www.chartjs.org/docs/latest/ If it turns out to be a bug, please report it to Chart.js: https://github.com/chartjs/Chart.js/issues
Activity
[-][Bug]: [/-][+][Bug]: Labels stay visible after closing pie-part via HMTL legend[/+][-][Bug]: Labels stay visible after closing pie-part via HMTL legend[/-][+][Bug]: Labels stay visible after closing pie-part via HTML legend[/+]dangreen commentedon Nov 30, 2026
Closing: this is about how Chart.js itself behaves or is configured, while react-chartjs-2 passes
data,optionsandpluginsto Chart.js as they are. The Chart.js docs cover it: https://www.chartjs.org/docs/latest/ If it turns out to be a bug, please report it to Chart.js: https://github.com/chartjs/Chart.js/issues