I need to make a column chart using tall charts having 1px space between the columns and the Y axis, how can I add the 1px space that is in my desired chart to the chart I made is the code I made: (Sorry I don’t have enough reputation to add images that why not post).
var data = [ 20, 29, 25, 29, 21, 17, 20, 19, 18];
createMeasuresGraph(data, "quintals-sugar-graph");
function createMeasuresGraph(data, container) {
data[0] = { color: '#55B647', y: data[0] };
data[data.length -2 ] = { color: '#F15B49', y: data[data.length -2 ] };
var chart = new Highcharts.Chart({
chart: {
marginBottom: 1,
marginLeft: 0,
marginRight: 0,
marginTop: 0,
renderTo: container,
type: 'column',
},
credits: {
enabled: false
},
legend: {
enabled: false
},
plotOptions: {
column: {
pointWidth: 5,
},
series: {
borderWidth: .1,
}
},
series: [{
data: data,
color: '#95D2F3',
shadow: false,
}],
title: {
text: ''
},
tooltip: {
enabled: false
},
xAxis: {
labels: {
enabled: false
},
title: {
enabled: false
},
lineColor: '#CBCBCB',
tickWidth: 0
},
yAxis: {
endOnTick: false,
gridLineWidth: 0,
labels: {
enabled: false
},
startOnTick: false,
minPadding: 0.5,
title: {
text: ""
}
}
});
}
I also see that the space between them is not the same in all columns, maybe I'm using the wrong aproch to get spaces, what would it be better?