Changing HighCharts background color?

前端 未结 5 2073
天命终不由人
天命终不由人 2020-12-10 13:37

I don\'t really know how to do this.

I need to change background color of this highcharts chart:

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/h

5条回答
  •  一整个雨季
    2020-12-10 14:35

    Take a look at the Highcharts API here: https://api.highcharts.com/highcharts/chart.backgroundColor and you will see it's a property of the chart object that can take a solid color:

    {
      chart: {
         backgroundColor: '#FCFFC5',
         polar: true,
         type: 'line'
      }
    }
    

    Or Gradiant:

    {
      chart: {
        backgroundColor: {
           linearGradient: [0, 0, 500, 500],
           stops: [
             [0, 'rgb(255, 255, 255)'],
             [1, 'rgb(200, 200, 255)']
           ]
         },
         polar: true,
         type: 'line'
      }
    }
    

提交回复
热议问题