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

Unable to render a gvis object #26

Closed
snakonechny opened this issue May 22, 2016 · 5 comments
Closed

Unable to render a gvis object #26

snakonechny opened this issue May 22, 2016 · 5 comments

Comments

@snakonechny
Copy link

Hello,

Thank you much for putting together this great package! I'm having some issues with rendering gvis objects in flexdashbaord. Here's a minimal example:


title: "Sample"
output:
flexdashboard::flex_dashboard:
orientation: columns

vertical_layout: fill

library(flexdashboard)
library(googleVis)
library(dplyr)

df <- iris %>% group_by(Species) %>% mutate(meanSLength = mean(Sepal.Length))

Column {data-width=650}

Sample column chart in googleVis

renderGvis(

  gvisBarChart(df, "Species", "meanSLength")

)

Above renderGvis I do specify results='asis', message=FALSE, echo=FALSE. Still, I get the following back:

screen shot 2016-05-21 at 10 46 16 pm

This happens in both the RStudio preview window and the browser.

Any help would be much appreciated!

Thanks!

@jjallaire
Copy link
Member

Yes, googleVIs objects aren't htmlwidgets (http://www.htmlwidgets.org)
which is the standard protocol for JavaScript visualizations within R, and
what we built flexdashboard to interoperate with so I don't think this will
work.

J.J.

On Sat, May 21, 2016 at 10:48 PM, Svyat Nakonechny <notifications@github.com

wrote:

Hello,

Thank you much for putting together this great package! I'm having some
issues with rendering gvis objects in flexdashbaord. Here's a minimal

example:

title: "Sample"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill

library(flexdashboard)
library(googleVis)
library(dplyr)
df <- iris %>% group_by(Species) %>% mutate(meanSLength = mean(Sepal.Length))

Column {data-width=650} Sample column chart in googleVis

renderGvis(

gvisBarChart(df, "Species", "meanSLength")

)

Above renderGvis I do specify results='asis', message=FALSE, echo=FALSE.
Still, I get the following back:

[image: screen shot 2016-05-21 at 10 46 16 pm]
https://cloud.githubusercontent.com/assets/8390111/15451853/ebd98a9e-1fa5-11e6-925c-2c98decc398a.png

This happens in both the RStudio preview window and the browser.

Any help would be much appreciated!

Thanks!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#26

@snakonechny
Copy link
Author

@jjallaire ,
Thanks for a quick response! I tried testing rCharts in flexdashbaord and received a similar error message. I take it these interactive visualizations also aren't supported?

@jjallaire
Copy link
Member

No, we just support htmlwidgets

On Sun, May 22, 2016 at 10:54 AM, Svyat Nakonechny <notifications@github.com

wrote:

@jjallaire https://github.com/jjallaire ,
Thanks for a quick response! I tried testing rCharts in flexdashbaord and
received a similar error message. I take it these interactive
visualizations also aren't supported?


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

@paulditterline
Copy link

@snakonechny, using the ggplotly() wrapper from the plotly package on ggplot objects does allow for interactivity in flexdashboard. See: https://paulditterline.shinyapps.io/Louisville_Salaries/

@snakonechny
Copy link
Author

@paulditterline , thanks for the pointer!

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

3 participants