横向柱状图表示百分比

描述:当前是关于Echarts图表中的 柱状图 示例。
 
            option = {
    // backgroundColor: '#000416',
    grid: { left: '20%', right: '20%', },
    xAxis: { type: 'value', show: false, },
    yAxis: {
        type: 'category',
        show: false,
        axisTick: {
            show: false
        },
    },
    series: [{
        type: 'bar',
        name: '业主人口数',
        data: [40],
        stack: 'income',
        barWidth: 12,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
                    { offset: 0, color: '#6EB7FF' },
                    { offset: 1, color: '#0059FF' },
                ])
            }
        },
        label: {
            show: false,
            position: 'left',
            offset: [0, 0],
            color: "#000",
            formatter: '{a}   {c}'
        },
    },
    {
        type: 'bar',
        name: '租户人口数',
        data: [60],
        stack: 'income',
        barWidth: 12,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
                    { offset: 0, color: '#FFA300' },
                    { offset: 1, color: '#FFD16E' },
                ])
            }
        },
        label: {
            show: false,
            position: 'right',
            color: "#000",
            offset: [0, 0],
            formatter: '{c}   {a}'
        },
    }]
}