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

Render static images for pdf/html output #24

Closed
reinholdsson opened this issue Jan 22, 2016 · 8 comments
Closed

Render static images for pdf/html output #24

reinholdsson opened this issue Jan 22, 2016 · 8 comments

Comments

@reinholdsson
Copy link

Not sure if you have already looked into this, but one feature I would really appreciate is to be able to generate static chart images:

I think it would be really useful when creating different outputs (pdf or html) in rmarkdown. For example, when rendering a pdf document the package would automatically render a static image instead of an interactive javascript chart.

For an example, see: https://github.com/reinholdsson/test-highcharts-server-side-charts

What do you think about adding this feature to highcharter?

Keep up the good work! :)

@jbkunst
Copy link
Owner

jbkunst commented Jan 22, 2016

Hi @reinholdsson.

Interesting! Obviously this would be a really nice feature ;).

I'll check the link to see how it works and try to implement. I guess I'll ask some question if you dont mind 😅

Thanks

@reinholdsson
Copy link
Author

@jbkunst Sounds great! Of course, I'm glad to help :)

@jbkunst jbkunst added this to the v0.3.0 milestone Feb 21, 2016
@jbkunst
Copy link
Owner

jbkunst commented Feb 29, 2016

Hi @reinholdsson ,

Doy you know if exists a function to check if you're are knitting to pdf or html? I want to do something like this:

knit_print.highchart <- function(...){

  if( I knitting a html ) {
    knit_print.htmlwidget(...)
  } else {
    create_highchart_image(...)
  }

}

@reinholdsson
Copy link
Author

@jbkunst
Copy link
Owner

jbkunst commented Mar 2, 2016

@reinholdsson tyvm!

It seems that your search skills are better than mine.

Thanks again!

@jbkunst
Copy link
Owner

jbkunst commented Mar 5, 2016

Hi @reinholdsson,

knitr (https://github.com/yihui/knitr/blob/master/NEWS.md) will have a feature to generate a static image from a widget in non html documents using the https://github.com/wch/webshot. So I will close this issue and we can open if this feature/solution dont work with highcharter.

Kind regards,

@jbkunst jbkunst closed this as completed Mar 5, 2016
@jbkunst jbkunst removed this from the v0.3.0 milestone Mar 5, 2016
@Bryant-zhu
Copy link

@jbkunst hey , what if I only what highcharter to be static on my html file ? thanks

@apuhegde
Copy link

Hello, I'm using the pdf() function to save my plots in a pdf file when I run my R script on the command line (this is why I can't use RMarkdown/knittr). Does highcharter allow saving the charts to a static pdf using the pdf() function?

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

4 participants