Kibana change of decimal values in colour

Hi all,

I'm a float numeric field which i have values like 21.283774493.
I have managed to limit to 2 digits like 21.28.

Now the problem is when i use conditional colour for my number in edit field option, format goes off and again i see values like 21.283774493 highlighted in colour

Any turnaround for this

You can only have 1 field formatter at a time so you have to choose. I'd recommend using the digit formatte, because if you use that field in a metric visualization there are more options there to customize text color and background color.

@Marius_Dragomir I just had the same problem. I have some documents that need to be displayed their last value. I managed to display in a data table reading an answer that you gave few years ago ( Display latest value in a „Metric“ )

But there is no turnaround for this when we try to conditional color a field in a data table. Tried the same in TSVB and it's not possible to use the "Aggregate with concatenate".
Would love some help solving this.

Thanks in advance

@Marius_Dragomir @marcosvrrs
I got a turnaround for this.

Basically, i entered the below json input in advanced field of kibana visualization. I was able to control the number of decimal places showing.
However I used nearest roundoff value as i was calculating for an amount value.

  "script": {
"inline":"Math.round(doc['Init_amount'].value * 100.0)/100.0",
    "lang": "painless"

I was able to roundoff to 2 decimal places.
Also if we change from 100 to 1000, we can roundoff to 3 decimal places.

1 Like