My students have created a table in Ignition. In this table it has values for the percentage full a specific tank is. I would like for them to color-code the values based on pre-defined values. For example, if a tank is < 25% but > 10% full, I would like the text/label (or, preferably, the background of the text/label) to be color-coded yellow as a warning, and if it were <10% full to be color-coded red.
Okay, so within a table you must define styles as additional config on each data row. What that’s probably going to mean is a script transform on your incoming data (wherever it comes from) that adds style information to each row appropriate for how it should be rendered. Take a look at the way the Table component is renderer when you first create one:
The table data is coming in as a query bind. Not sure how to do a script transform that can add style information to each row’s data. There is a “tank percentage full” field from the DB table that the color will be based off. For now, I have set the data column to be a progress bar so there’s at least some sort of visual. But that color is the same regardless of the percentage.