Localized measurement units for time scale?
See original GitHub issueHi,
is it possible to have localized moment.js patterns for the time units for the time scale (Chart.js V2.0)? Currently, the configuration of time unit patterns (for hour, day, week etc.) are stored in a local variable in the ‘TimeScale’ object, line 25ff. in file ‘scale.time.js’. Unfortunately, they are not really suitable for countries that don’t use the anglo-american style of a time expression. E.g. in Germany we don’t use ‘am’ and ‘pm’ because we’re using the 24h clock here.
It would be cool if it’s possible to overwrite the patterns using the options for the time scale, e.g.
options: {
...
scales: {
xAxes: [{
type: 'time',
time: {
measurements: {
day: '< custom moment.js pattern >'
}
}
}]
}
}
...
}
Kind regards
Werner
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Localize Units of Measurement per User - AIMMS How-To
An AIMMS application can easily localize its interaction with numeric data. This is achieved by selecting the units and conversion factors ...
Read more >Tips for the localization of measurement units in DITA
Best practices for unit conversion Converting measurement units requires more than the translation by a linguist. A Subject Matter Expert should at least ......
Read more >Best Practices for Localizing Measurements and Numeric ...
Localize in bulk – but be careful! Localizing your numeric content all at once can be an excellent way to ensure consistency and...
Read more >Measurement and Unit — Displaying Human-Friendly Content
A formatter provides localized representations of units and measurements. MeasurementFormatter has an instance method string that takes the ...
Read more >Time and Frequency from A to Z, Ti | NIST
Seconds are then counted to measure longer units of time interval, such as minutes, hours, and days. Modern time scales such as UTC...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wwillms try setting
It’s no ideal (since you need to know the unit) but its a start.
@etimberg Wow, that was really fast, awesome! I’ve just integrated that into our project and it works perfectly. Using that configuration:
Thanks a lot, mate!