0

Hi I am trying bold the labels as per the attached image in the the code base with calculation with percentage as shown

https://codepen.io/SophTooke/pen/ExorZZj

enter image description here[enter code here][2]

1 Answers1

0

Try use dataLabels.formatter to edit dataLabels, and style inside CSS but remember to set dataLabels.useHTML.

plotOptions: {
    sankey: {
        dataLabels: {
            useHTML: true,
            formatter: function() {
              let chart = this,
                  weight = chart.point.weight;
              
              return `Weight: <span>${weight}</span>`
            }
        },
    }
},

Demo:

https://codepen.io/sebastian-hajdus/pen/BarjMap

API References:

https://api.highcharts.com/highcharts/series.sankey.dataLabels.formatter https://api.highcharts.com/highcharts/series.sankey.dataLabels.useHTML

Sebastian Hajdus
  • 1,422
  • 1
  • 5
  • 14