柱状echarts 自定义图例设置

 

 

  legend: {
          // 图例
          orient: 'vertical',
          left: 'right',
          icon: 'circle',
          data: this.legendData,
          formatter: name => {
            return `{a|${this.chartData.find(item => item.name === name)
              ?.value || 0}台}\n{b|${name}}`
          },
          textStyle: {
            rich: {
              a: {
                fontSize: 20,
                color: '#25355',
                fontWight: '600',
                verticalAlign: 'top',
                padding: [0, 0, 10, 0],
              },
              b: {
                fontSize: 14,
                color: '#A3AEC1',
                fontWeight: 500,
              },
            },
          },
        },

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-10-01
  • 2021-12-30
  • 2021-12-15
猜你喜欢
  • 2021-09-10
  • 2021-10-14
  • 2021-12-29
  • 2021-09-30
  • 2021-10-04
相关资源
相似解决方案