Episki
September 16, 2020, 2:30pm
#1
Hi,
is there a way to make VegaLite.jl plots interactive? is it somehow planned for future releases?(https://www.queryverse.org/VegaLite.jl/stable/ ).
I’m looking for something similar to Altair for Python (https://altair-viz.github.io/ ) which is also based on Vega-Lite and where it is quite simple to add interactivity to the plots (Bindings, selections, zoom, variable selection, etc.).
Thanks!!
This thread Interactive plot, acting as a range slider tool for another plot? has a bit of info about interactive plotting in VegaLite.jl. It is all a bit manual at the moment but it is doable.
1 Like
brucala
September 17, 2020, 3:04pm
#5
I believe with VegaLite.jl you can virtually do anything you can do in Vega-Lite by passing a Vega-Lite specification to the @vlplot
macro: https://www.queryverse.org/VegaLite.jl/stable/userguide/vlplotmacro/
For example, the first interactive plot in Altair’s guide (https://altair-viz.github.io/user_guide/interactions.html ) could be replicated like:
using VegaLite, VegaDatasets
dataset("cars") |>
@vlplot(
mark=:point,
x=:Miles_per_Gallon,
y=:Horsepower,
color=:Origin,
selection={selector={type="interval"}}
)
I guess what’s missing are syntax shorthands to make selections, bindings and other interactions easier.
3 Likes