Repeat layers

Source code Author

using Deneb

data = Data(url="https://vega.github.io/vega-datasets/data/movies.json")

chart = Data(data) * Mark(:line) * Repeat(
    layer = ["US Gross", "Worldwide Gross"]
) * Encoding(
    x=field("IMDB Rating:Q", bin=true),
    y=(
        field=(;repeat=:layer),
        aggregate=:mean,
        title="Mean of US and Worldwide",
    ),
    color=(;datum=(;repeat=:layer)),
)

This page was generated using DemoCards.jl and Literate.jl.