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

autosize failed sometimes #78

Closed
ObservedObserver opened this issue Dec 6, 2019 · 1 comment
Closed

autosize failed sometimes #78

ObservedObserver opened this issue Dec 6, 2019 · 1 comment
Labels

Comments

@ObservedObserver
Copy link
Contributor

ObservedObserver commented Dec 6, 2019

I lost the axis title, and sometimes axis tick number or even legend if they are big enough. I think it is casued by failing of autosize.

It might be some reason like data changed but chart failed to auto size for the changed data.

the warning I got

WARN Infinite extent for field "writing score": [Infinity, -Infinity]

It works fine in vega-embed, but fails when I change to react-vega.

{
  "data": {"name": "dataSource"},
  "autosize": {"type": "pad"},
  "mark": "point",
  "selection": {"sl": {"type": "interval"}},
  "encoding": {
    "x": {"field": "math score", "type": "quantitative"},
    "y": {"field": "writing score", "type": "quantitative"},
    "size": {"field": "reading score", "type": "quantitative"},
    "color": {"field": "lunch", "type": "nominal"}
  }
Besides, when I put the dataSource as values in spec props instead of using data props, It works fine.
}

students performance dataset

kristw pushed a commit that referenced this issue Feb 5, 2020
after updating data, the scale might change.(size of axis tick might change, etc). It is better to resize the chart to prevent part of the tick number get out of the canvas.
@kristw kristw added the bug label Feb 5, 2020
@kristw
Copy link
Member

kristw commented Feb 5, 2020

PR merged and published as 7.1.2

@kristw kristw closed this as completed Feb 5, 2020
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

2 participants