Changes between Version 34 and Version 35 of VisualizationPlugin


Ignore:
Timestamp:
Nov 10, 2015, 9:08:16 AM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • VisualizationPlugin

    v34 v35  
    1919
    2020If you have any issues, create a
    21 [http://trac-hacks.org/newticket?component=VisualizationPlugin&owner=robguttman new ticket].
     21[/newticket?component=VisualizationPlugin new ticket].
    2222
    2323[[TicketQuery(component=VisualizationPlugin&group=type,format=progress)]]
     
    2525== Download
    2626
    27 Download the zipped source from [download:visualizationplugin here].
     27Download the zipped source from [export:visualizationplugin here].
    2828
    2929== Source
    3030
    31 You can check out VisualizationPlugin from [http://trac-hacks.org/svn/visualizationplugin here] using Subversion, or [source:visualizationplugin browse the source] with Trac.
     31You can check out VisualizationPlugin from [/svn/visualizationplugin here] using Subversion, or [source:visualizationplugin browse the source] with Trac.
    3232
    3333== Installation and Configuration
    3434
    3535 1. Install the plugin after downloading and unzipping:
    36     {{{
    37     #!sh
     36    {{{#!sh
    3837    cd visualizationplugin/0.12
    3938    sudo python setup.py bdist_egg
     
    4443
    4544 2. Enable the plugin in `trac.ini`:
    46     {{{
    47     #!ini
     45    {{{#!ini
    4846    [components]
    4947    viz.* = enabled
     
    5351
    5452 3. Configure which pages to include graphs in `trac.ini`:
    55     {{{
    56     #!ini
     53    {{{#!ini
    5754    [viz]
    5855    reports = 21
     
    6865
    6966The 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 in {{{trac.ini}}}:
    70 {{{
    71 #!ini
     67{{{#!ini
    7268[viz]
    7369reports = 21,23
     
    7571
    7672The 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):
    77 {{{
    78 #!sql
     73{{{#!sql
    7974SELECT date(tc.time/1000000, 'unixepoch', 'weekday 5') as "Week ending",
    8075  SUM(CASE e.value
     
    9590
    9691If you prefer a column chart instead of the default area chart, you can change the chart type as follows:
    97 {{{
    98 #!ini
     92{{{#!ini
    9993[viz]
    10094reports = 21,23
     
    10397
    10498The type name must exactly match those supported by the Google Visualization API [http://code.google.com/apis/chart/interactive/docs/gallery.html 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 [http://code.google.com/apis/chart/interactive/docs/gallery/columnchart.html#Configuration_Options 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 do this:
    105 {{{
    106 #!ini
     99{{{#!ini
    107100[viz]
    108101reports = 21,23
     
    116109
    117110If you use multiple graphs and charts, you may want to customize them differently for different reports. To do that, create a new section for the reports instead of including them in the main {{{[viz]}}} section's {{{reports}}} option in `trac.ini`:
    118 {{{
    119 #!ini
     111{{{#!ini
    120112[viz]
    121113options = width:600,height:400
     
    132124You customize a page's graph by creating a section that matches all or part of its url after a {{{viz.}}} prefix. So for example, the above customizes reports 21 and 23 differently. Report 21 will be a green column chart with the given title, and report 23 will be a red area chart with its given title. Both charts will inherit the {{{[viz]}}} section's width and height, however.
    133125
    134  '''Important''': whereas the {{{options}}} option ''adds'' to the base {{{[viz]}}} section's {{{options}}}, all other options, such as {{{type}}}, ''override'' the base {{{[viz]}}} section's options.
     126'''Note''': whereas the {{{options}}} option ''adds'' to the base {{{[viz]}}} section's {{{options}}}, all other options, such as {{{type}}}, ''override'' the base {{{[viz]}}} section's options.
    135127
    136128=== Burndown chart on milestone pages
    137129
    138 In the examples above, the data for the charts came from a report table located on the same page. You can also create charts by [http://code.google.com/apis/chart/interactive/docs/queries.html querying remote data sources] that conform to the [http://code.google.com/apis/chart/interactive/docs/dev/implementing_data_source.html Google Visualization Data Source API]. One such example is the [wiki:SumStatsPlugin SumStats plugin] which provides a data source amenable to graphing as a daily burndown chart on any milestone page. For example:
    139 {{{
    140 #!ini
     130In the examples above, the data for the charts came from a report table located on the same page. You can also create charts by [http://code.google.com/apis/chart/interactive/docs/queries.html querying remote data sources] that conform to the [http://code.google.com/apis/chart/interactive/docs/dev/implementing_data_source.html Google Visualization Data Source API]. One such example is the [wiki:SumStatsPlugin SumStats plugin] which provides a data source amenable to graphing as a daily burndown chart on any milestone page.
     131
     132For example:
     133{{{#!ini
    141134[viz.milestone]
    142135# Burndown