Changes between Version 18 and Version 19 of TicketChartsMacro


Ignore:
Timestamp:
May 14, 2013 6:13:59 AM (16 months ago)
Author:
rjollos
Comment:

Removed obsolete configuration info.

Legend:

Unmodified
Added
Removed
Modified
  • TicketChartsMacro

    v18 v19  
    1212The charts are created by the parameters that you give to the macro. See the examples below. 
    1313 
    14 All charts are clickable (see requirements) and will link to the query page of the graph. 
     14All charts are clickable and will link to the query page of the graph. 
    1515 
    1616See also TracTicketStatsPlugin, TracMetrixPlugin, TicketStatsMacro. 
     
    3232You can check out TicketChartsMacro from [http://trac-hacks.org/svn/ticketchartsmacro here] using Subversion, or [source:ticketchartsmacro browse the source] with Trac. 
    3333 
    34 == Requirements == 
    35   * '''Python 2.5''' or above. For '''Python 2.4''', see the instructions in #5225. 
    36   * [http://teethgrinder.co.uk/open-flash-chart-2/ Open Flash Charts] installed on your server 
    37     * [http://www.ofc2dz.com/ OFCDZ] has more experimental features which get merged back to the main OFC project once in a while. For example clickable charts come from here. 
    38     * "Installing" in this case means: 
    39       * making accessible to web clients OFC's js and js/json as well as the top-level Flash file (open-flash-chart.swf or OFCDZ.swf) 
    40       * Deploying python-ofc-library-2/openFlashChart*.py somewhere Python will find them 
    41   * Advanced Argument Parser for Trac Macros (AdvParseArgsPlugin). 
    42   * Tested only on Trac 0.11.3. 
    43   * Tested only on Apache configuration, but with proper configuration (see configuration section) this should work with any http server (including tracd). 
    44  
    4534== Installation == 
    4635  * Download the source. 
    4736  * Copy the file !TicketCharts.py to your project's plugins directory or to the global plugins directory, which is usually in: 
    48 {{{ 
     37  {{{ 
    4938#!sh 
    5039/usr/share/trac/plugins 
     
    5241  * Enable !TicketCharts plugin via the WebAdmin interface or by adding the following lines to the [components] section of trac.ini: 
    5342  {{{ 
    54   #!ini 
    55   ticketcharts.* = enabled 
    56   }}} 
    57   * Install Open Flash Charts 2 '''and its version 2 python bindings''' (everything can be downloaded from [http://teethgrinder.co.uk/open-flash-chart-2/ Open Flash Charts]). 
    58  
    59 Note: These installation steps need to be updated and enhanced. See [/ticket/6061#comment:13 comment:13:ticket:6061] for more hints if you are having trouble. 
     43#!ini 
     44ticketcharts.* = enabled 
     45}}} 
    6046 
    6147== Configuration == 
    62   * The following configuration should appear in trac.ini: 
     48 * The following configuration can appear in trac.ini (default values are shown): 
    6349{{{ 
    6450#!ini 
     
    6652height = 300 
    6753width = 500 
    68 js_dir = /js 
    69 json_dir = /js/json 
    70 ofc_file = /OFCDZ.swf 
    7154}}} 
    72   * If this does not appear, default values will be used. 
    73   * ''js_dir'', ''jsor_dir'' and ''ofc_file'' are the location '''on the http server''' of the Open Flash Charts files. 
    74   * As you can see, the default '''ofc_file''' value is OFCDZ.swf, which is another implementation of Open Flash Charts, that make the bar charts clickable. You can download it from [http://www.ofc2dz.com/ OFCDZ]. 
    75  
    76 == Some notes on installation == 
    77 - I tried all kinds of configurations to get the charts to appear (ver 11.5) - followed the information on this [http://trac-hacks.org/ticket/5542 ticket] 
    78 - Answer for me was to copy all the OFC2 files to my Apache web server http://mywebserver/trac/reports/ 
    79 - Then I changed the paths to: 
    80  
    81 {{{ 
    82 #!ini 
    83 js_dir = http://mywebserver/trac/reports/js 
    84 json_dir = http://mywebserver/trac/reports/js/json 
    85 ofc_file = http://mywebserver/trac/reports/OFCDZ.swf 
    86 }}} 
    87  
    88 and it worked.  
    8955 
    9056== Macro arguments == 
    9157 
    9258Although I believe the examples show it all, I'll write here the arguments: 
    93   * Arguments for all types of graphs: 
    94       * '''type''' - The type of the graph. Can be pie, bars or stacked_bars. 
    95       * '''height''', '''width''' - The height and width of the graph, in pixels. Percents will not work. If not specified, the values from trac.ini are taken (and if those aren't specified, then other default values are used). 
    96       * '''title''' - Text that will be displayed on the top of the chart. 
    97       * '''query''' - A Trac Query. All the stats will be taken from this query. It is important that everything in the query's parmeters will be under quotes. Examples: 
    98         {{{ 
     59 * Arguments for all types of graphs: 
     60  * '''type''' - The type of the graph. Can be pie, bars or stacked_bars. 
     61  * '''height''', '''width''' - The height and width of the graph, in pixels. Percents will not work. If not specified, the values from trac.ini are taken (and if those aren't specified, then other default values are used). 
     62  * '''title''' - Text that will be displayed on the top of the chart. 
     63  * '''query''' - A Trac Query. All the stats will be taken from this query. It is important that everything in the query's parmeters will be under quotes. Examples: 
     64  {{{ 
    9965query = milestone="my_milestone"&owner="aviram"|"danny" 
    100         }}} 
    101       * '''ofc_file''', '''js_dir''', '''json_dir''' - Same as the variables in the macro's configuration. If these are specified, the configuration is ignored. 
    102   * Arguments for '''pie''' graphs: 
    103       * '''factor''' - The name of the field by which the stats will be formed. 
    104   * Arguments for '''bar''' graphs: 
    105       * '''x_axis''' - The name of the field by which the stats will be formed (The X Axis values). 
    106   * Arguments for '''stacked bars''' graphs: 
    107       * '''x_axis''' - The name of the field by which the stats will be formed (The X Axis values). 
    108       * '''key''' - The name of the field by which the chart's columns are divided. 
     66}}} 
     67  * '''factor''' - The name of the field by which the stats will be formed. 
     68 * Arguments for '''bar''' graphs: 
     69  * '''x_axis''' - The name of the field by which the stats will be formed (The X Axis values). 
     70 * Arguments for '''stacked bars''' graphs: 
     71  * '''x_axis''' - The name of the field by which the stats will be formed (The X Axis values). 
     72  * '''key''' - The name of the field by which the chart's columns are divided. 
    10973 
    11074== Examples with Snapshots ==