Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#2670 closed Bug (fixed)

Metadata improvements to generate static graph image URL

Reported by: matt Owned by:
Priority: major Milestone: 1.6 Piwik 1.6
Component: Core Keywords:
Cc: Sensitive: no

Description (last modified by matt)

Improve Metadata output to offer the URL to the graph in the metadata, for Piwik mobile and PDF integration. Notes:

  • Metadata will specify the parameters: idSite, period, date, apiModule, apiAction but also:
    • graphType
      • use line graph for "Metadata without dimension" VisitsSummary.get, Goals.get, with default metric
      • use bar graph (or Pie chart) for "Metadata with dimension" (keywords, countries, etc)
    • column, default to the "main" metric for evolution graphs?

So Piwik Mobile will define: $width, $height, $fontSize, $colors, $date, $period, $token_auth, $language.

See #1721

Change History (8)

comment:1 Changed 3 years ago by matt (mattab)

  • Description modified (diff)

comment:3 Changed 3 years ago by matt (mattab)

  • Description modified (diff)

comment:4 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [5296]) Fixes #2670

  • Metadata output now contains "imageGraphUrl"
  • the function used by piwik mobile and others, API.getReportMetadata now accepts period and date parameters
    • for "Evolution graphs" (goals, visitssummary, etc.) we must "plot" multiple days previous to the currently selected date. The metadata APi automatically does the $date parameter rewrite, when period != range, and date is not already a range. Therefore the imageGraphUrl can be used as is.
  • New page available at: index.php?module=ImageGraph&action=index&idSite=1&period=month&date=2011-04-17
    • This page will call metadata APi then display the graph for all existing reports. This is a useful debug/test page to view all graphs as they will be displayed in Piwik Mobile (and PDF reports later refs #2706

Refs #1721

  • Showing less vertical bars in graph by default
  • Displaying empty graph when there is no data

comment:5 Changed 3 years ago by matt (mattab)

(In [5298]) Refs #2670

  • Fixing few bugs found by integration tests and hopefully fixing build!

comment:6 Changed 3 years ago by matt (mattab)

(In [5301]) Refs #2670

  • Testing for Freetype support otherwise throwing exception

comment:7 Changed 2 years ago by JulienM (JulienMoumne)

(In [5415]) fixes #2706

  • refs #2318, #71 : Graphs now supported
  • refs #2670, #898 : Restoring VisitsSummary report metadata before eCommerce
  • refs #1721 : Additional security, filename fixes and new internal outputType

comment:8 Changed 2 years ago by JulienM (JulienMoumne)

(In [5582]) * fixes #2706, #2828, #2704, refs #1721, #2637, #2711, #2318, #71 : horizontal static graph implemented

  • fixes #2788, refs #2670, #1721, #2637, #2711 : default graph type logic moved to ImageGraph API, improved date/period logic, new parameter graphs_default_period_to_plot_when_period_range
  • fixes #2704, #2804, refs #1721 : pChart updated to 2.1.3, pChart code removed from Piwik code, OOP refactoring, support for unifont.ttf if present in ImageGraph/fonts, testAllSizes now uses report metadata ImageGraphUrl
  • refs #71 : space between report title and report table reduced to avoid page overflow
  • refs #2829 : TODO display percentages
  • r5544, r5547, r5549 merged
Note: See TracTickets for help on using tickets.