Skip to content

Commit

Permalink
Improvements to graph - allow interactive pan & zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Nov 21, 2011
1 parent d75d8b5 commit 0589daf
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions resources/html/chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
{
Expand Down

0 comments on commit 0589daf

Please sign in to comment.