Open ttzhou opened 6 years ago
In layer_bars
:
function (vis, ..., stack = TRUE, width = NULL)
{
new_props <- merge_props(cur_props(vis), props(...))
check_unsupported_props(new_props, c("x", "y", "x2", "y2"),
c("enter", "exit", "hover"), "layer_bars")
x_var <- find_prop_var(new_props, "x.update")
discrete_x <- prop_countable(cur_data(vis), new_props$x.update)
vis <- set_scale_label(vis, "x", prop_label(**cur_props**(vis)$x.update))
...
}
Would setting cur_props(vis)
to new_props(vis)
rectify this?
The following does not work:
Error is:
Error in UseMethod("prop_label") : no applicable method for 'prop_label' applied to an object of class "NULL"
But the following does:
Even the following works:
i.e.
layer_bars
works only ifx
andy
are initially set in the initialggvis
call.The source code for
layer_bars
seems to ask for'x.update'
, which I'm guessing only works ifx
is initially defined.This does not seem to be the case for
layer_points
, i.e.works fine.
In my opinion, this should be made consistent... if some marks allow for empty initial values for props, I think all of them should?
Also: thank you, to the entire team, for making such a great contribution to the data community. I know this isn't high on your priority list right now, but there are definitely people out there who love
ggvis
and are hoping for further development.