Hello!
Is it possible to create a custom chart, using vega or vega-lite, referencing a local file (experience file)? Something like:
“data”: {“name”: “my_file.csv”}
Apparently, files generated by workflows appear as downloadable links, so that’s probably why just typing it in the “name” won’t work.
Thanks in advance!
You need to drop in the full URL, and it must be a publicly accessible URL. For example, you could upload your CSV to Application Files.
As proof …
- Start creating a new custom chart block in a dashboard.
- Change the spec from “Vega-Lite 2” to “Vega 5”.
- In a separate browser tab, visit this example from Vega, and copy the spec JSON.
- Back in the Losant block configuration, paste the spec into the configuration.
- Find the line
"url": "data/movies.json",
(under the data
property) and change it to the full URL, which is “https://vega.github.io/editor/data/movies.json”. So after the change the line should read "url": "https://vega.github.io/editor/data/movies.json",
.
- You should see the chart appear.