The example also demonstrates how to send messages to the client from a server.R file giving way to possibilites using JS with Shiny. The example uses a real-time visualisation generated by random data points.
Intentional snapshot: the logic and style are kept as-was to reflect how I worked back in 2016.
app.R
– tiny launcher that sourcesui.R
andserver.R
without altering their logicui.R
/server.R
– original Shiny app files (preserved)www/realCharts.js
– JavaScript used by the app (moved to the Shiny-conventionalwww/
folder)docs/
– (optional) screenshots or notes
# in R
install.packages(c("shiny"))
# highcharter is NOT required here because this example uses Highcharts.js directly.
# Run the app:
shiny::runApp(".")
Highcharts is a JavaScript charting library (SVG-based) with rich interactivity. {highcharter}
R package is available and easier to use in R but this example showcases using JS with R. I also found that this approach exposed more Highchart features as you ar working direclty with the native code.
Product page & docs: highcharts.com/products/highcharts/ Highcharts Blog | Highcharts
Licensing: free for non-commercial use; commercial use requires a license from Highsoft. See official terms. Highcharts Blog | Highcharts rviews.rstudio.com
This repo is part of a series I’m keeping as historical snapshots. I’ve not modernized the app or refactored the code beyond: