Home forums Using CanvasJS Zoom Reply To: Zoom

#12674

Navinder
Member

Hi Vishwas,

Thanks for that. I have data in minutes and I am using below code. Its working fine for reset but for zoom, it’s showing
HH:11 for all minutes of hour and changes to HH+1:11 for next hour.

var axisXOption= {
interval: 3,
intervalType: “hour”,
valueFormatString: “DD-MMM h tt”,
};
if(e.trigger === “reset”) {
axisXOption.interval=3;
axisXOption.intervalType=”hour”;
axisXOption.valueFormatString= “DD-MMM h tt”;
}
else if(e.trigger === “zoom”) {
axisXOption.interval= 5;
axisXOption.intervalType= “minute”;
axisXOption.valueFormatString= “HH:MM”;
}