how to get the Y value for a particular x value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
lakshmi
Posts: 10
Joined: Wed Mar 08, 2006 6:15 am

how to get the Y value for a particular x value

Post by lakshmi » Wed Mar 29, 2006 10:58 am

hi,

i want to retreive the y value for the coreesponding x-value.
i used
public double getYValue(int series, int item),
a method of XYDataset.
when i used that method, Nullpointer exception is thrown.
i cant intialise XYDataset,because it is an interface.
my x-axis is date and i want the return type of the function as double.
is there any method to get the y-value for the corresponding x-value.

Locked