highcharts 简单图类型

var chart = {

       /* type: 'areaspline'*/    //折线图

       /* type: 'column'*/            //柱状图

     /*   type: 'pie'  */        //饼图
  /*      type: 'treemap'  */         //树状图
       /* type: 'scatter',
        zoomType: 'xy'  */          //散点图
   
        //动态图
        events: {
            load: function () {
                // 图表每秒更新一次
                var series = this.series[0];
                setInterval(function () {
                    var x = (new Date()).getTime(), // 当期时间
                        y = Math.random();
                    series.addPoint([x, y], true, true);
                }, 1000);
            }
        }
    };

猜你喜欢

转载自blog.csdn.net/weixin_42470710/article/details/87776001