## Not run:
# library(webshot)
# library(vegalite)
#
# dat <- jsonlite::fromJSON('[
# {"a": "A","b": 28}, {"a": "B","b": 55}, {"a": "C","b": 43},
# {"a": "D","b": 91}, {"a": "E","b": 81}, {"a": "F","b": 53},
# {"a": "G","b": 19}, {"a": "H","b": 87}, {"a": "I","b": 52}
# ]')
#
# vegalite(viewport_width=350, viewport_height=250) %>%
# add_data(dat) %>%
# encode_x("a", "ordinal") %>%
# encode_y("b", "quantitative") %>%
# mark_bar() -> vl
#
# capture_widget(vl, "inline", 250, 350)
# ## End(Not run)
Run the code above in your browser using DataLab