The theme! function is a convenience around the Theme type, so that end-users don’t need to reference ec.theme directly (though, nothing prevents users modifying the EChart chart instance). There are 15 pre-defined themes, originating from the ECharts theme builder:

chalk, dark, essos, halloween, infographic, macarons, roma, purplepassion, roma, shine, vintage, walden, westeros, wonderland, grayscale.

Currently, none of themes are exported, to avoid namespace pollution. To use a theme in your code, prepend ECharts to the theme name (see example below). Note that theme! is a slightly different use case than colorscheme! in that theme! can change all the properties of the graph (similar to a style sheet), whereas colorscheme only changes the series colors (but not the background, axes, title, text, etc.)

To define your own themes, you can either create a Theme() struct directly in Julia or use the ECharts theme builder to create the JSON for you. After creating the JSON, themes can be loaded by using code similar to what is in theme.jl.

Method Signatures

theme!(ec::EChart, theme::Theme)

Optional Arguments

None currently


using ECharts, DataFrames, CSV
s_df ="ECharts", "exampledata/streamdata.csv"), types=[String, Float64, String])
sg = streamgraph(s_df[:date], s_df[:value], s_df[:key], legend = true)
theme!(sg, ECharts.purplepassion)