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

Use thousands separator in single metric view #15026

Merged
merged 4 commits into from Nov 7, 2019
Merged

Use thousands separator in single metric view #15026

merged 4 commits into from Nov 7, 2019

Conversation

katebutler
Copy link

Fixes #14945

@katebutler katebutler added the Needs Review PRs that need a code review label Oct 20, 2019
@katebutler katebutler added this to the 3.13.0 milestone Oct 20, 2019
@tsteur
Copy link
Member

tsteur commented Oct 21, 2019

@katebutler not sure if this only fixes the issue for the generic single widget or for all reports? In this case @mattab meant for example the Acquisitions => Overview report.

In 3.11 this was formatted, eg
image
and in 3.12 this is not the case anymore
image

The solution for this specific widget seems to work but we usually format metrics server side to have consistent formatting everywhere depending on the chosen language / locale AFAIK. Wonder if somewhere maybe some format_metrics: 'all' or similar is missing for example or if there is some other issue.

@tsteur
Copy link
Member

tsteur commented Oct 21, 2019

BTW also possible for example that the |number filter in a sparkline visualisation template is missing.

@katebutler
Copy link
Author

Have found and fixed the Twig macro that was outputting the raw numbers on Acquisitions => Overview.
Regarding the single metric view, I've looked into the API calls that it makes and it fetches the metrics both with format_metrics=all and with format_metrics=0. In both responses the integer values are unformatted. format_metrics=all calls $metric->format($value) for the processed metrics only, and also does currency formatting for other metrics if the column name contains "revenue".

@KarthikRaja1388
Copy link

@tsteur This issue seems to be happening. Customer is using 3.13.6 and this happens when the language is set to Deutsche

image

@tsteur
Copy link
Member

tsteur commented Jul 28, 2020

@KarthikRaja1388 this seems to only apply here to single metric view and not to a regular report. Can you create an issue with steps on how to reproduce it? Be good to check if this applies to any Matomo report or only custom reports. If it's only custom reports then we'd create an internal issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In Comparison mode, numbers are not formatted (thousands separator)
3 participants