Home Forums Report Bugs Pan refreshing page

Pan refreshing page

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

    When I click on the Pan button, it refreshes the page. I copy the sample html and paste it to my local machine and it still refreshes the page when i click on the Pan button. I did download the latest js file.

    Here is the code i took:
    <!DOCTYPE HTML>
    <html>

    <head>
    <script type=”text/javascript”>
    window.onload = function () {

    var chart = new CanvasJS.Chart(“chartContainer”,
    {
    zoomEnabled: true,
    title:{
    text: “Stress Test: 100,000 Data Points”
    },
    axisX:{
    labelAngle: 30
    },

    axisY :{
    includeZero:false
    },

    data: data // random generator below

    });

    chart.render();
    }

    var limit = 100000; //increase number of dataPoints by increasing this

    var y = 0;
    var data = []; var dataSeries = { type: “line” };
    var dataPoints = [];
    for (var i = 0; i < limit; i += 1) {
    y += (Math.random() * 10 – 5);
    dataPoints.push({
    x: i – limit / 2,
    y: y
    });
    }
    dataSeries.dataPoints = dataPoints;
    data.push(dataSeries);

    </script>
    <script type=”text/javascript” src=”https://cdn.canvasjs.com/canvasjs.min.js”></script&gt;
    <body>
    <div id=”chartContainer” style=”height: 300px; width: 100%;”>
    </div>
    </body>
    </html>

    #5704

    May I know which browser you are using and its version?

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

You must be logged in to reply to this topic.