echarts设置title格式 rich

                title: {
                    text: [
                        "{a|15%}",
                        "{b|YIELD}"
                    ].join("\n"),
                    subtext: "",
                    itemGap: 5,
                    left: 'center',
                    top: 'center',
                    // 将标题放置在圆环的中间
                    position: 'inside',
                    // 将标题的偏移量设置为圆环的一半
                    offsetCenter: [0, '-50%'],
                    zlevel: 3, //层级
                    textStyle: {
                        rich: {
                            a: {
                                color: '#6DFFFF',
                                fontSize: 24,
                                lineHeight: 32
                            },
                            b: {
                                color: "#E5FFFF",
                                fontSize: 20,
                            }
                        },
                    }
                    //textStyle: {
                    //    fontWeight: '700',
                    //    color: '#fff',
                    //    fontSize: '21',
                    //    lineHeight: 32
                    //},
                    //subtextStyle: {
                    //    color: "#Fff",
                    //    fontSize: 14,
                    //    top: "center"
                    //}
                },
posted @ 2024-12-27 15:44  暖暖De幸福  阅读(190)  评论(0)    收藏  举报