Improved the pie charts of the HTML output.

All authors with a workload less than one percent are now combined into
the same slice of the pie chart.
This commit is contained in:
Adam Waldenberg 2013-05-08 05:32:45 +02:00
parent 0c6358324d
commit b50f85ba17
3 changed files with 13 additions and 4 deletions

View File

@ -189,7 +189,11 @@ class BlameOutput(Outputable):
blame_xml += " series: {"
blame_xml += " pie: {"
blame_xml += " innerRadius: 0.4,"
blame_xml += " show: true"
blame_xml += " show: true,"
blame_xml += " combine: {"
blame_xml += " threshold: 0.01,"
blame_xml += " label: \"Other Authors\""
blame_xml += " }"
blame_xml += " }"
blame_xml += " }"
blame_xml += " });"

View File

@ -200,13 +200,16 @@ class ChangesOutput(Outputable):
changes_xml += ("<tfoot><tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td>" +
"</tr></tfoot></tbody></table>")
changes_xml += "<div class=\"chart\" id=\"changes_chart\"></div></div>"
changes_xml += "<script type=\"text/javascript\">"
changes_xml += " $.plot($(\"#changes_chart\"), [{0}], {{".format(chart_data)
changes_xml += " series: {"
changes_xml += " pie: {"
changes_xml += " innerRadius: 0.4,"
changes_xml += " show: true"
changes_xml += " show: true,"
changes_xml += " combine: {"
changes_xml += " threshold: 0.01,"
changes_xml += " label: \"Other Authors\""
changes_xml += " }"
changes_xml += " }"
changes_xml += " }"
changes_xml += " });"

View File

@ -46,6 +46,7 @@
table.git {{
font-size: small;
width: 60%;
padding-right: 5px;
}}
table.full {{
width: 100%;
@ -81,9 +82,10 @@
position: absolute;
top: 5px;
bottom: 5px;
right: 5px;
right: 0px;
width: 40%;
font-size: x-small;
height: 240px;
}}
p.error {{
color: #700;