score:13

Accepted answer

Use plotBands

Example:

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/plotbands-color/

$(function () {
$('#container').highcharts({
    chart: {
    },
    xAxis: {        
        plotBands: [{ // mark the weekend
            color: '#FCFFC5',
            from: Date.UTC(2010, 0, 2),
            to: Date.UTC(2010, 0, 4)
        }],
        tickInterval: 24 * 3600 * 1000, // one day
        type: 'datetime'
    },

    series: [{
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4],
        pointStart: Date.UTC(2010, 0, 1),
        pointInterval: 24 * 3600 * 1000
    }]
});
});

score:1

yes you can go with plot bands

 xAxis: {
   plotBands: {
    from: fromDate,
    to: toDate,
    color: color
   }
 }

score:3

plotBands are what you need to accomplish this:

http://api.highcharts.com/highcharts#xAxis.plotBands

using the example you posted:

http://jsfiddle.net/jlbriggs/tv5cN/

plotBands:[{
  from:Date.UTC(1971,  0,  8),
  to:Date.UTC(1971,  2, 15),
  color:'rgba(156,156,156,.25)'
}]

Related Query

More Query from same tag