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

后端 未结 1 361
失恋的感觉
失恋的感觉 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 + '
    '; dlabel += Math.round(this.percentage*100)/100 + ' %'; return dlabel }, style: { color: 'white', }, }, },

    I think this snippet is what you are after?

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