案例:Highcharts案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
 
1
<html>
2
<head>
3
<meta charset="UTF-8" />
4
<title>Highcharts 教程 | W3xue教程(w3xue.com)</title>
5
<script src="/js/jquery-2.1.4.min.js"></script>
6
<script src="/js/hc/highcharts5.0.6.js"></script>
7
</head>
8
<body>
9
<div id="container" style="width: 550px; height: 400px; margin: 0 auto"></div>
10
<script language="JavaScript">
11
$(document).ready(function() {  
12
   var chart = {
13
      type: 'spline',
14
      animation: Highcharts.svg, // don't animate in IE < IE 10.
15
      marginRight: 10,
16
      events: {
17
         load: function () {
18
            // set up the updating of the chart each second
19
            var series = this.series[0];
20
            setInterval(function () {
21
               var x = (new Date()).getTime(), // current time
22
               y = Math.random();
23
               series.addPoint([x, y], true, true);
24
            }, 1000);
25
         }
26
      }
27
   };
28
   var title = {
29
      text: 'Live random data'   
30
   };   
31
   var xAxis = {
32
      type: 'datetime',
33
      tickPixelInterval: 150
34
   };
35
   var yAxis = {
36
      title: {
37
         text: 'Value'
38
      },
39
      plotLines: [{
40
         value: 0,
41
         width: 1,
42
         color: '#808080'
43
      }]
44
   };
45
   var tooltip = {
46
      formatter: function () {
47
      return '<b>' + this.series.name + '</b><br/>' +
48
         Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>' +