How to Show Legend for PlotOptionsErrorbar in Charts 3.0.0


Good morning!

After migrating to Charts 3.0.0, we noticed that there is no option to show the legend of the PlotOptionsErrorbar. Can someone advise me how to make a workaround to show the legend for the PlotOptionsErrorbar?

Thank you in advance!

Best regards,

Hi Adrian,

What do you mean by showing the legend of the error bar?

Can you post an example of how you were seting it before migrating to Charts 3?


Hi Guillermo,

Thanks for the prompt response. Here’s the code snippet:

PlotOptionsErrorBar plotOptionsErrorBar = new PlotOptionsErrorBar();
tooltip = new Tooltip();
tooltip.setPointFormat("Avg: {point.high:,.2f}");

Previously, setShowInLegend() was still available before the PlotOptionsError
was changed to PlotOptionsError
. But not it has been removed and was not even tackled in the Charts Migration (

Best regards,

Thanks, now I get the issue.

You’re right, PlotOptionsErrorbar is missing the showInLegend property. Could you create an issue for the missing API in

In the meantime if you want to show legend for all series you can set the showInLegend porperty using PlotOptionSeries that will affect all series in the plot like this:

        Configuration conf = chart.getConfiguration();
        PlotOptionsSeries seriesOptions = new PlotOptionsSeries();

If you only want to enable it for some series you can enable it for all on the same way and disable for each series you don’t want to show in the legend.

If your case is more complex and you want to show some error bars in the legend and some others not there are other workarounds but it gets a bit more messy.

Hope this helps!


Hi Guillermo,

It worked! Thanks for the prompt action! Will raise a ticket for the missing API. Thank you again, buddy!

Best regards,

Great to hear that it worked!