Example usage for org.jfree.data.general DatasetUtils createConsolidatedPieDataset

List of usage examples for org.jfree.data.general DatasetUtils createConsolidatedPieDataset

Introduction

In this page you can find the example usage for org.jfree.data.general DatasetUtils createConsolidatedPieDataset.

Prototype

public static PieDataset createConsolidatedPieDataset(PieDataset source, Comparable key, double minimumPercent,
        int minItems) 

Source Link

Document

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 percentThreshold ) into a single item.

Usage

From source file:org.jfree.data.general.DatasetUtils.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}) into a single item with the
 * key "Other"./*  w  ww.  ja  v  a  2s  . co m*/
 *
 * @param source  the source dataset ({@code null} not permitted).
 * @param key  a new key for the aggregated items ({@code null} 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 DatasetUtils.createConsolidatedPieDataset(source, key, minimumPercent, 2);
}