vega-lite icon indicating copy to clipboard operation
vega-lite copied to clipboard

Undefined data set when using facets and repeat operator for histograms

Open kanitw opened this issue 6 years ago • 7 comments

{
  "$schema": "https://vega.github.io/schema/vega-lite/v3.json",
  "repeat": {"column": ["Horsepower","Miles_per_Gallon", "Acceleration"]},
  "spec": {
    "data": {"url": "data/cars.json"},
    "mark": "bar",
    "encoding": {
      "row":{"field":"Origin", "type":"nominal"},
      "x": {
        "field": {"repeat": "column"},
        "bin": true,
        "type": "quantitative"
      },
      "y": {"aggregate": "count","type": "quantitative"}
    }
  }
}

Originally from https://stackoverflow.com/questions/54126339/is-it-possible-to-use-facets-and-repeat-operator-for-histograms

kanitw avatar Jan 11 '19 01:01 kanitw

Odd. To debug this, we should print the dataflow before optimizations and see whether necessary nodes get removed from it.

domoritz avatar Jan 19 '19 19:01 domoritz

scale_child_Miles_per_Gallon_child_main

It's related to scale rename

kanitw avatar Jan 19 '19 22:01 kanitw

I am having the same problem while trying to use repeat and facet together. It seems this bug has been open for long time, is there a plan to fix it officially in future?

ObservedObserver avatar Jan 15 '20 04:01 ObservedObserver

Yes, I plan to get to these issues this quarter.

domoritz avatar Jan 17 '20 06:01 domoritz

I'm having what looks like the same problem here as well, trying to use both repeat and a facet. Any update or pointers to a workaround? Thanks!

eidietrich avatar Aug 04 '20 14:08 eidietrich

I got swamped with other things to work on. I don't have an update yet.

domoritz avatar Aug 04 '20 15:08 domoritz

cannot reproduce in v5.16.3

ChiaLingWeng avatar Feb 02 '24 04:02 ChiaLingWeng