vega / voyager

Visualization Tool for Data Exploration
http://vega.github.io/voyager
Other
1.45k stars 179 forks source link

getSpec doesn't work when in multi views mode #817

Open davidanthoff opened 6 years ago

davidanthoff commented 6 years ago

When I call voyagerInstance.getSpec(true) in a case where someone for example dropped a wildcard onto the y axis (so that voyager will show multiple views as the "specified view"), I get some JSON back that has only the data and an id field, e.g.

{
  "data": {
    "values": [
      {
        "c": "A",
        "_id": 6,
        "b": 0.8807206033943051,
        "a": 0.10309715830344635
      },
      {
        "c": "B",
        "_id": 7,
        "b": 0.9519120695229859,
        "a": 0.5902066327311346
      }
    ]
  }
}

It would maybe make more sense to return an array of specs, or something like that?