You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #1645 - bryanburgers:download-graph-numbering, r=sgrif
Use a consistent format for numbers in dl graph
When formatting download numbers in the download graph, use a consistent numbering format for both raw numbers and the rolling 7-day average.
There are cases where the user's local can make inconsistent formatting. Specifically, we use `Number.prototype.toFixed` to format the rolling 7-day average, which always results in a number format that uses a decimal point (e.g. "1234.56"). However, the raw download numbers end up using the locale, which in some places can end up formatting the number with a decimal as the thousands separator ("1.234").
To fix this, use google.visualization.NumberFormat for *both* values, so that they are always consistent.
Fixes#1628
Note that I couldn't fully test this, because even after changing my browser's language to `de`, I would still see English number formatting. I did test it by [forcing the Google Visualization chart locale](https://developers.google.com/chart/interactive/docs/basic_load_libs#loadwithlocale), but I'm still not 100% sure if the numbers will show in a German format for a German viewer.
I am, however, sure that they will always show in a *consistent* format.
0 commit comments