I am developing dashboards in a Splunk instance which I don't manage, so I have little room for adding custom js, and frankly neither do I want to work with CSS and js, to keep things easily movable.
I have a table where the value of one field/column determines the overall status of the row, and I have a colour palette doing what I need it to do. This works fine; high values are red, low are green.
However, I would ideally like to be able to change the colouring of other columns based on the same field. I could not find any documentation stating that "value" is the only variable available to the expression in
<colorPalette type="expression">. My question then is: can I refer to the whole row or other fields in the colorPalette expression for a given column? I tried the usual suspects like
row.<fieldname> or simply
<fieldname>, but to no avail.
So, can this be done? Or is the colouring evaluated purely in the context of a single cell? Does anybody know if Splunk is going to introduce explicit row colouring at one point?
Actually another use case for what I'm asking is if one wants to colour a column or columns based on another field that is not even displayed - for example when you have a calculation that determines some internal "score" value, which in itself is of no interest to the user.
@wowczarek will the field names remain same or can they change? How many in total of they are fixed?
I'm also facing the similar issue. I want to use values from other fields before deciding the colour on the column. If someone can throw some light into this original post, that would be really helpful in a lot many ways.
Please try out and confirm!
In my use case ideally I wanted to decide colour based on multiple fields. Since I could not do that, I created a new field which will check the conditions in multiple fields and put the value of colour required for that whole row. Though this was tweak, this only help if I can extend the colour from one column to whole row.
So getting a solution for "colouring multiple columns based on one field" OR "colour one column based on multiple columns" both will help me.
Also in my case, I cant use JS extension.
I am trying to do the same thing as you and have also not found an answer on how to accomplish this. I did however find in the documentation showing "value" being used, though it does not state that "value" is the only variable available to expression.