public class PieDatasetUtil extends Object
Constructor and Description |
---|
PieDatasetUtil() |
Modifier and Type | Method and Description |
---|---|
static org.jfree.data.general.PieDataset |
createConsolidatedSortedPieDataset(org.jfree.data.general.PieDataset source,
Comparable key,
boolean sort,
double minimumPercent,
int minItems)
Creates a new PieDataset with ranked, consolidated results.
|
static org.jfree.data.general.PieDataset |
createSortedPieDataset(org.jfree.data.general.PieDataset source)
Sort a pie dataset by it's values (highest to lowest)
|
public static org.jfree.data.general.PieDataset createConsolidatedSortedPieDataset(org.jfree.data.general.PieDataset source, Comparable key, boolean sort, double minimumPercent, int minItems)
Results are ranked by their value (ie 10 is greater than 5), so that pie slices are in order of greatest to smallest.
The minimum number of items will ALWAYS be displayed if there are at least that many items.
If there are more than the minimum number of items, once ranked any items smaller than the minimumPercent are consolidated into an "Other" entity (named by 'key').
source
- the source dataset (null
not permitted).key
- the key to represent the aggregated items.sort
- minimumPercent
- the percent threshold (ten percent is 0.10).minItems
- keep at least this many items (no matter how small)public static org.jfree.data.general.PieDataset createSortedPieDataset(org.jfree.data.general.PieDataset source)
source
- the source dataset (null
not permitted).Copyright © 2002-2024 Atlassian. All Rights Reserved.