How to colour by threshold in eCharts

Using Grafanav 10.3.5
Im new to Grafana and have installed the business charts (previously eCharts) mainly used for business dashboarding. Using the bar charts (Set style of single bar), I would like to colour the bars by a threshold value. ie anything underneath 95% is red, and above is green.
This example shows how to accomplish this with hard-coded data, but here, the colour is specified for the specific data value.

How do we achieve the same result with data sourced from the database?
My dummy data

the source for the code editor:

let vDate = [ ];
let vMetric = [ ];

context.panel.data.series.map((s) => {
vDate = s.fields.find((f) => f.name === “Date”).values;
vMetric = s.fields.find((f) => f.name === “Metric”).values;
});

return {
grid: {
top: ‘4%’,
left: ‘3%’,
right: ‘4%’,
bottom: ‘3%’,
containLabel: true
},
xAxis: {
type: “category”,
data: vDate;
},
yAxis: {
type: “value”
},
series: [
{
data: vMetric,
type: “bar”
}
]
};