• echarts 柱状图


    var option3 = {
            title: {
                text: '各统筹区DRGs入组病案年累计费用',
                textStyle:{
                    fontSize:'20'
                }
            },
            tooltip: {
                trigger: 'axis',
                axisPointer: { // 坐标轴指示器,坐标轴触发有效
                    type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
                }
            },
            legend: {
                data: ['DRGs职工结算', 'DRGs居民结算', '特例单议结算'],
                y: 'bottom'
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '10%',
                containLabel: true
            },
            toolbox: {
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis: {
                type: 'value' //xAxis和yAxis可以调换,

                  axisLabel: { //用于解决横轴列过多,自动隐藏列标题
                     interval: 0,
                        rotate: 30
                  }

            },
            yAxis: {
                type: 'category',
                data: ['云城区', '云安区', '郁南县', '新兴县', '罗定市']
            },
            series: [{
                name: 'DRGs职工结算',
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'insideRight'
                    }
                },
                barWidth: 13,
                stack: '总量',//stack总量表示柱状图重叠在一起,如果不想重叠注释掉即可
                data: [1669, 1456, 840, 657, 270],
                itemStyle: {
                    normal: {
                        color: '#2dafd1'
                    }
                }
            },
            {
                name: 'DRGs居民结算',
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'insideRight'
                    }
                },
                barWidth: 13,
                stack: '总量',
                data: [947, 300, 122, 120, 248],
                itemStyle: {
                    normal: {
                        color: '#2ec2ba'
                    }
                }
            },
            {
                name: '特例单议结算',
                type: 'bar',
                label: {
                    normal: {
                        show: true,
                        position: 'insideRight'//表示柱状图上文字显示的位置
                    }
                },
                barWidth: 13,
                stack: '总量',
                data: [263, 100, 40, 158, 36],
                itemStyle: {
                    normal: {
                        color: '#30d9a1'
                    }
                }
            }
            ]
        };
  • 相关阅读:
    1654. Minimum Jumps to Reach Home
    1129. Shortest Path with Alternating Colors
    1766. Tree of Coprimes
    1368. Minimum Cost to Make at Least One Valid Path in a Grid
    LeetCode 841 钥匙与房间
    LeetCode 268 缺失数字
    LeetCode 136 只出现一次的数字
    LeetCode 461 汉明距离
    LeetCode 557 反转字符串中的单词 III
    LeetCode 392 判断子序列
  • 原文地址:https://www.cnblogs.com/slfmeimei/p/10723269.html
Copyright © 2020-2023  润新知