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

Should scaled constants be embedded in the data #29

Closed
hadley opened this issue Aug 19, 2013 · 3 comments
Closed

Should scaled constants be embedded in the data #29

hadley opened this issue Aug 19, 2013 · 3 comments
Milestone

Comments

@hadley
Copy link
Member

@hadley hadley commented Aug 19, 2013

Because we can't currently add constants to a scale: https://github.com/trifacta/vega/issues/103

Then it would work the same way as reactive constants.

Scaled constants are useful for cases like this:

ggvis(mtcars, props(x ~ wt, y ~ mpg), 
  mark_symbol(),
  branch_smooth(props(stroke = "lm"), method = lm),
  branch_smooth(props(stroke = "loess"))
)
@wch
Copy link
Contributor

@wch wch commented Aug 19, 2013

Seems reasonable, but maybe we should wait to see what the vega guys decide to do about it first?

@hadley
Copy link
Member Author

@hadley hadley commented Aug 29, 2013

The only problem is that it's now easy to do props(fill = "colour") which creates an invalid vega spec which just doesn't render. Maybe we need to at least throw an error?

@hadley hadley added this to the vega milestone Feb 7, 2014
@wch
Copy link
Contributor

@wch wch commented May 23, 2014

This works as of 4965233. The new syntax is:

mtcars %>% ggvis(x = ~wt, y = ~mpg) %>%
  layer_points() %>%
  layer_model_predictions(stroke = "lm", model = "lm") %>% 
  layer_model_predictions(stroke = "loess", model = "loess")
@wch wch closed this May 23, 2014
davechilders pushed a commit to davechilders/ggvis that referenced this issue Oct 9, 2015
The example works for me using ggvis version 0.4.2. And the associated
issue rstudio#29 has been closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.