Tags:
create new tag
view all tags

SID-00549: Change text/bg colors in table depending on cell value

Status: Answered 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:

Question Last Author Revision
WebStatistics TWikiGuest
7919
Restoring a parent-less web from Trash WilliamSeligman
2
Regex search: lookaheads PeterThoeny
3
'rcs too old' even though it's version 5... PeterThoeny
7
Is MailInContrib Installed On TwikiDotOr... PeterThoeny
2
viewfile timeout PeterThoeny
2
TWiki causes an error when accessed thro... PeterThoeny
2
Supported OS for TWiki-6.1.0 PeterThoeny
2
$IF(0, SID-02517, Registration without personal data (like...) EmielVanRiel
6
Manage link seems to be incorrectly retr... PeterThoeny
2
Locked down Main web blocks user Watchli... BenScott
1
New Web RSS feed enabling TonyQiu
3
Safari WebLeftBar not aligned PeterThoeny
2
The save script can only be called with ... PeterThoeny
4
A corrupted TWiki page PeterThoeny
3

View the raw text (link below) to see the magic.

-- PeterThoeny - 2009-10-05

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Change text/bg colors in table depending on cell value
SupportCategory CategoryRendering
TWiki version 4.3.0
Server OS Fedora Core 9
Web server Apache
Perl version

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2009-10-06 - RaghuKiran
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.