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

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

1 Like

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

Can you share you vega json ?

{
  $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"}
    }
  }
}

Try this, hope that may help

{
  "$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"}
        }
      }
    }
  ]
}

Thank you, but it returns the following error:

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

Can you adjust the time range ?

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

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

But I guess that's not the problem in Canvas

  • %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

What's your issue in Canevas ?

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.

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

Done.

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