Highcharts Fixed Layout Column Chart
The following example demonstrates a fixed layout column chart.
We learned the basic Highcharts configuration syntax in the previous chapters. Now let's look at some other configurations. Add the pointPlacement and pointPadding configurations under series.
series.pointPadding
Controls the distance between columns. When the Highcharts chart width is fixed, the larger this value, the narrower the columns, and vice versa. The default value is 0.1.
series.pointPlacement
In a column chart, when pointPlacement is set to "on", the points on the X axis have no spacing. If pointPlacement is set to "between", columns are laid out according to ticks.
In versions after Highcharts 3.0.2, pointPlacement can accept numbers: 0 is the value on the axis, -0.5 is the interval between the current value and the previous value, and 0.5 is the interval between the current value and the next value. Unlike text settings, numeric settings do not affect the spacing between axes.
series: {
name: 'Employees',
color: 'rgba(165,170,217,1)',
data: [150, 73, 20],
pointPadding: 0.3,
pointPlacement: -0.2
}
Example
Filename: highcharts_column_fixed.htm
Highcharts 教程 | Runoob Tutorial(runoob.com)
The output of the above example is:
Highcharts Column Chart