fusionCaption: Adding FusionCharts caption

Description Usage Arguments Examples

View source: R/fusionCaption.R

Description

https://www.fusioncharts.com/dev/chart-guide/chart-configurations/caption-and-sub-caption

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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()

caption

Specify the caption of the chart

captionFont

Set the caption font family

captionFontSize

Set the caption font size (between 0 and 72)

captionFontColor

Set the caption font color

captionFontBold

Enable caption font to bold

captionOnTop

Display the caption at the top of the chart

captionAlignment

Specify the horizontal alignment of the caption

Examples

1
2
3
4
5
6
7
library(fusionchartsR)

df <- data.frame(label = c("Venezuela", "Saudi", "Canada", "Russia"), value = c(290, 260,180, 115))
fusionPlot(data = df, x = "label", y = "value", type = "column2d") %>%
  fusionCaption(caption = "Caption on the left", captionAlignment = "left") %>%
  fusionSubcaption(subcaption = "subcaption too") %>%
  fusionTheme(theme = "fusion")

fusionchartsR documentation built on Dec. 21, 2021, 1:07 a.m.