Visokio website     Downloads     Video tutorials     KnowledgeBase  
Styling: Conditional colouring in table? - Visokio Forums
Styling: Conditional colouring in table?
  •     Mees April 5, 2012 3:00PM
    Is it possible to colour cells in a table based on a value, i.e.:
    Column A: <100 red, >100 green
    Column B: blue if between 5% and 15% etc. ?

  • 5 Comments
  •     steve April 9, 2012 3:20AM
    Three solutions, best first:

    1. Using value colouring
      1. In table view, enable colouring of the column in question using the "Colour" button on the table view toolbar.
      2. In "Data > Manage fields > [field] > Options > Value colouring", configure red/green colours, and set a fixed 2-point range to be start 100.00, end 100.01.

    2. Using a formula field
      1. Add a formula field with "IF([field]<100, "red", "green")<br />
      2. Colour by that field using the global colour-by option.
      3. Configure the table view to colour the cells in question

    3. Using the Content view
      1. Add a Content View and insert a table containing your data. If the rows need to be dynamically generated you'll need to use script pre-processing.
      2. Inside the table cells, insert a formula using the f button, configuring the "Set value" section to result in the correct value, and choosing "Display value as: Styled text".


    Note that red/green are unsuitable for approximately 10% of the population. You can improve this somewhat by using a slightly orange red, or much improve using the default blue-orange scheme.
  •     rajeshbalu29 July 25, 2012 4:02AM
    Hi All,
    In addtion to this chain, can we have complicated formulas like if I have a table with 3 columns as attached in the snapshot. I want to check if in the value cell that if that column is a current month or lesser than that when the output is yes then i wanted the output to be in red else Green. Please find the attached snapshot for your reference.
    Please let me know if you have any further clarifications.

    Thanks & regards
    Rajesh B
  •     paola July 25, 2012 1:16PM
    Hi Rajesh,
    You can do this in Content view by using text formatting.
    If this was just a sample and you have more formulas/data in the table - then please let me know what view you wish to use and send us a file, so we can have a look. Thanks
  •     rajeshbalu29 July 27, 2012 3:07AM
    Hi Paola,
    I have sent you the iok file seperately in a mail to you.
    Please let me know incase of any further clarifications.

    Regards
    Rajesh B
  •     paola July 27, 2012 7:57AM
    Hi Rajesh,
    please look at the few Forum posts showcasing what can be done with scripting in Content view.
    This solution would address your question and be able to deliver on requirements.
    There are also few files with examples.
    http://forums.visokio.com/discussion/comment/6007/#Comment_6007

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership