I am trying to make a column chart with no padding on the sides.
What options do I have to add to my highcharts configuration?
This jsfiddle is my current attempt:
$('#container').highcharts
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
credits:
enabled: off
legend:
enabled: off
exporting:
enabled: off
title:
text: null
chart:
margin: [0,0,0,0]
type: 'column'
plotOptions:
column:
groupPadding: 0
pointPadding: 0
borderWidth : 0
stacking: 'normal'
xAxis:
title:
text: null
labels:
enabled: off
yAxis:
title:
text: null
labels:
enabled: off
gridLineWidth: 0
minorGridLineWidth: 0
For CoffeeScript
Under xAxis, add
min: 0.05
max: 11
For Javascript,
Under xAxis, add
min: 0.05,
max: 11,
PS Adjust max
according to your needs.
DEMO : http://jsfiddle.net/ytfYe/2/
Ref: Highcharts Remove Space across the x-Axis
tag: bar column left right spacing remove
尽管您将其设置为零,我也不知道为什么会有边距,但是我摆脱了这个:
margin: [0,-5,0,-5]
You can set minPadding/maxPadding
as 0 on the xAxis.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.