Usage
fusionCaption(
fusionPlot,
caption = "Add a caption here",
captionFont = "Arial",
captionFontSize = "18",
captionFontColor = "#5A5A5A",
captionFontBold = TRUE,
captionOnTop = TRUE,
captionAlignment = c("center", "left", "right")
)
Arguments
- fusionPlot
fusionPlot object got by
fusionPlot()
Specify the caption of the chart
Set the caption font family
Set the caption font size (between 0 and 72)
Set the caption font color
Enable caption font to bold
Display the caption at the top of the chart
Specify the horizontal alignment of the caption
Examples
library(fusionchartsR)
mtcars %>%
fusionPlot(
x = "cyl",
y = "mpg",
type = "boxandwhisker2d"
) %>%
fusionCaption(caption = "Caption on the left", captionAlignment = "left") %>%
fusionSubcaption(subcaption = "subcaption too") %>%
fusionPalette(palettecolors = c("#5D62B5", "#979AD0")) %>%
fusionTheme(theme = "fusion")