tnblog
首页
视频
资源
登录

MVC统计图自动增加节点

1381人阅读 2021/4/23 17:24 总访问:187484 评论:0 收藏:0 手机
分类: Jquery

报表中增加节点(chart)

                     events: {
                        load: function () {
                            //根据数据个数改变(没有数据就不能增加)
                            var servirs = this.series[0];
                            var servirs1 = this.series[1];
                            setInterval(function () {
                                servirs.addPoint(Math.round(Math.random() *10), true, true)
                                servirs1.addPoint(Math.round(Math.random() * 10), true, true)
                            }, 1000)
                        }
                    }
                    
                    
                    
                    //数据个数
                     series: [{
                                name: '温度',
                                color: '#89A54E',
                                type: 'line',
                                data: [6, 8, 2, 4, 5, 7, 8, 2, 4, 1, 4, 3, 4],
                                tooltip: {
                                valueSuffix: ' °C'
                               }
                               }, {
                                name: '湿度',
                                color: '#abcdef',
                                type: 'line',
                                data: [6, 8, 2, 4, 5, 7, 8, 2, 4, 1, 4, 3, 4],
                                tooltip: {
                                valueSuffix: ' °C'
                                }
                            }]


评价
脚踏实地,一步一个脚印
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2022TNBLOG.NET
技术交流:群号677373950
联系我们:contact@tnblog.net
欢迎加群交流技术