Chart addon

I would like to allow my app user to add/remove chart dataLabels for All charts on their dashboard; forcing a redraw similar to when changing themes say from VaadinTheme to GridTheme. How may I achieve this? How does changing themes work under the hood, what is the source code that does this?
I know I could redraw a single chart individually by resetting its plot options and then redrawing it
PlotOptionsColumnRange columnRange = new PlotOptionsColumnRange();
columnRange.setDataLabels(new Labels(true)) //
columnRange.setDataLabels.setFormatter(/* some javascript about this.y */)

But I want to do it for All charts on a dashboard like having a Listener that does
ChartOptions.get().setTheme(new VaadinTheme())
ChartOptions.get().setTheme(new GridTheme())
and viceversa

Maybe I can reset the plotOption dataLabels then reset the theme to force a redraw with the new dataLabel state?
Please advise…

Hi Matt.

You can easily hide the dataLabels with basic css. For example, if you can apply a stylename “dataLabelsHidden” to you UI, then you could write in your stylesheet a specific enough rule for hiding the labels. I quickly tested the demo with this:

.v-ui.dataLabelsHidden g.highcharts-data-labels {
    display: none;

This way you won’t have to update all your charts when the labels on/off is triggered.