hai,
i have xyseries , i need to find minimum and maximum values in it and display on the chart . can anybody help me.
addala
min and max
Re: min and max
XYSeries doesn't keep track of the min and max values (maybe it should?) so you have to iterate through all the (x, y) pairs and find the min and max values yourself. Alternatively, you can add the XYSeries to an XYSeriesCollection, and since this class implements XYDataset you can then use these methods in DatasetUtilities to find the values you are looking for:
public Range getDomainExtent(Dataset dataset);
Returns the min and max X values.
public Range getRangeExtent(Dataset dataset);
Returns the min and max Y values.
Regards,
Dave Gilbert
public Range getDomainExtent(Dataset dataset);
Returns the min and max X values.
public Range getRangeExtent(Dataset dataset);
Returns the min and max Y values.
Regards,
Dave Gilbert