Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locale separators not applied [help wanted] #14516

Closed
MateuszRomek opened this issue Mar 22, 2021 · 5 comments
Closed

locale separators not applied [help wanted] #14516

MateuszRomek opened this issue Mar 22, 2021 · 5 comments
Labels
en This issue is in English

Comments

@MateuszRomek
Copy link

Version

5.0.2

Reproduction link

https://jsfiddle.net/d63vbuzf/4/

Steps to reproduce

  1. register FR locale (as shown in jsFiddle)
  2. Initialize chart wich .init function and set locale option to "FR"

What is expected?

After adding the FR locale, the values in the tooltip and on yAxis should be separated by spaces.

What is actually happening?

The values are still separated by a comma.


I would like to know if it is possible to use the registerLocale function to set the correct decimal and thousand separators in echarts?

In jsFiddle demo, my goal is to use the FR locale (this is an example country).
I provided the registerLocale function with the object in the same format as in the documentation:
https://github.com/apache/echarts/blob/release/src/i18n/langEN.ts but the values in the chart (tooltip and yAxis) are still separated by a comma, and in this case I would like it to be separated by a space.

Do I still have to use formatter to adjust locale separators?

E.g.

axisLabel: {

 formatter: function(value, index) {}

}
@echarts-bot
Copy link

echarts-bot bot commented Mar 22, 2021

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Mar 22, 2021
@susiwen8
Copy link
Contributor

Well, i18n doesn't affect tooltip format, if you want to format tooltip, you can use tooltip.formatter

@susiwen8 susiwen8 removed bug pending We are not sure about whether this is a bug/new feature. labels Mar 22, 2021
@MateuszRomek
Copy link
Author

So for the values on yAxis and xAxis I also have to use a formatter?

@susiwen8
Copy link
Contributor

So for the values on yAxis and xAxis I also have to use a formatter?

Yes, that's right

@razzeee
Copy link

razzeee commented Mar 6, 2023

Are there any docs, what locale will affect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
en This issue is in English
Projects
None yet
Development

No branches or pull requests

3 participants