Home forums Report Bugs Pan refreshing page

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 2 years, 10 months ago.

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

    khuynh
    Participant

    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=”/assets/script/canvasjs.min.js”></script>
    <body>
    <div id=”chartContainer” style=”height: 300px; width: 100%;”>
    </div>
    </body>
    </html>

    #5704

    Sunil Urs
    Keymaster

    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.