Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Highcharts Column Chart with Rotated Labels

Highcharts Column Chart with Rotated Labels

Highcharts Column ChartHighcharts Column Chart

The following example demonstrates a column chart with rotated labels.

We learned the basic Highcharts configuration syntax in the previous chapters. Now let's look at some other configurations. Add the rotation property to dataLabels:


Configure

dataLabels: Data Labels

dataLabels defines whether data labels are displayed on the chart.

The degree of text rotation is determined by the rotation property. We can also define the background, spacing, border, etc. of the text labels through other properties.



dataLabels = {

   enabled: true,

   rotation: -90,

   color: '#FFFFFF',

   align: 'right',

   format: '{point.y:.1f}', // 一个小数

   y: 10, // 从上到下 10 像素

   style: {

      fontSize: '13px',

      fontFamily: 'Verdana, sans-serif'

   }

}

Example

Filename: highcharts_column_rotated.htm









Highcharts 教程 | Runoob Tutorial(runoob.com)









The output of the above example is:

Highcharts Column ChartHighcharts Column Chart