Is it possible to position Highcharts dataLabels depending on the value?

后端 未结 4 484
温柔的废话
温柔的废话 2020-12-14 11:32

I\'m using Highcharts to display a bar chart, with 2 bars overlaying each other, and a dataLabels at the right of them, displaying the exact value.

The problem here

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 12:01

    I've been trying to figure some of this out myself... it looks like instead of

    this.series.chart.options.plotOptions.bar.dataLabels.x -= 20;
    

    could you use...

    this.series.options.dataLabels.x = -20;
    

    ... at this point I'm trying to understand if I'm able to discern the location of a dataLabel so that I can reposition it if necessary.

提交回复
热议问题