我正在使用此代码生成 2 个带有 rmarkdown 的 highchart 对象:
---
title: "Untitled"
output: html_document
---
```{r library_objects, include= FALSE, echo = FALSE}
library(highcharter)
```
```{r objects, include = T, echo = FALSE}
df1 <- data.frame(data = c(2, 4, 6, 10),
labels = c("A", "B", "C", "D")
)
df2 <- data.frame(data = c(1, 3, 5, 9),
labels = c("Z", "Y", "X", "W")
)
```
```{r charts, include = T, echo = FALSE}
highchart(height = 150, width = 750) %>%
hc_add_series(data = df1$data) %>%
hc_xAxis(categories = df1$labels)
highchart(height = 150, width = 750) %>%
hc_add_series(data = df2$data) %>%
hc_xAxis(categories = df2$labels)
```
我怎么能设法在同一水平面上显示它们(一个在左侧,另一个在右侧)?