SID-00549: Change text/bg colors in table depending on cell value
| Status: |
Answered |
TWiki version: |
4.3.0 |
Perl version: |
|
| Category: |
CategoryRendering |
Server OS: |
Fedora Core 9 |
Last update: |
16 years ago |
Hi,
I am planning to show detailed list bugs in a table which crossed the norms which did not cross. I would like to highlight the cell contents (either background / font color) to the users so that users can easily distinguish what are crossing the norms and what are in safe area.
Below is an example table
| Bug no# |
Severity |
no.of.days |
| 2 |
Critical |
6 <want it in red color> |
| 5 |
Normal |
3 <Want it in green color> |
In general any value more than 5 has to be shown in red color and any value less than 5 in green color. Please let me know if it is possible. A Small example would be great.
--
RaghuKiran - 2009-10-05
Discussion and Answer
Check out the discussion and references in
Support.SID-00400.
--
SeanCMorgan - 2009-10-05
You can use some css to show colors. Example:
| Bug no# |
Severity |
no.of.days |
| 2 |
Critical |
6 |
| 5 |
Normal |
3 |
If you build the table dynamically via a
VarSEARCH you can add some
SpreadSheetPlugin formula to show colors conditionally. Example on colored revision number of recently updated pages in this web:
View the raw text (link below) to see the magic.
--
PeterThoeny - 2009-10-05
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.