Changes between Version 7 and Version 8 of VisualizationPlugin

Jan 2, 2012, 4:22:53 PM (7 years ago)
Rob Guttman



  • VisualizationPlugin

    v7 v8  
    5454You can check out VisualizationPlugin from [ here] using Subversion, or [source:visualizationplugin browse the source] with Trac.
    56 == Example ==
     56== Examples ==
     58=== Existing report ===
     59The most basic usage is adding a chart to an existing report - this can be achieved with almost no configuration.  Simply list the reports in the {{{[viz]}}} section:
     62reports = 21,23
     65The plugin will automatically determine the data types for each column.  However, the table needs to be structured suitably for graphing.  In the screenshot at the top of this page, the table was built by grouping tickets into weeks as follows (sqlite SQL):
     67SELECT date(tc.time/1000000, 'unixepoch', 'weekday 5') as "Week ending",
     68  SUM(CASE e.value
     69          WHEN '' THEN 0
     70          ELSE e.value END) AS effort
     71  FROM ticket t
     72    JOIN ticket_change tc ON tc.ticket = and tc.field = 'status' and tc.newvalue='closed'
     73   and tc.time=(SELECT max(time) from ticket_change tc2 where tc2.ticket = and tc2.field = 'status' and tc2.newvalue='closed')
     74  LEFT OUTER JOIN ticket_custom e ON e.ticket = and = 'effort'
     75  WHERE resolution = 'fixed' AND t.type != 'epic'
     76  GROUP BY date(tc.time/1000000, 'unixepoch', 'weekday 5')
     77  ORDER BY date(tc.time/1000000, 'unixepoch', 'weekday 5')
     80If you prefer a column chart instead of the default area chart, you can change the chart type as follows:
     83reports = 21,23
     84type = ColumnChart
     87The type name must exactly match those supported by the Google Visualization API [ here] (no spaces). You can also customize all of its options available for that chart type.  For example, the {{{ColumnChart}}} type's options can be found [ here].  So if we wanted to add a title and change the color for the same table as shown in the screen at the top of this page, we can so this:
     89reports = 21,23
     90type = ColumnChart
     91options = colors:['green'],title='Whistle while we work'
     96=== Burndown chart on Milestone page ===
    58100 * table