Ticket #804 (new New feature)

Opened 8 months ago

Last modified 5 weeks ago

Non-Flash Charting & Tables

Reported by: vipsoft Owned by:
Priority: normal Milestone: Features requests - after Piwik 1.0
Component: UI (templates, javascript) Keywords:
Cc: Sensitive: no

Description (last modified by vipsoft) (diff)

Client-side:

In #760, there is a proof-of-concept example using JavaScript libraries to present a non-Flash line chart and table based on HTML tables retrieved via Piwik's API.

We should flesh this out more as this feature would provide:

  • an alternate method of embedding graphs & tables (i.e., not using iframes)
  • a lighter-weight presentation method for mobile clients
  • a potential fallback method where the browser doesn't support Flash or an older version of the player is detected (#545)

Things to consider:

  • state of the art: HTML tables vs JSON?
  • a server-side filter to prevent sending more data than can be displayed given browser's limited resolution; filter could either sample or smooth data
  • how to translate column labels?
  • excanvas drawing (via VML?) is slow on IE and doesn't support hover events
  • flot library is popular but doesn't have built-in support for pie charts; there are numerous unofficial patches floating around though...

Server-side:

  • JpGraph
  • pchart.sourceforge.net
  • google chart API

Change History

Changed 8 months ago by vipsoft

Interesting excanvas examples by Jon Combe, the author of JAWStats:

Changed 8 months ago by matt

if we do something like this, we should consider the following:

  • the data will be fetched when rendering the main page request (as opposed to now where the data is rendered when the flash graph does the http request to request the JSON)
  • because it will be rendered for the fallback at the same time when the page render, we could also consider generating the graph data at page render, and then fetch the JSON to the flash object directly; it saves one http request and makes page load faster. There is such functionnality in open flash chart.

Changed 8 months ago by matt

note, my previous ticket should really be in a different ticket - but is related to this.

Changed 4 months ago by vipsoft

  • sensitive unset

More links:

  • http://www.rgraph.net/
  • http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/

Changed 3 months ago by vipsoft

Use swfobject.hasFlashPlayerVersion(versionStr) to detect Flash. Add parameter to server request when loading dashboard, iframe widgets, etc. Piwik_ViewDataTable::factory would generate alternate content if Flash not detected.

Changed 8 weeks ago by vipsoft

  • summary changed from Client-side: Non-Flash Charting & Tables to Non-Flash Charting & Tables

Changed 8 weeks ago by vipsoft

  • description modified (diff)

rolling in comments from #545 and #1084

Changed 5 weeks ago by Dd

Other charts with canvas :  Flot

Not RGraph because the licence isn't free (not commercial use).

jQuery Visualize Plugin is a very good solution, but they aren't tooltip...

Note: See TracTickets for help on using tickets.