1、echarts--rich的基础配置

180 阅读1分钟

1、rich 修改样式

注释:使用rich设置自己想要的样式

title: {
          text: "{a||}{b|数据异常情况}{c|生长数据}   {d|传感数据器}",
          textStyle: {
            lineHeight: 25,
            rich: {
              a: {
                width: 3,
                height: 15,
                fontWeight: "bloder",
                color: "#0ea97b",
                backgroundColor: "#18b78a",
              },
              b: {
                width: 120,
                height: 25,
                fontSize: "14px",
                color: "#0ea97b",
                padding: [0, 0, 0, 15],
              },
              c: {
                width: 60,
                height: 25,
                color: "#fff",
                backgroundColor: "#18b78a",
                borderRadius: 4,
                padding: [0, 0, 0, 15],
              },
              d: {
                width: 80,
                height: 25,
                color: "#18b78a",
                borderColor: "#18b78a",
                borderWidth: 1,
                borderRadius: 4,
                padding: [0, 0, 0, 15],
              },
            },
          },
        },