score:0

Accepted answer

someone named daniel, answered this question on the highcharts forum, i will give his answer below:

hi kodarokid,

if i understood correctly, you mean that you don't want to show the datalabels of points without partialfill to on the chart, right? if yes, in order to achieve the effect you expecting, you need to use datalabels.formatter function, and check whether the partialfill is defined in specific point, then format and display its value. otherwise return the empty string. please take a look at code below:

live example: https://jsfiddle.net/fmca01cz/

     datalabels: {
        enabled: true,
        formatter: function() {
          var percents = this.point.partialfill
          return percents ? percents * 100 + '%' : ''
      }

api reference: https://api.highcharts.com/highcharts/series.xrange.datalabels.formatter

best regards!


Related Query

More Query from same tag