Home

VegaStreams.jl

VegaStreams

Stable Dev Build Status Codecov Coveralls

Example

julia> using VegaStreams
       using VegaLite

julia> vls = vegastream(@vlplot(:line, x=:x, y=:y));

julia> for (x, y) in enumerate(randn(100))
           sleep(0.01)
           push!(vls, (x=x, y=y))
       end
source
vegastream(mark::Symbol = :line; processrow=NamedTuple{(:x, :y)}, ...)

A shortcut for creating a simple plotter.

source
vegastream(vlspec; processrow=identity, kwargs...)

Open a window containing a Vega-lite plot and a return a handle to it. This handle supports push! and append! to update the plot.

Examples

julia> using VegaStreams
       using VegaLite

julia> vls = vegastream(@vlplot(:line, x=:x, y=:y));

julia> push!(vls, (x=1, y=2));

Arguments

  • vlspec: an objection showable as application/vnd.vegalite.v3+json or application/vnd.vegalite.v2+json. The data property is ignored.

Keyword Arguments

  • processrow: a callable to that process the item(s) given to push! and append! before sending it/them to Vega-Lite.
  • Other keyword arguments are passed to electrondisplay. By default, single_window=false is used.
source
vegastream(vlspec::Dict; ...)

Interpret a dictionary as a Vega-Lite spec. This is usable without importing VegaLite.

source