vaadin / vaadin-charts-flow

Vaadin Charts for Flow
Other
7 stars 11 forks source link

Charts 6 -> 9 migration: TypeError: axis.labelFormatter.call is not a function #385

Closed werwolfberlin closed 4 years ago

werwolfberlin commented 4 years ago

Try to migrate https://demo.vaadin.com/charts4/#MultipleAxes

replace getThemeColors();

by {SolidColor.ALICEBLUE, SolidColor.BEIGE, SolidColor.BLUEVIOLET, SolidColor.DARKOLIVEGREEN};

Observation: the application shows a black rectangle and an error: image

alvarezguille commented 4 years ago

This is actually an issue when migrating from Charts 4 for Vaadin 8.

Charts 4 had a more relaxed syntax for formatter function where labels.setFormatter("this.value +' mm'"); worked.

Starting from Charts 6 the following alternatives work:

This is not specific to charts 9, and needs better documentation. Closing as duplicate of #340