| 1 | = Adding a Chart = |
| 2 | Some basic steps for adding a chart to the build page. |
| 3 | |
| 4 | 1. In the report directory create a new Python file with an implementation of IReportChartGenerator. I based my new implementation on testing.py. The generate_chart_data() method is used to gather the data to chart from the database. Note: I used a new category name (e.g. "performance" instead of "test"). |
| 5 | |
| 6 | 2. In the template directory create a new template to use to generate the chart configuration XML. I based mine on bitten_chart_tests.cs. |
| 7 | |
| 8 | 3. Add the new Python file into the entry_points.txt file in Bitten's EGG-INFO directory. Add a new line in the "[trac.plugins]" section that points to the file you've just created. |
| 9 | |
| 10 | 4. Add a new line in your trac.ini's "[components]" section to enable the class you've just created. |
| 11 | |
| 12 | 5. Restart Trac and the new chart should appear on the build page. |
| 13 | |
| 14 | You can inspect the XML your new Python file feeds the chart software by going to the "/build/<build name>/chart/<category>" page of your Trac install. |