Skip to contents

Forecast data points

Usage

ax_forecast_data_points(
  ax,
  count = NULL,
  fillOpacity = NULL,
  strokeWidth = NULL,
  dashArray = NULL,
  ...
)

Arguments

ax

An apexchart() htmlwidget object.

count

Number of ending data-points you want to indicate as a forecast or prediction values. The ending line/bar will result into a dashed border with a distinct look to differentiate from the rest of the data-points.

fillOpacity

Opacity of the fill attribute.

strokeWidth

Sets the width of the points.

dashArray

Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.

...

Additional arguments (not used).

Value

An apexchart() htmlwidget object.

Examples

# add 5 predictions to data then plot it
data.frame(
  time = seq_len(53),
  lh = c(
    as.vector(lh),
    as.vector(predict(arima(lh, order = c(1,0,1)), 5)$pred)
  )
) %>% 
  apex(aes(time, lh), type = "line") %>% 
  ax_xaxis(type = "numeric") %>% 
  ax_forecast_data_points(count = 5)