Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
anonymous-piwik-user opened this Issue · 1 comment

1 participant

@anonymous-piwik-user

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-piwik-user

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.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.