changeset 596:e5591cc5bcf7

Add percent numbers on thread pie chart review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-September/003103.html reviewed-by: jerboaa
author Mario Torre <neugens.limasoftware@gmail.com>
date Mon, 10 Sep 2012 15:11:59 +0200
parents 4554ecf92e41
children c096b240356c
files thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/chart/ThreadDeatailsPieChart.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/chart/ThreadDeatailsPieChart.java	Mon Sep 10 13:02:22 2012 +0200
+++ b/thread/client-common/src/main/java/com/redhat/thermostat/thread/client/common/chart/ThreadDeatailsPieChart.java	Mon Sep 10 15:11:59 2012 +0200
@@ -40,6 +40,7 @@
 
 import org.jfree.chart.ChartFactory;
 import org.jfree.chart.JFreeChart;
+import org.jfree.chart.labels.StandardPieSectionLabelGenerator;
 import org.jfree.chart.plot.PiePlot3D;
 import org.jfree.data.general.DefaultPieDataset;
 
@@ -79,7 +80,11 @@
         
         plot.setStartAngle(290);
         plot.setForegroundAlpha(0.5f);
+
+        plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} - {2}"));
+        plot.setBackgroundPaint(bgColor);
         
+        plot.setInteriorGap(0.0);
         
         return chart;
     }