一只龙小虾 2022-08-14 13:34 采纳率: 0%
浏览 34

第二个饼图的副标题显示不出来 只有个横杠

饼图样式代码

export var options_pie = {
title: [
{
subtext: "各累计数据占比",
left: "6%",
top: "90%",
textAlign: "center",
subtextStyle: {
fontSize: 16,
color: "bisque",
fontWeight: "bold",
},
},

{
  subtext: "各今日数据占比",
  right: "25%",
  top: "90%",
  textAlign: "center",
  subtextStyle: {
    fontSize: 1,
    color: "bisque",
    fontWeight: "bold",
  },
},

],
tooltip: {
trigger: "item",
formatter: "{a}
{b} : {c} ({d}%)",
},

series: [
{
type: "pie",
radius: "68%",
center: ["50%", "50%"],
data: [],
label: {
position: "outer",
alignTo: "labelLine",
color: "white",
fontSize: "12",
fontWeight: "bold",
},
left: 0,
right: "50%",
top: 0,
bottom: 0,
},
{
type: "pie",
radius: "68%",
center: ["50%", "50%"],
data: [],
label: {
position: "outer",
alignTo: "labelLine",
color: "white",
fontSize: "12",
fontWeight: "bold",
},
left: "50%",
right: "0%",
top: 0,
bottom: 0,
},
],
};

运行结果及报错内容

img

  • 写回答

1条回答 默认 最新

  • 拾梦逅 2022-08-15 09:17
    关注

    是不是你设置font-size为1?

    img

    评论

报告相同问题?

问题事件

  • 创建了问题 8月14日