1

对于以下滑动甲板,

---
title       : Foo
framework   : revealjs        # {io2012, html5slides, shower, dzslides, ...}
revealjs    : {theme: solarized}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : tomorrow      # 
widgets     : []            # {mathjax, quiz, bootstrap}
mode        : selfcontained # {standalone, draft}
ext_widgets : [libraries/nvd3]
---
## NVD3 Plot Iframe
```{r nvd3plot2, results = 'asis', comment = NA, message = F, echo = F} 
require(rCharts)
n1 <- nPlot(mpg ~ wt, data = mtcars, type = 'scatterChart')
n1
```

我想将图表的背景颜色设置为白色。

如果我编织它然后编辑<style>生成的块figure/nvd3plot2.html以添加,我可以这样做background-color: white;

<style>
.rChart {
  display: block;
  margin-left: auto; 
  margin-right: auto;
  width: 800px;
  height: 400px;
  background-color: white;
}  
</style>

如何从 .Rmd 文件执行此操作?

4

1 回答 1

2

如我的评论中所述,获得白色背景的快速解决方法是将以下行添加到您的Rmd文件中

<style>iframe{background-color: white}</style>
于 2014-01-13T02:14:54.520 回答