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

how to save the interactive plots? #14

Open
YuanqiangDuan opened this issue Jan 28, 2019 · 1 comment
Open

how to save the interactive plots? #14

YuanqiangDuan opened this issue Jan 28, 2019 · 1 comment

Comments

@YuanqiangDuan
Copy link

Dear Simon,

I have made the interactive plots and when I click different points in "A1" place(a scatter plot), it will give different scatter plot in "A2" place. Now the plots are shown in R/linked-charts. But how can I save the interactive plots? So I do not need rerun the code if I want to open the plots.

library( rlc )
openPage(useViewer = F, layout="table2x1")

lc_scatter(
dat(
x = procdat_gen$Exprs, ## prodat_gen is a data.frame
y = procdat_gen$total,
label = procdat_gen$WellID,
on_click = function(k){wellname <<- k; updateCharts(c("A2"))}
),
place = "A1",
)

lc_scatter(
dat(
x = CurrSg[which(CurrSg$WellID == procdat_gen$WellID[wellname] ),]$X405.A.A, ## CurrSg is a data.frame
y = CurrSg[which(CurrSg$WellID == procdat_gen$WellID[wellname] ),]$X405.B.A
),
place = "A2",
)

best wishes
yuanqiang

@simon-anders
Copy link
Contributor

Yes, as long as your code is written in R, you need to have R running to execute it. You can translate it to JavaScript, and then it works stand-alone.

You could have a look at the JavaScript tutorial to see how that can be done. It should be quite easy -- unless you are completely unfamiliar with JavaScript.

Or you imply run R on a web server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants