Refer this jsfiddle link first:
https://jsfiddle.net/sq7n69dh/17/
Here, In this above example the spline type series (Series 2) primary yAxis (left side) doesn't start with 0% it takes the dynamic value based on the series data range.
The same thing I want in the column type series (Series 2) Secondary yAxis (right side) i.e. instead of staring with $0, it should start with some dynamic value based on the series data range.
** The main reason is to make the minute change in the values for Series 2 to be differentiated properly in the chart view. I mean for minute changes in value of Series 2, the column height looks kind of equal on chart view.
When I change the type for Series 2 from column to spline, it works. So does it means we can't have yAxis dynamic plotting for column series and it will always start with 0 value ??
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<div id="container"></div>
JS:
Highcharts.chart('container', {
chart: {
height: 298,
marginTop: 33
},
xAxis: {
categories: [
"Current",
"30 Days",
"60 Days",
"90 Days"
],
},
yAxis: [{
labels: {
format: '{value:,.1f}%'
}
}, { // Secondary yAxis
labels: {
format: '$' + '{value:,.0f}'
},
opposite: true
}],
series: [{"name":"Series 1",
"data":[95.19,95.93,95.93,95.93],
"type":"spline",
"color":"#88CB11",
"yAxis":0},
{"name":"Series 2",
"data":[601.02,603.81,600.31,599.9],
"type":"column",
"color":"#4472C4",
"yAxis":1}]
});
yAxis.min
: api.highcharts.com/highcharts/yAxis.min – Sebastian Wędzel