Realtime chart using flot jquery
I'm looking for a way to display a VM current CPU usage using a Flot (Jquery) Chart.

From now, i can draw simple lines but no clue on how to get the graphic move to the left as new data comes in.

    <script type="text/javascript">
    		var d1 = [ [0,0] ];
    		 options = {
    				lines: {
    					show: true
    				},
    				points: {
    					show: true
    				},
    				xaxis: {
    					tickDecimals: 0,
    					tickSize: 1
    				},
    				grid: {
    					backgroundColor: {
    						colors: ["#fff", "#eee"]
    					}
    				}
    		};
    		
    		function init() {                                              
    			$.plot($("#placeholder"), d1, options);
    		} /* init Function */
    
    		function update(){
    			for (var i = 0; i < 14; i += 0.5) {
    				d1.push([i, Math.floor(Math.random()*11)]);
    			}
    			$.plot($("#placeholder"), [ d1 ], options);
    		}
    		init();
    		$("input.dataUpdate").click(function () {
    			update();
    		});			
    	</script>

Any idea or maybe another plugin that can do the trick ?
Realtime chart using flot jquery
===

I'm looking for a way to display a VM current CPU usage using a Flot (Jquery) Chart.

From now, i can draw simple lines but no clue on how to get the graphic move to the left as new data comes in.

    <script type="text/javascript">
    		var d1 = [ [0,0] ];
    		 options = {
    				lines: {
    					show: true
    				},
    				points: {
    					show: true
    				},
    				xaxis: {
    					tickDecimals: 0,
    					tickSize: 1
    				},
    				grid: {
    					backgroundColor: {
    						colors: ["#fff", "#eee"]
    					}
    				}
    		};
    		
    		function init() {                                              
    			$.plot($("#placeholder"), d1, options);
    		} /* init Function */
    
    		function update(){
    			for (var i = 0; i < 14; i += 0.5) {
    				d1.push([i, Math.floor(Math.random()*11)]);
    			}
    			$.plot($("#placeholder"), [ d1 ], options);
    		}
    		init();
    		$("input.dataUpdate").click(function () {
    			update();
    		});			
    	</script>

Any idea or maybe another plugin that can do the trick ?