Reputation: 307
I have a graph that mixes column and line charts. I would like to display the legend only for the column chart.
My full code is available here: https://codepen.io/European-DataLab/pen/wVJKrN?editors=0010
Here, is the code for the legend :
// Legend settings
series.name = "Période référence";
series2.name = "Cotisation minimale";
chart.legend = new am4charts.Legend();
chart.legend.position = "top";
chart.legend.align = "center";
In my example, the legend for the two lines is shown. Here is my output:
However, I would like to have this output:
Upvotes: 1
Views: 1130
Reputation: 232
May be setting the hiddenInLegend property to true
series.hiddenInLegend = true;
This should work as per the documentation below
https://www.amcharts.com/docs/v4/reference/series/#hiddenInLegend_property
Upvotes: 1