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

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  mojito 1 year, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9368

    mojito
    Member

    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

    ?

    #9381

    Looks like you have forgotten to update/save the fiddle before posting. Can you please create it again and send.

    #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();

    #9435

    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.

    #9436

    mojito
    Member

    Thanks. As you say, works with 1.8 beta.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.