amCharts 5 - How to customize legend text color

97 views Asked by At

Good morning,

I'm trying to figure out how to change the base color of a chart's legend.

am5 default behaviour is: the label appears dark gray; when clicking on it (the corresponding data is hidden and) the label goes light gray.

The desired behaviour is: the label appears of {stroke} color; when clicking on it (the corresponding data is hidden and) the label goes light gray.

I tried using formatting in legendLabelText, like

legendLabelText: "[{stroke}]{name}[/]"

Unfortunately this is not the solution because the label initially appears of the {stroke} color, but when clicking on it (the corresponding data is hidden so) I expect it to go light gray, but it stays of the {stroke} color.

Here a basic fiddle showing the case: https://jsfiddle.net/fhryacsL/

Thank you everybody in advance!

0

There are 0 answers