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

Cannot Read properties of undefined (reading 'marktype') #9280

Open
1 task done
NfNitLoop opened this issue Mar 7, 2024 · 1 comment
Open
1 task done

Cannot Read properties of undefined (reading 'marktype') #9280

NfNitLoop opened this issue Mar 7, 2024 · 1 comment
Labels
Bug 🐛 P3 Should be fixed at some point

Comments

@NfNitLoop
Copy link

NfNitLoop commented Mar 7, 2024

Bug Description

Using binning with maxbins + extent not possible with facets. (Though you can use either independently.)

Reproduction

Using a slightly modified version of an example from the Vega-Lite docs, I want to set maxbins within the viewed extent. But setting that when using facets results in the error:

Caution

[Error] Cannot read properties of undefined (reading 'marktype')

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {"url": "data/cars.json"},
  "facet": {"row": {"field": "Origin"}},
  "spec": {
    "mark": "bar",
    "encoding": {
      "x": {
        "bin": {
          "maxbins": 5, 
          // UNCOMMENT this line to see the error:
          // "extent": {"param": "zoom"}
          },
        "field": "Horsepower",
        "type": "quantitative"
      },
      "y": {"aggregate": "count", "type": "quantitative"}
    },
    "params": [
      {
        "name": "zoom",
        "select": "interval",
        "bind": "scales",
      }
    ]
  }
}

editor

This works just fine without facets.

Checklist

  • I checked for duplicate issues.
@domoritz
Copy link
Member

maxbins works with extent: Open the Chart in the Vega Editor. The error seems to be specific to params.

@domoritz domoritz added the P3 Should be fixed at some point label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 P3 Should be fixed at some point
Projects
None yet
Development

No branches or pull requests

2 participants