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