Mercurial > bitten > bitten-test
changeset 237:fd509f1ea029
Minor improvements to chart layout.
author | cmlenz |
---|---|
date | Fri, 30 Sep 2005 23:00:41 +0000 |
parents | 34202d89f57d |
children | 832e64330c31 |
files | bitten/trac_ext/charts.py bitten/trac_ext/templates/bitten_chart_coverage.cs bitten/trac_ext/templates/bitten_chart_tests.cs |
diffstat | 3 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/trac_ext/charts.py +++ b/bitten/trac_ext/charts.py @@ -79,7 +79,7 @@ req.hdf['chart.title'] = 'Unit Tests' req.hdf['chart.data'] = [ - [''] + [item[0] for item in tests], + [''] + ['[%s]' % item[0] for item in tests], ['Total'] + [item[1] for item in tests], ['Failures'] + [item[2] for item in tests] ] @@ -127,7 +127,7 @@ req.hdf['chart.title'] = 'Code Coverage' req.hdf['chart.data'] = [ - [''] + [item[0] for item in coverage], + [''] + ['[%s]' % item[0] for item in coverage], ['Lines of code'] + [item[1] for item in coverage], ['Coverage'] + [int(item[2]) for item in coverage] ]
--- a/bitten/trac_ext/templates/bitten_chart_coverage.cs +++ b/bitten/trac_ext/templates/bitten_chart_coverage.cs @@ -4,15 +4,15 @@ <value>area</value> </chart_type> - <axis_category size="10" - skip="<?cs var:len(chart.data.0) / 6 ?>" orientation="vertical" /> + <axis_category size="10" orientation="diagonal_up" + skip="<?cs var:len(chart.data.0) / 6 ?>"/> <axis_ticks value_ticks="false" category_ticks="true" major_thickness="1" - minor_thickness="0" major_color="000000" position="outside" /> + minor_thickness="0" major_color="000000" position="outside"/> <chart_data><?cs each:row = chart.data ?><row><?cs each:value = row ?><?cs - if:name(value) == 0 ?><string><?cs + if:name(row) == 0 || name(value) == 0 ?><string><?cs var:value ?></string><?cs else ?><number><?cs var:value ?></number><?cs @@ -23,6 +23,7 @@ <chart_border color="999999" left_thickness="1" bottom_thickness="1"/> <chart_grid_h alpha="5" color="666666" thickness="3"/> <chart_pref line_thickness="2" point_shape="none"/> + <chart_value position="cursor"/> <series_color> <color>bbbbbb</color> <color>9999ff</color>
--- a/bitten/trac_ext/templates/bitten_chart_tests.cs +++ b/bitten/trac_ext/templates/bitten_chart_tests.cs @@ -3,25 +3,27 @@ <value>area</value> <value>column</value> </chart_type> - <axis_category size="10" - skip="<?cs var:len(chart.data.0) / 6 ?>" orientation="vertical" /> + + <axis_category size="10" orientation="diagonal_up" + skip="<?cs var:len(chart.data.0) / 6 ?>"/> <axis_ticks value_ticks="false" category_ticks="true" major_thickness="2" - minor_thickness="0" major_color="000000" position="outside" /> - + minor_thickness="0" major_color="000000" position="outside"/> + <chart_data><?cs each:row = chart.data ?><row><?cs each:value = row ?><?cs - if:name(value) == 0 ?><string><?cs + if:name(row) == 0 || name(value) == 0 ?><string><?cs var:value ?></string><?cs else ?><number><?cs var:value ?></number><?cs /if ?><?cs /each ?></row><?cs /each ?></chart_data> - + <chart_border color="999999" left_thickness="1" bottom_thickness="1"/> <chart_grid_h alpha="5" color="666666" thickness="3"/> <chart_pref line_thickness="2" point_shape="none"/> + <chart_value position="cursor"/> <series_color> <color>99dd99</color> <color>ff0000</color>