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

Comments

Projects
None yet
2 participants
@hadley
Member

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

This comment has been minimized.

Show comment
Hide comment
@wch

wch Aug 19, 2013

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@hadley

hadley Aug 29, 2013

Member

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?

Member

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

This comment has been minimized.

Show comment
Hide comment
@wch

wch May 23, 2014

Contributor

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")
Contributor

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

Dave Childers
Remove 'note' from properties-scales vignette
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