Hi!!
I tried to make my own tooltip for my ScatterPlot, but there is some problems:
I don't know exactly what is happening, i have an array of strings with the aditional information of the points and i want to add each one to its respective position. Like: The string ofthe position 0,0 i want to append to the tooltip of my data of the same position, and so on.
The main problem is that when i take the value from the XYDataset it isn't the same of my initial value?!
my code is:
public String generateToolTip(XYDataset data, int series, int item) {
StringBuffer result = new StringBuffer().append(data.getSeriesName(series)).append(": ");
Number x = data.getXValue(series, item);
result.append("PI: ").append(xFormat.format(x));
Number y = data.getYValue(series, item);
if (y!=null) {
result.append(", HM: ").append(yFormat.format(y)).append("; ");
}
else {
result.append(", PI: null\n");
}
result.append(seqName[series][item]);
return (new String(result));
}
Problems with tooltips
Re: Problems with tooltips
How can i find the first position of my element in the dataset? (the index when i added to it)
Re: Problems with tooltips
I don't understand...can you explain some more?
Regards,
DG
Regards,
DG
Re: Problems with tooltips
Ok.
I want to put a tooltip for each point of the ScatterPlot chart. Then i create two arrays, one for my plot data and other for my tooltip. In the tooltip, i appended my tooltip of the first position of the array to the data on the first position of the XYDataset, but it (the data from XYDataset) isn't the same of that data which i've added to the XYSeries.
Thanks!!
Elio
I want to put a tooltip for each point of the ScatterPlot chart. Then i create two arrays, one for my plot data and other for my tooltip. In the tooltip, i appended my tooltip of the first position of the array to the data on the first position of the XYDataset, but it (the data from XYDataset) isn't the same of that data which i've added to the XYSeries.
Thanks!!
Elio
Re: Problems with tooltips
It might be that XYSeries sorts (x,y) pairs into ascending order of x values.
Regards,
DG.
Regards,
DG.