0

我必须在图表后面的空格中添加一个数字。像这样的东西

在此处输入图像描述

这是小提琴

这是我的代码

  title: {
    text: title,
    align: 'left',
    x: 10,
    style: {
      color: '#000000',
      fontSize: '20px',
      fontWeight: '600',
      lineHeight: '29px'
    },
  },
  subtitle: {
    text: subtitle,
    align: 'left',
    x: 10,
    style: {
      color: '#4A4A4A',
      fontSize: '14px',

    },
    y: 50,
  },

我该怎么做?

4

1 回答 1

1

您可以使用添加文本Highcharts.SVGRenderer.text。检查下面发布的代码和演示。

代码:

  chart: {
    type: 'areaspline',
    width: 300,
    height: 275,
    events: {
      load: function() {
        var chart = this,
          number = 853;

        chart.renderer.text(number, 50, 70)
          .css({
            color: '#8b8bff',
            fontSize: 26,
            fontWeight: 'bold'
          })
          .add()
          .toFront();
      }
    }
  }

演示:

API参考:

于 2019-02-27T11:40:53.867 回答