Skip to contents

Run the examples below or browse the Shiny gallery. Each app has its own folder under pkgdown/shiny/ on GitHub. The first launch downloads R and its dependencies. The apps use the highcharter version documented here.

Basics

Move the slider to choose an eruption duration for Old Faithful. The chart highlights eruptions within half a minute of that duration and reports their median wait until the next eruption. The UI contains highchartOutput("eruptions") and renderHighchart() reads input$duration to update the chart.

Open the app in its own tab · View app.R on GitHub

Proxies

The original proxy playground inspired these three examples. Each tab creates its chart once, then uses highchartProxy() to change the chart already on screen.

  • Series. Compare monthly temperatures in Santiago and Tokyo. Toggle Tokyo to add or remove its series. Switch from daily means to daily highs to replace the data by series ID with hcpxy_set_data(). A single hcpxy_redraw() displays both changes. Try the same comparison on polar axes.
  • Points. Add or remove a month of observed air traffic. Turn on the dashed forecast to repeat the last twelve observations one year ahead. The forecast moves with the observations, even when you switch to columns.
  • Layout. Rearrange the same 592 students into a grid, semicircle or circle. hcpxy_update_series() changes the item layout while preserving the counts.

Open the app in its own tab · View app.R on GitHub

To switch from weekly to daily Stock prices when the visible date range narrows, run the Stock proxy app or read the Stock walkthrough.

Events

Gain ranges from −12 dB (cut) to +12 dB (boost), with 0 dB neutral. Hover over a band, click it, then drag the arrow at its top and release it. Each event has its own readout. The drag and mouseOver values refresh at most once every 150 ms. The drop value shows the final gain as soon as you release the band.

Open the app in its own tab · View app.R on GitHub

Point clicks arrive automatically at input$eq_point_click. Register mouseOver, drag and drop with hc_add_event_point() to receive their inputs too. For example, input$eq_point_mouseOver$pointid identifies the band under the pointer and input$eq_point_drag$y gives its gain during a drag.

Linked views

The dotplot shows mean petal length by species, rounded to the nearest millimeter. With colorByPoint = TRUE, each species gets its own color. Pause over a species for 200 ms or click it for an immediate selection. The detail shows petal length and width for its 50 flowers in the same color. A Shiny proxy animates the 50 dots to the new species’ measurements and updates the color and title. The axes stay fixed for comparison.

Open the app in its own tab · View app.R on GitHub

To run an example from a local checkout, load the package and open the app directory:

pkgload::load_all()
shiny::runApp("pkgdown/shiny/events")

The original Shiny examples also include a population explorer with linked views.