Reputation: 13
2 additional lines were showing when I set alignTicks: false in y axis config. I have added that to limit y axis percentage to 100%. minPadding & maxPadding is not workng for limiting y axis percentage to 100% Can anyone know how to limit y axis percentage to 100% or how we can remove additional horizontal lines.
Image - https://i.sstatic.net/Z4YqLahm.png
Can anyone know how to limit y axis percentage to 100% or how we can remove additional horizontal lines.
Upvotes: 0
Views: 63
Reputation: 1100
To hide the additional horizontal lines, which are yAxis gridlines you can set their width to 0.
Highcharts.chart("container", {
yAxis: [{}, { opposite: true, tickInterval: 1, gridLineWidth: 0 }],
series: [
{
data: [2, 6, 4, 7, 9, 3],
},
{
type: "column",
yAxis: 1,
data: [3, 5, 4, 6, 7, 8, 4],
}
]
});
API reference: https://api.highcharts.com/highcharts/yAxis.gridLineWidth
Demo: https://jsfiddle.net/BlackLabel/zk9erq73/
Upvotes: 0