Displaying percentage in Y-axis of Highcharts column chart

前端 未结 5 1145
醉梦人生
醉梦人生 2020-12-18 21:46

I have a column chart very similar to this one demo. I want to display percentage on the Y-axis and not the count.Count should be displayed on top of each bar. I do not want

相关标签:
5条回答
  • 2020-12-18 22:03

    You could do this:

    yAxis: {
      labels: {
        format: '{value}%'
      }
    }
    
    0 讨论(0)
  • 2020-12-18 22:03

    You can use formatter http://api.highcharts.com/highcharts#yAxis.labels.formatter and add symbol to your label.

    0 讨论(0)
  • 2020-12-18 22:04

    Here is what I did:

    yAxis: {
      labels: {
        formatter: function() {
           return this.value+"%";
        }
      },
    }
    
    0 讨论(0)
  • 2020-12-18 22:10

    what I did is:

    yAxis: {min: 0, max:100,tickInterval: 25,
                  title: {
                      text: "title"
                  },
                  labels: {
                      format: '{value}%',
                  }
              }
    
    0 讨论(0)
  • 2020-12-18 22:15

    Use this in plot options,

    plotOptions: { column: { stacking:'percent', pointPadding: 0.2, borderWidth: 0 } },

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