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

The default offset range makes categories bleed together #9437

Open
joelostblom opened this issue Sep 20, 2024 · 0 comments
Open

The default offset range makes categories bleed together #9437

joelostblom opened this issue Sep 20, 2024 · 0 comments
Labels

Comments

@joelostblom
Copy link
Contributor

By default when creating a chart with jittered/offset points, they are so close together that it is difficult to see which belongs to which category (unless using color as in this example):

image
Open the Chart in the Vega Editor

Looking at the Vega spec, it seems like the offset by default is spread over the entire bandwidth:

    {
      "name": "yOffset",
      "type": "linear",
      "domain": {"data": "source_0", "field": "random"},
      "range": [0, {"signal": "bandwidth('y')"}],
      "zero": false
    },

I think the chart becomes significantly easier to read once scaling the range so that the max is bandwidth('y') * 0.7 (or similar):

image
Open the Chart in the Vega Editor

@kanitw Is this a case where the default would be easy to change only for quantitative fields without affecting how offset is handled for categorical fields?

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

No branches or pull requests

1 participant