charts icon indicating copy to clipboard operation
charts copied to clipboard

Charts 4.2.0: cannot customize From/To labels

Open mvysny opened this issue 5 years ago • 2 comments

I expect the following code to customize the From/To labels in the range selector, but it doesn't work and the default "From"/"To" strings are shown anyways:

        configuration.getLang().setRangeSelectorFrom("F2");
        configuration.getLang().setRangeSelectorTo("T2");

Screenshot from 2020-12-17 16-39-12

I'll attach an example app shortly.

mvysny avatar Dec 17 '20 14:12 mvysny

vaadin-app.zip

Simply unzip the app and run it via mvn -C clean package jetty:run

mvysny avatar Dec 17 '20 14:12 mvysny

Hi @mvysny,

You may be able to set it through ChartOptions like so:

Lang lang = new Lang();
lang.setRangeSelectorFrom("F2");
lang.setRangeSelectorTo("T2");

ChartOptions options = ChartOptions.get();
options.setLang(lang);

This will set the same value for all charts on the project.

DiegoCardoso avatar Dec 23 '20 14:12 DiegoCardoso