echarts内的legend换行对齐

image.png

  legend: {
                    bottom: 'bottom',
                    formatter: ["{a|{name}}"].join("\n"),
                    textStyle: {
                        // 文字块背景色,一定要加上,否则对齐不会生效
                        backgroundColor: "transparent",
                        rich: {
                            a: {
                                width: 110
                            },
                        },
                    },
                },


相关内容

发表评论

验证码:
点击我更换图片

最新评论