distill
distill copied to clipboard
Incorrect rendering of highcharter's hw_grid()
In trying to use hw_grid() to render three maps side-by-side in a distill post the knitted html will not render correctly. Instead of three maps, one per column, it will force them into a single column.
They display correctly in a plain RMarkdown html though, and in the RStudio viewer.
Is there a workaround anyone has come up with?
Here is the plain RMarkdown template code:
---
title: "hw_grid()"
author: ""
date: "3/27/2021"
output: html_document
---
```{r plots}
library(highcharter)
hcmap("countries/nz/nz-all") -> p1
hcmap("countries/nz/nz-all") -> p2
hcmap("countries/nz/nz-all") -> p3
list(p1, p2, p3) -> mylst
hw_grid(mylst, rowheight = 600, ncol = 3)
<img width="767" alt="Screen Shot 2021-03-27 at 1 09 18 PM" src="https://user-images.githubusercontent.com/1810206/112728505-07e1ad80-8efe-11eb-9405-d8d032ea8cc7.png">
And here is the distill code:
title: "Testing hw_grid()" description: | A short description of the post. author:
- name: url: {} date: 03-27-2021 output: distill::distill_article: self_contained: true draft: true
knitr::opts_chunk$set(echo = TRUE)
library(highcharter)
hcmap("countries/nz/nz-all") -> p1
hcmap("countries/nz/nz-all") -> p2
hcmap("countries/nz/nz-all") -> p3
list(p1, p2, p3) -> mylst
hw_grid(mylst, rowheight = 600, ncol = 3)
that yields <img width="681" alt="Screen Shot 2021-03-27 at 1 09 58 PM" src="https://user-images.githubusercontent.com/1810206/112728463-ce10a700-8efd-11eb-89cd-496c2bb98796.png">