How to change the Colour of Bar Chart by Comapring the value of other parameters automatically

Dear Team,

I have configured rela time Data(influxdb) for 5 Parameters A,B,C,D,E.
Using overrides the Graph Styel I have Changed for each parameters,
I need the colour of the “A” to be take the Colou of B if the value of A is less Than B
I have Checked All the properties in Overrides and Transform Function also but Not Change.


ging.

Welcome

Maybe by using aoache echart grafana plugin you have a lot motlre fine grained control

Thank You,
Even Using The Apache echart grafana plugin I can’t able to Give the if conditions.

Just adding the Functions here
const series = data.series.map((s) => {
const sData = s.fields.find((f) => f.type === ‘number’).values.buffer;
const sTime = s.fields.find((f) => f.type === ‘time’).values.buffer;
if (s.refId == ‘B’) {
return {
name: ‘B’,
type: ‘bar’,
showSymbol: false,
areaStyle: {
opacity: 0.2,
},
lineStyle: {
width: 1,
colour: ‘rgba(60, 141, 188, 1)’
},
data: sData.map((d, i) => [sTime[i], d.toFixed(2)]),
// data: sData.map((d, i) => {
// add itemStyle for bar series
itemStyle: {
color: ‘grey’,
emphasis: {
color: ‘rgba(60, 141, 188, 1)’,
},
},
}
}

The Same If Condtion with return I have Given For Other Paramete with Graph Specification, But Comparing with respect to values, I Can’t tracke through which the value is displying.

Also, the if Condition is not working.

Could you please expound on “not working”. Did you test to see if s.xyz do have data?

Yes, I have tested with real time Data and graph Data Also Showing.
As per the Function, mentioned above The graph Is Showing, Only the condition is not working.

So, From the above Function, where Can I Add the If Condition in the fucntion:
Condition:
the value of refID=B is less than the value of refID= A, then the Colour of the bar Chart should chnage to assigned Colour.

The Issue I am Having is from the finction I can’t Able to track where each Ref ID is taking The Value.