Seyed-Amir-Mehrizi
Seyed-Amir-Mehrizi

Reputation: 739

set the background color for column group graphs in highcharts

I have a column group charts for 4 distinct data in highchart JavaScript library. I want to set the background color for each specific data each month but unfortunately, I did not find any relevant code which can render it for me. I could be very pleased if you can help me.

enter image description here

Upvotes: 0

Views: 130

Answers (1)

Sebastian Wędzel
Sebastian Wędzel

Reputation: 11633

I think that using a plotBands feature could be a good solution for your case.

Demo: https://jsfiddle.net/BlackLabel/ta9L4zfx/

  xAxis: {
    plotBands: [{
        from: -0.35,
      to: 0.35,
      color: 'gray'
    }, {
        from: 0.65,
      to: 1.35,
      color: 'gray'
    }, {
        from: 1.65,
      to: 2.35,
      color: 'gray'
    }]
  },

API: https://api.highcharts.com/highcharts/xAxis.plotBands.events

Upvotes: 1

Related Questions