mirror of https://github.com/zulip/zulip.git
stats: Remove complex regex badly implementing toLocaleString.
This regular expression to add commas to a large number is hard to read and produces less useful output than using the standard browser API for doing this. Fixes #20416.
This commit is contained in:
parent
fc8db93f36
commit
e9d80390cc
|
@ -593,7 +593,7 @@ function populate_messages_sent_by_message_type(data) {
|
|||
for (let i = 0; i < plot_data.labels.length; i += 1) {
|
||||
labels.push(plot_data.labels[i] + " (" + plot_data.percentages[i] + ")");
|
||||
}
|
||||
const total_string = plot_data.total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
const total_string = plot_data.total.toLocaleString();
|
||||
return {
|
||||
trace: {
|
||||
values: plot_data.values,
|
||||
|
|
Loading…
Reference in New Issue