fusionTrendline: Adding FusionCharts trend-line/trend-zone

Description Usage Arguments Examples

View source: R/fusionTrendline.R

Description

https://www.fusioncharts.com/dev/chart-guide/chart-configurations/trend-lines-and-zones

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
fusionTrendline(
  fusionPlot,
  isTrendZone = FALSE,
  displayValue = NULL,
  startValue = NULL,
  endValue = NULL,
  color = "#000000",
  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

1
2
3
4
5
6
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")

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