Piwik custom plugin development / JQPlot (specifically: seriesPicker in Piwik 1.7.1)


#1

I have a custom plugin for the Piwik analytics tool, written by a former colleague of mine, that stopped working in Piwik 1.7.1.

Like Piwik, the plugin is written in PHP and utilizes JQPlot to display graphs on various logged metrics.

Since the update to V1.7.1, the interface apparently changed and JQPlot now requires a parameter called “seriesPicker”. If I don’t pass this parameter, I get an error “this.seriesPicker is undefined”. If I leave it empty, the graph appears but without any data.

The backend remains the same, all the data I want the graph to show is there and correct. I believe said seriesPicker is the only problem in my code, but I can’t find any documentation at all on it, neither the JQPlot homepage nor the Piwik homepage mention it in any way.

What I did find out is that the seriesPicker has two options “multiSelect” and “selectableColumns”. The latter one is unclear to me.

Code sample:
JQPlot object generated by a PHP script


    var plot = new JQPlot({
	"params":{
		"axes":{
			"xaxis":{
				"labels":['.$lables.'],
				"ticks":['.$ticks.']
			},
			"yaxis":{
				"ticks":['.$yticks.']
			}
		},
		"series":[{
			"label":"'.$unit.'",
			"internalLabel":"'.$unit.'"
		}],
		"seriesColors":["#5170AE","#CC3399","#9933CC","#80a033","#FD9816","#246AD2","#FD16EA","#49C100"]
	},
	"data":['.$data.'],
	"tooltip":{"yUnits":""},
	"seriesPicker":{
		"multiSelect":"true", // either true or false, I presume
		"selectableColumns":"'.$selectableCols.'" // what goes here?
	}});

If anyone knows how to set up / configure the seriesPicker it would really help me out.

Thanks four your time.