# Vega chart in Kibana 7.9 doesn't change with different date ranges

**URL:** <https://discuss.elastic.co/t/vega-chart-in-kibana-7-9-doesnt-change-with-different-date-ranges/264783>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [February 19, 2021, 4:21am UTC](https://discuss.elastic.co/t/vega-chart-in-kibana-7-9-doesnt-change-with-different-date-ranges/264783 "2021-02-19T04:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticQuestion\_1234](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@ElasticQuestion\_1234](https://discuss.elastic.co/u/ElasticQuestion_1234)\
**Post date:** [February 19, 2021, 4:21am UTC](https://discuss.elastic.co/t/vega-chart-in-kibana-7-9-doesnt-change-with-different-date-ranges/264783/1 "2021-02-19T04:21:08Z")

</div>

I used Vega-lite command to create a time series chart. However, the chart doesn't change no matter which date range I select. It always show the whole set of data. I set "%timefield%": "timestamp", which is the name of my date field. I am new to Vega-lite and not sure how to debug it. In my Kibana, it says this visualization doesn't support inspect. I read some discussion about this but couldn't figure out what is the issue here. Really appreciate some help here. The following is my Vega code:

```auto
    { "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
      "title": "Volume",
      "width": 800,
      "height": 300,
      "data": {
        "name": "data1",
        "url": {
          "%context%": true,
          "%timefield%": "timestamp",
          "index": "testindex",
          "body": {
            "size": 10000,
            "_source": ["Volume","timestamp"]
          }
        },
        "format": {"property": "hits.hits"}
      },
      "transform":[
        {
        "calculate": "toDate(datum._source['timestamp'])",
        "as":"time"
        }
      ],
      "mark": {"type": "circle", "opacity": 0.3, "size": 100},
      "encoding": {
        "x": {
          "field": "time",
          "type": "temporal"
        },
        "y": {
          "field": "_source.Volume",
          "type": "quantitative",
          "scale": {"domain": [0, 400]}
        }
      }
    }

```

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [February 19, 2021, 3:53pm UTC](https://discuss.elastic.co/t/vega-chart-in-kibana-7-9-doesnt-change-with-different-date-ranges/264783/2 "2021-02-19T15:53:04Z")

</div>

Your Elasticsearch query will get updated by the time filter, but maybe you haven't written a query that actually gives you the data you want. All that the `%timefield%` does is apply a time range filter to reduce the number of matches. Have you tried running this query in the Dev Tools with different time ranges?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 19, 2021, 3:53pm UTC](https://discuss.elastic.co/t/vega-chart-in-kibana-7-9-doesnt-change-with-different-date-ranges/264783/3 "2021-03-19T15:53:28Z")

</div>

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