Changing HighCharts background color?

前端 未结 5 2071
天命终不由人
天命终不由人 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:09

    you can hide value by 'false'

    data: [[0, 0, false], [0, 1, 2], [0, 2, 3], [0, 3, 4], [0, 4, 5], [1, 0, 2], [1, 1, 4], [1, 2, 6], [1, 3, 8], [1, 4, 10], [2, 0, 3], [2, 1, 6], [2, 2, 9], [2, 3, 12], [2, 4, 15], [3, 0, 4], [3, 1, 8], [3, 2,12], [3, 3, 16], [3, 4, 20], [4, 0, 5], [4, 1, 10], [4, 2, 15], [4, 3, 20], [4, 4, 25]
    

    http://jsfiddle.net/3527r4ty/1/

    0 讨论(0)
  • 2020-12-10 14:12

    There is a backgroundColor tag you can use: (http://jsfiddle.net/aeP4E/)

    chart: {
          polar: true,
          type: 'line',
          backgroundColor:'blue' 
    },
    
    0 讨论(0)
  • 2020-12-10 14:14

    That's you want `

    chart: {
                polar: true,
                type: 'line',
                backgroundColor:'rgba(255, 255, 255, 0.1)'
            }
    

    `

    0 讨论(0)
  • 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'
      }
    }
    
    0 讨论(0)
  • 2020-12-10 14:35

    Demo

    You can data: [[0, 0, true], you can hide value by 'false' and you can set your gradient by

      colorAxis: {
            min: 0,
            stops: [
             [0, '#5DBA76'],
            [0.4, '#ffff00'],
            [0.8, '#F30000']
        ],
            minColor: '#ff0000',
            maxColor: '#ffff00'
        },
    

    Thanks :)

    0 讨论(0)
提交回复
热议问题