Generates line plot with markers on every value.

line_chart_markers(
  data,
  x,
  series,
  series_labels,
  interval = "months",
  styles = NULL
)

Arguments

data

data frame containing data to be plotted

x

vector cointaining time intervals of the values

series

vector containing names of columns in data with values to plot

series_labels

vector containing names of series to be shown on the plot

interval

intervals on x axis. The width of the bars depends on this parameter

styles

optional data frame with style names. Styles of the markers will be plotted accordingly.

Value

object of class tidychart with a character vector containing SVG elements

Examples

#preparing a data frame data <- data.frame( time = c("Jan", "Feb", "Mar", "Apr", "May", "Jun"), PL = (c(51, 42, 50, 58, 78, 79) - 30), AC = (c(62, 70, 67, 77, 63, 62) - 30) ) #preparing the styles data frame styles <- data.frame( PL = c("plan", "plan", "plan", "plan", "plan", "plan"), AC = c("actual", "actual", "actual", "forecast", "forecast", "forecast") ) #generating svg string line_chart <- line_chart_markers(data, data$time, c("PL", "AC"), c("PL", "AC"),"months", styles) #show the plot line_chart