Selecting metrics in a custom evolution chart

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(){
$this->GetDateRange();
$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.

Dr Peter J Bleackley
Data Analyst
MultPlx

We should document this in the “ExampleUI” plugin. Please create a ticket in dev.piwik.org

I’ve added ticket #3008 for this. However, it would be really helpful if somebody could post a quick note here about how to do it.

Dr Peter J Bleackley
Data Analyst
MultPlx

If you are in a hurry please consider contracting Piwik consultant: http://piwik.org/consulting/
we are quite overloaded (to say the least)

After some further investigations, I’ve changed my code to


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

 }

The chart now displays a selector, but when I deselect particular lines, nothing happens.

Dr Peter J Bleackley
Data Analyst
MultPlx

Please post in the ticket directly for ease of follow up

Happy New Year! If you are still using Piwik and interested in the awesome new feature of “Creating a Custom Segment in Piwik and apply to reports in Real time!” we need YOUR help, with a little or big donation at: http://crowdfunding.piwik.org/custom-segments-editor/

This will allow to dynamically add or edit, a new set of rules for example “Show all visitors from USA and using Firefox and using Google”. This will be done via a simple to use interface. See screenshots and more info here: http://crowdfunding.piwik.org/custom-segments-editor/

We are crowd funding the future of Piwik and this feature in particular. With your help we can do it.

Thanks

Matthieu