# Data from ESSQL not available to bubble chart, in Canvas and Vega

**URL:** <https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816>\
**Category:** Kibana\
**Tags:** vega, canvas\
**Created:** [December 29, 2020, 5:07pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816 "2020-12-29T17:07:33Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 5:07pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/1 "2020-12-29T17:07:33Z")

</div>

Hello

I am trying to create a scatter plot from an index (created with a transform). The data is available at the datasource preview of the query but it doesn't show up in the chart.

Running the chart in debug mode gives an empty data array.

Could you help? I had a similar problem when I tried to create a scatter from this data with Vega

Thank you

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 6:46pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/2 "2020-12-29T18:46:29Z")

</div>

I've found out that the problem is the same on Canvas tables

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 6:55pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/3 "2020-12-29T18:55:23Z")

</div>

Can you share you vega json ?

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 7:01pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/4 "2020-12-29T19:01:31Z")

</div>

```auto
{
  $schema: https://vega.github.io/schema/vega-lite/v4.json
  title: Avaliação

  data: {
    url: {
      %context%: true
      %timefield%: @timestamp

      index: agnts_txcch
      body: {
      }
    }
    format: {property: "hits.hits"}
  }

  mark: points

  encoding: {
    x: {
      field: countcalls
      type: quantitative
      axis: {title: "Chamadas"}
    }
    y: {
      field: countsales
      type: quantitative
      axis: {title: "Vendas"}
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 7:41pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/5 "2020-12-29T19:41:13Z")

</div>

Try this, hope that may help

```auto
{
  "$schema": "https://vega.github.io/schema/vega/v5.json",
  "title": "Title here for Scatter Plot Example",
  "padding": 5,
  "data": [
    {
      "name": "esdata",
      "url": {
        "%context%": "true",
        "%timefield%": "@timestamp",
        "index": "agnts_txcch",
        "body": {}
      },
      "format": {"property": "hits.hits"}
    }
  ],
  "scales": [
    {
      "name": "x",
      "type": "linear",
      "round": true,
      "nice": true,
      "zero": true,
      "domain": {"data": "esdata", "field": "_source.countcalls"},
      "range": "width"
    },
    {
      "name": "y",
      "type": "linear",
      "round": true,
      "nice": true,
      "zero": true,
      "domain": {"data": "esdata", "field": "_source.countsales"},
      "range": "height"
    }
  ],
  "axes": [
    {
      "scale": "x",
      "grid": true,
      "domain": false,
      "orient": "bottom",
      "tickCount": 5,
      "title": "Chamadas"
    },
    {
      "scale": "y",
      "grid": true,
      "domain": false,
      "orient": "left",
      "titlePadding": 5,
      "title": "Vendas"
    }
  ],
  "marks": [
    {
      "name": "marks",
      "type": "symbol",
      "from": {"data": "esdata"},
      "encode": {
        "update": {
          "x": {"scale": "x", "field": "_source.countcalls"},
          "y": {"scale": "y", "field": "_source.countsales"}
        }
      }
    }
  ]
}

```

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 7:55pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/6 "2020-12-29T19:55:16Z")

</div>

Thank you, but it returns the following error:

```auto
Infinite extent for field "_source.countcalls": [Infinity, -Infinity]
Infinite extent for field "_source.countsales": [Infinity, -Infinity]

```

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 7:56pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/7 "2020-12-29T19:56:10Z")

</div>

Can you adjust the time range ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/9/49e04017891baa20c4aadb53d7a590ffdd2408f4.png)

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 7:58pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/8 "2020-12-29T19:58:55Z")

</div>

It is already 1Year. But the index has no timestamp data.

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 8:00pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/9 "2020-12-29T20:00:48Z")

</div>

That's the problem. I've deleted `"%timefield%": "@timestamp",` and it works

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 8:02pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/10 "2020-12-29T20:02:06Z")

</div>

But I guess that's not the problem in Canvas

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 8:03pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/11 "2020-12-29T20:03:11Z")

</div>

- `%context%: true` : Set at the top level, and replaces the `query` section with filters from dashboard
- `%timefield%: <name>` : Set at the top level, integrates the query with the dashboard time filter

> **[Vega reference | Kibana Guide \[7.10\] | Elastic](https://www.elastic.co/guide/en/kibana/current/vega-reference.html#vega-queries)**

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 8:03pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/12 "2020-12-29T20:03:32Z")

</div>

What's your issue in Canevas ?

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 8:05pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/13 "2020-12-29T20:05:01Z")

</div>

I am sorry to mix up two issues on same question. I thought it could help.

> I am trying to create a scatter plot from an index (created with a transform). The data is available at the datasource preview of the query but it doesn't show up in the chart.  
> Running the chart in debug mode gives an empty data array.

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [December 29, 2020, 8:05pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/14 "2020-12-29T20:05:52Z")

</div>

ok, feel free to open a new thread for the issue related to Canevas

---

<div class="post-metadata">

**Author:** ![Hugo\_Pires](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hugo_pires/32/68069_2.png) [@Hugo\_Pires](https://discuss.elastic.co/u/Hugo_Pires)\
**Post date:** [December 29, 2020, 8:07pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/15 "2020-12-29T20:07:40Z")

</div>

Done.

---

<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:** [January 26, 2021, 8:08pm UTC](https://discuss.elastic.co/t/data-from-essql-not-available-to-bubble-chart-in-canvas-and-vega/259816/16 "2021-01-26T20:08:13Z")

</div>

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