Infinite extent for field "<field name>" : [Infinity, -Infinity]

Hi there,

I am using elasticsearch & kibana version 8.5.3

This is how my data look like when I run my script:

Inspect > View Request > Vega debug > Spec:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "format": {
      "property": "hits.hits"
    },
    "url": {
      "name": "table",
      "index": "insights_default_xod",
      "body": {
        "size": 30,
        "_source": [
          "description",
          "metadata.properties.StartDate",
          "metadata.properties.EndDate",
          "metadata.properties.Project"
        ],
        "query": {
          "bool": {
            "must": {
              "bool": {
                "filter": {
                  "exists": {
                    "field": "metadata.properties.EndDate"
                  }
                }
              }
            },
            "filter": {
              "term": {
                "description": "project"
              }
            }
          }
        }
      }
    },
    "values": {
      "took": 1,
      "timed_out": false,
      "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
      },
      "hits": {
        "total": 27,
        "max_score": 0,
        "hits": [
          {
            "_index": "insights_default_xod",
            "_id": "4759b71d043a7b146e02af7081346b6ab82fb1d3fad6de5af5ae040813701426",
            "_score": 0,
            "_source": {
              "metadata.properties.Project": "Name1",
              "description": "project",
              "metadata.properties.StartDate": "2022-05-02",
              "metadata.properties.EndDate": "2022-05-31"
            }
          },
          {
            "_index": "insights_default_xod",
            "_id": "1b0b77e92d18103c69b887b28f4a0731a7cee92b7ceb34766d35ed2f58520018",
            "_score": 0,
            "_source": {
              "metadata.properties.Project": "Name2",
              "description": "project",
              "metadata.properties.StartDate": "2022-11-14",
              "metadata.properties.EndDate": "2022-11-21"
            }
          },
  "mark": "bar",
  "encoding": {
    "x": {
      "field": "metadata.properties.Project",
      "type": "nominal"
    },
    "y": {
      "field": "metadata.properties.StartDate",
      "type": "temporal"
    },
    "y2": {
      "field": "metadata.properties.EndDate",
      "type": "temporal"
    }
  },
  "config": {
    "range": {
      "category": {
        "scheme": "elastic"
      }
    },
    "mark": {
      "color": "#54B399"
    },
    "title": {
      "color": "#343741"
    },
    "style": {
      "guide-label": {
        "fill": "#69707d"
      },
      "guide-title": {
        "fill": "#343741"
      },
      "group-title": {
        "fill": "#343741"
      },
      "group-subtitle": {
        "fill": "#343741"
      }
    },
    "axis": {
      "tickColor": "#eef0f3",
      "domainColor": "#eef0f3",
      "gridColor": "#eef0f3"
    },
    "background": "transparent"
  },
  "width": "container",
  "height": "container",
  "autosize": {
    "type": "fit",
    "contains": "padding"
  }
}

And here is my script:

{
  $schema: https://vega.github.io/schema/vega-lite/v5.json
  data: {
    url: {
      name: table
      index: insights_default_xod
      body: {
        size: 30
        _source: ["description", "metadata.properties.StartDate", "metadata.properties.EndDate", "metadata.properties.Project"]
        "query": {
          "bool": {
            "must": {
              "bool": {
                "filter" : {
                  "exists": { 
                    "field" : "metadata.properties.StartDate",
                    "field" : "metadata.properties.EndDate" 
                  }
                }
              }
            }
            "filter" : {
              "term": { "description" : "project" }
            }
          }
        }
      }
    }
    format: {property: "hits.hits"}
  }

  mark: bar

  encoding: {
    x: {field: "metadata.properties.Project", type: "nominal"}
    y: {field: "metadata.properties.StartDate", type: "temporal"}
    y2: {field: "metadata.properties.EndDate", type: "temporal"}
  }
}

When I click on update, I don't see any chart, instead I see the following warnings:

Can anyone tell me, how can I visualize my data?
I am trying to create Gantt Chart.

With regards,
Kamil

Hi Kamil,

There is a similar discuss thread on generating using a Gantt chart that may help. It is using version 7 but the approach should be similar. Not sure if you are following that example?

@Kamil_BdBelfort

in the encoding block, you need to access the _source property of your values to get the field data:

"encoding": {
    "x": {
      "field": "_source['metadata.properties.Project']",
      "type": "nominal"
    },
    "y": {
      "field": "_source['metadata.properties.StartDate']",
      "type": "temporal"
    },
    "y2": {
      "field": "_source['metadata.properties.EndDate']",
      "type": "temporal"
    }
  },

should work

Yes, this worked perfectly! Thank you @Marco_Liberati !

Hi @carly.richmond ! I tried to follow this thread indeed without success.
Thank you for your reply :slight_smile:

1 Like

No worries. Thankfully @Marco_Liberati came to the rescue. Glad it's all working now!