效果圖:
JS代碼:
$(function() { $(document).ready(function() { Highcharts.setOptions({ global: { useUTC: false } }); var chart; chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'spline', animation: Highcharts.svg, // don't animate in old IE marginRight: 10, events: { load: function() {} } }, title: { text: 'Live random data' }, xAxis: { type: 'datetime', tickPixelInterval: 150 }, yAxis: [{ title: { text: 'Value' }, plotLines: [{ value: 0, width: 1, color: '#808080' }] }, { title: { text: 'Name' }, plotLines: [{值:0,寬度:1,顏色:'#808080'}]}],工具提示:{formatter:function(){返回'<b>' + this.series.name.name +'</b> <br/> highCharts.numberformat(this.y,2);}},傳奇:{enabled:false},導出:{enabled:false},序列:[{name:'andand data',data',data:function(//) data.push({x:time+i * 1000,y:math.random()});}返回data;}}()},{name:'隨機數據',data :( function(){//生成一系列隨機數據= [] x: + i * 1000,y:math.random())系列([x,y + 1],true); addpoint([x,y -1]html::
<head> <script type =“ text/javaScript” src =“ js/jquery.min.js”> </script> <腳本> <腳本> <script> text/javascript“ src =” js/highcharts.js> </scipt> </script> <</script> <sript> <srippect =“在
以上這篇highcharts多個y軸動態刷新數據的實現代碼軸動態刷新數據的實現代碼,希望能給大家一個參考,也希望大家多多支持武林網。 ,也希望大家多多支持武林網。