I would like to center, horizontally and vertically, the graphs generated with googleVis.
Right now I have this code:
---
title: "Untitled"
output: slidy_presentation
---
## Slide with googleVis
```{r, echo=F}
suppressPackageStartupMessages(library(googleVis))
op <- options(gvis.plot.tag="chart")
```
```{r results='asis', tidy=TRUE, echo=F}
Geo=gvisGeoChart(Exports, locationvar="Country",
colorvar="Profit",
options=list(projection="kavrayskiy-vii",
width = 1024,
keepAspectRatio=T))
cat("<center>")
print(Geo, "chart")
cat("</center>")
```
and this on my css
img.center {
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)
}
The image is centered horizontally but not vertically.
What am I doing wrong?
Thanks!