Open espressoroaster opened 7 years ago
We just need to prepend the remainder of the file path from voyager-electron
to the VLspec to convert the VLspec's data URL into an absolute URL.
The fp
variable in electron should contain the absolute URL to the spec being opened. From there we'll need to distinguish between whether we are loading in-line data, data from an absolute URL, or data from a relative URL. For the latter case we will need to be modify the spec's relative data path to an absolute path by prepending the path (sans filename) from fp
.
Voyager-electron currently parses Vega-Lite spec data URLs relative to the program rather than relative to the spec as you would expect.
File structure:
Error:
cars_scatterplot.json:
cars.json: https://raw.githubusercontent.com/vega/vega-editor/redux/data/cars.json