Hi all,
I have created a pie chart map, where I define 4 different attributes.
Is it possible to define a conditional color code based on yet another field instead of defining them for each field in the attributes?
Ex.: If Field5 less1 then color should be gray
if Field5 more or equal than 1 and Field4 less and equal than 3 then color should be green
etc
I tried defining visualVariables type color and the stops for each different value, but it does not seem to work.
The renderer is defined as following:
const renderer_pie = {
type: "pie-chart",
attributes: [
{
field: "Field1",
label: 'label1',
color: 'blue'
},
{
field: "Field2",
label: 'label2',
color: '#green'
},
{
field: "Field3",
label: 'label3',
color: 'orange'
},
{
field: "Field4",
label: 'label4',
color: 'gray'
},
]
};