Hi, fellas!
Is it possible to use a timeline with dynamic lanes(i.e. bringing them from a datasource)?
I really did a deep research about that and can't figure out a working solution.
I'm using SmartGWT 3.1 and trying something like below, but the lanes don't show up on the page:
Thanks in advance
Is it possible to use a timeline with dynamic lanes(i.e. bringing them from a datasource)?
I really did a deep research about that and can't figure out a working solution.
I'm using SmartGWT 3.1 and trying something like below, but the lanes don't show up on the page:
Code:
public class Module implements EntryPoint { public static Lane[] lanes; /** * This is the entry point method. */ public void onModuleLoad() { AnyDS.getInstance().fetchData(null, new DSCallback() { @Override public void execute(DSResponse response, Object rawData, DSRequest request) { Record[] rs = response.getData() lanes = new Lane[rs.length] for(int i = 0 ; i < rs.length ; i++){ Record r = rs[i]; lanes[i] = new Lane(r.getAttribute("x"), r.getAttribute("y")); } } }); Timeline timeline = new Timeline(); timeline.setLanes(lanes); timeline.setDataSource(OtherDS.getInstance()); timeline.draw(); } }
Thanks in advance
Comment