https://www.fusioncharts.com/dev/chart-guide/chart-configurations/legend
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"
)
fusionPlot object got by fusionPlot()
Enable highlighting of corresponding data series after hover over a legend text
Specify the color
Specify the opacity
Enable drawing of a custom legend icon
Specify the hex color code for the background of the legend icon
Set the legend icon transparency (0 to 100)
Set the legend icon background transparency
Specify the hex color code for the border of the legend icon
Set the thickness of the legend icon border
Set the number of sides for the legend icon
Set the starting angle for drawing the legend icon
Specify the background color of the scroll bar
Specify the background color for the legend
Specify the background transparency for the legend
Specify the border color for the legend
Specify the border thickness for the legend
Specify the border transparency for the legend
Specify the horizontal alignment of the legend caption
Enable the legend shadow
Display legend keys in bold
Specify the legend item font
Specify the legend item font size (0 to 72)
Specify the legend item font color
Enable hover effect to legend item
Specify the legend item font color on hover
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")
Run the code above in your browser using DataLab