-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Graphs should display a SELECT to choose the metrics to plot (visits, pages, etc.) #1820
Comments
Note: modules could also define the default metrics to plot. For example, under "Goals > By segment", when clicking on the graph icon, by default the Goal Conversions count would be plotted (rather than the default Visits for others). |
Now that we support Custom Date Range, by default Piwik will plot the "days" within the range. However it would be cool / useful to be able to plot Weekly / monthly / yearly stats for the selected date range. |
(In [5421]) refs #1820 added metrics picker to more core reports. some language updates to make metrics consistent and short. new api methods for comparing metrics in Referers and VisitsSummary. minor tweaks. |
(In [5422]) refs #1820 added expected test output for new method Referers.getVisitsPerRefererType |
Feedback
Code review
Cheers! |
Replying to matt:
The text "Metrics to plot" is quite long and we would have to ensure that there is enough space. This would mean that the legend would have very little space when evolution graphs are displayed in reports with two columns. When there's not enough space, the text "metrics to plot" appears left of the icon at the moment. But that only works because the popover is covering part of the legend.
I came up with another solution. The metrics picker can now select rows and columns. See the Referrers report after my next commit (coming in a few minutes). This way, we don't need the new API method anymore. I will revert.
This refers to |
(In [5443]) refs #1820 reverted Referers.getVisitsPerRefererType |
(In [5444]) refs #1820 added row picker to evolution graphs |
(In [5445]) refs #1820 metrics picker for goal reports |
Replying to matt:
I added a picker for conversions and conversion rate to goal reports. I don't have ecommerce data set up but the changes might apply to ecommerce as well. Can you please check? It would be nice to compare the conversions of different goals but that would be quite hard to do and this has already taken way more time than I thought. We can add that to the list of future improvements. I would like to create a list in the ticket description if you give me the rights to do so. |
Great code updates, nice! Code review:
Note: You should now have permission to edit tickets Keep up the great UI improvements Timo! |
(In [5447]) Refs #1820 Timo sorry for this feedback, you're right in this case magic numbers are acceptable, adding a small comment to clarify |
Replying to matt:
But what if you have three metrics or a language like German where labels are 1.5-2times as long? I made the icon always visible but faded out. This should improve the visibility of the feature as well.
The column translation was set to "Visits (from Search Engines)" for example. That doesn't work with multiple rows because the label needs to be different in each row. The UI code handles that by default if a label is set in the column that should be plotted. The text is now "Search Engines (Visits)". |
(In [5449]) refs #1820 misc improvements to the metrics picker |
(In [5450]) refs #1820 updating all languages and tests after removing language string |
(In [5451]) refs #1820 metrics picker for pie and bar chart |
For pie charts, only one metric can be plotted. The picker is rendered as a select in the data table footer. For bar charts, we can plot multiple metrics - picker is rendered like for line charts. |
(In [5453]) refs #1820 metrics picker for pie/bar charts in more reports |
Great stuff, exciting to see this feature coming together and implemented nicely in the new graph framework. Glad to see already the first major improvements to our "old graphs"!! :)
Also, no problem not to include abandoned cart metrics for now. Feedback:
|
(In [5456]) Refs #1820 Adding picker in few reports |
(In [5457]) refs #1820 goal metrics in picker, normal metrics picker for pie chart, improved unit / tooltip handling for bar and pie chart |
(In [5459]) refs #1820 metrics picker shows on hover |
ohhh close to perfection ;) |
Good idea to reuse this method. There is nb_conversions, nb_visits_converted and revenue. Can you explain the rationale behind the first two? I get the difference between the metrics but in a test setup I have, there are conversions but no visits converted and I don't know why. If only of them is present for each report, we should only enable the available metric. But how can we find out, which is "active"?
Ecommerce conversions are tracked with idgoal=ecommerceOrder, which means they are not in the main report but in the goals dimension. We can add them later together with the conversions for user defined goals. At the moment, I don't have time for that because it's a largish change.
I reused the new picker. The legend is displayed in gray since there are no series colors. Apart from that, it looks like the legend in the other reports. This way, the user recognizes the UI elements instantaneously and we can reuse almost all the code.
The metric name is in the export done via JS. It's not in the static image graphs rendered by PHP. That's a task for the authors of the ImageGraph plugin.
The widgets have |
Code review:
|
(In [5460]) Refs #1820 Updating icon for slightly cleaner version |
I didn't solve this myself because I don't understand the effects either. If you remove the line, some reports don't work anymore. Could you maybe find out why?
Can you explain this in more detail?
Why do we need |
(In [5461]) refs #1820 metrics picker ui improvements |
(In [5462]) refs #1820 new icon should be more opaque, metrics picker on dashboard |
How about closing the popover and repolotting on click? Since the popover now opens on hover, it's easy to open it multiple times if you want to do more than one modification. |
That sounds like the best of both worlds indeed! Except, don't remove the graph on Untick, unless leaving the popover. This should be possible: 1) Visit is plotted 2) Want to plot Revenue only, untick Visit, popover stays open, tick Revenue 3) popover closes and revenue only is loaded on the graph Does it sound good to you? PS: the Pie chart picker at least could close/replot on click on the radio button.
I think it was needed to hide the images used for "column sort", that would otherwise appear in the widget on the next right out of nowhere. But, if you remove it, maybe you can find a better solution to hide these sort icons, than use overflow hidden? edit: thanks for all follow up to the review! |
(In [5464]) Refs #1820
|
(In [5465]) Refs #1820 Fixing few bugs when plotting and switching views, and fixing sorting issue with generic filters |
Sorting columns in tables works just fine without overflow:hidden (at least for me). If I remember correctly, I changed the markup for that when introducing column documentations. Might that have done the trick? Do you remember in which browsers the problem occurred? Please check again.
Thanks for all the review! Polishing takes a lot of time but it definately wort it. |
(In [5471]) refs #1820 replot on metric select |
In IE7, the icon doesn't have a transparent background. We used to do that wie PIE, but I can't find it anymore. Am I blind or did we remove the library? How can we do transparency in IE7 now? |
Nearly there :)
|
Attachment: Overflow displayed in ff8 |
Ok, overflow:hidden is set on the widgets again. I worked around the problem by appending the popover to the body, not the graph. This makes the JS a little harder to understand but I couldn't find another way. I also did cross-browser optimization. It works almost perfect in IE7 (the almost being a feature because it annoys IE7 users into updating) and perfect in IE89, Safari, Chrome and Firefox. |
(In [5472]) refs #1820 cross-browser, dashboard optimizations, misc tweaks |
(In [5473]) refs #1820 belongs to last commit |
Everything should be done now (except the two things from the description). If nobody finds more bugs, I'll leave it like this for now. |
Great the overflow works well. I don't really understand these hacks but it looks good ;) One last (I tried fixing it but didn't make it). The text is not aligned well with the checkbox, it is slightly below which looks not as best as it should. Feel free to close the ticket! |
Replying to matt:
The popover is put into the body, therefore it won't be cut off by the widget container. The JS is pretty comlex already, imagine what a mess it would be if we would plot in the background.
That depends on which browser you use. I tried to find a configuration that works well in all browsers. I had to sacrifice a single pixel here and there to achieve that. So, let's close the ticket. Yay! I still leave the future improvements in the description in case somebody wants to reopen it and work on those (maybe future me). |
See Graphs picker wish list & improvements |
(In [5533]) refs #1820 unique visitors can only be selected for period=day in referrer overview |
(In [5580]) refs #1820 working around firefox css bug for metrics picker |
x |
It would be great for usability, reporting efficiency and consistency, that all graphs in Piwik have possibility to select which metrics to plot.
In addition to the current implementation, the following features would be nice:
The text was updated successfully, but these errors were encountered: