use of org.jfree.data.statistics.DefaultStatisticalCategoryDataset in project qpid-broker-j by apache.
the class StatisticalBarChartBuilder method newDatasetHolder.
@Override
protected DatasetHolder newDatasetHolder() {
return new DatasetHolder() {
private final DefaultStatisticalCategoryDataset _dataset = new DefaultStatisticalCategoryDataset();
@Override
public void addDataPointToSeries(SeriesDefinition seriesDefinition, SeriesRow row) {
String x = row.dimensionAsString(0);
double mean = row.dimensionAsDouble(1);
double stdDev = row.dimensionAsDouble(2);
_dataset.add(mean, stdDev, seriesDefinition.getSeriesLegend(), x);
}
@Override
public void beginSeries(SeriesDefinition seriesDefinition) {
// unused
}
@Override
public void endSeries(SeriesDefinition seriesDefinition) {
// unused
}
@Override
public int getNumberOfDimensions() {
return 3;
}
@Override
public Dataset getPopulatedDataset() {
return _dataset;
}
};
}
Aggregations