Changes between Version 4 and Version 5 of DygraphsVisualizationPlugin
- Timestamp:
- Aug 24, 2015, 12:51:48 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DygraphsVisualizationPlugin
v4 v5 5 5 == Description 6 6 7 This plugin is based on Rob Guttman's [[VisualizationPlugin|Visualization Plugin]], except that it uses the MIT-licensed [[http://dygraphs.com|Dygraphs]] charting library instead of the [[http://code.google.com/apis/chart/|Google Visualization API]].7 This plugin is based on Rob Guttman's [[VisualizationPlugin|Visualization Plugin]], except that it uses the MIT-licensed [[http://dygraphs.com|Dygraphs]] charting library, instead of the https://developers.google.com/chart/?csw=1&safe=on Google Visualization API]. 8 8 9 9 This means that it can be legally used offline, which the Google APIs don't allow. There are corporate Trac installations that for various reasons can't be connected to the Internet. 10 10 11 Only tested with Trac 0.12 and 1.0 so far.11 Tested with Trac 0.12 and 1.0. 12 12 13 13 == !Bugs/Feature Requests … … 35 35 Once installed, enable graphical output for a particular report in the `trac.ini` file: 36 36 37 {{{ 38 #!ini 39 [dyviz] 40 reports = 10 41 options = width:1000,height:400 42 }}} 37 {{{#!ini 38 [dyviz] 39 reports = 10 40 options = width:1000,height:400 41 }}} 43 42 44 43 Customise options for a particular report: 45 44 46 {{{ 47 #!ini 48 [dyviz.report/10] 49 options = plotter:barChartPlotter,labels:labels,colors:['red','orange','green'],includeZero:true,animatedZooms:true,legend:'follow' 50 }}} 45 {{{#!ini 46 [dyviz.report/10] 47 options = plotter:barChartPlotter,labels:labels,colors:['red','orange','green'],includeZero:true,animatedZooms:true,legend:'follow' 48 }}} 51 49 52 50 The options are generally passed directly to the Dygraphs library. To allow the `labelsDiv` option to be used effectively, the plugin inserts empty divs "dyviz_above" and "dyviz_below" above and below the chart, respectively. … … 56 54 === Report the history of tickets open and closed 57 55 58 It 'soften useful to be able to generate reports that span a period of time, for monitoring the progress of a project.56 It ioften useful to be able to generate reports that span a period of time, for monitoring the progress of a project. 59 57 60 58 Constructing such reports is not always straightforward. Here's an example of a report that plots the number of tickets that were opened and closed throughout the duration of the project. It also plots the growth of the "backlog": the number of currently-open tickets at that time. 61 59 62 Note that this query uses Common Table Expressions. These have only been present in SQLite since [[http://www.sqlite.org/releaselog/3_8_3.html|version 3.8.3]]. It will usually be necessary to update the version of `SQLITE3.DLL` in your Python installation's top-level `DLLs` folder to one compiled from SQLite 3.8.3 or later .60 Note that this query uses Common Table Expressions. These have only been present in SQLite since [[http://www.sqlite.org/releaselog/3_8_3.html|version 3.8.3]]. It will usually be necessary to update the version of `SQLITE3.DLL` in your Python installation's top-level `DLLs` folder to one compiled from SQLite 3.8.3 or later: 63 61 64 {{{ 65 #!sql 62 {{{#!sql 66 63 WITH 67 64 cutoff_time(n, usec) AS … … 113 110 === Report the number of open tickets with particular values of a custom field over time 114 111 115 Here 's a more complex report that looks for tickets of type 'fault' that have a custom field 'safety_related'. At any time, this field can have one of three values that classify the safety status of the ticket: 'Not assessed', 'Safety related' or 'Not safety related'. The report plots the count of the number of open tickets with each safety status at the start of every week for the past three years.112 Here ia more complex report that looks for tickets of type 'fault' that have a custom field 'safety_related'. At any time, this field can have one of three values that classify the safety status of the ticket: 'Not assessed', 'Safety related' or 'Not safety related'. The report plots the count of the number of open tickets with each safety status at the start of every week for the past three years: 116 113 117 {{{ 118 #!sql 114 {{{#!sql 119 115 WITH 120 116 -- Select the time period of interest here, e.g. last three years.