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 | | |
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. |
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 | {{{ |
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. |