syampillai / SOCharts

A wrapper around the "echarts" JavaScript library to use it as a Vaadin component.
Apache License 2.0
27 stars 11 forks source link

Option to set locale for formatting numbers and dates #17

Closed norbertroamsys closed 1 year ago

norbertroamsys commented 1 year ago

We wanted to set and use a different locale for controlling the output of various axis texts and also the tooltip. Is there a way to do this? A workaround is also welcome ...

We checked Apache echarts and it seems that it is possible as of version 5.0.0 by using echarts.init(..., { opts: ... locale: 'de_DE'}) - see: https://echarts.apache.org/en/api.html#echarts.init

Please note that we are currently using so-charts version 2.3.0 because of a dependency to Java 11. But as far as I see there is also no support in version 3.2.1

Thanks for your feedback and support!

syampillai commented 1 year ago

I added SOChart.setLanguage(...) in version 3.2.2 As per the echarts documentation, only a few languages are supported. (You can contribute new languages in echarts and I can add those in future versions). Currently supported languages Anyway, you could set text values and labels in any language irrespective of the language set.

norbertroamsys commented 1 year ago

Hi @syampillai, thank's a lot for your quick support!

Regards from Luxemburg 👍