横向柱状图

描述:当前是关于Echarts图表中的 柱状图 示例。
 
            let diff = [{ name: '缓冲区', value: 10 ,unit:"pa"}, 
    { name: '接受处理区', value: 90 ,unit:"pa" }, 
    { name: '制备区', value: 80 ,unit:"pa" }, 
    { name: '质检区', value: 70  ,unit:"pa"}, 
    { name: '存储区', value: 60  ,unit:"pa"}]
option = {
   backgroundColor:"#000000",
        tooltip: {
            show: true,
            trigger: 'item',
            padding: [8, 15],
            backgroundColor: 'rgba(12, 51, 115,0.8)',
            borderColor: 'rgba(3, 11, 44, 0.5)',
            textStyle: {
                color: 'rgba(255, 255, 255, 1)'
            },
        },
        legend: {show: false,},
        grid: {left: '22%',right: '12%',top: '5%',bottom: '3%',},
        xAxis: [
            {
                splitLine: {show: false,},
                type: 'value',
                show: false,
                axisLine: {     //x轴坐标轴,false为隐藏,true为显示
                    show: false
                },
            },
        ],
        yAxis: [{
                show: true,
                splitLine: {show: false,},
                axisLine: { show: false,},
                type: 'category',
                axisTick: {show: false,},
                inverse: true,
                axisLabel: { show: false,},
            },{
                type: 'category',
                inverse: true,
                axisTick: 'none',
                axisLine: 'none',
                show: true,
                axisLabel: {
                    textStyle: {
                        color: '#fff',
                        fontSize: 12
                    },
                    formatter: function (value , index  ) {
                        return value + diff[index].unit ;
                    },
                },
                data: diff,
            },],
        series: [{
                show: true,
                name: '',
                type: 'bar',
                data: diff,
                barWidth: 5, // 柱子宽度
                showBackground: true,
                label: {
                    show: true,
                    width: 200,
                    offset: [0, 0],
                    color: 'rgba(255, 255, 255, 0.6)',
                    fontFamily: 'SourceHanSansCN-Normal',
                    fontSize: 12,
                    fontWeight: 500,
                    position: 'left',
                    formatter: function (params) {
                        return params.data.name;
                    }},
                itemStyle: {
                    show: true,
                    barBorderRadius: [10, 10, 10, 10],
                    color: {
                        type: "linear",
                        colorStops: [{ offset: 0, color: "rgba(30, 230, 231, 1)", }, { offset: 1, color: "rgba(63, 149, 206, 0.3)", },],
                    },
                },
                emphasis: {disabled: true,}
            },
            {
                name: "",
                type: "scatter",
                emphasis: { scale: false, },
                symbol: "rect",
                symbolSize: [3, 9],// 进度条白点
                itemStyle: {
                    show: true,
                    barBorderRadius: [10, 10, 10, 10],
                    color: '#FFF',
                    shadowColor: "rgba(255, 255, 255, 0.5)",
                    shadowBlur: 5,
                    borderWidth: 1,
                    opacity: 1,
                },
                z: 2,
                data: diff,
                animationDelay: 500,
            },
        ],

    }