rstudio / ggvis

Interactive grammar of graphics for R
Other
714 stars 172 forks source link

Exporting to png/svg fails #432

Open entropitor opened 9 years ago

entropitor commented 9 years ago

When I try to export to an svg or png, it fails with next query:

/usr/lib/node_modules/vega/src/parse/transforms.js:5
  var tx = new transforms[def.type](model);
           ^
TypeError: undefined is not a function
    at parseTransforms (/usr/lib/node_modules/vega/src/parse/transforms.js:5:12)
    at /usr/lib/node_modules/vega/src/parse/data.js:36:16
    at Array.map (native)
    at Function.parseData.datasource (/usr/lib/node_modules/vega/src/parse/data.js:35:39)
    at /usr/lib/node_modules/vega/src/parse/data.js:27:15
    at Array.forEach (native)
    at Object.parseData [as data] (/usr/lib/node_modules/vega/src/parse/data.js:22:16)
    at parse (/usr/lib/node_modules/vega/src/parse/spec.js:30:21)
    at Object.parseSpec [as spec] (/usr/lib/node_modules/vega/src/parse/spec.js:37:5)
    at render (/usr/lib/node_modules/vega/bin/vg2svg:66:12)

Any idea how to solve this problem?

(It works fine if I show the plot in Rstudio and then press "export SVG". So if there would be a way to automate that, that would be fine too!)

pssguy commented 8 years ago

It usually helps if you are able to provide a toy example with data which reproduces the error