web299.com
全部
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
首页
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
当前位置:
首页
>
网页特效
>
图表
html5 canvas+js动态仪表盘插件
分类:
图表
日期:
2024-05-14
点击(0)
评论(0)
演 示
免费下载
简介
```html var opts = { lines: 12, // The number of lines to draw angle: 0.35, // The length of each line lineWidth: 0.1, // The line thickness pointer: { length: 0.7, // The radius of the inner circle strokeWidth: 0.04, // The rotation offset color: '#000000' // Fill color }, limitMax: 'false', // If true, the pointer will not go past the end of the gauge colorStart: '#6F6EA0', // Colors colorStop: '#C0C0DB', // just experiment with them strokeColor: '#EEEEEE', // to see which ones work best for you generateGradient: true }; var target = document.getElementById('foo'); // your canvas element var gauge = new Donut(target).setOptions(opts); // create sexy gauge! gauge.maxValue = 3000; // set max gauge value gauge.animationSpeed = 25; // set animation speed (32 is default value) gauge.set(1600); // set actual value Gauge类处理canvas的作图和使图像运动起来。 ``` ##### jQuery 插件 Gauge.js不依赖于jQuery,但如果你想用jQuery来运行它,你可以按下面的方法做: ```html $.fn.gauge = function(opts) { this.each(function() { var $this = $(this), data = $this.data(); if (data.gauge) { data.gauge.stop(); delete data.gauge; } if (opts !== false) { data.gauge = new Gauge(this).setOptions(opts); } }); return this; }; ```
相关推荐
html5浪漫粒子表白文字特效
SlidesJS幻灯片特效
html5瀑布流相册特效
css3 svg实现的情人节表白鲜花动画特效
t-scroll.js基于ES6的DOM元素,过渡动画库插件
纯js写省市区三级联动效果
广告
广告