List of usage examples for org.jfree.data.general DatasetUtilities createConsolidatedPieDataset
public static PieDataset createConsolidatedPieDataset(PieDataset source, Comparable key, double minimumPercent, int minItems)
percentThreshold
) into a single item. From source file:org.jfree.data.general.DatasetUtilities.java
/** * Creates a new pie dataset based on the supplied dataset, but modified * by aggregating all the low value items (those whose value is lower * than the <code>percentThreshold</code>) into a single item with the * key "Other".// w ww .j a va 2s . c o m * * @param source the source dataset (<code>null</code> not permitted). * @param key a new key for the aggregated items (<code>null</code> not * permitted). * @param minimumPercent the percent threshold. * * @return The pie dataset with (possibly) aggregated items. */ public static PieDataset createConsolidatedPieDataset(PieDataset source, Comparable key, double minimumPercent) { return DatasetUtilities.createConsolidatedPieDataset(source, key, minimumPercent, 2); }