Oh I see. Tried what you said and still got nothing.
my custom bean
[code]
public class PointWithDate extends DataSeriesItem{
Date date;
String formattedDate;
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm");
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
if(date != null)
this.formattedDate = sdf.format(date);
}
public String getFormattedDate() {
return formattedDate;
}
}
[/code]then the DataSeries:
[code]
private DataSeries getDataSeries(TreeMap<Date, Double> dataX, TreeMap<Date, Double> dataY) {
DataSeries cDataSeries = new DataSeries();
for (Map.Entry<Date, Double> entry : dataX.entrySet()) {
PointWithDate point = new PointWithDate();
Date date = entry.getKey();
Double valueX = entry.getValue();
Double valueY = dataY.get(date);
if (date != null && valueX != null && valueY != null) {
point.setX(valueX);
point.setY(valueY);
point.setDate(date);
cDataSeries.add(point);
}
}
return cDataSeries;
}
[/code]and then the tooltip format:
Tooltip tooltip = new Tooltip();
tooltip.setShared(true);
tooltip.setUseHTML(true);
tooltip.setHeaderFormat("<small>Date: {point.formattedDate}</small><table>");
tooltip.setPointFormat("<tr><td style=\"color: {series.color}\">x: </td><td style=\"text-align: right\"><b>{point.x}</b></td></tr>"
+ "<tr><td style=\"color: {series.color}\">y: </td><td style=\"text-align: right\"><b>{point.y}</b></td></tr>");
tooltip.setFooterFormat("</table>");
configuration.setTooltip(tooltip);
configuration.getTooltip().setShared(true);
point.formattedDate still appears blank in the tooltip