Example usage for org.jfree.chart.plot CategoryPlot getDataRange

List of usage examples for org.jfree.chart.plot CategoryPlot getDataRange

Introduction

In this page you can find the example usage for org.jfree.chart.plot CategoryPlot getDataRange.

Prototype

@Override
public Range getDataRange(ValueAxis axis) 

Source Link

Document

Returns the range of data values that will be plotted against the range axis.

Usage

From source file:ChartUsingJava.CombinedCategoryPlot.java

/**
 * Returns the bounds of the data values that will be plotted against
 * the specified axis./*from   w  w  w.  j av  a  2s. co  m*/
 *
 * @param axis  the axis.
 *
 * @return The bounds.
 */
public Range getDataRange(ValueAxis axis) {
    Range l_result = null;
    Iterator l_itr = getSubplots().iterator();
    while (l_itr.hasNext()) {
        CategoryPlot l_subplot = (CategoryPlot) l_itr.next();

        l_result = Range.combine(l_result, l_subplot.getDataRange(axis));
    }
    return l_result;
}