Home forums Report Bugs Zoom doesn't work with Date xAxis minimum. Reply To: Zoom doesn't work with Date xAxis minimum.

#9386

mojito
Member

Oops.Sorry. Try this one: https://jsfiddle.net/2tex4qc3/11/

Or, in case I have still messed up, code:

var chart = new CanvasJS.Chart(“chartContainer”,
{
zoomEnabled: true,
axisX: {
// Comment out the next line to make zoom and pan work
minimum: new Date(“2015-10-05”)
},

data: [
{
type: “line”,
dataPoints: [
{ x: new Date(“2015-10-10”), y: 71 },
{ x: new Date(“2015-10-11”), y: 55},
{ x: new Date(“2015-10-12”), y: 50 },
{ x: new Date(“2015-10-13”), y: 65 },
{ x: new Date(“2015-10-14”), y: 95 },
{ x: new Date(“2015-10-15”), y: 68 },
{ x: new Date(“2015-10-16”), y: 28 },
{ x: new Date(“2015-10-17”), y: 34 },
{ x: new Date(“2015-10-18”), y: 14}
]
}
]
});

chart.render();