I am trying to change the color of a specific cell (process_value) based on the value of two columns (low limit, high limit). I have the script below in the message handler. However, with this script the whole table change its color to green/red (defined color style). How should I change this to be able to change the desired cell color and not the whole table color? Thank you!
specLL = pds.getValueAt(row,"low_limit") specHL = pds.getValueAt(row,"high_limit") if value != "": # Spec value is a float Process Value if col == "process_value": value = float(value) pds = system.dataset.setValue(pds, row,col,value) # evaluate the result if value <= specHL and value >= specLL: self.props.cells.style.classes="CellColor/green" else: self.props.cells.style.classes="CellColor/red" # UPDATE DATASET self.view.custom.part.spec.data = pds
I guess my question then would be how to apply color to this cell?