Conditional colouring of values in a column in a data table

Hi everyone.

I'm trying to do some possibly advanced conditional statement for columns in a data table. Ideally, I would like to change the color of a string, based on the value of another field in the same document. I'm not sure how to approach it in expression editor, but a regular if statement would look something like:

if ram_usage gt 10:
   then service font color="red" 
   else service font color="green"

Wondering if this is possible with the expression editor, or if anyone has encountered a similar challenge and what their solution was.

You can't conditionally style table cells in Canvas yet - this is the issue tracking this request: https://github.com/elastic/kibana/issues/27700

To a certain degree this is possible in a TSVB visualization which you can embed in a canvas, but it can only work on aggregated time series data, so I'm not sure whether it's a good option for you.

Can you give an example? I don't fully understand what aggregated time series data means.

You can check out the capabilities of TSVB here (also talks about the table visualization): https://www.elastic.co/guide/en/kibana/current/TSVB.html

Aggregatated time series data means you can't look at individual documents, but just at aggregated values over time, e.g. the average a field for all documents within a certain time bucket.

Okay I see, thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.