Echarts横向倒叙柱状图显示箭头

该博客内容展示了三个不同进度——榜样进度、平均进度和实际进度的柱状图。图表详细描绘了工作态度、获客能力等七个能力领域的完成情况,通过颜色和标记区分了各个进度,有助于读者对比和理解各项能力的差距。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

横向倒叙柱状图显示箭头图例

option = {
    title: {
        text: '能力进度条',

    },
    tooltip: {
        trigger: 'axis',
        axisPointer: { // 坐标轴指示器,坐标轴触发有效
            type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
        }
    },
    legend: {
        data: ['实际进度', '平均进度', '榜样进度']
    },
    grid: {

        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'value',
        show: false
    },
    yAxis: {
        type: 'category',
        data: ['工作态度', '获客能力', '开单能力', '增员能力', '团队管理能力', '高客拓展能力', '学习能力'],
        axisTick: {
            show: false
        },
        inverse: true,
        axisLine: {
            show: false
        }
    },
    series: [{
            name: '榜样进度',
            type: 'bar',
            barGap: '-100%',
            barCategoryGap: '70%',
            /*多个并排柱子设置柱子之间的间距*/
            // barCateGoryGap:1, //关键第二句:值或为百分比 ‘60%’ ,如果同一类目下的柱间距:barGap:2
            itemStyle: {
                normal: {
                    color: 'rgba(128,128,128,1)',
                    label: {
                        formatter: "\n\n\n\n\n\n榜样进度",
                        show: true,
                        position: 'insideRight',
                        textStyle: {
                            fontSize: 9,
                            fontFamily: 'Microsoft YaHei',
                            fontStyle: 'normal',
                            fontWeight: 'bold'
                        }
                    },


                }
            },
            data: [100, 100, 100, 100, 100, 100, 100],
            markPoint: {
                symbol:
                    'path://M708.49298 138.982839l-140.580343-119.812792c-33.547582-25.560062-81.472699-25.560062-115.020281 0l-140.580344 119.812792c-17.572543 17.572543-20.767551 43.132605-4.792511 59.107645s43.132605 20.767551 59.107644 4.792511l102.24025-84.667706v862.652106c0 25.560062 17.572543 43.132605 43.132605 43.132605s43.132605-17.572543 43.132605-43.132605V123.0078l102.24025 84.667707c4.792512 4.792512 17.572543 7.98752 25.560062 7.98752 12.780031 0 25.560062-4.792512 33.547582-17.572543 12.780031-15.975039 12.780031-41.535101-7.987519-59.107645z',
                symbolKeepAspect: true,
                symbolSize: [10, 65],
                label: {
                    position: "insideTop",
                    // distance: 7,
                    show: false
                },
                data: [{
                        xAxis: 100,
                        yAxis: 0
                    },
                    {
                        xAxis: 100,
                        yAxis: 1
                    },
                    {
                        xAxis: 100,
                        yAxis: 2
                    },
                    {
                        xAxis: 100,
                        yAxis: 3
                    },
                    {
                        xAxis: 100,
                        yAxis: 4
                    },
                    {
                        xAxis: 100,
                        yAxis: 5
                    },
                    {
                        xAxis: 100,
                        yAxis: 6
                    }
                ]
            }
        },
        {
            name: '平均进度',
            type: 'bar',
            barGap: '-100%',
            barCategoryGap: '70%',
            /*多个并排柱子设置柱子之间的间距*/
            // barCateGoryGap:1, //关键第二句:值或为百分比 ‘60%’ ,如果同一类目下的柱间距:barGap:2
            itemStyle: {
                normal: {
                    color: 'green',
                    label: {
                        formatter: "\n\n\n\n\平均进度",
                        show: true,

                        position: 'insideRight',
                        textStyle: {
                            fontSize: 9,
                            fontFamily: 'Microsoft YaHei',
                            fontStyle: 'normal',
                            fontWeight: 'bold'
                        }

                    },


                }
            },
            data: [30, 40, 50, 60, 40, 50, 60],
            markPoint: {
                symbol:
                    'path://M708.49298 138.982839l-140.580343-119.812792c-33.547582-25.560062-81.472699-25.560062-115.020281 0l-140.580344 119.812792c-17.572543 17.572543-20.767551 43.132605-4.792511 59.107645s43.132605 20.767551 59.107644 4.792511l102.24025-84.667706v862.652106c0 25.560062 17.572543 43.132605 43.132605 43.132605s43.132605-17.572543 43.132605-43.132605V123.0078l102.24025 84.667707c4.792512 4.792512 17.572543 7.98752 25.560062 7.98752 12.780031 0 25.560062-4.792512 33.547582-17.572543 12.780031-15.975039 12.780031-41.535101-7.987519-59.107645z',
                symbolKeepAspect: true,
                symbolSize: [10, 65],
                label: {
                    position: "insideTop",
                    // distance: 7,
                    show: false
                },
                data: [{
                        xAxis: 30,
                        yAxis: 0
                    },
                    {
                        xAxis: 40,
                        yAxis: 1
                    },
                    {
                        xAxis: 50,
                        yAxis: 2
                    },
                    {
                        xAxis: 60,
                        yAxis: 3
                    },
                    {
                        xAxis: 40,
                        yAxis: 4
                    },
                    {
                        xAxis: 50,
                        yAxis: 5
                    },
                    {
                        xAxis: 60,
                        yAxis: 6
                    }
                ]
            }
        },

        {
            name: '实际进度',
            type: 'bar',
            barGap: '-100%',
            barCategoryGap: '70%',
            /*多个并排柱子设置柱子之间的间距*/
            // barCateGoryGap:1, //关键第二句:值或为百分比 ‘60%’ ,如果同一类目下的柱间距:barGap:2
            itemStyle: {
                normal: {
                    color: 'red',
                    label: {
                        formatter: "\n\n\实际进度",
                        show: true,
                        position: 'insideRight',
                        textStyle: {
                            fontSize: 9,
                            fontFamily: 'Microsoft YaHei',
                            fontStyle: 'normal',
                            fontWeight: 'bold'
                        }
                    },


                }
            },
            data: [50, 60, 30, 50, 100, 40, 65],
            markPoint: {
                symbol:
                    'path://M708.49298 138.982839l-140.580343-119.812792c-33.547582-25.560062-81.472699-25.560062-115.020281 0l-140.580344 119.812792c-17.572543 17.572543-20.767551 43.132605-4.792511 59.107645s43.132605 20.767551 59.107644 4.792511l102.24025-84.667706v862.652106c0 25.560062 17.572543 43.132605 43.132605 43.132605s43.132605-17.572543 43.132605-43.132605V123.0078l102.24025 84.667707c4.792512 4.792512 17.572543 7.98752 25.560062 7.98752 12.780031 0 25.560062-4.792512 33.547582-17.572543 12.780031-15.975039 12.780031-41.535101-7.987519-59.107645z',
                symbolKeepAspect: true,
                symbolSize: [10, 65],
                label: {
                    position: "insideTop",
                    // distance: 7,
                    show: false
                },
                data: [{
                        xAxis: 50,
                        yAxis: 0
                    },
                    {
                        xAxis: 60,
                        yAxis: 1
                    },
                    {
                        xAxis: 30,
                        yAxis: 2
                    },
                    {
                        xAxis: 50,
                        yAxis: 3
                    },
                    {
                        xAxis: 100,
                        yAxis: 4
                    },
                    {
                        xAxis: 40,
                        yAxis: 5
                    },
                    {
                        xAxis: 65,
                        yAxis: 6
                    }
                ]
            }
        }
    ]
}
echarts横向叠加柱状图是一种数据可视化的图表类型,主要用于展示不同类别的数据在同一时间段或同一维度上的对比情况。 echarts是一个基于JavaScript的开源数据可视化库,具有强大的绘图能力和丰富的图表类型。横向叠加柱状图是其中一种常用的图表类型,通过将不同类别的柱状图在水平方向上进行叠加,可以方便地对比它们之间的差异。 横向叠加柱状图的绘制需要准备好数据和配置参数。数据通常以数组的形式传入,每个元素表示一个柱状图的数据项。可以通过设置不同的属性,如name、type、barCategoryGap等,来控制横向叠加柱状图的样式和布局。 要绘制一张横向叠加柱状图,首先需要初始化一个echarts实例,并指定绘图的容器。然后,通过配置参数来定义横向叠加柱状图的各项属性,比如坐标轴、图例、标题等。最后,将前面准备好的数据传入echarts实例中,调用绘图方法即可。 横向叠加柱状图可以帮助我们更直观地比较多个类别的数据,在销售对比、市场份额、用户数量等方面有广泛应用。通过合理设计图表的颜色、标签和交互方式,可以使数据更加易于理解和传达,有助于分析和决策。 总之,横向叠加柱状图是一种常用的数据可视化工具,可以通过echarts库来绘制。在实际应用中,我们可以根据需求和数据特点来调整其样式和布局,以更好地呈现数据的对比情况。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值