barPlotly: Plotly Bar Chart

Description Usage Arguments Details Examples

View source: R/myModules.R

Description

This function is used to generates a bar chart using Plotly Package

Usage

1
barPlotly(input, output, session, xdata, ydata, xaxis, setElement = NULL)

Arguments

input

Required Param

output

Required Param

session

Required Param

xdata

Array with numeric values, usually is a percentage

ydata

Array with character values, usually is a name

xaxis

x Axis Title

setElement

Element name to be highlighted

Details

This function belongs to server.R script to easily generates a bar chart using Dygraphs. This function has three required params input, output, session that always is used by Shiny Modules. The ydata param means to names in y axis, xdata param is realted to x axis values, usually it must a percentage, the xaxis param is to set x axis title, the setElement param is used to set a element name to be highlighted in the chart. 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(barPlotly, "plot1", data1$x, data2$y, "Participacion %", "ISGG")
callModule(barPlotly, "plot2", data1$x, data2$y, "Ingresos %")

sflorezp/modulesRReport documentation built on Sept. 21, 2017, 8:26 p.m.