How to create a text box in a visualization in kibana vega

Hello, I have a visualization in kibana - vega, I already made a graph, but now I want to add a text below the "Estado" bar, I do not know if there is the possibility of putting some text there already having a graph, I have not been able to do it, I need your help, I attach my code:

{
  $schema: https://vega.github.io/schema/vega-lite/v2.json
  "config": {"view": {"height": 100, "width": 200}},
  "title": "Prueba Vega 1"
  data: {
    # URL object is a context-aware query to Elasticsearch
    url: {
      # The %-enclosed keys are handled by Kibana to modify the query
      # before it gets sent to Elasticsearch. Context is the search
      # filter as shown above the dashboard. Timefield uses the value 
      # of the time picker from the upper right corner.
      %context%: true
      %timefield%: @timestamp
      index: efecty*
      body: {
        size: 20
        _source: ["@timestamp", "Sysname", "RAMUsage","State","IP","Estatus"]
      }
    }
    # We only need the content of hits.hits array
    format: {property: "hits.hits"}
  },
  
    "transform": [
        {"calculate": "'https://72dfe17217744236af40cc31b704a664.us-central1.gcp.cloud.es.io:9243/s/efecty/app/kibana#/dashboard/bb33f960-80df-11eb-bca8-7bba65cbb959'","as": "web"}
      ],
  
 "encoding": {
        "x": {"field": "_source.Estatus", "type": "ordinal", "title": "Estado"},
        "y": {"field": "_source.Sysname", "type": "ordinal", "title": "Equipos"}
      },
      

      
    "layer": [
        {
        "selection": {"pts": {"type":"single"}}
          "mark": "rect",
          "encoding": {
            "color": {
              "field": "_source.State",
              "title": "Estado",
              "scale": {"scheme": "redyellowgreen"},
              "type": "quantitative",
            }
            
          "tooltip": [
            {"field": "_source.IP", "type": "ordinal", title: "Direccion"}
            {"field": "_source.@timestamp", "type": "ordinal", title: "Hora"}
            {"field": "_source.Estatus", "type": "ordinal", title: "Estado"}
          ]
          "href": {"field": "web"}
          }
        },
        {
          "mark": {"type": "text", "fontSize": 20, "dy": -5},
          "encoding": {
            "text": {"field": "_source.State"},
            "color": {"value": "black"}
          }
        },
        {
          "mark": {"type": "text", "fontSize": 15, "dy": 20},
          "encoding": {
            "text": {"field": "_source.Sysname"},
            "color": {"value": "black"}
          }
        }
      ]
      
        "marks": [
    {
      "type": "text",
      "encode": {
        "update": {
          "text":     { "value": "Hello Vega!" },
  
      
        }
      }
    }
  ]
      
      
}

Hi there, did you manage to find a solution to your problem?

hello, I have not yet been able to add a text box.

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