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

Boxplot missing/broken whiskers when using timeUnit #4925

Closed
semiamaurotic opened this issue Apr 29, 2019 · 2 comments · Fixed by #6755
Closed

Boxplot missing/broken whiskers when using timeUnit #4925

semiamaurotic opened this issue Apr 29, 2019 · 2 comments · Fixed by #6755
Labels
Area - Macro / Composite Mark Bug 🐛 P2 Important Issues that should be fixed soon

Comments

@semiamaurotic
Copy link

When I try to group data by weekday or month (or any timeUnit) and use "extent": "min-max", whiskers are displayed, but when using the default 1.5 IQR, no whiskers are drawn. If I switch to ordinal or nominal types, detached whiskers are drawn in a new column. This seems to be related to issue #4524

image

image

image

{
  "$schema": "https://vega.github.io/schema/vega-lite/v3.2.1.json",
  "hconcat": [
    {
      "data": {"url": "https://vega.github.io/vega-datasets/data/seattle-temps.csv"},
      "mark": {"type": "boxplot",  "extent": "min-max"},
      "encoding": {
        "x": {"type": "temporal", "field": "date", "timeUnit": "month"},
        "y": {"type": "quantitative", "field": "temp"}
      }
    },
    {
      "data": {"url": "https://vega.github.io/vega-datasets/data/seattle-temps.csv"},
      "mark": "boxplot",
      "encoding": {
        "x": {"type": "temporal", "field": "date", "timeUnit": "month"},
        "y": {"type": "quantitative", "field": "temp"}
      }
    },
    {
      "data": {"url": "https://vega.github.io/vega-datasets/data/seattle-temps.csv"},
      "mark": "boxplot",
      "encoding": {
        "x": {"type": "ordinal", "field": "date", "timeUnit": "month"},
        "y": {"type": "quantitative", "field": "temp"}
      }
    }
  ]
}
@kanitw kanitw added the Bug 🐛 label Jun 2, 2019
@kanitw kanitw added this to the x.x Composite Marks milestone Jun 2, 2019
@kanitw kanitw added greenkeeper P3 Should be fixed at some point and removed greenkeeper labels Jun 2, 2019
@mattijn
Copy link
Contributor

mattijn commented Sep 30, 2019

Run into this issue as well:

image

I found out that when adding a temporal tooltip the outliers are placed on the right places and not on the Jan-1970.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v3.2.1.json",
  "data": {
    "url": "https://vega.github.io/vega-datasets/data/seattle-temps.csv"
  },
  "mark": {"type": "boxplot", "extent": 0.5},
  "encoding": {
    "x": {"type": "ordinal", "field": "date", "timeUnit": "yearmonth"},
    "y": {"type": "quantitative", "field": "temp"},
    "tooltip": [{"type": "temporal", "field": "date", "timeUnit": "yearmonth"}]
  }
}

(had to reduce the extent to get some outliers)

editor-url

@kpm-at-hfi
Copy link

Following

@kanitw kanitw added P2 Important Issues that should be fixed soon and removed P3 Should be fixed at some point labels Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Macro / Composite Mark Bug 🐛 P2 Important Issues that should be fixed soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants