Highcharts single horizontal stacked bar chart with data names (labels) and %-ages always shown and data numbers and series name shown on mousehover

后端 未结 1 360
失恋的感觉
失恋的感觉 2021-01-24 04:24

Is it possible to combine the following?

Fiddle 1 (answered by mäksä) as a main template:

  • Single horizontal stacked bar w
相关标签:
1条回答
  • 2021-01-24 05:03

    Again it's a simple modification of the Highcharts attributes in particular this small snippet:

    bar: {
            dataLabels: {
               enabled: true,
               distance : -50,
               formatter: function() {
                     var dlabel = this.series.name + '<br/>';
                     dlabel += Math.round(this.percentage*100)/100 + ' %';
                     return dlabel
               },
               style: {
                     color: 'white',
               },
            },
    
      },
    

    I think this snippet is what you are after?

    0 讨论(0)
提交回复
热议问题