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

Improved color managment in static PNG graphs #3792

Open
julienmoumne opened this issue Mar 4, 2013 · 1 comment
Open

Improved color managment in static PNG graphs #3792

julienmoumne opened this issue Mar 4, 2013 · 1 comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@julienmoumne
Copy link
Member

The Static PNG Graphs APIcurrently supports a maximum of 6 colours (PieGraph.php#L34 & GridGraph.php#L54).

Trying to plot more than 6 elements (filter_limit > 6 or $columns => 6) results in the following notices :


 Notice:</strong> <i>Undefined index: GRAPHIC_COLOR9</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>80</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR9</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>270</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR8</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>80</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR8</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>270</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR7</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>80</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR7</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>270</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR10</i> in <b>/home/piwik/www/plugins/ImageGraph/StaticGraph/GridGraph.php</b> on line <b>80</b>
      7             Notice:</strong> <i>Undefined index: GRAPHIC_COLOR10</i> in <b>

The API should either :

  • output an explicit error message
  • support more colours, 10 should be enough, with an explicit error message when trying to plot more elements
  • support an unlimited amount of colors
@mattab
Copy link
Member

mattab commented Mar 11, 2013

a Proposal:

  • define 10 colors
  • Throw error if more than 10 plotted (does not make sense to do that anyway)

@julienmoumne julienmoumne added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
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

2 participants