Echars——码表指针

Echars——码表指针

 

Echars——码表指针

option ={
             backgroundColor: "#062a44",
            grid: {
                left: 30,
                right: 30,
                top: 10,
                bottom: 10
            },
            series: [

                {
                name: '刻度',
                type: 'gauge',
                    center: ['50%', '55%'],
                radius: '82%',
               
                min: -25,
                max: 100,
                splitNumber: 10, //刻度数量
                startAngle: 220,
                endAngle: -40,
                axisLabel: {
                        show: true,
                        color: '#fff',
                        distance: -18,
                        fontWeight:'bold'
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        width: 1,
                        color: [[1, 'rgba(255,255,255,0.8)']]
                    }
                },//刻度标签。
                axisTick: {
                    show: true,
                    lineStyle: {
                        color: '#fff',
                        width: 1
                    },
                    length: -8
                },//刻度样式
                splitLine: {
                    show: true,
                    length: -15,
                    lineStyle: {
                        color: '#fff'
                    }
                },//分隔线样式
                detail: {
                    show: false
                },
                pointer: {
                    show: false
                }
            },
        
                {


                    type: 'gauge',
                    radius: '75%',
                    center: ['50%', '55%'],
                    data: [{value: 25, name: ''}],
                     min: -25,
                   max: 100,
                    splitNumber: 10, //刻度数量
                    startAngle: 220,
                    endAngle: -40,
                    axisLine: {
                        show: true,
                        lineStyle: {
                            width: 20,
                            color:
                                [[0.3, '#F499A7'],[0.6, '#20EE42'], [1, '#ffffff']]
                        }
                    },
                    //分隔线样式。
                    splitLine: {
                        show: true
                    },
                    axisLabel: {
                        show: true
                    },
                    axisTick: {
                        show: true
                    },
               
                    //仪表盘详情,用于显示数据。
                    detail: {
                        show: false,
                        offsetCenter: [0, 0],
                        color: '#ddd',
                        formatter: function (params) {
                            return params
                        },
                        textStyle: {
                            fontSize: 40
                        }
                    },
                 
                }
            ]
        };