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

Boxplot doesn't play well with params

Open brucala opened this issue 4 years ago • 2 comments

It seems that boxplots don't work with params. Here is a MWE:

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",

  "data": {"url": "data/penguins.json"},
  "mark": "boxplot",
  "encoding": {
    "y": {"field": "Species", "type": "nominal"},
    "x": {
      "field": "Body Mass (g)",
      "type": "quantitative",
      "scale": {"zero": false}
    }
  },
  "params": [{
    "name": "selector",
    "select": {"type": "point", "fields": ["Species"]},
    "bind": {"input": "select", "options": [null, "Adelie", "Chinstrap", "Gentoo"]}
  }],
  "transform": [{"filter": {"param": "selector"}}]
}

Note that if the mark property is replaced to "point", then the plot works just as expected.

The error message is: image with a warning: "Selection not supported for boxplot yet". However, I don't see any reference in the documentation that params are not supported for boxplots.

Is this a known issue? is there a fix for this planned in the pipeline?

(Thanks for the awesome VegaLite!)

brucala avatar Jan 18 '22 08:01 brucala

There are known issues with full support for params and I have some prs with a fix that need to be cleaned up/redone now. It's in my queue to fix them.

Thanks for the example.

domoritz avatar Jan 18 '22 14:01 domoritz

Any news on fixing this @domoritz ?

NguyenNamUET avatar Dec 06 '23 07:12 NguyenNamUET