inst/shiny-demo/data-set-montecarlo/readme.md

This example, based on an example from Cameron Yick, shows how we can design a chart using Vega-Lite, then use Shiny to run that chart using a dataset that can be updated.

In the server function, we use vw_shiny_set_data() to observe the reactive expression rct_points(), updating the datasets, then re-running the Vega-Lite chart, whenever rct_points() changes.

To do this, we had to name the datasets in the Vega-Lite specification; you will see in the definition of spec that there are datasets named "points" and "estimates". We use these as name arguments for vw_shiny_set_data().



vegawidget/vegawidget documentation built on Jan. 27, 2024, 10:48 a.m.