Skip to content
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

Option to disable seriesPicker for jqPlot #3316

Closed
chmielot opened this issue Aug 13, 2012 · 7 comments
Closed

Option to disable seriesPicker for jqPlot #3316

chmielot opened this issue Aug 13, 2012 · 7 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone

Comments

@chmielot
Copy link

Use case:
Using Widgetize-Plugin to display certain widgets on a website:

<div id="widgetIframe">
<iframe width="100%" 
    height="350" 
    src="http://host/piwik/index.php?module=Widgetize&action=iframe&columns[]=nb_visits,nb_pageviews&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=1&period=month&date=today&disableLink=1&widget=1&seriesPicker=0" 
    scrolling="no" 
    frameborder="0" 
    marginheight="0" 
    marginwidth="0" 
    id="visitssum"></iframe>
</div>

This widget should be a limited version of the real piwik widgets, so you want to disable other series for the graph. Currently there is no option to disable the series picker in jqPlot, it is always activated as long as there are other series types for the requested graph.

I am aware of the fact that the URL can be manipulated to show other graph types. This is not important as the end user is assumed to not be able to do it. On the other hand, this could be prevented by apache rules for example.

This patch allows to set request parameter "seriesPicker" to 0 to disable the seriesPicker.

@chmielot
Copy link
Author

Attachment:
3316-seriespicker.diff

@chmielot
Copy link
Author

Please review

@chmielot
Copy link
Author

The implementation just worked for evolution graphs. Pie charts overwrite the settings in core/Controller.php.
New implementation sets selectableColumns in core/ViewDataTable/GenerateGraphData and affects all types of graphs.
This is a new patch which doesn't revert the old changes. Please tell me if a patch with reverts is needed.

@chmielot
Copy link
Author

Attachment: Correct patch!
3316-seriesPicker_v2.diff

@mattab
Copy link
Member

mattab commented Oct 19, 2012

Please review the patch to apply the best solution.

Also update & add the new parameter in the Analytics Widgets doc.

parameter name should be "showSeriesPicker" ?

@chmielot
Copy link
Author

matt, how can I update the doc? Shall I review the patch again or do you mean somebody else?

@diosmosis
Copy link
Member

(In [7537]) Fixes #3316, applied modified version of @chmielot's patch to add showSeriesPicker query parameter which can be used to enable/disable the series picker on graphs.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants