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
Feature Request: Localization of datetime #35
Comments
@arkhenstone Tested the date.toLocaleString() function and it looks like it returns the full date and time in this format I suggest, using the and here is an example of how you can use .toLocaleString() in |
I checked your example and the I think it should pass the raw value to the formatter |
Ah! right. |
I have provided an additional parameter in Example: xaxis: {
tickAmount: 6,
labels: {
formatter: function(val, timestamp) {
return moment(timestamp).format("DD MMM YYYY");
}
}
}, Note that here - tickAmount will respond to the value you provide. With this update, I have also provided localization options which you can set in So, from now on: you will be able to set your preferred language strings in some elements. Cheers |
Can we close this if I have not missed anything regarding localization? |
There is some UI elements in apexcharts that are locked into english, like date format. Even if we can configure the way it's displayed, we can't have the config format the date in another language.
Just let the datetimeFormatter object takes the localization token.
Vanilla JS takes it like with a simple string like 'FR-fr' as parameter of toLocaleString()
MDN toLocaleString function documentation
The text was updated successfully, but these errors were encountered: