@anonymous-piwik-user opened this Issue on March 5th 2012

I have created a plugin to generate an evolution chart for some custom data. The code is as follows

class Piwik_MultplxAnalytics_Controller extends Piwik_Controller{

function CustomerJourneysGraph(){
$view = Piwik_ViewDataTable::factory('graphEvolution');
$view->init( $this->pluginName, __FUNCTION__, 'MultplxAnalytics.GetCustomerJourneys' );
return $this->renderView($view);



This creates a chart with several lines on it. I would like to be able to turn those lines on and off individually for clarity. I've installed Piwik 1.7, and I know that there's a way of doing it with Piwik 1.7, but after 2 days of examining the codebase, I've not been able to work out how to do it. I think I need to invoke the function Piwik_ViewDataTable_GenerateGraphData_ChartEvolution->addRowPicker(), but I can't work out how to access this from my code, of what to use as its argument.

Please create some documentation for this
Keywords: charts,evolution,picker,documentation

@BeezyT commented on March 6th 2012 Member

The graphs provide two mechanisms:

  1. A metrics picker (that appears on all core graphs) to select the available metrics.
  2. A mechanism where external series pickers can hook into. We're still working on this one for a feature called row evolution.

Which of them do you want? The picker inside the graph or toggeling the series from the outside?

@mattab commented on March 6th 2012 Owner

I think mechanism 1) Metrics picker
would be the easiest and the feature that plugin developers would re-use.

@anonymous-piwik-user commented on March 14th 2012

I've now modified the code to read

function CustomerJourneysGraph(){
   $view = $this->getLastUnitGraphAcrossPlugins( $this->pluginName,  __FUNCTION__, $shops, $shops, false, 'MultplxAnalytics.GetCustomerJourneys' );
   return $this->renderView($view);


This creates a chart with a series picker, but when I deselect individual lines, nothing happens.

@mattab commented on March 21st 2012 Owner

See also another report maybe related? where a user does not know how to fix his code http://forum.piwik.org/read.php?6,87442

@mattab commented on March 11th 2013 Owner

we'll review this as well as other aspects of plugins API in next few months.

This Issue was closed on March 11th 2013
Powered by GitHub Issue Mirror