charts icon indicating copy to clipboard operation
charts copied to clipboard

Charts 2.0: Labels.formatter function is broken

Open vaadin-bot opened this issue 9 years ago • 1 comments

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

vaadin-bot avatar Jan 13 '15 16:01 vaadin-bot

Originally by Mingjie


During my test, the same code works in column chart but broken in bar chart.

vaadin-bot avatar Mar 20 '15 20:03 vaadin-bot