Open tmattsso opened 4 years ago
Addendum, using a full function works:
labels.setFormatter("function(){ return this.value + '°'; }");
Apparently arrow functions in JS do not bind 'this'. So the feature does work, but should get some documentation?
the function is as Highcharts say it should work (using this.value)
Can you link where this is said? Just to see how exactly is it documented.
I guess you meant this https://api.highcharts.com/highcharts/legend.labelFormatter
I guess it would be helpful to improve the docs. Maybe add an example or two for setFormatter()
https://github.com/vaadin/vaadin-charts-flow/blob/master/addon/src/main/java/com/vaadin/flow/component/charts/model/Labels.java#L164
We could also mention to avoid arrow functions in formatter docs https://vaadin.com/docs/v14/charts/java-api/charts-configuration.html#charts.configuration.format.formatter
The first row prints 'undefined°' while the second one works.