View Source Tucan.Themes (tucan v0.4.1)

Helper functions for Tucan theme.

You can apply any of the supported themes through the Tucan.set_theme/2 helper:

Tucan.scatter(:iris, "petal_width", "petal_length")
|> Tucan.color_by("species")
|> Tucan.shape_by("species")
|> Tucan.set_theme(:latimes)
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#82c6df"},"area":{"fill":"#82c6df"},"axis":{"labelFont":"Benton Gothic, sans-serif","labelFontSize":11.5,"labelFontWeight":"normal","titleFont":"Benton Gothic Bold, sans-serif","titleFontSize":13,"titleFontWeight":"normal"},"axisX":{"labelangle":0,"labelpadding":4,"ticksize":3},"axisY":{"labelbaseline":"middle","maxextent":45,"minextent":45,"ticksize":2,"titlealign":"left","titleangle":0,"titlex":-45,"titley":-11},"background":"#ffffff","legend":{"font":"Benton Gothic, sans-serif","fontSize":11.5,"symboltype":"square","titleFont":"Benton Gothic Bold, sans-serif","titleFontSize":13,"titleFontWeight":"normal"},"line":{"stroke":"#82c6df","strokeWidth":2},"path":{"stroke":"#82c6df"},"range":{"category":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"diverging":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"heatmap":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"ordinal":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"ramp":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"]},"rect":{"fill":"#82c6df"},"shape":{"stroke":"#82c6df"},"symbol":{"fill":"#82c6df","size":30},"title":{"anchor":"start","color":"#000000","font":"Benton Gothic Bold, sans-serif","fontSize":22,"fontWeight":"normal"}},"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"type":"point"}}

Themes and livebook

If you are using Tucan with livebook notice that kino_vega_lite applies by default a theme that may override Tucan theme settings. You can disable the default theme through Kino.VegaLite.configure/1:

# disable default livebook theme
Kino.VegaLite.configure(theme: nil)

Tucan.scatter(:iris, "petal_width", "petal_length")
|> Tucan.color_by("species")
|> Tucan.shape_by("species")
|> Tucan.set_theme(:dark)

About themes

A Tucan theme is nothing more than a keyword list with a VegaLite configuration object with some styles applied and some metadata. Every theme must have the following format:

[
   theme: [],          # the actual theme configuration
   name: :name,        # an atom with a unique name
   doc: "description", # a description of the theme,
   source: "url"       # a url to the source of the theme if any for attribution
]

Default themes

Tucan comes pre-packed with a set of themes, borrowed by the Vega Themes project. You can set a theme to a plot by calling the Tucan.set_theme/2 function. If no theme set the default vega-lite theme is used. In all examples below the following example plot is used:

scatter =
  Tucan.scatter(:iris, "petal_width", "petal_length", tooltip: true)
  |> Tucan.color_by("species")
  |> Tucan.shape_by("species")

lines = Tucan.lineplot(:stocks, "date", "price", color_by: "symbol", x: [type: :temporal])

area =
  Tucan.area(:stocks, "date", "price", color_by: "symbol", mode: :normalize, x: [type: :temporal])

density = Tucan.density(:penguins, "Body Mass (g)", color_by: "Species", fill_opacity: 0.2)

strip =
  Tucan.stripplot(:tips, "total_bill", group_by: "day", style: :jitter)
  |> Tucan.color_by("sex")

boxplot = Tucan.boxplot(:penguins, "Body Mass (g)", color_by: "Species")
histogram = Tucan.histogram(:cars, "Horsepower", color_by: "Origin", fill_opacity: 0.5)

pie = Tucan.pie(:barley, "yield", "site", aggregate: :sum, tooltip: true)

donut = Tucan.donut(:barley, "yield", "site", aggregate: :sum, tooltip: true)

heatmap =
  Tucan.density_heatmap(:penguins, "Beak Length (mm)", "Beak Depth (mm)")

Tucan.vconcat([
  Tucan.hconcat([scatter, lines, area]),
  Tucan.hconcat([density, Tucan.vconcat([strip, boxplot]), histogram]),
  Tucan.hconcat([pie, donut, heatmap])
])
|> VegaLite.config(legend: [disable: true])
|> VegaLite.resolve(:scale, color: :independent)
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"legend":{"disable":true}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

The following themes are currently supported:

:dark

A dark theme [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"axis":{"domainColor":"#fff","gridColor":"#888","tickColor":"#fff"},"background":"#333","legend":{"disable":true},"style":{"guide-label":{"fill":"#fff"},"guide-title":{"fill":"#fff"}},"title":{"color":"#fff","subtitleColor":"#fff"},"view":{"stroke":"#888"}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:excel

Chart theme modeled after excel [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#4572a7"},"area":{"fill":"#4572a7"},"axis":{"bandPosition":0.5,"grid":true,"gridColor":"#000000","gridOpacity":1,"gridWidth":0.5,"labelPadding":10,"tickSize":5,"tickWidth":0.5},"axisBand":{"grid":false,"tickExtra":true},"background":"#fff","legend":{"disable":true},"line":{"stroke":"#4572a7","strokeWidth":2},"path":{"stroke":"#4572a7"},"range":{"category":["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]},"rect":{"fill":"#4572a7"},"shape":{"stroke":"#4572a7"},"symbol":{"fill":"#4572a7","size":50,"strokeWidth":1.5}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:five_thirty_eight

Chart theme modeled after FiveThirtyEight [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#30a2da"},"area":{"fill":"#30a2da"},"axis":{"domainColor":"#cbcbcb","grid":true,"gridColor":"#cbcbcb","gridWidth":1,"labelColor":"#999","labelFontSize":10,"labelPadding":4,"tickColor":"#cbcbcb","tickSize":10,"titleColor":"#333","titleFontSize":14,"titlePadding":10},"axisBand":{"grid":false},"background":"#f0f0f0","bar":{"binSpacing":2,"fill":"#30a2da","stroke":null},"group":{"fill":"#f0f0f0"},"legend":{"disable":true},"line":{"stroke":"#30a2da","strokeWidth":2},"path":{"stroke":"#30a2da","strokeWidth":0.5},"point":{"filled":true,"shape":"circle"},"range":{"category":["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],"diverging":["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],"heatmap":["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},"rect":{"fill":"#30a2da"},"shape":{"stroke":"#30a2da"},"title":{"anchor":"start","fontSize":24,"fontWeight":600,"offset":20}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:ggplot2

Chart theme modeled after ggplot2 [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#000"},"area":{"fill":"#000"},"axis":{"domain":false,"grid":true,"gridColor":"#FFFFFF","gridOpacity":1,"labelColor":"#7F7F7F","labelPadding":4,"tickColor":"#7F7F7F","tickSize":5.67,"titleFontSize":16,"titleFontWeight":"normal"},"group":{"fill":"#e5e5e5"},"legend":{"disable":true},"line":{"stroke":"#000"},"path":{"stroke":"#000"},"range":{"category":["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]},"rect":{"fill":"#000"},"shape":{"stroke":"#000"},"symbol":{"fill":"#000","size":40}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:google_charts

Chart theme modeled after Google Charts [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#3366CC"},"area":{"fill":"#3366CC"},"axis":{"domain":false,"grid":true,"gridColor":"#ccc","tickColor":"#ccc"},"background":"#fff","circle":{"fill":"#3366CC"},"legend":{"disable":true},"padding":{"bottom":10,"left":10,"right":10,"top":10},"path":{"stroke":"#3366CC"},"range":{"category":["#4285F4","#dB4437","#f4B400","#0F9D58","#aB47BC","#00ACC1","#fF7043","#9E9D24","#5C6BC0","#f06292","#00796B","#c2185B"],"heatmap":["#c6dafc","#5e97f6","#2a56c6"]},"rect":{"fill":"#3366CC"},"shape":{"stroke":"#3366CC"},"style":{"groupTitle":{"font":"arial, sans-serif","fontSize":12},"guideLabel":{"font":"arial, sans-serif","fontSize":12},"guideTitle":{"font":"arial, sans-serif","fontSize":12}},"symbol":{"stroke":"#3366CC"},"title":{"anchor":"start","dy":-3,"font":"arial, sans-serif","fontSize":14,"fontWeight":"bold"}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:latimes

Chart theme modeled after the Los Angeles Times [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#82c6df"},"area":{"fill":"#82c6df"},"axis":{"labelFont":"Benton Gothic, sans-serif","labelFontSize":11.5,"labelFontWeight":"normal","titleFont":"Benton Gothic Bold, sans-serif","titleFontSize":13,"titleFontWeight":"normal"},"axisX":{"labelangle":0,"labelpadding":4,"ticksize":3},"axisY":{"labelbaseline":"middle","maxextent":45,"minextent":45,"ticksize":2,"titlealign":"left","titleangle":0,"titlex":-45,"titley":-11},"background":"#ffffff","legend":{"disable":true},"line":{"stroke":"#82c6df","strokeWidth":2},"path":{"stroke":"#82c6df"},"range":{"category":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"diverging":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"heatmap":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"ordinal":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"ramp":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"]},"rect":{"fill":"#82c6df"},"shape":{"stroke":"#82c6df"},"symbol":{"fill":"#82c6df","size":30},"title":{"anchor":"start","color":"#000000","font":"Benton Gothic Bold, sans-serif","fontSize":22,"fontWeight":"normal"}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:power_bi

Chart theme modeled after Power BI [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#118DFF"},"area":{"fill":"#118DFF","line":true,"opacity":0.6},"axis":{"domain":false,"grid":false,"labelColor":"#605E5C","labelFontSize":12.0,"ticks":false,"titleColor":"#252423","titleFont":"wf_standard-font, helvetica, arial, sans-serif","titleFontSize":16.0,"titleFontWeight":"normal"},"axisBand":{"tickExtra":true},"axisQuantitative":{"grid":true,"gridColor":"#c8C6C4","gridDash":[1,5],"labelFlush":false,"tickCount":3},"axisX":{"labelPadding":5},"axisY":{"labelPadding":10},"background":"transparent","bar":{"fill":"#118DFF"},"font":"segoe uI","header":{"labelColor":"#605E5C","labelFont":"segoe uI","labelFontSize":13.333333333333332,"titleColor":"#252423","titleFont":"wf_standard-font, helvetica, arial, sans-serif","titleFontSize":16.0},"legend":{"disable":true},"line":{"stroke":"#118DFF","strokeCap":"round","strokeJoin":"round","strokeWidth":3},"path":{"stroke":"#118DFF"},"point":{"fill":"#118DFF","filled":true,"size":75},"range":{"category":["#118DFF","#12239E","#e66C37","#6B007B","#e044A7","#744EC2","#d9B300","#d64550"],"diverging":["#dEEFFF","#118DFF"],"heatmap":["#dEEFFF","#118DFF"],"ordinal":["#dEEFFF","#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff","#118DFF"]},"rect":{"fill":"#118DFF"},"shape":{"stroke":"#118DFF"},"symbol":{"fill":"#118DFF","size":50,"strokeWidth":1.5},"text":{"fill":"#605E5C","font":"segoe uI","fontSize":12.0},"view":{"stroke":"transparent"}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:quartz

Chart theme modeled after Quartz [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#ab5787"},"area":{"fill":"#ab5787"},"axis":{"domainColor":"#979797","domainWidth":0.5,"gridWidth":0.2,"labelColor":"#979797","tickColor":"#979797","tickWidth":0.2,"titleColor":"#979797"},"axisBand":{"grid":false},"axisX":{"grid":true,"tickSize":10},"axisY":{"domain":false,"grid":true,"tickSize":0},"background":"#f9f9f9","legend":{"disable":true},"line":{"stroke":"#ab5787"},"path":{"stroke":"#ab5787"},"range":{"category":["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]},"rect":{"fill":"#ab5787"},"shape":{"stroke":"#ab5787"},"symbol":{"fill":"#ab5787","size":30}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:urban_institute

Chart theme modeled after Urban Institute [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#1696d2"},"area":{"fill":"#1696d2"},"axisX":{"domain":true,"domainColor":"#000000","domainWidth":1,"grid":false,"labelAngle":0,"labelFont":"lato","labelFontSize":12,"tickColor":"#000000","tickSize":5,"titleFont":"lato","titleFontSize":12,"titlePadding":10},"axisY":{"domain":false,"domainWidth":1,"grid":true,"gridColor":"#dEDDDD","gridWidth":1,"labelFont":"lato","labelFontSize":12,"labelPadding":8,"ticks":false,"titleAngle":0,"titleFont":"lato","titleFontSize":12,"titlePadding":10,"titleX":18,"titleY":-10},"background":"#fFFFFF","legend":{"disable":true},"line":{"color":"#1696d2","stroke":"#1696d2","strokeWidth":5},"path":{"stroke":"#1696d2","strokeWidth":0.5},"point":{"filled":true},"range":{"category":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"diverging":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"],"heatmap":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"],"ordinal":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"ramp":["#cFE8F3","#a2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"]},"rect":{"fill":"#1696d2"},"shape":{"stroke":"#1696d2"},"style":{"bar":{"fill":"#1696d2","stroke":null}},"symbol":{"fill":"#1696d2","size":30},"text":{"align":"center","color":"#1696d2","font":"lato","fontSize":11,"fontWeight":400,"size":11},"title":{"anchor":"start","font":"lato","fontSize":18},"trail":{"color":"#1696d2","size":1,"stroke":"#1696d2","strokeWidth":0},"view":{"stroke":"transparent"}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

:vox

Chart theme modeled after Vox [source]

Example:

{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","config":{"arc":{"fill":"#3e5c69"},"area":{"fill":"#3e5c69"},"axis":{"domainWidth":0.5,"grid":true,"labelPadding":2,"tickSize":5,"tickWidth":0.5,"titleFontWeight":"normal"},"axisBand":{"grid":false},"axisX":{"gridWidth":0.2},"axisY":{"gridDash":[3],"gridWidth":0.4},"background":"#fff","legend":{"disable":true},"line":{"stroke":"#3e5c69"},"path":{"stroke":"#3e5c69"},"range":{"category":["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]},"rect":{"fill":"#3e5c69"},"shape":{"stroke":"#3e5c69"},"symbol":{"fill":"#3e5c69"}},"resolve":{"scale":{"color":"independent"}},"vconcat":[{"hconcat":[{"data":{"url":"https://gist.githubusercontent.com/curran/a08a1080b88344b0c8a7/raw/0e7a9b0a5d22642a06d3d5b9bcbad9890c8ee534/iris.csv"},"encoding":{"color":{"field":"species"},"shape":{"field":"species"},"x":{"field":"petal_width","scale":{"zero":false},"type":"quantitative"},"y":{"field":"petal_length","scale":{"zero":false},"type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"point"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"line"}},{"data":{"url":"https://vega.github.io/editor/data/stocks.csv"},"encoding":{"color":{"field":"symbol"},"x":{"field":"date","type":"temporal"},"y":{"field":"price","stack":"normalize","type":"quantitative"}},"mark":{"fillOpacity":1,"line":false,"type":"area"}}]},{"hconcat":[{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"axis":{"title":"Body Mass (g)"},"field":"value","scale":{"zero":false},"type":"quantitative"},"y":{"field":"density","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.2,"orient":"vertical","type":"area"},"transform":[{"counts":false,"cumulative":false,"density":"Body Mass (g)","groupby":["Species"],"maxsteps":200,"minsteps":25}]},{"vconcat":[{"data":{"url":"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"},"encoding":{"color":{"field":"sex"},"x":{"field":"total_bill","type":"quantitative"},"y":{"field":"day","type":"nominal"},"yOffset":{"axis":null,"field":"jitter","type":"quantitative"}},"mark":{"size":16,"type":"point"},"transform":[{"as":"jitter","calculate":"sqrt(-2*log(random()))*cos(2*PI*random())"}]},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"field":"Species"},"x":{"field":"Body Mass (g)","scale":{"zero":false},"type":"quantitative"},"y":{"field":"Species","type":"nominal"}},"mark":{"extent":1.5,"fillOpacity":1,"type":"boxplot"}}]},{"__tucan__":{"plot":"histogram"},"data":{"url":"https://vega.github.io/editor/data/cars.json"},"encoding":{"color":{"field":"Origin"},"x":{"bin":{"binned":true},"field":"bin_Horsepower","title":"Horsepower"},"x2":{"field":"bin_Horsepower_end"},"y":{"field":"count_Horsepower","stack":null,"type":"quantitative"}},"mark":{"fillOpacity":0.5,"type":"bar"},"transform":[{"as":"bin_Horsepower","bin":true,"field":"Horsepower"},{"aggregate":[{"as":"count_Horsepower","op":"count"}],"groupby":["bin_Horsepower","bin_Horsepower_end","Origin"]}]}]},{"hconcat":[{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"tooltip":true,"type":"arc"}},{"data":{"url":"https://vega.github.io/editor/data/barley.json"},"encoding":{"color":{"field":"site"},"theta":{"aggregate":"sum","field":"yield","type":"quantitative"}},"mark":{"fillOpacity":1,"innerRadius":50,"tooltip":true,"type":"arc"}},{"data":{"url":"https://raw.githubusercontent.com/vega/vega-datasets/next/data/penguins.json"},"encoding":{"color":{"aggregate":"count","type":"quantitative"},"x":{"bin":true,"field":"Beak Length (mm)","type":"quantitative"},"y":{"bin":true,"field":"Beak Depth (mm)","type":"quantitative"}},"mark":{"fillOpacity":1,"type":"rect"}}]}]}

Summary

Functions

Returns the configuration object for the given theme.

Functions

@spec theme(name :: atom()) :: keyword()

Returns the configuration object for the given theme.

An exception will be raised if the theme name is invalid.