ramnathv / slidify

Generate reproducible html5 slides from R markdown
http://www.slidify.org
843 stars 339 forks source link

Problem with Rickshaw in Slidify #402

Open OehlR opened 9 years ago

OehlR commented 9 years ago

Hi Ramnath,

I had a problem when displaying a Rickshaw chart in Slidify. To reproduce the problem I used the timelyportfolio example here : http://timelyportfolio.github.io/rCharts_rickshaw_gettingstarted/index_dataspecified.html

It seems to be a problem of yAxis label. Here is what I get when displaying the yAxis

image

Here is what I get when not displaying the yAxis (it works better) :

image

I install the dev branch of slidify & slidifyLibraries but that not change anything. Any idea ?

My code :


---
title       : test
subtitle    : 
author      : 
job         : 
framework   : io2012        # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : tomorrow      # 
widgets     : []            # {mathjax, quiz, bootstrap}
ext_widgets: {rCharts: [libraries/rickshaw]}
mode        : selfcontained # {standalone, draft}
knit        : slidify::knit2slides

---

## Rickshaw test

```{r results = 'asis', comment = NA, message = F, echo = F, fig.align='center'}
options(RCHART_TEMPLATE = 'Rickshaw.html')
#specify the data
data = data.frame(
  seq( from = 1910, to = 2010, by = 10 ),
  c(
    92228531, 
    106021568, 
    123202660, 
    132165129, 
    151325798, 
    179323175, 
    203211926,
    226545805,
    248709873,
    281421906,
    308745538
  ),
  stringsAsFactors = FALSE
)
colnames(data) <- c("x","y")
#build the plot
r4 <- Rickshaw$new()
r4$layer(
  y ~ x,
  data = data,
  type = "area",
  colors= "steelblue",
  height = 240,
  width = 540
)
#turn off all the nice built in features except xAxis and yAxis
r4$set(
  yAxis = FALSE,
  hoverDetail = FALSE,
  shelving = FALSE,
  legend = FALSE,
  slider = FALSE,
  highlight = FALSE
)
r4$show("inline")

---

My sessionInfo() :

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] slidify_0.3.52 devtools_1.5   reshape2_1.2.2 rCharts_0.4.5 
[5] knitr_1.6     

loaded via a namespace (and not attached):
 [1] codetools_0.2-8 digest_0.6.4    evaluate_0.5.3  formatR_0.10   
 [5] grid_3.0.2      httr_0.3        lattice_0.20-23 markdown_0.6.5 
 [9] memoise_0.1     parallel_3.0.2  plyr_1.8.1      Rcpp_0.11.1    
[13] RCurl_1.95-4.1  RJSONIO_1.0-3   stringr_0.6.2   tools_3.0.2    
[17] whisker_0.3-2   yaml_2.1.11  
ramnathv commented 9 years ago

I believe it is because of some CSS files not getting included. I will check on it.

cgrossbaier commented 8 years ago

Hi Ramnath,

Thanks for all your great work! I was just wondering if this issue has been resolved? I encountered the same problem today.