VegaLite - Interactive plots?

Hi,

is there a way to make VegaLite.jl plots interactive? is it somehow planned for future releases?(Home · VegaLite.jl).

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!!

https://www.queryverse.org/VegaLite.jl/stable/examples/examples_repeat_concatenation/#Interactive-Scatterplot-Matrix-1

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

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: The @vlplot command · VegaLite.jl

For example, the first interactive plot in Altair’s guide (Bindings, Selections, Conditions: Making Charts Interactive — Altair 4.2.0 documentation) 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