I want to adjust the positioning of the yAxis categories. Specifically, I want the first category (“Low”) to start right at the xAxis line without any padding or space before it.
Highcharts.chart("container", {
chart: {
type: "line",
},
title: {
text: "Monthly Data",
},
xAxis: {},
yAxis: [{
opposite: true,
categories: ["Low", "Meduim", "High"],
title: {
text: "Severity",
},
},
{
title: {
text: "Measurment",
},
},
],
series: [{
yAxis: 0,
name: "Severity",
data: [0, 1, 0, 1, 0, 0, 0, 1, 1],
},
{
yAxis: 1,
name: "Measurment",
data: [0, 5, 20, 5, 2, 5, 1],
},
],
tooltip: {
shared: true,
valueSuffix: "",
},
})
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 300px; margin-top: 1em"></div>
<button id="button">Export chart</button>