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

parcoords problem in rmarkdown Tabbed Sections #20

Open
ghost opened this issue Apr 17, 2016 · 5 comments
Open

parcoords problem in rmarkdown Tabbed Sections #20

ghost opened this issue Apr 17, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 17, 2016

parcoords plots do not appear in other but the first tab in rmarkdown documents with tabs (by applying the .tabset class attribute). Is there a solution?

@timelyportfolio
Copy link
Owner

Thanks for the report. Yep, there is no resize handler, so the shown events (see ramnathv/htmlwidgets#184) will have no impact. I'll work through this. The very simple approach will be to re-render the instance, but in the case of "bigger data" will have performance implications.

@timelyportfolio
Copy link
Owner

@gd047, I started working on this by adding resize on the JavaScript side. The behavior can be turned on in R with the argument autoresize=TRUE.

devtools::install_github("timelyportfolio/parcoords@feature/resize")
library(parcoords)
parcoords(mtcars, autoresize=TRUE)

Please help me test.

reference rstudio/flexdashboard#24
branch https://github.com/timelyportfolio/parcoords/tree/feature/resize
commit 45005dd

@ghost
Copy link
Author

ghost commented May 17, 2016

It is now working as expected. Thank you.

@ghost ghost closed this as completed May 17, 2016
@ghost
Copy link
Author

ghost commented May 23, 2016

I noticed something strange that has to do with tabsets and nvd3 plots with
rCharts.

I have created a shiny app that uses renderChart to create a nPlot. This
app also displays some html pages (created using rmarkdown), using the
includeHTML command.

Everything was ok until I installed the latest rmarkdown version, that
supports tabsets. Suddenly the nPlot disappeared. After some research I
found out that in order to make it appear again, I had to remove the
following code from *every *html page I was using (with includeHTML).

<script> $(document).ready(function () { window.buildTabsets("TOC"); }); </script>

Since it's not easy to do that by hand every time, I have created a macro
in Ultraedit that deletes those lines from every html page, and call it
from within R, after the pages creation.

Have you noticed that problem? Is there a better solution?

On Mon, May 16, 2016 at 5:19 PM, timelyportfolio [email protected]
wrote:

@gd047 https://github.com/gd047, I started working on this by adding
resize on the JavaScript side. The behavior can be turned on in R with
the argument autoresize=TRUE.

devtools::install_github("timelyportfolio/parcoords@feature/resize")
library(parcoords)
parcoords(mtcars, autoresize=TRUE)

Please help me test.

reference rstudio/flexdashboard#24
rstudio/flexdashboard#24
branch https://github.com/timelyportfolio/parcoords/tree/feature/resize
commit 45005dd
45005dd


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#20 (comment)

@ghost
Copy link
Author

ghost commented Jan 30, 2018

Same problem in version 0.5.0. (It was fixed in version 0.3.0)

@ghost ghost reopened this Jan 30, 2018
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

1 participant