echarts使用记录

2023-02-20  本文已影响0人  LemonTree7

1、柱状图如何让label文字固定在右侧

series: [
    {
      data: [],
      color: '#08B76F',
      type: 'bar',
      barWidth: '12px',
      showBackground: true,
      backgroundStyle: {
        color: '#E9EDF2',
        borderRadius: 15,
      },
      //使用这个对象来显示
      itemStyle: {
        normal: {
          label: {
            show: true,
            position: 'insideLeft',
            offset: [284, 0],  //标注好这个距离就可以
            textStyle: {
              //数值样式,显示的文字大小和颜色
              fontSize: '12',
              color: 'rgba(0,0,0,0.55)',
              fontWeight: 400,
              lineHeight: '18',
            }
          },
          barBorderRadius: 15,
        },
      },
    },
  ]
上一篇 下一篇

猜你喜欢

热点阅读