charts
charts copied to clipboard
Charts 2.0: Labels.formatter function is broken
Originally by HermanBovens
I tried for several chart types including Heatmap to set my own custom formatting functions, and it doesn't work.
Even what is documented as the "default function" doesn't work:
labels.setFormatter("function(){ return this.value; }");
fails because this.value is undefined.
I also tried defining my own custom function in a separated javascript file (loaded with @JavaScript
), added as a property on window
, but that property also turned out to be undefined inside the label's formatter function. I did check with the console in chrome and it was really defined on the window
object.
Imported from https://dev.vaadin.com/ issue #16197
Originally by Mingjie
During my test, the same code works in column chart but broken in bar chart.