Example usage for org.jfree.data.xy XIntervalDataItem getYValue

List of usage examples for org.jfree.data.xy XIntervalDataItem getYValue

Introduction

In this page you can find the example usage for org.jfree.data.xy XIntervalDataItem getYValue.

Prototype

public double getYValue() 

Source Link

Document

Returns the y-value.

Usage

From source file:org.jfree.data.xy.XIntervalDataItemTest.java

/**
 * Some checks for the constructor.//w ww .j a  v a 2 s .  c o m
 */
@Test
public void testConstructor1() {
    XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);
    assertEquals(new Double(1.0), item1.getX());
    assertEquals(2.0, item1.getXLowValue(), EPSILON);
    assertEquals(3.0, item1.getXHighValue(), EPSILON);
    assertEquals(4.0, item1.getYValue(), EPSILON);
}

From source file:org.jfree.data.xy.XIntervalSeriesCollection.java

/**
 * Returns the y-value for an item within a series.
 *
 * @param series  the series index.// w ww  . j a va2  s.  co  m
 * @param item  the item index.
 *
 * @return The y-value.
 */
@Override
public Number getY(int series, int item) {
    XIntervalSeries s = (XIntervalSeries) this.data.get(series);
    XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);
    return new Double(di.getYValue());
}