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

Number format thousands, decimal, abbreviate large numbers l10n #4114

Closed
gka opened this issue Sep 4, 2013 · 7 comments
Closed

Number format thousands, decimal, abbreviate large numbers l10n #4114

gka opened this issue Sep 4, 2013 · 7 comments
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@gka
Copy link
Contributor

gka commented Sep 4, 2013

For sites with a lot of visits the numbers at some point get really hard to read. So instead of "22990872 visits" why not show "22.99 mio visits"?

@gka
Copy link
Contributor Author

gka commented Sep 4, 2013

Attachment:
screenshot 2013-09-03 um 23.57.23.png

@halfdan
Copy link
Member

halfdan commented Sep 4, 2013

Maybe we could just display it as 22,990,872 (or 22.990.872 for German)?

@mattab
Copy link
Member

mattab commented Sep 6, 2013

it would be awesome if we managed to run all numbers being output in Piwik. For example we could have a prettyNumeric() method which may use localeconv() function to get thousands+decimal separator for current selected language, and then use number_format() to build the string.

function number_format_locale($number,$decimals=2) {
    $locale = localeconv();
    return number_format($number,$decimals,
               $locale['decimal_point'],
               $locale['thousands_sep']);
 }

we could then apply this prettyNumeric() filter to all numbers found in the output of some key twig templates where applying this prettify makes sense.

prettyNumeric() could also contain logic to abbreviate large numbers eg. 12.5M instead of 12,500,000

@hpvd
Copy link

hpvd commented Mar 4, 2014

for nice looking numbers especially in columns see also: #4789

@gka gka added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab removed the P: normal label Aug 3, 2014
@mattab mattab added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. and removed c: UI - UX (AngularJS twig less) labels Oct 12, 2014
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Apr 21, 2015
@mattab mattab modified the milestones: Short term, Mid term Sep 23, 2015
@mattab
Copy link
Member

mattab commented Oct 2, 2015

FYI: Number formatting is finally implemented in Piwik in #8857 ❤️

@mattab mattab removed the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Oct 2, 2015
@mattab mattab modified the milestones: Mid term, Short term Oct 2, 2015
@sgiehl
Copy link
Member

sgiehl commented Jan 6, 2016

Can we close this, or are there stills tasks open for improving number formats?

@mattab
Copy link
Member

mattab commented Jan 7, 2016

Well done Stefan!

@mattab mattab closed this as completed Jan 7, 2016
@mattab mattab modified the milestones: 2.16.0, Long term Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

5 participants