Home Forums Report Bugs Zoom not working with many data points?

Zoom not working with many data points?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #20031

    Hi

    I have a graph that works fine with 89 data points, but fail to work with 255 data points. The problem is that the zoom does not work when having 255 datapoints.

    The code is the same in both case, could you please direct me to the issue?

    Many thanks.

    Code:

    `unction RenderTurningGraph() {
    var turningData = data;
    chartTurning = new CanvasJS.Chart(“trolley-turning-graph”, {
    title: {
    text: “Turning”
    },
    zoomEnabled: true,
    zoomType: “xy”,
    exportEnabled: true,
    axisY: {
    minimum: -50,
    maximum: 50,
    title: ‘Turning’,
    titleFontSize: 20,
    stripLines: [
    {
    value: $(‘#threshold-data’).data(‘turning-min’),
    color: ‘#222’
    },
    {
    value: $(‘#threshold-data’).data(‘turning-max’),
    color: ‘#222’
    }
    ],
    gridThickness: 1
    },
    axisX: {
    title: ‘Time [Days|Hours]’,
    titleFontSize: 20,
    labelFormatter: function (e) {
    //
    }
    },
    toolTip: {
    contentFormatter: function (e) {
    return e.entries[0].dataPoint.Label + “: ” + e.entries[0].dataPoint.y + ‘°’ +
    ‘<p>’ + e.entries[0].dataPoint.SampleTime + ‘</p>’;
    }
    },
    data: [
    {
    type: “line”,
    markerSize: 7,
    dataPoints: turningData
    }
    ]
    });

    chartTurning.render();
    }

    #20034

    @ehudg,

    Can you please create a jsfiddle reproducing the issue with sample data so that we can understand your code better and help you out.

    ___________
    Indranil Deo,
    Team CanvasJS

    #20045

    Hi

    I’ve created the fiddle:

    zoom not working

    #20051

    @ehudg,

    The behavior is designed such that zooming is limited upto a certain region, so the user doesn’t end up zooming into a blank-region (region with no dataPoints). To zoom into a certain region, there should be a minimum of 3-4 dataPoints.

    In your case, the zoom doesn’t work as there are less than 3-4 dataPoints over the Axis Y.

    We will reconsider this behavior for future releases.

    ___________
    Indranil Deo,
    Team CanvasJS

    #42552

    Has this already been fixed? I tried with the latest version and this bug still exists (after 5 years!). When will a fix be available?

    #42576

    @stefan-alfs,

    We are limiting the zooming & panning to have a minimum of 3-4 datapoints across x-axis in case of xy zooming type. This behaviour is designed to help users not zoom into blank regions (region with no dataPoints).
    ___________
    Adithya Menon,
    Team CanvasJS

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

You must be logged in to reply to this topic.