ercharts 仪表盘

 


           var c8 = echarts.init(document.querySelector('#c8'));
           c8.setOption({
                   
            tooltip : {
                formatter: "{a} <br/>{c} {b}"
            },
            toolbox: {
                show : true,
                feature : {
                    mark : {show: true},
                    restore : {show: true},
                    saveAsImage : {show: true}
                }
            },
            
            series : [
                {
                    name:'电流',
                    type:'gauge',
                    min:0,
                    max:100,
                    splitNumber:10,
                    axisLine: {            // 坐标轴线
                        lineStyle: {       // 属性lineStyle控制线条样式
                            color: [[1, '#0374d4']],
                            width: 3,
                            shadowColor : '#0374d4', //默认透明
                            shadowBlur: 10
                        }
                    },
                    axisLabel: {            // 坐标轴小标记
                        textStyle: {       // 属性lineStyle控制线条样式
                            fontWeight: 'bolder',
                            color: '#e9eaeb',
                            shadowColor : '#0374d4', //默认透明
                            shadowBlur: 15
                        }
                    },
                    axisTick: {            // 坐标轴小标记
                        length :15,        // 属性length控制线长
                        lineStyle: {       // 属性lineStyle控制线条样式
                            color: 'auto',
                            shadowColor : '#0374d4', //默认透明
                            shadowBlur: 10
                        }
                    },
                    splitLine: {           // 分隔线
                        length :10,         // 属性length控制线长
                        lineStyle: {       // 属性lineStyle(详见lineStyle)控制线条样式
                            width:1,
                            color: '#0374d4',
                            shadowColor : '#0374d4', //默认透明
                            shadowBlur: 1
                        }
                    },
                    pointer: {           // 指针
                        width:5,
                        shadowColor : '#fff', //默认透明
                        shadowBlur: 5
                    },
                    title : {
                        textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
                            fontWeight: 'bolder',
                            fontSize: 12,
                            fontStyle: 'italic',
                            color: '#fff',
                            shadowColor : '#fff', //默认透明
                            shadowBlur: 10
                        }
                    },
                    detail : {
                            show : true,
                            borderWidth: 0,
                            borderColor: '#ccc',
                            offsetCenter: [0, '40%'],       // x, y,单位px
                            formatter:'{value}%',
                            textStyle: {       // 其余属性默认使用全局文本样式,详见TEXTSTYLE
                                fontSize : 50
                            }
                    },
                    data:[{value: 40}]
                },
            ]
        });

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值