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

Intl support #23

Closed
sassomedia opened this issue Sep 30, 2021 · 4 comments
Closed

Intl support #23

sassomedia opened this issue Sep 30, 2021 · 4 comments
Labels
enhancement Feature request

Comments

@sassomedia
Copy link

I'm in the process of converting am4 to am5 charts and one thing we heavily depend on is Intl support. I don't see this currently documented or supported in am5 and when I try something equivalent to the code in am4:

chart.dateFormatter.dateFormat = { month: "short", day: "numeric" };
chart.dateFormatter.intlLocales = userLocale;

none of this works in am5:

root.dateFormatter.set("dateFormat", { month: "short", day: "numeric" }); // "dateFormat" only supports Strings
root.dateFormatter.set("intlLocales", userLocale); // "intlLocales" is not an available setting on "dateFormatter"
root.locale = am5locales_en_US; // this seems to only be for manually imported locales

I hope I'm missing something or maybe it's just not part of the beta but will be in the release version, yes?

@martynasma martynasma added the enhancement Feature request label Sep 30, 2021
@martynasma
Copy link
Collaborator

We don't have Intl support, yet. But we plan to add it. Will keep you posted.

@sassomedia
Copy link
Author

Sounds good, thanks for the confirmation!

@martynasma martynasma added the in next release Implemented. Available soon. label Oct 1, 2021
@martynasma
Copy link
Collaborator

Implemented in 5.0.0-beta.29.

[5.0.0-beta.29] - 2021-10-01

Added

  • Wherever date or number format can be set (DateFormatter, NumberFormatter, DateAxis, ValueAxis, Exporting) it can now be set as Intl.DateTimeFormatOptions (for date format) or Intl.NumberFormatOptions (for number format) object in additional to string-based format. More info.
  • New list type ListAutoDispose added.

Changed

  • XYCursor will now ignore mouse movement if chart is obstructed by other element, unless zoomin/panning.
  • series, xAxes, and yAxes on an XYChart are now ListAutoDispose, which means that removing items from those lists will automatically dispose them. Set autoDispose = false on those lists if you are planning on removing and reusing items.

Fixed

  • Sunburst nodes were shown on drill-down when they were not supposed to in some cases.
  • Hierarchy node elements were ignoring templateField.
  • It was impossible to move XYChart scrollbars to some other container.
  • Fixed memory leaking when scrolling LineSeries, and when disposing series or other items.
  • XYCursor was not firing selectended event if behavior was set to "selectX", "selectY", or "selectXY".
  • XYCursor was hiding selection when when behavior was set to "selectX", "selectY", or "selectXY".
  • SerialChart.series.clear() was not working properly.

Full change log.

Download options.

Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.

@martynasma martynasma removed the in next release Implemented. Available soon. label Oct 1, 2021
@sassomedia
Copy link
Author

Awesome, that was fast! Just tried it, works great! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request
Projects
None yet
Development

No branches or pull requests

2 participants