Plotinfo plot = (Plotinfo) evt.getTarget();
System.out.println(evt.getTime());
System.out.println(evt.getValue());
System.out.println(evt.getCustomValues());
ListModelList model = (ListModelList) plot.getDataModel();
System.out.println(model.get(evt.getPlotDataIndex()));
System.out.println();
}
});
List<Float> records = new ArrayList<Float>();
for (int i = 0; i < 10; i++)
{
records.add(i + 0f);
}
ListModelList model = new ListModelList();
Calendar cal = Calendar.getInstance();
cal.setTime(now);
for (int j = 0; j < 10; j++)
{
PlotData data = new PlotData();
Map _customValues = new HashMap();
_customValues.put("reliability", j);
data.setCustomValues(_customValues );
cal.add(Calendar.DATE, j);
data.setFormat("yyyy/MM/dd HH:mm:ss");
data.setTime(cal.getTime());
// data.setReliability(j);
data.setValue(records.get(j));
model.add(data);
}
plot1.setDataModel(model);
plot1.setEventSourceUri("");
// plot1(true);