Scriptable Option for backgroundColor

Hi there,

I have a horizontalBar type chart and would like to change to colour of the bar based on the value. I understand that backgroundColour has a ‘ScritableOption’ and have the following JSON doe in the QuickChart editor, however, the colours remain the same default blue.

Any suggestions?! Thanks in advance.

{
type: ‘horizontalBar’,
data: {
labels: [‘1’, ‘2’, ‘3’],
datasets: [{
label: ‘DataSet1’,
data: [3.4,5.5,8.6],
barPercentage: 0.5
}],
},
options: {
scales: {
xAxes: [{
ticks: {
min: 0,
max: 10,
stepSize: 1,
autoSkip: false
}
}]
},
legend: {
display: false // Set display to false to hide the legend
},
backgroundColor: function(context) {
var index = context.dataIndex;
var value = context.dataset.data[index];
return value < 5 ? ‘rgba(255, 99, 132, 0.2)’ :
‘rgba(54, 162, 235, 0.2)’;
}
}
}

backgroundColor and Color in the options section have the same results (and doesn’t change the bar colour)