Created
July 14, 2012 00:40
-
-
Save gidili/3108480 to your computer and use it in GitHub Desktop.
reproduces a visual issue with flot on chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<script src="./js/jquery-1.7.2.min.js"></script> | |
<script src="./js/jquery.flot.js"></script> | |
<script type="text/javascript"> | |
var plot = null; | |
var flotOptions = { yaxis: { min: -30, max: 125 }, xaxis: { show: false, min: 0, max: 100 }, series: { shadowSize: 0 }, grid: { backgroundColor: { colors: ["#fff", "#eee"] } } }; | |
function refreshChart(points) | |
{ | |
plot.setData([{data: points, label: "mV", color: "#4AA02C"}]); | |
//plot.setupGrid(); | |
plot.draw(); | |
} | |
function getDataset() | |
{ | |
var points = []; | |
for(var i =0; i < 10000; i++){ | |
points.push([0.01*i, 10]); | |
} | |
refreshChart(points); | |
} | |
$(document).ready(function(){ | |
plot = $.plot($("#placeholder"), [{data: [], label: "mV", color: "#4AA02C"}], flotOptions); | |
t = setInterval(getDataset, 100); | |
}); | |
</script> | |
</head> | |
<body> | |
<center> | |
<div id="placeholder" style="width: 600px; height: 350px;"></div> | |
</center> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment