ECharts.areaMethod
area(x, y)

Creates an EChart where region below plotted line filled with color.

Methods

area(x::AbstractVector, y::AbstractVector{<:Union{Missing, Real}})
area(x::AbstractVector, y::AbstractArray{<:Union{Missing, Real},2})
area(df::AbstractDataFrame, x::Symbol, y::Symbol)
area(df::AbstractDataFrame, x::Symbol, y::Symbol, group::Symbol)
area(k::KernelDensity.UnivariateKDE)

Arguments

  • mark::Union{String, AbstractVector} = "line" : how to display plotted points
  • fill::Union{Bool, AbstractVector} = true : fill area below marks with color?
  • stack::Union{Bool, AbstractVector, Void} = nothing : stack (add together) when multple series present?
  • step::Union{String, Void} = nothing : one of {"start", "end", "middle", nothing}
  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of area, such as displaying a legend when two or more series present.

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
ar = area(x, y)
ECharts.barMethod
bar(x, y)

Creates an EChart where values plotted vertically as rectangular columns.

Methods

bar(x::AbstractVector, y::AbstractVector{<:Union{Missing, Real}})
bar(x::AbstractVector, y::AbstractArray{<:Union{Missing, Real},2})
bar(df::AbstractDataFrame, x::Symbol, y::Symbol)
bar(df::AbstractDataFrame, x::Symbol, y::Symbol, group::Symbol)

Arguments

  • mark::Union{String, AbstractVector} = "bar" : how to display plotted points
  • stack::Union{Bool, AbstractVector, Void} = nothing : stack (add together) when multple series present?
  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of bar, such as displaying a legend when two or more series present.

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
b = bar(x, y)
ECharts.boxMethod
box(data)

Creates an EChart as a boxplot, optionally with outliers.

Methods

box(data::AbstractVector{<:Union{Missing, Real}})
box(data::AbstractVector{<:AbstractVector{<:Union{Missing, Real}}})
box(df::AbstractDataFrame, data::Symbol)
box(df::AbstractDataFrame, data::Symbol, group::Symbol)

Arguments

  • names::Union{AbstractVector, Void} = nothing : provide names for series
  • outliers::Bool : show outliers?
  • legend::Bool : display legend?
  • horizontal::Bool = false : show horizontal? (default: vertical)
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of box, such as displaying a legend when two or more series present.

Examples

data = [850, 740, 900, 1070, 930, 850, 950, 980, 980, 880, 1000, 980, 930, 650, 760, 810, 1000, 1000, 960, 960]
b = box(data)
ECharts.bubbleMethod
bubble(x, y)

Creates an EChart scatterplot, with additional dimension represented by circle size.

Methods

bubble(x::AbstractVector{<:Union{Missing, Real}}, y::AbstractVector{<:Union{Missing, Real}},
    size::AbstractVector{<:Union{Missing, Real}})
bubble(df::AbstractDataFrame, x::Symbol, y::Symbol, size::Symbol)
bubble(df::AbstractDataFrame, x::Symbol, y::Symbol, size::Symbol, group::Symbol)

Arguments

  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • large::Bool = true : minimize overplotting
  • largeThreshold::Int = 2000 : number of points before overplotting optimization occurs
  • bubblesize::Real = 50 : maximum size of bubbles (see notes)
  • kwargs : varargs to set any field of resulting EChart struct

Notes

The displayed size of the bubble is normalized within the function, as the square root of the size values. Using the square root of the value maintains the proper visual perception of the difference. The overall circle size can be modified by the bubblesize keyword argument, which is roughly the area in pixels of the largest circle.

Examples

Random.seed!(13579)
xval = rand() .* (0:1000:30000)
yval = 60 .+ (rand(31) * 20)
sizeval = shuffle!(6000 .* (rand(31) * 50))
sp = bubble(xval, yval, sizeval, scale = true)
ECharts.candlestickMethod
candlestick(dt, open, close, low, high)

Creates an EChart for visualizing financial prices of a security.

Methods

candlestick(dt::AbstractVector{String},
            open::AbstractVector{<:Union{Missing, Real}},
            close::AbstractVector{<:Union{Missing, Real}},
            low::AbstractVector{<:Union{Missing, Real}},
            high::AbstractVector{<:Union{Missing, Real}})

candlestick(dt::AbstractVector{<:Dates.TimeType},
            open::AbstractVector{<:Union{Missing, Real}},
            close::AbstractVector{<:Union{Missing, Real}},
            low::AbstractVector{<:Union{Missing, Real}},
            high::AbstractVector{<:Union{Missing, Real}})

Arguments

  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Candlestick plots are financial plots showing the relationship between the open, close, low and high prices for a security on a given day. For a more thorough description of the uses and subtleties of candlestick plots, see: http://www.datavizcatalogue.com/methods/candlestick_chart.html

Examples

dt = ["2016/08/26", "2016/08/29", "2016/08/30", "2016/08/31", "2016/09/01", "2016/09/02",
"2016/09/06", "2016/09/07", "2016/09/08", "2016/09/09", "2016/09/12", "2016/09/13",
"2016/09/14", "2016/09/15", "2016/09/16", "2016/09/19", "2016/09/20", "2016/09/21",
"2016/09/22", "2016/09/23", "2016/09/26"]

close_ = [12.38, 12.47, 12.55, 12.60, 12.44, 12.50, 12.67, 12.70, 12.73, 12.38, 12.70, 12.38, 12.14, 12.11, 12.11, 12.11, 12.00, 12.09, 12.18, 12.17, 12.01]

open_ = [12.47, 12.38, 12.46, 12.48, 12.66, 12.53, 12.49, 12.62, 12.50, 12.61, 12.32, 12.53, 12.18, 12.14, 12.05, 12.12, 12.09, 12.08, 12.17, 12.12, 12.12]

high_ = [12.55, 12.50, 12.56, 12.61, 12.72, 12.57, 12.67, 12.75, 12.75, 12.6850, 12.77, 12.68, 12.31, 12.18, 12.13, 12.33, 12.19, 12.11, 12.29, 12.22, 12.12]

low_ = [12.34, 12.38, 12.43, 12.48, 12.35, 12.46, 12.43, 12.62, 12.50, 12.38, 12.28, 12.33,12.11, 12.06, 12.01, 12.0586, 11.96, 12.01, 12.16, 12.12, 12.00]

c = candlestick(dt, open_, close_, low_, high_)
ECharts.corrplotMethod
corrplot(data)

Creates an EChart showing pairwise correlations between columns of data.

Methods

corrplot(m::Matrix)
corrplot(df::AbstractDataFrame)

Arguments

  • bubblesize::Int = 45 : size of bubbles
  • layout::String = "lower" : one of {"lower", "upper", nothing}
  • kwargs : varargs to set any field of resulting EChart struct

Notes

corrplot does not currently support missing values. Users should call completecases!() when using a DataFrame, or manually fill missing values as appropriate.

Examples

using ECharts, DataFrames, RDatasets
df = dataset("datasets", "mtcars")
cplot = corrplot(df)
ECharts.donutMethod
donut(names, values)

Creates an EChart where each value is represented as circular portion of the whole, with a hole removed from the center.

Methods

donut(names::AbstractVector, values::AbstractVector{<:Union{Missing, Real}})

Arguments

  • selected::Union{AbstractVector, Void} = nothing : explode slice by position
  • radius::Union{AbstractVector, String} = ["50%", "80%"] :
  • center::Union{AbstractVector, String} = ["50%", "50%"] :
  • roseType::Union{String, Void} = nothing : one of {"angle", "radius", nothing}
  • legend::Bool : display legend?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
d = donut(x, y)
ECharts.funnelMethod
funnel(names, values)

Creates an EChart funnel.

Methods

funnel(names::AbstractVector, values::AbstractVector{<:Union{Missing, Real}})

Arguments

  • legend::Bool : display legend?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Given the concept of a funnel (largest at top, narrowing), if you pass in the values out of order, the echarts.js library automatically sorts the numbers highest to lowest.

Examples

v = [100,60,80,70,50]
n = ["A", "B", "C", "D", "E"]
fn = funnel(n, v)
ECharts.gaugeMethod
gauge(x)

Creates an EChart where a value is plotted as a needle indicating the value along some range.

Methods

gauge(x::Union{Missing, Real})

Arguments

  • breakpoints::AbstractVector = [0.2, 0.8, 1] : percentage along gauge to switch indicator colors
  • colors::AbstractVector = ["#91c7ae", "#63869e", "#c23531"] : colors for breakpoints
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

gg = gauge(27.64)
ECharts.heatmapMethod
heatmap(data)

Creates an EChart heatmap.

Methods

heatmap(h::StatsBase.Histogram)

Arguments

  • legend::Bool = false : display legend?
  • show::Bool = true : show slider denoting color range
  • calculable::Bool = true : allow user to slide endpoints to change data displayed
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of area, such as displaying a legend when two or more series present.

Examples

using RDatasets
h2 = fit(Histogram, (df[:Price], df[:Carat]), closed = :left)
hs2 = heatmap(h2)
ECharts.histogramMethod
histogram(data)

Creates an EChart where region below plotted line filled with color.

Methods

histogram(h::StatsBase.Histogram)

Arguments

  • legend::Bool = false : display legend?
  • horizontal::Bool = false : show bars horizontally?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of area, such as displaying a legend when two or more series present.

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
ar = area(x, y)
ECharts.lineMethod
line(x, y)

Creates an EChart where region between points connected by a line.

Methods

line(x::AbstractVector, y::AbstractVector{<:Union{Missing, Real}})
line(x::AbstractVector, y::AbstractArray{<:Union{Missing, Real},2})
line(df::AbstractDataFrame, x::Symbol, y::Symbol)
line(df::AbstractDataFrame, x::Symbol, y::Symbol, group::Symbol)

Arguments

  • mark::Union{String, AbstractVector} = "line" : how to display plotted points
  • step::Union{String, Void} = nothing : one of {"start", "end", "middle", nothing}
  • legend::Bool = false : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of area, such as displaying a legend when two or more series present.

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
ll = line(x, y)
ECharts.pieMethod
pie(names, values)

Creates an EChart where each value is represented as circular portion of the whole,

Methods

pie(names::AbstractVector, values::AbstractVector{<:Union{Missing, Real}})

Arguments

  • selected::Union{AbstractVector, Void} = nothing : explode slice by position
  • radius::Union{AbstractVector, String} = "80%" :
  • center::Union{AbstractVector, String} = ["50%", "50%"] :
  • roseType::Union{String, Void} = nothing : one of {"angle", "radius", nothing}
  • legend::Bool : display legend?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
pp = pie(x, y)
ECharts.polarMethod
polar(angle, radius)

Creates an EChart where region between points connected by a line, with polar coordinates.

Methods

polar(angle::AbstractVector{<:Union{Missing, Real}}, radius::AbstractVector{<:Union{Missing, Real}})
polar(angle::AbstractVector{<:Union{Missing, Real}},radius::AbstractArray{<:Union{Missing, Real},2})

Arguments

  • splitNumber::Int = 12 : number of splits shown in axis
  • showSymbol::Bool = false : show the dots as well as the line?
  • legend::Bool : display legend?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of polar, such as displaying a legend when two or more series present.

Examples

t = 0:360
angle = [a / 180 * pi for a in t]
radius = [(sin(2t) * cos(2t)) for t in angle]
p = polar(angle, radius)
ECharts.radarMethod
radar(names, values)

Creates an EChart where region inside plotted line optionally filled with color.

Methods

radar(names::AbstractVector, values::AbstractVector{<:Union{Missing, Real}},
    max::AbstractVector{<:Union{Missing, Real}})
radar(names::AbstractVector, values::AbstractArray{<:Union{Missing, Real},2},
	max::AbstractVector{<:Union{Missing, Int, AbstractFloat, Rational}})

Arguments

  • fill::Union{Bool, AbstractVector} = false : fill area inside marks with color?
  • legend::Bool : display legend?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
ar = area(x, y)
ECharts.radialbarMethod
radialbar(x, y)

Creates an EChart where values plotted as a percentage of cirlce as rectangular columns.

Methods

radialbar(x::AbstractVector, y::AbstractVector{<:Union{Missing, Real}})
radialbar(x::AbstractVector, y::AbstractArray{<:Union{Missing, Real},2})
radialbar(df::AbstractDataFrame, x::Symbol, y::Symbol)
radialbar(df::AbstractDataFrame, x::Symbol, y::Symbol, group::Symbol)

Arguments

  • mark::Union{String, AbstractVector} = "bar" : how to display plotted points
  • stack::Union{Bool, AbstractVector, Void} = nothing : stack (add together) when multple series present?
  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

x = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
y = [11, 11, 15, 13, 12, 13, 10]
b = radialbar(x, y)
ECharts.sankeyMethod
sankey(names, source, target, value)

Creates an EChart diagram displaying the path and frequencies between nodes.

Methods

sankey(names::AbstractVector, source::AbstractVector{<:Union{Missing, Int}},
    target::AbstractVector{<:Union{Missing, Int}}, value::AbstractVector{<:Union{Missing, Real}};
sankey(datafile::AbstractString)

Arguments

  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

name = ["Agricultural waste", "Bio-conversion", "Liquid", "Losses", "Solid", "Gas", "Biofuel imports",
    "Biomass imports", "Coal imports", "Coal"]
source = [0, 1, 1, 1, 1, 6, 7, 8, 10]
target = [1, 2, 3, 4, 5, 2, 4, 9, 9]
value = [124.729, 0.597, 26.862, 280.322, 81.144, 35, 35, 11.606, 63.965]
s = sankey(name, source, target, value)

Using the second method mentioned above–as per http://sankeymatic.com/build/'s convention–you can have a datafile (call it input.txt), where each line has the information

SOURCE [AMOUNT] TARGET

In this case. SOURCE and TARGET are both Strings, where AMOUNT is a Real. For example:

Wages [2000] Budget
Interest [25] Budget
Budget [500] Taxes
Budget [450] Housing
Budget [310] Food
Budget [205] Transportation
Budget [400] Health Care
Budget [160] Other Necessities

And simply run

s = sankey("input.txt")
ECharts.scatterMethod
scatter(x, y)

Creates an EChart where (x,y) tuples are plotted as dots.

Methods

scatter(x::AbstractVector, y::AbstractVector{<:Union{Missing, Real}})
scatter(x::AbstractVector, y::AbstractArray{<:Union{Missing, Real},2})
scatter(df::AbstractDataFrame, x::Symbol, y::Symbol)
scatter(df::AbstractDataFrame, x::Symbol, y::Symbol, group::Symbol)

Arguments

  • mark::Union{String, AbstractVector} = "scatter" : how to display plotted points
  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • large::Bool = true : minimize overplotting
  • largeThreshold::Int = 2000 : number of points before overplotting optimization occurs
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

sc = scatter(rand(30), rand(30))
ECharts.streamgraphMethod
streamgraph(x, y, group)

Creates an EChart where region below plotted line filled with color.

Methods

streamgraph(x::AbstractVector{String},y::AbstractVector{<:Union{Missing, Real}},
            group::AbstractVector)
streamgraph(x::AbstractVector{<:Union{Missing, Real}},
            y::AbstractVector{<:Union{Missing, Real}},
            group::AbstractVector)
streamgraph(df::AbstractDataFrame, x::Symbol, y::Symbol, group::Symbol)
streamgraph(x::AbstractVector{<:Dates.TimeType},y::AbstractVector{<:Union{Missing, Real}},             group::AbstractVector)

Arguments

  • legend::Bool = false : display legend?
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Examples

s_df = readtable(Pkg.dir("ECharts", "exampledata/streamdata.csv"))
sg = streamgraph(s_df[:date], s_df[:value], s_df[:key], legend = true)
ECharts.waterfallMethod
waterfall(x, y)

Creates an EChart representing the increase/decrease between two consecutive points.

Methods

waterfall(x::AbstractVector, y::AbstractVector{<:Real})

Arguments

  • legend::Bool : display legend?
  • scale::Bool = false : show full Y-axis or truncated
  • kwargs : varargs to set any field of resulting EChart struct

Notes

Reasonable defaults set for different methods of area, such as displaying a legend when two or more series present.

Examples

x = 1:5
y = [2900, -1200, -300, -200, -900]
w = waterfall(x, y)