timeSeriesPlotly: Plotly Time Series Chart

Description Usage Arguments Details Examples

View source: R/myModules.R

Description

This function is used to generates time series charts using Plotly Package

Usage

1
timeSeriesPlotly(input, output, session, xdata, ydata, title, yaxis, isSmooth)

Arguments

input

Required Param

output

Required Param

session

Required Param

xdata

Array with Dates in POSIXt Format

ydata

Array with Values

title

Main Title

yaxis

y Axis Title

isSmooth

When is True must be showed an Smooth Line else the Real Value

Details

This function belongs to server.R script to easily generates a time series chart using Dygraphs. This function has three required params input, output, session that always is used by Shiny Modules. The xdata param must be in POSIXt format, ydata param means to y axis values, title param means to maint title, yaxis param is to set y axis title, isSmooth param say when must be show and Smooth Line or Real Values. How it used Shiny Modules, The function will be called using the callModule function, in the first param is the function to be called, the second param is the identifier used in plotlyObjectUI("id") and the other params are the same after the session param. See the examples please.

Examples

1
2
callModule(timeSeriesPlotly, "plot1", trmDia_xts$x, trmDia_xts$y, "TRM diaria", "[COP/USD]", F)
callModule(timeSeriesPlotly, "plot2", trmDia_xts$x, trmDia_xts$y, "TRM diaria", "[COP/USD]", T)

sflorezp/modulesRReport documentation built on May 14, 2019, 9 a.m.