nesxam
May 20, 2013, 7:52pm
#1
chart_month.define(
"units",{
start:new Date(yearp_v,monthp_v,1),
end:new Date(yearp_v,monthp_v,day_v)
});
chart_month.refresh();
chart_month.load("source/xml/barm"+montht_v+yearp_v+".xml");
data loaded but time period not changed ???
“units” is property of “xAxis” object and can not be defined separately. Therefore, if you want to change units, you should redefine the whole xAxis object.
chart_month.define("xAxis",{
template:function(obj){...},
value:function(obj){...},
units:{
start:new Date(yearp_v,monthp_v,1),
end:new Date(yearp_v,monthp_v,day_v),
next:function(d){
return dhtmlx.Date.add(d, 1, "day");
}
}
});
chart_month.refresh();