1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
protected Object[] createItemArray(XYDataset dataset, int series,
int item) {
Object[] result = new Object[3];
result[0] = dataset.getSeriesKey(series).toString();
double x = dataset.getXValue(series, item);
if (Double.isNaN(x) && dataset.getX(series, item) == null) {
result[1] = this.nullXString;
}
else {
if (this.xDateFormat != null) {
result[1] = this.xDateFormat.format(new Date((long) x));
}
else {
result[1] = this.xFormat.format(x);
}
}
double y = dataset.getYValue(series, item);
if (Double.isNaN(y) && dataset.getY(series, item) == null) {
result[2] = this.nullYString;
}
else {
if (this.yDateFormat != null) {
result[2] = this.yDateFormat.format(new Date((long) y));
}
else {
result[2] = this.yFormat.format(y);
}
}
return result;
} |
Partager