Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Fix support for multiple scales for a visual property
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jun 2, 2014
1 parent f94e3a9 commit 4a756e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/ggvis.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ register_scale_info <- function(vis, props) {
scale_infos <- compact(Map(build_info, names(props), props))

# Add them to the vis
scales <- prop_to_scale(names(scale_infos))
scales <-vpluck(scale_infos, "scale", character(1))
for (i in seq_along(scale_infos)) {
vis <- add_scale_info(vis, scales[i], scale_infos[[i]])
}
Expand Down
2 changes: 1 addition & 1 deletion R/prop.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ prop_scale.default <- function(x, default_scale) {
}

# Reports whether this is a scaled prop
prop_is_scaled <- function(prop) isTRUE(prop$scale)
prop_is_scaled <- function(prop) prop$scale != FALSE

This comment has been minimized.

Copy link
@hadley

hadley Jun 3, 2014

Member

Safer to do !identical(prop$scale, FALSE)


# Generate a vega object for the individual mark.
prop_vega <- function(x, default_scale) UseMethod("prop_vega")
Expand Down

0 comments on commit 4a756e4

Please sign in to comment.