fusionLegend {fusionchartsR}R Documentation

Adding FusionCharts legend

Description

https://www.fusioncharts.com/dev/chart-guide/chart-configurations/legend

Usage

fusionLegend(
  fusionPlot,
  showLegend = TRUE,
  interactiveLegend = TRUE,
  legendPosition = c("bottom", "left", "right"),
  legendAllowDrag = FALSE,
  legendIconScale = "1",
  reverseLegend = FALSE,
  legendCaption = NULL,
  legendCaptionBold = TRUE,
  legendCaptionFont = "Arial",
  legendCaptionFontSize = "14",
  legendCaptionFontColor = "#333333"
)

Arguments

fusionPlot

fusionPlot object got by fusionPlot()

showLegend

Show the legend

interactiveLegend

Enable interactive legend

legendPosition

Specify the position of the legend

legendAllowDrag

Make the legend draggable

legendIconScale

Specify the legend icon size (values from "1" to "5")

reverseLegend

Reverse the order of datasets

legendCaption

Specify the legend caption value

legendCaptionBold

Set the legend caption font style to bold

legendCaptionFont

Specify the legend caption font

legendCaptionFontSize

Specify the legend caption font size

legendCaptionFontColor

Specify the hex color code for the caption font legend

Examples

library(fusionchartsR)
df <- data.frame(label = c("Venezuela", "Saudi", "Canada", "Russia"), value = c(290, 260,180, 115))
df %>%
fusionPlot(x = "label", y = "value", type = "doughnut2d") %>%
fusionLegend(legendCaption = "LegendCaption", legendCaptionFontSize = "24") %>%
fusionTheme(theme = "fusion")


[Package fusionchartsR version 0.0.3 Index]