score:1
Accepted answer
You can use programmatically generated plot-bands. For example:
const plotBands = [];
const series = warData.map((m, index) => {
if (m.flag === 1) {
plotBands.push({
color: 'yellow',
from: index - 0.5,
to: index + 0.5
});
}
return {
name: m.Month,
data: [
[m.Month.toString(), JSON.parse(m.Maintenance)]
],
};
});
const options = {
xAxis: {
type: "category",
plotBands
},
...
};
Live demo: http://jsfiddle.net/BlackLabel/95gcsheo/
API Reference: https://api.highcharts.com/highcharts/xAxis.plotBands
Source: stackoverflow.com
Related Query
- How to add background color on highchart based on flag?
- How to add color in highmap highchart based on value
- How to add a background image (pattern) to highchart column graph?
- how to change color of line chart in highchart based on a categorical column in r?
- how to add an color picker control to highchart for changing the color of series by user
- How to change rCharts Highchart Color based on Factor Variable
- Column based Highchart drilldown series assign color code to each column
- How to adjust the height and width of background color in Highchart
- how to add color inside a 3d chart in highchart js
- How to add space between plotband and first bar(red color "A" bar) in highchart
- How to add different color border in column highchart
- Highchart columnrange, color code lines based on data
- How to apply custom color on candlesticks based on OPEN/CLOSE values?
- Background color for multiple Highchart panes, in Vue app
- How to add a newline to a Highchart tooltip?
- How to change series legend text color in HighChart chart?
- Need to apply background color to each legend text highchart
- How to add box shadow for highchart chart?
- How to add background colors to category groupings in Highcharts
- How do I set the background color of a Highcharts HTML label?
- How to Add button in React Highchart Tooltip?
- Highcharts Change Bar Background Color Based on categories value
- Set background color to HighChart xAxis labels
- How to add Highchart Bar lines and lables?
- Highchart / Highstock how to set color of individual ohlc or candle?
- How to Change Highchart Column Color Dynamicly
- How to set series-label to false by default and change the color of series label text in highchart
- How to add Legend in highchart compare stock chart
- How can I add a Bar Chart to my Django based Database?
- How to add % symbol to Y axis values in HighChart graph?
More Query from same tag
- Highcharts stock chart time selector
- Highcharts -- exporting, setting dataLabel options
- dataClasses name in tooltip through formatter function [Highcharts]
- How to add current price line on hover?
- Different tooltip and value in Treemap || Highcharts
- Highcharts Bullet Chart with 2 x axes... possible?
- Highcharts determine if text is outside of data point
- x axis label word wrap in high charts for radar chart
- Set Custom icon to context menu for multiple charts (Highcharts)
- Send variables from Symfony2 PHP file to js file
- Align Bar Graph with Negative Stack
- Trying to update high chart data
- Alignment of y axis labels and text
- Highchart - xAxis values are to close
- Highcharts error 15
- Multiple Gauge Chart
- Highchart dual y-axes with same base and smaller tickinterval
- Own back button for drilldown charts
- How to read data from in Javascript
- How to get max value by comparing dual y-axis in highchart?
- Highcharts - Highstock chart showing double line on hovering data points to show tooltip
- Tooltip in highmaps is not working .Unable to show the data from the json onto the highmap
- javascript conditional before push?
- javascript display multiple Highcharts using single function
- highcharts-export-server yAxis formatter does not work
- Using columnrange chart type in Highcharts with custom output?
- RRD raw data to JSON
- Highcharts JS: How do I decrease the spacing between Y values?
- Drilldown in Sankey Diagram
- Highcharts - prevent large marker from overflowing axes - my bubbles are escaping =(