score:1
Accepted answer
Inside setExtremes, this
references the xAxis
object. The threshold
is on the series
object, so you need to get a reference to the right series.
var series = this.chart.series[0];
Then, you need to update
it with the new value.
series.update({threshold: threshold}, false);
I'm passing false
for the redraw
parameter, since we're also going to update the plotLine
, and we'll only want to redraw once.
For the plotLine
, you'll need a reference to the yAxis
.
var yAxis = this.chart.yAxis[0];
And, then you'll need to pass the new plotLine
settings to the update
method.
yAxis.update({
plotLines: [{
value: threshold,
color: 'green',
dashStyle: 'shortdash',
width: 2,
label: {
text: 'Last quarter minimum'
}
}]
});
Source: stackoverflow.com
Related Query
- Threshold value change on click of rangeSelector in HighStock graph
- How to change area graph color above certain value in Highcharts
- highcharts change rendered image source on click
- Change color code on colum, depending on data value (highchartJS)
- Unable to change default rangeSelector Highstock
- Highstock charts - change position of rangeselector From and To inputs
- Display threshold line even if threshold value is higher than max y-axis value in HighStock
- How to change the theme of a Highstock graph with a button?
- Strange character in the Highstock source code
- Change highstock chart zones on click yAxis
- Change HighStock chart label on changing rangeselector button
- highcharts- I would like to change the axis value while leaving the graph intact
- Highstock - click drag on the portion of the graph to zoom?
- change value and run function on click
- Change yAxis values in Compare multiple series highstock for showing point value instead of percentage change value
- How to change value of highchart graph with the other value with refresh
- missing value in highcharts line graph results in no line, just points
- Highcharts Change Bar Color Based on Value
- Highcharts dynamically change bar color based on value
- How to make stacked column graph to show total data value on top
- Change color of bars depending on value in Highchart bar-chart with MVC3
- How to change graph colour above and below plotline in Highcharts
- Click event on clicking on the graph
- How do I get the value of a highcharts graph point on mouseover?
- how to change highstock date to persian date
- Highcharts - change column stacking on click
- How to position RangeSelector / zoom buttons at custom co-ordinates in Highstock
- how to set a rangeSelector for highstock
- How to pass custom data into Highcharts graph click event
- How to change axis label size when exporting in Highcharts / Highstock
More Query from same tag
- Buttons not working on subsequent tabs to redraw chart in Highcharts
- HighChart highlight point
- Join regions highmaps
- Highchart: Spline with clickable Symbols
- adding extra series on highchart
- JSON how to get squared brackets?
- Highcharts JS in IE 7 doesn't appear
- Highstock - flag text appears on top of the tooltip
- HighCharts remove $ and % symbols from custom html table when creating graph
- Highcharts pie spacing title - chart - legend
- How to toggle date input datepicker in Highstock rangeSelector
- Highcharts - Change value of text box when drilling down through chart
- Redrawing the tooltip inside of the tooltip positioner callback
- Error: Unexpected token. A constructor, method, accessor, or property is expected. ts(1068)
- Is there a way of dynamically toggling the Highstock navigator to regain vertical space for the chart?
- Highcharts: align markers with xAxis
- High Charts fails to add series dynamically
- Highstock xAxis Label rotation
- charts highcharts add spacethe right side
- Highcharts change pointPlacement through javascript
- Can highcharts drilldown of a chart, reflect on another chart?
- How Can I Make Responsive Titles In Highcharts?
- Highcharts: disable allowPointSelect for only one pie slice
- Highcharts -Highmaps making map curved(geojson QGIS)
- Highcharts: rapid, real-time data updates in high volume line charts using boost
- Inserting mouseover event to custom label created with SVGRenderer, highcharts
- Highcharts: How do I get columns to have specific color with multiple series
- Highcharts {Pie} - Remove slice pieces out onclick
- Wrong date in tooltip in charts with daylight savings time in highcharts
- Is it possible to make a table with y axis labels of Highcharts bar chart?