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

Regression of behaviour of signals/viewof for layered vega-lite with multiple signals #599

Open
RobinL opened this issue Oct 11, 2023 · 0 comments

Comments

@RobinL
Copy link

RobinL commented Oct 11, 2023

The following schema has two signals, one on each layer:

schema $schema: "https://vega.github.io/schema/vega-lite/v5.json", vconcat: [ { params: [ { name: "brush1", select: { type: "interval", encodings: ["x"] } } ], data: { values: [ { x: 1, y: 3 }, { x: 2, y: 2 }, { x: 3, y: 4 } ] }, mark: "line", encoding: { x: { field: "x", type: "ordinal" }, y: { field: "y", type: "quantitative" } } }, { selection: { gam_concat_signal: { type: "single", encodings: ["x"] } }, data: { values: [ { x: 1, y: 2 }, { x: 2, y: 4 }, { x: 3, y: 3 } ] }, mark: "bar", encoding: { x: { field: "x", type: "ordinal" }, y: { field: "y", type: "quantitative" } } } ] };

Open the Chart in the Vega Editor

In the vega editor, both signals display correctly in the signal viewer.

If I use Generators.observe to observe the signals, then historically in observablehq, both signals could be successfully observed.

However, some of my notebooks recently broke. With no changes to the code, only the brush1 signal now is observable.

The fix is using specific vega/vega-lite versions:

embedWithSpecificVersions = require.alias({
  vega: "[email protected]",
  "vega-lite": "[email protected]"
})("vega-embed@6")

Working version notebook

Non-working version notebook

Apologies - I struggle to understand where I should raise this issue because it's unclear whether it's a vega issue (but the signals are viewable in the vega lite editor), a vega embed issue (something to do with viewof) or an observable runtime issue. Grateful for any advice.

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

No branches or pull requests

1 participant