Home Forums Report Bugs Bug report

Bug report

Viewing 2 posts - 1 through 2 (of 2 total)
  • #26075

    When the count of points is less than 12, then I got below error info:
    canvasjs.min.js:546 Uncaught TypeError: Cannot read property ‘x’ of undefined
    at F.getDataPointAtX (canvasjs.min.js:546)
    at $._updateToolTip (canvasjs.min.js:818)
    at $.mouseMoveHandler (canvasjs.min.js:816)
    at p._plotAreaMouseMove (canvasjs.min.js:263)
    at p._mouseEventHandler (canvasjs.min.js:253)
    at HTMLCanvasElement.<anonymous> (canvasjs.min.js:123)
    F.getDataPointAtX @ canvasjs.min.js:546
    $._updateToolTip @ canvasjs.min.js:818
    $.mouseMoveHandler @ canvasjs.min.js:816
    p._plotAreaMouseMove @ canvasjs.min.js:263
    p._mouseEventHandler @ canvasjs.min.js:253
    (anonymous) @ canvasjs.min.js:123

    Here is my code:
    function PlotChart(cd){
    if(document.getElementById(cd.name) == null){
    var v = document.createElement(“div”);
    v.setAttribute(“id”,cd.name);
    v.setAttribute(“style”,”height: 240px; width: 100%;”);
    document.body.appendChild(v);
    document.body.appendChild(document.createElement(“br”));
    }
    var chart = new CanvasJS.Chart(cd.name, {
    animationEnabled: true,
    zoomEnabled: true,
    theme: “light2”,

    title:{
    text: cd.name
    },
    axisX:{
    includeZero: false,
    valueFormatString: “HH:mm:ss.fff”
    },
    axisY:{
    includeZero: false,
    },
    data: [{
    toolTipContent: “{y}”,
    type: “line”,
    dataPoints: cd.dataPoints,
    }],
    rangeChanged: syncHandler
    });
    chart.render();
    //chart.destroy();
    //chart = null;
    //charts.push(chart);
    }

    #26093

    @sean_wdl,

    Using the code snippet shared above we are unable to reproduce the issue at our end. Can you kindly create a JSFiddle reproducing the issue you are facing and share it with us along with the sample data so that we can look into the code and chart-options being used by you to understand the scenario better and help you out?

    From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue or not able to understand the exact requirements or the solution that we provide may not work properly due to the variation in chart-options being used by you and us.

    Having a JSFiddle helps us in figuring out the issue and suggesting an appropriate solution accordingly.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.