I have a perspective table that is bound to a JSON array. Of the several fields, I am binding stateDescription, I need to set the background color of this column for each row. There is a stateColor field which is a number that can be easily converted to hex code with a script. My question is how do I access the color column during the table binding so that each row can be set.
Write a script transform that takes the JSON array and generates a new array in the same format with the required style elements using a for loop.
city: {
value: 'Folsom',
editable: true,
style: {
backgroundColor: '#DADDE0',
classes: [] |''
}
}
I'm not sure what you mean by "color column," but this guide helped me. You might need to modify the JSON structure.