Skip to content
Permalink
Browse files
Improvements to graph - allow interactive pan & zoom
  • Loading branch information
timlinux committed Nov 21, 2011
1 parent d75d8b5 commit 0589dafe4816f01fa155741e59112877408e63a0
Showing with 13 additions and 7 deletions.
  1. +13 −7 resources/html/chart.html
@@ -6,27 +6,33 @@
<script language="javascript" type="text/javascript" src="../js/jquery.flot.js"></script>
<!-- flot grow plugin: see http://jumware.com/Includes/jquery/Flot/Doc/JQuery.flot.grow.html -->
<script language="javascript" type="text/javascript" src="../js/jquery.flot.grow.js"></script>
<script language="javascript" type="text/javascript" src="../js/jquery.flot.navigate.js"></script>
</head>
<body>
<div id="chart"><h1>Histogram loading...</h1></div>
<script id="source" language="javascript" type="text/javascript">
var d = new Array();
function replot()
{
var options = { series : {
grow : { active : true },
points : { show : true },
grow : { stepMode : "maximum", steps: 120 },
lines : { show : true }
}
var options = { series :
{
grow : { active : true },
points : { show : true },
grow : { stepMode : "maximum", steps: 120 },
lines : { show : true },
},
yaxis : { zoomRange: null, panRange: null },
xaxis : { zoomRange: null, panRange: null },
zoom : { interactive : true },
pan : { interactive : true }
};
$.plot($("#chart"), d, options);
}
function addSeries( theSeries )
{
d.push( { data: theSeries } );
replot();
alert( theSeries );
//alert( theSeries );
}
$(function ()
{

0 comments on commit 0589daf

Please sign in to comment.