Example usage for org.jfree.data.general DatasetUtilities findStackedRangeBounds

List of usage examples for org.jfree.data.general DatasetUtilities findStackedRangeBounds

Introduction

In this page you can find the example usage for org.jfree.data.general DatasetUtilities findStackedRangeBounds.

Prototype

public static Range findStackedRangeBounds(TableXYDataset dataset) 

Source Link

Document

Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked.

Usage

From source file:org.pentaho.plugin.jfreereport.reportcharts.backport.StackedAreaRenderer.java

/**
 * Returns the range of values the renderer requires to display all the items from the specified dataset.
 *
 * @param dataset the dataset (<code>null</code> not permitted).
 * @return The range (or <code>null</code> if the dataset is empty).
 *//* w  w  w .  j a v a  2 s  .c  o m*/
public Range findRangeBounds(final CategoryDataset dataset) {
    if (dataset == null) {
        return null;
    }
    if (this.renderAsPercentages) {
        return new Range(0.0, 1.0);
    } else {
        return DatasetUtilities.findStackedRangeBounds(dataset);
    }
}