I want to add different colours for parts of the bar based on partialfill.
At the moment when the partialfill is 0.5 (50%) it makes half of the bar darker green. Is there a way to define colour in bar based on percentage?
For example 0-49 make the partialfill red and the rest white. 50-100 make the partial fill green and the rest white etc.
https://jsfiddle.net/sg0co5au/11/
Highcharts.chart('container', {
chart: {
type: 'xrange'
},
title: {
text: 'Highcharts X-range'
},
xAxis: {
type: 'datetime'
},
yAxis: {
title: {
text: ''
},
categories: ['Prototyping', 'Development', 'Testing'],
reversed: true
},
series: [{
name: 'Project 1',
// pointPadding: 0,
// groupPadding: 0,
borderColor: 'gray',
pointWidth: 20,
colour:'#FF0000',
data: [{
x: Date.UTC(2014, 10, 21),
x2: Date.UTC(2014, 11, 2),
y: 0,
partialFill: 0.50,
color:'#469E5A'
},
],
dataLabels: {
enabled: true
}
}]
});