0

我一直在尝试使用 rcharts 在 slidify 中处理图例和控件的重叠。Chrome 下的行为如下所示:

https://codemorecode.wordpress.com/2015/03/04/legend-and-controls-overlapping-at-rcharts/

但是,对 YAML 前端问题中的元数据的任何更改都不起作用。任何建议我都会非常感谢。干杯,

胡安卡洛斯

下面是我的yaml:

`---
title       :
subtitle    : AAD-UTAS PhD Program in Quantitative Antarctic Science (QAS) 
author      : Juan-Carlos Quiroz
job         : March, 2015
framework   : io2012
highlighter : highlight.js
hitheme     : tomorrow
widgets     : [bootstrap, quiz, interactive, shiny]
mode        : selfcontained
knit        : slidify::knit2slides
logo        : aad.png
biglogo     : utas.jpg
license     : by-nc-sa
ext_widgets : {rCharts: [libraries/nvd3, libraries/morris]}
runtime     : shiny
---`
4

1 回答 1

1

避免此问题的一种方法是将multiBarChart保存到 html 文件中(您有 2 个选项cdnStandalone)。生成的 html 文件没有任何控件重叠的问题。例如:

r1 = nPlot(Catch ~ Years, group = "Class", data = database, type = "multiBarChart")
r1$xAxis(axisLabel = 'Years')
r1$yAxis(axisLabel = 'Catch (tons)', width = 55)
r1$yAxis(tickFormat = "#! function(d) {return d3.format(',.2f')(d)} !#")
#r1$save('mydata.html', cdn = TRUE)
r1$save('mydata.html', standalone = TRUE)

然后您需要将 html 文件引用到您的 rmd 文件中,例如:

---

## Embedded html

<iframe width="800" height="400" src = 'assets/mydata.html'></iframe>
于 2015-04-16T22:14:16.953 回答