Hi,
Has anyone had any luck with setting the formatter property for the Labels for any chart type?
I tried for several chart types including Heatmap, and it doesn’t work.
Even setting what is documented as the default doesn’t work:
labels.setFormatter("function(){ return this.value; }");
It seems that this.value is undefined here. I also wanted to define a formatter function in a separate javascript file, loaded with @JavaScript on the component, as e.g. window.myformatter. But then this turned out to be undefined as well from within the function set by setFormatter, even though I could see (using the console in Chrome) that window.myformatter was set.
This feature works fine in HighCharts so it must be a Vaadin Charts issue.
Does anyone have a workaround for this?
Is there perhaps a way to get to the chart object from javascript, so that I can set the correct formatting function using a javascript function after the chart is loaded?
Thanks
Herman Bovens