How to use JSON Input on split series by terms


(Slava Shpitalny) #1

I have a bar chart visualization and I split the bars by terms on a string field.
Every value of that string field has the same prefix, I would like to remove it using the JSON input.
I already use the JSON input on the Y-Axis like so:

{
  "script": {
    "inline": "doc['measurement.executionTimeMsec'].value / 1000",
    "lang": "painless"
  }
}

I tried doing something similar there but it doesn't work, even simply presenting the value doesn't work:

{
  "script": {
    "inline": "doc['measurement.query'].value",
    "lang": "painless"
  }
}

(Thomas Neirynck) #2

hi @slavik57,

I'd use the scripted-field functionality of Kibana. It does the same thing, but it gets bootstrapped for you.

See here for info:

https://www.elastic.co/guide/en/kibana/current/scripted-fields.html

You create the field and then it is available for display in Discovery or Visualize.


(system) #3

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