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

API (3D) pie charts with wrong legend / label. #3956

Closed
anonymous-matomo-user opened this issue May 25, 2013 · 1 comment
Closed

API (3D) pie charts with wrong legend / label. #3956

anonymous-matomo-user opened this issue May 25, 2013 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

I noticed that (3D) pie charts which have discrete number of elements have wrong last item label in some cases. This bug is at least from 1.11 to now (1.12-b20). Example :

1.) I use following code to generate pie chart of Visits by day of week (in my case there is afterwards some additional image post processing):

wget "http://piwik.###############/index.php?module=API&method=ImageGraph.get&idSite=##&apiModule=VisitTime&apiAction=getByDayOfWeek&token_auth=#########&graphType=3dPie&period=month&date=today&width=500&height=250&column=nb_visits&aliasedGraph=1&showLegend=1&filter_truncate=7" > weekdays.png

2.) If value of "filter_truncate" is 5 (default value) API gives correct result, because pie chart merges less visited 2 days under "Others" label. This behavior is expected and correct.
3.) If you change "filter_truncate" to 6 then you have 6 most visited days of week last is under "Others" label what is also correct.
4.) If you change "filter_truncate" to to 7 or more all item labels should have correct value and no "Others" should be displayed, because there is no other items.

In general when drawing (3D) pie charts with API in cases where we have discrete number of items known in advance, if "filter_truncate" is equal or more to number of discrete number of items last item should have correct label instead of "Others".

You can observe http://www.si-vreme.com/o-portalu/statistika with filter_truncate=7 last pie chart.

@anonymous-matomo-user
Copy link
Author

In 047586c: Fixes #3956, don't rename last piece of data to Others in Pie static graph (in ImageGraph) since logic is handled by truncate filter.

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12 - The Great 1.x Backlog milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

1 participant