1 37 package net.sourceforge.cruisecontrol.chart; 38 39 import java.util.Map ; 40 41 import net.sourceforge.cruisecontrol.BuildInfoSummary; 42 43 import org.jfree.data.DefaultPieDataset; 44 45 import de.laures.cewolf.DatasetProduceException; 46 47 public class PieChartData extends AbstractCruiseControlChartData { 48 49 public Object produceDataset(Map params) throws DatasetProduceException { 50 BuildInfoSummary summary = (BuildInfoSummary) params.get("buildInfo"); 51 DefaultPieDataset dataset = new DefaultPieDataset(); 52 dataset.setValue("Broken Builds", summary.getNumBrokenBuilds()); 53 dataset.setValue("Good Builds", summary.getNumSuccessfulBuilds()); 54 return dataset; 55 } 56 57 public String getProducerId() { 58 return "PieChartData DatasetProducer"; 59 } 60 } | Popular Tags |