Allow bar graph as well as line graph #2608

Closed
gka opened this Issue Aug 3, 2011 · 9 comments

Comments

Projects
None yet
5 participants
@gka
Member

gka commented Aug 3, 2011

Quick explanation: line charts are for continuous data, bar charts are for discrete data. The numbers of visits per day is a classic example of discrete data and therefore a bar chart would be the right chart.

The current line chart falsely indicates that their are more values between the displayed point. But, for instance, if there were 10 visits on Monday and 20 visits on Tuesday, than you can't say that there were 15 visits in the night between both days or something.

I just investigated in how much work it would take to fix this bug. Fortunately, it can be done in seconds. We just need to change the $graphType to "bar" in line 21 of /core/ViewDataTable/GenerateGraphHTML/ChartEvolution.php

You can see a running demo here: http://piwik.vis4.net/

@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder Aug 11, 2011

Contributor

I understand/agree, but I'll let Matt chime in since this has been the way since the beginning.

Out of curiousity, I increased the number of data points, and it still looked ok. (The only problem is X-axis labels.)

Contributor

robocoder commented Aug 11, 2011

I understand/agree, but I'll let Matt chime in since this has been the way since the beginning.

Out of curiousity, I increased the number of data points, and it still looked ok. (The only problem is X-axis labels.)

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Aug 21, 2011

Member

While I agree with the explanation, I find that the bar chart graph is more "heavy weight" in term of visual impact, I find there are too many dark pixels and it looks less nice.

Note: there is a small bug that the graph does not use 100% width.

At this stage I would prefer not to change but maybe there are ways we can make the bar chart looking nicer.... what are your thoughts?

Member

mattab commented Aug 21, 2011

While I agree with the explanation, I find that the bar chart graph is more "heavy weight" in term of visual impact, I find there are too many dark pixels and it looks less nice.

Note: there is a small bug that the graph does not use 100% width.

At this stage I would prefer not to change but maybe there are ways we can make the bar chart looking nicer.... what are your thoughts?

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Sep 17, 2011

Member

Please comment if any feedback

Member

mattab commented Sep 17, 2011

Please comment if any feedback

@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder Sep 18, 2011

Contributor

Maybe an alternate chart that contains both bars for discrete values + a spline function for a continuous line. (see also #1718)

Contributor

robocoder commented Sep 18, 2011

Maybe an alternate chart that contains both bars for discrete values + a spline function for a continuous line. (see also #1718)

@gka

This comment has been minimized.

Show comment
Hide comment
@gka

gka Sep 18, 2011

Member

I think this is good idea. Will try to investigate into this in the future. Another idea would be to allow users to change from line to bar charts and to store the choice in the user settings.

Member

gka commented Sep 18, 2011

I think this is good idea. Will try to investigate into this in the future. Another idea would be to allow users to change from line to bar charts and to store the choice in the user settings.

@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder Sep 18, 2011

Contributor

Being able to switch between line and bar is actually implied by the current UI. A 'bar chart' icon is visible in the chart footer, while its hover text reads "vertical bar graph". Clicking on it just refreshes the line graph. This is a bug.

+1 to implement greg's idea in comment:5. Otherwise, simply remove the bar chart icon from the footer.

Contributor

robocoder commented Sep 18, 2011

Being able to switch between line and bar is actually implied by the current UI. A 'bar chart' icon is visible in the chart footer, while its hover text reads "vertical bar graph". Clicking on it just refreshes the line graph. This is a bug.

+1 to implement greg's idea in comment:5. Otherwise, simply remove the bar chart icon from the footer.

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Oct 18, 2011

Member

Good point, we could change the "Bar chart" icon for a "line chart" icon (example) for the "evolution" graphs footer.

Member

mattab commented Oct 18, 2011

Good point, we could change the "Bar chart" icon for a "line chart" icon (example) for the "evolution" graphs footer.

@anonymous-piwik-user

This comment has been minimized.

Show comment
Hide comment
@anonymous-piwik-user

anonymous-piwik-user Sep 1, 2013

In 967c398: Refs #2608, add display property to evolution graph allowing it to be plotted as a bar graph.

In 967c398: Refs #2608, add display property to evolution graph allowing it to be plotted as a bar graph.

@diosmosis

This comment has been minimized.

Show comment
Hide comment
@diosmosis

diosmosis Sep 2, 2013

Member

The bar graph looks a bit off, but this will be fixed in #3089. Closing this ticket.

Member

diosmosis commented Sep 2, 2013

The bar graph looks a bit off, but this will be fixed in #3089. Closing this ticket.

@gka gka added this to the Future releases milestone Jul 8, 2014

@gka gka added T: Bug labels Jul 8, 2014

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment