score:1
Refer to this live demo: http://jsfiddle.net/kkulig/dhsgo47z/
If you want the secondary axis to have the same extremes as the primary one then a good place add the new axis is a load event (because it doesn't utilize hardcoded values):
chart: {
events: {
load: function() {
var primaryYAxis = this.yAxis[0];
this.addAxis({
title: {
text: 'Secondary'
},
min: primaryYAxis.min,
max: primaryYAxis.max,
tickPositions: [0, primaryYAxis.max],
endOnTick: false,
labels: {
formatter: function() {
return this.isLast ? "Maximum" : this.value;
}
}
}, false);
}
}
},
tickPositiones
serves to set the exact positions of ticks (there'll be no more and no less than defined). labels.formatter
is used to give the second tick a custom string value.
API reference:
Source: stackoverflow.com
Related Query
- angular 4 Highcharts set yAxis Categories
- How to set Highcharts chart maximum yAxis value
- Highcharts set x-axis categories
- Highcharts - set maximum range for yAxis but keep axis dynamic within that range
- Highcharts - yAxis logarithmic scale and allowDecimals set to false not seeming to have any effect
- Decimal values for yAxis categories in Highcharts
- How to set 'lang' property in Highcharts using Angular JS?
- highcharts and different yAxis for different categories
- How do I set Highcharts categories dynamically?
- Highcharts - Cannot set x-axes categories in column charts with negative values
- How to set Highcharts options in Angular 5
- How to set non-linear step in yAxis on Highcharts
- Set at the same level the unit of two yaxis highcharts
- Highcharts Gantt - Set max height and scrollbar on yAxis
- Highcharts yAxis Categories with string values: error 14
- My Highcharts graph with multiple axis ignores the max value I set for the first yaxis
- How to set Highcharts xAxis position on the yAxis zero value (negative/positive chart)?
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- how do you set the yaxis values in highcharts
- How can i place the Highcharts yAxis categories inside the chart?
- Highcharts Angular - How to set chart width and height with percentages?
- How to set yAxis min/max in Highcharts synchronized chart with JSON
- Decimals on yAxis are not being displayed, even if that same code works on highcharts jsfiddle
- HighCharts Angular 8 | yAxis problem with FireFox and IE
- Highcharts set yAxis labels width
- Set Max value in yAxis jQuery Highcharts
- Highcharts limit the amount of items that will be displayed in categories on the yAxis
- Highcharts : how to set yAxis max value inside angularjs controller
- Highcharts code with same set of code/data works in PHP but does not work in JSfiddle
- How to set variable as categories in Highcharts
More Query from same tag
- Style dash in highchart graphic
- How to show all values at datetime axis in highcharts?
- Highcharts v6.0.0 Annotations Not Working
- Graph sliding strangely with negativeColor activated
- Configure Data Table at bottom in Highcharts
- Dynamically move highstock navigator
- same scale on x y axis in highchart
- Highcharts: First X Point over the YAxis
- Column range chart columns top alignment
- HighCharts Tooltips are coming but Graph is not coming
- highcharts displaying data on timechange
- How do I enable y-axis gridline at the ticks?
- Change chart type and redraw with multiple series in Highcharts
- High Charts Range Selector
- How do I enlarge the pie chart and shift to the center
- onClick takes two clicks to populate results, HighCharts
- How to avoid hiding the only line showing?
- budling and download json files for highcharts
- Javascript+Highcharts: Substituting series.data for my own
- How to aggregate boolean values in elastic search?
- Highcharts CSV export changes the chart JS object
- Is it possible to remove a pane in highstock/highcharts?
- HighChart - show tooltips for null on hover
- High chart partial rendering
- Specify X-Axis Category in Series Data in Highcharts
- Highcharts - making a point clickable?
- How to allow the country labels to auto-hide when using HTML?
- How to insert a background image in r highcharts?
- Highchart - Datalabel overlaps across slices
- Tooltip for whole stack in grouped stacked Highcharts diagram