Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect axes merging rule for facet of facet #2761

Open
kanitw opened this issue Aug 4, 2017 · 4 comments
Open

Incorrect axes merging rule for facet of facet #2761

kanitw opened this issue Aug 4, 2017 · 4 comments
Assignees

Comments

@kanitw
Copy link
Member

kanitw commented Aug 4, 2017

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "data": {"url": "data/cars.json"},
  "facet": {"row": {"field": "Origin","type": "ordinal"}},
  "spec": {
    "facet": {"row": {"field": "Cylinders","type": "ordinal"}},
    "spec": {
      "mark": "point",
      "encoding": {
        "x": {"field": "Horsepower","type": "quantitative"},
        "y": {"field": "Acceleration","type": "quantitative"}
      }
    }
  }
}

X-Axis should be shared for all of the facets

@kanitw kanitw modified the milestones: 2.1? Important Patches, 2.0.0 Critical Issues for Release Aug 12, 2017
@kanitw kanitw modified the milestones: 2.x? Important Patches, 2.x Composition Patches Sep 22, 2017
@domoritz
Copy link
Member

Column of column leads to Error: Unrecognized signal name: "undefined"

{
  "$schema": "https://vega.github.io/schema/vega-lite/v2.json",
  "data": {"url": "data/cars.json"},
  "facet": {"column": {"field": "Origin","type": "ordinal"}},
  "spec": {
    "facet": {"column": {"field": "Cylinders","type": "ordinal"}},
    "spec": {
      "mark": "point",
      "encoding": {
        "x": {"field": "Horsepower","type": "quantitative"},
        "y": {"field": "Acceleration","type": "quantitative"}
      }
    }
  }
}

@kanitw kanitw removed this from the x.x View Composition milestone Dec 4, 2019
@domoritz
Copy link
Member

domoritz commented Dec 4, 2019

Here is another example we should support.

Facet of facet where the inside facet uses a shared y scale but every row uses a different scale.

{
  "data": {"url": "https://vega.github.io/vega-lite/examples/data/cars.json"},
  "transform": [{
    "filter": "year(datum.Year) > 1977"
  }],
  "facet": {
    "row": {"type": "nominal", "field": "Origin"}
  },
  "spec": {
    "facet": {
      "column": {"type": "ordinal", "field": "Year"}
    },
    "spec": {
      "mark": {"type": "circle", "size": 60},
      "encoding": {
        "color": {"type": "nominal", "field": "Origin"},
        "x": {"type": "quantitative", "field": "Horsepower"},
        "y": {"type": "quantitative", "field": "Miles_per_Gallon", "scale": {"zero": false}}
      },
      "height": 100,
      "width": 100
    },
    "resolve": {"scale": {"y": "shared"}}
  },
  "resolve": {"scale": {"y": "independent"}},
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json"
}

Right now, this produces

image

@nmaar
Copy link

nmaar commented May 4, 2021

Hello, here is a summary of issue #7407.

In the current version of vega lite, multiple axis are displayed in the case of a facet of a facet:
example multiple

Facet of facet visualizaitons will improve if one (shared) axis is displayed, like the following Tableau example.
Schermafbeelding 2021-05-04 om 14 08 54

Currently this issue has a P4 "nice to have" label.
I can't estimate how much work it is (or even possible) to implement a common axis.
But (if possible) I suggest implementing this feature would expand the possibilities of vega lite greatly.

nmaar

@bigfacewo
Copy link

Are there any updates or plans regarding this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants