HI, I'm experimenting a bit with the new Vega plugin for 6.2, but while it works pretty fine with external JSON files it fails when I try to achieve the same with a local stored JSON file.
I've tried with the treemap demo (https://vega.github.io/editor/#/examples/vega/treemap) and copy / pasting this in Kibana gives me the results I want when replacing the url to match the full path ("url": "https://vega.github.io/new-editor/data/flare.json")
However, when I save this file and store it on my local machine I get a 'no root' error message. The JSON itself is correct, and an exact copy of the file used when calling it with the above url.
I am running Kibana and ES on an Ubuntu server (16.04) and access rights to the folder where the JSON is stored is ok. I've tried by adding a root to the doc, but no difference. I also tried with different files, all the same problem.
My code is as below, the only difference with the working demo is with the url part, so I assume something is wrong there, but I can't find a working example using a locally stored JSON, so what is the correct syntax to use with local stored JSON?
"data": [
{
"name": "tree",
"url": "/data/kibana/flare.json",
"transform": [
{
"type": "stratify",
"key": "id",
"parentKey": "parent"
},
{
"type": "treemap",
"field": "size",
"sort": {"field": "value"},
"round": true,
"method": {"signal": "layout"},
"ratio": {"signal": "aspectRatio"},
"size": [{"signal": "width"}, {"signal": "height"}]
}
]
},
{
"name": "nodes",
"source": "tree",
"transform": [{ "type": "filter", "expr": "datum.children" }]
},
{
"name": "leaves",
"source": "tree",
"transform": [{ "type": "filter", "expr": "!datum.children" }]
}
]