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

Strip off names in chartOpts #69

Open
kbroman opened this issue Jun 12, 2020 · 0 comments
Open

Strip off names in chartOpts #69

kbroman opened this issue Jun 12, 2020 · 0 comments

Comments

@kbroman
Copy link
Owner

kbroman commented Jun 12, 2020

In chartOpts for various charts, have names on a vector of colors can screw things up. Could we automatically strip those off in some cases, so that on the javascript side they're a vector not a list/object?

n <- 10
x <- rnorm(n)
y <- rnorm(n)
g <- sample(1:2, n, replace=TRUE)
ptcolor <- setNames(c("blue", "red"), c("blue", "red"))

iplot(x, y, group=g, chartOpts=list(pointcolor=ptcolor))
iplot(x, y, group=g, chartOpts=list(pointcolor = setNames(ptcolor, NULL) ))
@kbroman kbroman changed the title Strip of names in chartOpts Strip off names in chartOpts Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant