仪表盘

描述:当前是关于Echarts图表中的 示例。
 
            const value = 70
option = {
    backgroundColor: '#0E1327',
    series: [
        {
            type: 'gauge',
            z: 100,
            axisLine: {
                lineStyle: {
                    width: 3,
                    color: [
                        [0.25, '#00ed03'],
                        [0.55, '#ffb800'],
                        [1, '#af00a9']
                    ]
                }
            },
            pointer: { // 指针样式
                itemStyle: {
                    color: 'auto' // 随刻度区间颜色变化
                }
            },
            axisTick: { // 刻度样式
                distance: 0,
                length: 4,
                lineStyle: {
                    color: 'auto',
                    width: 2
                }
            },
            splitLine: { // 刻度中长刻度的样式
                distance: 0,
                length: 6,
                lineStyle: {
                    color: 'auto',
                    width: 4
                }
            },
            axisLabel: { // 表盘数字样式
                color: '#fff',
                distance: 20,
                fontSize: 15
            },
            detail: { // 仪表盘详情
                valueAnimation: true,
                formatter: '{value} %',
                show: true,
                color: 'white',
                offsetCenter: [0, '75%']
            },
            data: [{
                value: value
            }]
        },
    ]
};