Skip to contents

Usage

fusionTrendline(
  fusionPlot,
  isTrendZone = FALSE,
  displayValue = "",
  startValue = "",
  endValue = "",
  color = "#FFFFFF",
  thickness = 2,
  alpha = "60",
  valueOnRight = TRUE,
  trendValueFont = "Arial",
  trendValueFontSize = "12",
  trendValueFontBold = TRUE,
  trendValueFontItalic = FALSE,
  trendValueAlpha = "80",
  trendValueBgColor = "#000000",
  trendValueBgAlpha = "10",
  trendValueBorderColor = "#000000",
  trendValueBorderAlpha = "80",
  trendValueBorderPadding = "4",
  trendValueBorderRadius = "5",
  trendValueBorderThickness = "2",
  trendValueBorderDashed = FALSE,
  trendValueBorderDashLen = "#5A5A5A",
  trendValueBorderDashGap = "1"
)

Arguments

fusionPlot

fusionPlot object got by fusionPlot()

isTrendZone

Render a trend zone on a chart

displayValue

Add text next to the trend-line

startValue

Specify the data value of the starting point of the trend-line

endValue

Specify the data value of the ending point of the trend-line

color

Specify the hex code for the color of the trend-line

thickness

Specify the thickness of the trend-line(in pixels)

alpha

Specify the transparency of the trend-line

valueOnRight

Enable right position

trendValueFont

Set the font family for the trend-line display values

trendValueFontSize

Set the font size for the trend-line display values

trendValueFontBold

Make trend-line display values appear in bold

trendValueFontItalic

Make trend-line display values appear in italic

trendValueAlpha

Set the transparency for the trend-line display values

trendValueBgColor

Set the color for the background of the trend-line display values

trendValueBgAlpha

Set the transparency for the background of trend-line display values

trendValueBorderColor

Set the color for the border around the trend-line display values

trendValueBorderAlpha

Set the transparency for the border around the trend-line display values (0 to 100)

trendValueBorderPadding

Set the padding for the border around the trend-line display values

trendValueBorderRadius

Set the radius for the border around the trend-line display values

trendValueBorderThickness

Set the thickness of the border around the trend-line display values

trendValueBorderDashed

Specify whether the border around the trend-line display value will be drawn as a dashed line

trendValueBorderDashLen

Set the length of each dash

trendValueBorderDashGap

Set the gap between each dash

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 = "column2d") %>%
fusionTrendline(displayValue = "Help", startValue = "100") %>%
fusionTheme(theme = "candy")