fusionCustomLegend: Customing FusionCharts legend

View source: R/fusionCustomLegend.R

fusionCustomLegendR Documentation

Customing FusionCharts legend

Description

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

Usage

fusionCustomLegend(
  fusionPlot,
  plotHighlightEffect = FALSE,
  plotHighlightEffectColor = "#7f7f7f",
  plotHighlightEffectAlpha = "60",
  drawCustomLegendIcon = TRUE,
  legendIconBgColor = NULL,
  legendIconAlpha = "100",
  legendIconBgAlpha = "100",
  legendIconBorderColor = "#123456",
  legendIconBorderThickness = "0",
  legendIconSides = "1",
  legendIconStartAngle = "45",
  legendScrollBgColor = "#5A5A5A",
  legendBgColor = "#CCCCCC",
  legendBgAlpha = "0",
  legendBorderColor = "#666666",
  legendBorderThickness = "0",
  legendBorderAlpha = "40",
  legendCaptionAlignment = c("center", "left", "right"),
  legendShadow = FALSE,
  legendItemFontBold = FALSE,
  legendItemFont = "Arial",
  legendItemFontSize = "14",
  legendItemFontColor = "#5A5A5A",
  legendItemHover = FALSE,
  legendItemHoverFontColor = "#cccccc"
)

Arguments

fusionPlot

fusionPlot object got by fusionPlot()

plotHighlightEffect

Enable highlighting of corresponding data series after hover over a legend text

plotHighlightEffectColor

Specify the color

plotHighlightEffectAlpha

Specify the opacity

drawCustomLegendIcon

Enable drawing of a custom legend icon

legendIconBgColor

Specify the hex color code for the background of the legend icon

legendIconAlpha

Set the legend icon transparency (0 to 100)

legendIconBgAlpha

Set the legend icon background transparency

legendIconBorderColor

Specify the hex color code for the border of the legend icon

legendIconBorderThickness

Set the thickness of the legend icon border

legendIconSides

Set the number of sides for the legend icon

legendIconStartAngle

Set the starting angle for drawing the legend icon

legendScrollBgColor

Specify the background color of the scroll bar

legendBgColor

Specify the background color for the legend

legendBgAlpha

Specify the background transparency for the legend

legendBorderColor

Specify the border color for the legend

legendBorderThickness

Specify the border thickness for the legend

legendBorderAlpha

Specify the border transparency for the legend

legendCaptionAlignment

Specify the horizontal alignment of the legend caption

legendShadow

Enable the legend shadow

legendItemFontBold

Display legend keys in bold

legendItemFont

Specify the legend item font

legendItemFontSize

Specify the legend item font size (0 to 72)

legendItemFontColor

Specify the legend item font color

legendItemHover

Enable hover effect to legend item

legendItemHoverFontColor

Specify the legend item font color on hover

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") %>%
fusionCustomLegend(plotHighlightEffect = TRUE) %>%
fusionTheme(theme = "fusion")


alexym1/fusionChartsR documentation built on Feb. 2, 2024, 6:56 a.m.