You must be logged in to post your query.
Home › Forums › Report Bugs › Pan refreshing page
Tagged: Pan refreshing page
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>
May I know which browser you are using and its version?
You must be logged in to reply to this topic. Login/Register