Deneb.CommonPropertiesType

Common properties of all view specifications. https://vega.github.io/vega-lite/docs/spec.html#common The data, transform and params common properties are defined in dedicated Spec types.

Deneb.ConcatSpecType

General concatenation specification. https://vega.github.io/vega-lite/docs/concat.html#concat

Deneb.ConcatViewType

Concatenation specifications. https://vega.github.io/vega-lite/docs/concat.html

Deneb.DataSpecType

Spec containing the data property of viewable specifications. https://vega.github.io/vega-lite/docs/data.html

Deneb.EncodingSpecType

Spec containing the encoding property of a Single or Layered view specification. https://vega.github.io/vega-lite/docs/encoding.html

Deneb.FacetSpecType

Facet specification. https://vega.github.io/vega-lite/docs/facet.html

Deneb.HConcatSpecType

Horizontal concatenation specification. https://vega.github.io/vega-lite/docs/concat.html#hconcat

Deneb.LayerSpecType

Layer specification. https://vega.github.io/vega-lite/docs/layer.html

Deneb.LayoutPropertiesType

Common properties of all layout (facet, repeat, concat) specifications. https://vega.github.io/vega-lite/docs/spec.html#common

Deneb.MarkSpecType

Spec containing the mark property of a Single-View spec. https://vega.github.io/vega-lite/docs/mark.html

Deneb.MultiViewSpecType

Layered and Layout specifications. https://vega.github.io/vega-lite/docs/composition.html

Deneb.ParamsSpecType

Spec containing the params common property to all viewable specifications. https://vega.github.io/vega-lite/docs/parameter.html

Deneb.RepeatSpecType

Repeat specification. https://vega.github.io/vega-lite/docs/repeat.html

Deneb.ResolveSpecType

Spec containing the resolve property common to all Multi-View specifications. https://vega.github.io/vega-lite/docs/resolve.html

Deneb.SingleSpecType

Single view specification. https://vega.github.io/vega-lite/docs/spec.html#single

Deneb.TopLevelPropertiesType

Top-Level specification of a Vega-Lite specification. https://vega.github.io/vega-lite/docs/spec.html#top-level

Deneb.TransformSpecType

Spec containing the transform common property to all viewable specifications. https://vega.github.io/vega-lite/docs/transform.html

Deneb.VConcatSpecType

Vertical concatenation specification. https://vega.github.io/vega-lite/docs/concat.html#vconcat

Deneb.VegaLiteSpecType

Vega-Lite specification. https://vega.github.io/vega-lite/docs/spec.html

Base.:*Method
spec1::AbstractSpec * spec2::AbstractSpec

Multiplication of two AbstractSpec creates a new AbstractSpec as a composition of the two specifications. For instance, vlspec(mark=:bar) * vlspec(title="chart") will be equivalent to vlspec(mark=:bar, title="chart"). Properties defined in spec2 have precedence over spec1, meaning that if a given property is specified in both, then the result specification will use the property from spec2. If the types of the two specs are different then the result spec will be a VegaLiteSpec.

Base.:+Method
spec1::ConstrainedSpec + spec2::ConstrainedSpec

The addition of two specs will produce a new spec with both specs layered. The order matters as spec1 will appear below spec2. If the specs contain shared properties (e.g. data, encoding, width...), they will be promoted to the top level specification. Multi-view layout specs (facet, repeat, concat) cannot be layered.

Base.getpropertyMethod
getproperty(spec::AbstractSpec, property::Symbol)

Returns property property of a specification.

Base.hcatMethod
hcat(A::AbstractSpec...)
[spec1 spec2 spec3 ...]

Horizontal concatenation of specs.

Base.hvcatMethod
hvcat(A::AbstractSpec...)
[spec1 spec2; spec3 spec4 ...]

General (wrappable) concatenation of specs.

Base.propertynamesMethod
propertynames(::AbstractSpec)

Return the top-level properties of a specification.

Base.vcatMethod
vcat(A::AbstractSpec...)
[spec1; spec2; spec3 ...]

Vertical concatenation of specs.

Deneb.DataMethod
Data(table)
Data(; url, [format], [name])
Data(generator::SymbolOrString; properties...)

Creates a DataSpec containing the data property of a viewable specification. Available constructors are:

  • using a table that supports the Tables.jl interface
  • using a url to load the data from, with optional format and name properties.
  • using a generator with specific properties to a use any of the available Vega-Lite data generator

See more in Vega-Lite's and Deneb's documentation.

Deneb.EncodingMethod
Encoding(x; channels...)
Encoding(x, y; channels...)
Encoding(; channels...)

Creates an EncodingSpec containing the encoding property of a single or layer view specification. The x and y channels can be specified as positional arguments using the shorthad string syntax. See more in Vega-Lite's and Deneb.jl's.

Examples

Encoding("monthdate(date):T", "mean(precipitation):Q", color="year(date):O")
Encoding(
    x=field("bin_min:Q", bin=:binned, title="Maximum Daily Temperature (C)"),
    y=field("value:Q", scale=(range=[20, -20]), axis=nothing),
    fill=field="mean_temp:Q",
)
Deneb.FacetMethod
Facet(; [row], , [column], kw...)
Facet(field; columns::Int=nothing, kw...)

Creates a FacetSpec for a facet specification. . A field can be passed as a positional argument, or must be passed in the row/column keyword argument.

Examples

Facet("site:O", columns=2, sort=(op=:median, field=:yield))
Facet(row="Origin:N)
Deneb.MarkMethod
Mark(type; kw...)
Mark(; spec...)

Creates a MarkSpec containing the mark property of a single view specification. The type property of the mark can be specified as a positional argument. See more in Vega-Lite's and Deneb's documentation.

Deneb.ParamsMethod
Params(; spec...)

Creates a ParamsSpec containing the params property of a viewable specification. See also the more convenient select_* methods and the interactive_scales function.

Deneb.RepeatMethod
Repeat(; [row::Vector], [column::Vector], [layer::Vector])
Repeat(field::Vector{SymbolOrString}; columns::Int=nothing)

Creates a RepeatSpec for a repeat specification. . A field can be passed as a positional argument, or must be passed in the row/column/layer keyword argument.

Examples

Repeat([:Horsepower, :Miles_per_Gallon, :Acceleration], columns=2)
Repeat(column=[:distance, :delay, :time])
Deneb.TransformMethod
Transform(; spec...)

Creates a TransformSpec containing the transform property of a viewable specification. See also the more convenient transform_* methods.

Deneb.conditionFunction
condition(param::SymbolOrString, iftrue, iffalse; empty=nothing)
condition_test(test::String, iftrue, iffalse)
condition(param_then_pairs::Vector{Pair}, iffalse; empty::Vector=nothing)
condition_test(ifthen_pairs::Vector{Pair}, iffalse)

If iftrue/iffalse isn't a NamedTuple, then it'll be converted as a NamedTuple with name :value. Nested conditions via a vector of ifthen_pairs.

Examples

condition(:myparam, 1, 2; empty=true)
condition_test("datum.x > 0", field("color:O"), :blue)
condition_test(["datum.x > 5" => field("color:O"), "datum.x < 0" => :blue], :gray)
Deneb.configMethod
config(; properties...)
config(type; properties...)
Deneb.exprMethod
expr(expr)

Convenient function to create an expr spec: {"expr": expr}.

Deneb.fieldMethod
field(field; kw...)

Shortcut to create an arbitrary encoding channel, the positional argument field can use the shorthand string syntax (e.g. "mean(x):Q").

Deneb.interactive_scalesMethod
interactive_scales(;bindx=true, bindy=true, shift_on_y=false)

Creates a ParamsSpec that can be composed to other specs to create interactive pan (mouse hold and drag) and zoom (mouse wheel) charts. bindx and bindy specify if the x and y channels are to be bound. If shift_on_y is true, then the shift key must be hold to pan and zoom in the y channel.

Deneb.layoutMethod
layout(; align, bounds, center, spacing, columns)

Set layout properties. Needs to be composed with a LayoutSpec (Repeat, Facet, Concat).

Deneb.paramMethod
param(param)

Convenient function to create a param spec: {"param": param}.

Deneb.print_themeFunction
print_theme()

Prints the specification of the current theme.

Deneb.projectionMethod
projection(type; kw...)

Sets the projection properties.

Deneb.resolveMethod
resolve(type; channels...)
resolve(type, channel, option)

Creates a ResolveSpec. The type indicates the resolution to be defined: scale, axis, or legend.

For scales, resolution can be specified for every channel. For axes, resolutions can be defined for positional channels (x, y, xOffset, yOffset). For legends, resolutions can be defined for non-positional channels (color, opacity, shape, and size).

There are two options to resolve a scale, axis, or legend: shared and independent. Independent scales imply independent axes and legends.

The defaults are documented in Vega-Lite's documentation.

Example

resolve(:scale, color=:independent)
Deneb.resolve_axisMethod
resolve_axis(; channels...)

Alias to resolve(:axis; channels...)

Deneb.resolve_scaleMethod
resolve_scale(; channels...)

Alias to resolve(:scale; channels...)

Deneb.selectMethod
select(type, name; value, bind, select_options...)

Convenient function to create a ParamsSpec with the following structure:

{
  "name": name,
  "value": value,
  "select": {
    "type": type,
    select_options...
  },
  "bind": bind
}
Deneb.select_bind_inputMethod
select_bind_input(type, name; value, select, bind_options...)

Convenient function to create a ParamsSpec with the following structure:

{
  "name": name,
  "value": value,
  "select": select,
  "bind": {
    "input": type,
    bind_options...
  }
}
Deneb.select_dropdownMethod
select_dropdown(type, name; options, value, select, bind_options...)

options is required

Deneb.select_legendMethod
select_legend(name; encodings=:color, fields=nothing, bind_options=nothing)

Creates a ParamSpec named name that can be composed to other specs to create selectable legends bound to the given encoding or field. To customize the events that trigger legend interaction, set bind_options with a property that maps to a Vega event stream (e.g. "dblclick"). More info about legend binding: https://vega.github.io/vega-lite/docs/bind.html#legend-binding

Deneb.select_radioMethod
select_radio(type, name; options, value, select, bind_options...)

options is required

Deneb.set_theme!Method
set_theme!(theme::Symbol)

Sets the current theme to be used. The default Deneb's theme (:default) sets the following global config:

{
    "view": {"continuousWidth": 300, "continuousHeight": 300, "step": 25},
    "mark": {"tooltip": true}
}

The :default_no_tooltip theme sets the default size as above, but disables tooltips. The :empty theme uses Vega-Lite default empty configuration.

Other available themes are any of the Vega themes: :dark, :excel, :fivethirtyeight, :ggplot2, :googlecharts, :latimes, :powerbi, :quartz, :urbaninstitute, :vox (see https://vega.github.io/vega-themes for more info). In this case the :default global config will be used.

set_theme!(config_theme::Symbol, vega_theme::Symbol)

Sets the global config theme (:default, :default_no_tooltip, :empty) and the vega theme (use vega_theme = :default for no vega theme).

set_theme!(config::NamedTuple, [vega_theme::Symbol])

Sets a theme with a user-specified config.

Deneb.specMethod
spec(s)

Creates an arbitrary Vega-Lite spec.

Deneb.transform_foldMethod
transform_fold(fold::Vector; as=(:key, :value))

Wide to long transformation

Deneb.vlspecMethod
vlspec(s)

Creates a Vega-Lite spec enforcing certain Vega-Lite constrains.

Example

vlspec(
    data=(; url="https://vega.github.io/vega-datasets/data/seattle-weather.csv"),
    mark=:bar,
    encoding=(
        x=(timeUnit=:month, field=:date, type=:ordinal),
        y=(aggregate=:mean, field=:precipitation),
    )
)