tg.setAxisLabelsPlacement("bottom");
timeplot.setWidth("100%");
timeplot.setHeight("300px");
plotinfo = new Plotinfo();
plotinfo.setShowValues(true);
ListModelList dataModel = new ListModelList(initDataMode());
plotinfo.setDataModel(dataModel);
plotinfo.setParent(timeplot);
plotinfo.setTimeGeometry(tg);
plotinfo.setValueGeometry(vg);
timeplot.setParent(comp);
Button btn1 = new Button("ChangeData");
btn1.setParent(comp);
btn1.addEventListener("onClick", new EventListener(){
@Override
public void onEvent(Event event) throws Exception
{
// TODO Auto-generated method stub
ListModelList dataModel = (ListModelList)plotinfo.getDataModel();
ArrayList<TimeplotData> datas = new ArrayList<TimeplotData>();
TimeplotData pd = new TimeplotData();
pd.setTime(new Date(new Date().getTime() + 1000 * 1));
pd.setValue(10f);
datas.add(pd);
dataModel.clear();
dataModel.addAll(datas);
}});
}