score:7
Accepted answer
plotLines
is a sub-option of the yAxis or xAxis config and not a base option as you have it:
<SNIP>
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
plotLines: [{
color: '#FF0000',
width: 2,
value: 80,
zIndex: 5
}]
},
<SNIP>
Update fiddle here.
score:4
Axis.addPlotLine() api allows to add a line in the axis after the chart has been rendered .
var plotOption = {
color: '#FF0000',
dashStyle: 'ShortDash',
width: 2,
value: 1000,
zIndex: 0,
label : {
text : 'Goal'
}
};
this.lineChart.yAxis[0].addPlotLine(plotOption) ;
//where lineChart is the reference to the existing chart
Source: stackoverflow.com
Related Query
- How to add a plotline to a bar chart in Highcharts?
- How to add a horizontal line in Column bar chart in Highcharts plugin?
- How do I rotate my HighCharts bar chart so its vertical, not horizontal?
- How to add space between chart and axis in highcharts
- Highcharts Bar Chart - How to set the minimum bar width/length
- How to add a label above each bar in HighCharts
- HighCharts : How to add or remove "chart context menu" from chart container?
- How can I add a Bar Chart to my Django based Database?
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to add new index Highcharts column drilldown chart
- How to Make a Dashed Bar Chart Border in Highcharts
- How to add different click events on each pie of a pie chart created by highcharts usin jquery
- Add border on highcharts bar chart on start of bar
- How to change color of bar in column chart with different level of percentage in highcharts
- How to remove decimal values on x-axis of bar chart : Highcharts
- How to add two dataLabels to a bar chart using HightCharts
- How to resize bar chart based on no of x axis categories in HighCharts
- Add animation to bar in data sorting bar chart Highcharts
- HighCharts how to add live series data set to existing chart
- How to make split grouped column bar chart in highcharts with percentage?
- How to add plotline on highcharts with angle?
- How can i load external json data in highcharts to show the bar chart
- How can I prepare a Group Stacked Bar Chart in Highcharts using multiple and different types of data?
- How to add the "isSum" bar in Highchart Waterfall chart in R?
- Highcharts - Column Chart Drilldown, how to change the drilldown bar color based on some value
- How to add negative area or background for a specific bar or pie chart in highcharts?
- Highcharts Chart Bar - How can I display in the chart, only one column from my HTML table?
- How I can Add Start and end point in stacked bar chart in chart js?
- How can I add double related x-axis bar to high chart in zoom
- How to add comma to data labels value in bar chart race of highcarts?
More Query from same tag
- highcharts lang.resetZoom doesn't appear to work
- HighCharts Render Annotated Queryset in Jinja2 Template
- highcharts pie chart multiple sections selection
- Highcharts multiple column chart with drilldown, correct formatting of drilldown axes
- Using PHP for Highchart Heatmap
- Highstock setExtremes with a custom range selector button
- Highcharts tooltip looks weird
- how to remove extra data point from x-axis in highcharts
- Pass a List of Series to SetSeries
- Make Highchart R the full width and height of the box in Shiny
- Marker rotation in Highchart
- Highcharts: dynamically updating chart per click of a button
- highcharts: when adding new data series add new Y axis only if the title is different from existing Y axis
- highcharts tooltip wrong date
- Can you remove specific grid lines and point labels using highcharts without css?
- Highcharts - Solid Gauge - Inconsistent Styling and Improper Values
- Highcharts mouse tracking/mouseover feature is slow on chrome but not slow in firefox or IE
- How do I input bar-chart data to an overall pie-chart ? (Highcharts/ JS / jQuery)
- How to get height of axis column's ticks in highcharts
- View Data table in highcharts
- remove extra space/margin after navigator highstocks
- Uncaught Error: [$injector:modulerr] using Angular JS and highcharts-ng
- In Highcharts, my dataLabels disappear when re-enabling the rightmost element of my chart
- Toggle between two values
- Moving Highcharts series in front of other series with toFront() doesn't work
- Area chart with two data points. Full width
- Highcharts - Dynamic + Multiple charts not rendering
- Highstock - How to handle large data sets
- Pass string variable to data Highchart
- how to hide column in highchart column type