You must be logged in to post your query.
Home › Forums › Report Bugs › Zoom doesn't work with Date xAxis minimum.
Tagged: zoom date
Based on your “Axis Range”, and changing the xAxis to a Date, zoom (and pan) fail. Trying to zoom does nothing, and pan clears the chart. Remove the xAxis minimum and it works. Don’t use a Date (as in your example) and it works.
See here: jsfiddle
?
Looks like you have forgotten to update/save the fiddle before posting. Can you please create it again and send.
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();
We have tried your code and it is working fine with the latest version. We had this issue with the older version. Here is a jsFiddle.
Thanks. As you say, works with 1.8 beta.
You must be logged in to reply to this topic. Login/Register