Pedro4441
Pedro4441

Reputation: 261

ColorAxis in percentage bar. Approach. Highcharts

Is it possible to use ColorAxis in a bar?

It seems that only works with maps, I could do an approach iterating the data and setting the colour, do you know any tool to get the stops?

or Any better idea?

colorAxis: {
        min: 0,
        max: 1,
        minColor: '#a50022',
        maxColor: '#007340',
        gridLineColor: '#000000',
        stops: [
            [0, '#a50022'],
            [0.5, '#fffbbc'],
            [1, '#007340']
        ],
    },

Upvotes: 0

Views: 602

Answers (1)

Rob Schmuecker
Rob Schmuecker

Reputation: 8954

I don't think this is possible.

You could have a look at this http://jsfiddle.net/highcharts/A7zSf/ and this Styling bar colors in Highcharts with a gradient issue for some additional resources.

Alternatively you could style the plotBackground with a gradient to match your value ranges. http://api.highcharts.com/highcharts#chart.plotBackgroundColor

Upvotes: 1

Related Questions