billboard.js for R.
Includes but is not limited to:
library(billboard)
mtcars %>%
b_board() %>%
b_spline(wt) %>%
b_bar(disp, axis = "y2") %>%
b_step(cyl) %>%
b_area(qsec) %>%
b_scatter(hp, axis = "y2") %>%
b_xlabel("Miles per galon") %>%
b_color_brewer("Accent") %>%
b_tooltip(grouped = TRUE) %>%
b_grid_line(9, "Marked") %>%
b_grid_line(17, "avg (maybe)", axis = "y") %>%
b_region("x", 1, 4,)Features Shiny proxies; functions ending in _p.
Proxies:
billboardProxy - Create billboard proxy for Shinyb_zoom_p - Zoom proxyb_focus_p - Foxus proxyb_defocus_p - Unfocus proxyb_transform_p - Transform chart proxyb_stack_p - Stack proxyb_region_p - Customise regions proxyb_add_region_p - Add region proxyb_flow_p - Add rowsb_load_p - Add columnsBasic Example
See proxy documentation for more details ?b_flow_p
libary(shiny)
library(billboard)
shinyApp(
ui = fluidPage(
selectInput(
"transform",
"Change chart type:",
choices = c("line", "spline", "area", "area-spline", "scatter", "bar"),
selected = "line"
),
billboardOutput("b_board")
),
server = function(input, output){
data <- data.frame(y = runif(25, 1, 25))
output$b_board <- renderBillboard({
data %>%
b_board() %>%
b_line(y, name = "Values")
})
observeEvent(input$transform, {
billboardProxy("b_board") %>%
b_transform_p(input$transform, "Values")
})
}
)
Customise all the things
b_area - Add an area chartb_area_spline - Add an area spline chartb_bar - Add a bar chartb_board - Initialiseb_color - customise colorsb_donut - Add a donut chartb_gauge - Add a gauge chartb_grid - Customise the gridb_grid_line - Add a grid linebillboardOutput - billboard output for Shinyb_inter - Customise interactivityb_labels - Add labelsb_legend - Customise legendb_line - Add a line chartb_color_magma - Magma color paletteb_pad - Adjust paddingb_pie - Add a pie chartb_color_plasma - Plama color paletteb_region - Add regionsb_resize - Change auto resizeb_rotate - Rotate chartb_scatter - Add a scatter plotb_size - Change svg sizeb_spline - Add a spline chartb_step - Add a step chartb_step_area - Add a step area chartb_subchart - Add a subchartb_svg - Customise svgb_title - Add a chart titleb_tooltip - Customise tooltipb_trans - Customise transitionsb_color_brewer - Use RColorBrewer palettesb_color_viridis - Viridis color paletteb_color_wes - Wes Anderson color palettesb_color_ghibli - Ghibli palettesb_xaxis - Customise x axisb_xgrid - Customise x gridb_xlabel - Add x labelb_xtick - Customise x ticksb_yaxis - Customise y axisb_ygrid - Customise y gridb_ylabel - Customise y labelb_ytick - Customise y ticksb_zoom - Allow zoomrenderBillboard - Render billboard for ShinybillboardProxy - Create billboard proxy for SHinyb_zoom_p - Zoom proxyb_focus_p - Foxus proxyb_defocus_p - Unfocus proxyb_transform_p - Transform chart proxyb_stack_p - Stack proxyb_region_p - Customise regions proxyb_add_region_p - Add region proxyb_flow_p Add rowsb_load_p Add columns