score:7
A feature to solve this without "hacks" was added in Highcharts 4.1.0 (February 2015), called zones (API). The given problem can be solved like this, using zones:
plotOptions: {
series: {
zones: [{
value: 0, // Values up to 0 (not including) ...
color: 'blue' // ... have the color blue
},{
value: 10, // Values up to 10 (not including) ...
color: 'orange' // ... have the color orange
},{
color: 'red' // Values from 10 (including) and up have the color red
}]
}
}
See this JSFiddle demonstration of how it looks.
score:0
By the way, I can try use a plotLine, like this:
yAxis: {
title: {
text: 'My Chart'
},
plotLines: [{
id: 'limit-min',
dashStyle: 'ShortDash',
width: 2,
value: 80,
zIndex: 0,
label : {
text : '80% limit'
}
}, {
id: 'limit-max',
color: '#008000',
dashStyle: 'ShortDash',
width: 2,
value: 90,
zIndex: 0,
label : {
text : '90% limit'
}
}]
},
score:1
Unfortunately this option is not possible, but you can request your suggestion in http://highcharts.uservoice.com and vote for it.
score:9
It actually is possible if you don't mind plotting the data twice.
$('#container').highcharts({
chart: {
type: 'arearange'
},
title: {
text: 'Temperature variation by day'
},
xAxis: {
type: 'datetime'
},
yAxis: {
title: {
text: null
}
},
tooltip: {
crosshairs: true,
shared: true,
valueSuffix: '°C'
},
legend: {
enabled: false
},
series: [{
name: 'Temperatures',
threshold : 0,
data: data,
color: 'orange',
negativeColor: 'blue'
},
{
name: 'Temperatures',
threshold : 10,
data: data,
color: 'red',
negativeColor: 'transparent'
}]
});
});
Source: stackoverflow.com
Related Query
- Two different thresholds in HighCharts 3.0
- Can I sychronize two highcharts series with different years (leap year)
- AJAX displaying values from two different functions in a single Highcharts chart instead of two different ones
- Highcharts - two different values are being overlapped
- Connect two different values with vertical line in highcharts
- Plot a bar graph using Highcharts drilldown with two different JSON end points
- Why is the Highcharts tick placement different in two similar charts?
- Highcharts column chart with two different scales
- How to have multiple highcharts with different series data in vuejs without repeating code
- Define yAxis value with two different yAxis scale highcharts
- show two different series with different start intervals with the same xAxis highcharts
- How to style two different legends in HighCharts
- Highcharts - How to show two tooltips for single point at different positions of chart?
- Why do these two Highcharts calls produce different windrose charts
- Highcharts column drilldown, assign two different colours to the two different drilldown columns?
- set different colors for each column in highcharts
- Can I use two different formatters for highchart tooltips?
- HighCharts - two Y-axis, one with max value
- how do I get two highcharts on one page?
- Highcharts Pie Chart.How to set labels in two lines
- Highcharts graph X-axis label for different date ranges
- Possible to connect the zoom on two Highcharts graphs?
- Display legend items in two columns highcharts
- Highcharts shared tooltip requires different valueSuffix and varying decimals
- Population pyramid for different regions in Highcharts
- Highcharts highlight area between two lines
- Different border for selected column in highcharts
- highcharts different colors for selected columns
- How to access different contexts of 'this' in HighCharts callback (Angular / Typescript)
- Increase different marker sizes when hovering series using highcharts
More Query from same tag
- Production build issue with ChartModule in angular 2
- Is it possible to use multi path symbols in highcharts?
- Spline chart tooltip only snaps on x-axis
- How to find a point with longitude and latitude in a Highmaps maps serie, initiated with GeoJson?
- How to use highchart 3d with angular 5?
- Is there any way to know whether a highchart DOM is complete rendered?
- How do I remove left-hand numeric values in Bar Chartjs?
- Highstock bottom chart not shown
- Problems implementing synchronized plotline and tooltips for highcharts
- Flow chart in Highcharts adding list and line breaks
- Highcharts 3D Scatter Plot, pop up's and links after rotation
- highchart : add point without changing the series' line
- highcharts, stacked column, switchrowsandcolumns
- How to hide an element using javascript
- How to render the missing data series and fix the dates on the x-axis in Highcharts?
- High charts remove dots from the line graph
- Change Candle color based on Stochastic values
- Don't show data label if not enough room
- Center a chart inside of bootstrap's carousel
- HighCharts Stacked Charts xAxis with json not working
- jsonp callback data in highcharts not working
- Using Bootstrap Datepicker with Highcharts
- Resize data points with highcharts
- Send data from Python backend to Highcharts while escaping quotes for date
- Multiple chart in same page Highchart
- Different Highcharts in same component (Angular 5)
- Pie Charts with advanced design
- how can I add a borderline to a plotBand when mouse move in and remove that borderline when mouse move out?
- Highcharts : How to increase marker radius based on the value range in Y axis in Scatter Graph?
- Highcharts credits link not working when exporting as PDF