Description Usage Arguments Value Examples
View source: R/column_chart_functions.R
Generate column chart with reference line.
| 1 2 3 4 5 6 7 8 9 | column_chart_reference(
  data,
  x,
  series,
  ref_value,
  ref_label = NULL,
  styles = NULL,
  interval = "months"
)
 | 
| data | data frame in wide format containing data to be plotted | 
| x | vector containing labels for x axis or name of column in data with values of x axis labels | 
| series | vector containing names of columns in data with values to plot | 
| ref_value | one element numeric vector with referencing value. | 
| ref_label | name of the referencing value | 
| styles | optional vector with styles of bars | 
| interval | intervals on x axis. The width of the bars depends on this parameter | 
object of class tidychart with a character vector containing SVG elements
| 1 2 3 4 5 6 7 8 9 10 | # prepare some data frame
df <- data.frame(x = month.abb[1:6],
                 y = c(2, 4, 2, 1, 2.5, 3),
                 z = c(3, 4.5, 2, 1, 4, 2))
# generate character vector with svg data
column_chart_reference(df, x = 'x',
                       series = 'y',
                       ref_value = 3,
                       ref_label = 'baseline')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.