Modifier Functions

Modifier functions (those ending with !) adjust an existing EChart in place and return the modified chart.

aria!

ECharts.aria!Function
aria!(ec)

Adds or modifies ARIA (Accessible Rich Internet Applications) settings for an EChart.

Methods

aria!(ec::EChart; show, description, general, series, data)

Arguments

  • show::Bool = true : enable ARIA
  • description::Union{String, Nothing} = nothing : custom description for screen readers
  • general::Union{Dict, Nothing} = nothing : general ARIA configuration dict
  • series::Union{Dict, Nothing} = nothing : per-series ARIA configuration dict
  • data::Union{Dict, Nothing} = nothing : per-data ARIA configuration dict

Examples

b = bar(["A","B","C"], [1,2,3])
aria!(b)
source

colorscheme!

Missing docstring.

Missing docstring for colorscheme!. Check Documenter's build log for details.

flip!

Missing docstring.

Missing docstring for flip!. Check Documenter's build log for details.

jitter!

ECharts.jitter!Function
jitter!(ec)

Adds random jitter to data points in an EChart to reduce overplotting. The jitter amount is a random percentage of the data range, following the range method from Chambers, Cleveland, Kleiner, and Tukey (1983).

Methods

jitter!(ec::EChart, series::Int; pctxrange, pctyrange)
jitter!(ec::EChart; pctxrange, pctyrange)

Arguments

  • series::Int : index of the series to jitter (single-series method only)
  • pctxrange::Real = 0.05 : maximum jitter as a fraction of the x data range
  • pctyrange::Real = 0 : maximum jitter as a fraction of the y data range

Notes

When called without a series argument, jitter is applied to all series.

Examples

s = scatter([1,1,2,2,3], [1,1,2,2,3])
jitter!(s)
source

labels!

ECharts.labels!Function
labels!(ec)

Shows or hides data labels on an EChart.

Methods

labels!(ec::EChart, series::Int; show, position)
labels!(ec::EChart; show, position)

Arguments

  • series::Int : index of the series to modify (single-series method only)
  • show::Bool = true : display labels
  • position::String = "insideTop" : label position (e.g. "insideTop", "top", "inside", "bottom")

Notes

When called without a series argument, labels are applied to all series.

Examples

b = bar(["A","B","C"], [1,2,3])
labels!(b)
source

legend!

Missing docstring.

Missing docstring for legend!. Check Documenter's build log for details.

lineargradient

ECharts.lineargradientFunction
lineargradient(color1, color2)

Creates a linear gradient JSFunction for use with colorscheme! or other color arguments. The gradient transitions from color1 at offset 0 to color2 at offset 1.

Methods

lineargradient(color1::String, color2::String; x0, y0, x2, y2)

Arguments

  • color1::String : starting color (CSS color string)
  • color2::String : ending color (CSS color string)
  • x0::Number = 0 : x coordinate of gradient start (0–1)
  • y0::Number = 0 : y coordinate of gradient start (0–1)
  • x2::Number = 0 : x coordinate of gradient end (0–1)
  • y2::Number = 1 : y coordinate of gradient end (0–1)

Examples

b = bar(["A","B","C"], [1,2,3])
colorscheme!(b, lineargradient("#e96c5b", "#47a0d5"))
source

radial!

Missing docstring.

Missing docstring for radial!. Check Documenter's build log for details.

radialgradient

ECharts.radialgradientFunction
radialgradient(color1, color2)

Creates a radial gradient JSFunction for use with colorscheme! or other color arguments. The gradient transitions from color1 at offset 0 to color2 at offset 1.

Methods

radialgradient(color1::String, color2::String; x, y, r)

Arguments

  • color1::String : starting color at center (CSS color string)
  • color2::String : ending color at edge (CSS color string)
  • x::Number = 0.5 : x coordinate of gradient center (0–1)
  • y::Number = 0.5 : y coordinate of gradient center (0–1)
  • r::Number = 0.5 : radius of gradient (0–1)

Examples

b = bar(["A","B","C"], [1,2,3])
colorscheme!(b, radialgradient("#e96c5b", "#47a0d5"))
source

seriesnames!

Missing docstring.

Missing docstring for seriesnames!. Check Documenter's build log for details.

slider!

ECharts.slider!Function
slider!(ec)

Adds a data zoom slider to an EChart, allowing the user to pan and zoom along the data axis.

Methods

slider!(ec::EChart)

Examples

b = bar(["A","B","C","D","E"], [1,2,3,4,5])
slider!(b)
source

smooth!

Missing docstring.

Missing docstring for smooth!. Check Documenter's build log for details.

text!

Missing docstring.

Missing docstring for text!. Check Documenter's build log for details.

theme!

ECharts.theme!Function
theme!(ec, theme)

Sets the theme for an EChart.

Methods

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

Arguments

  • theme::Theme : a Theme object specifying visual styling

Examples

b = bar(["A","B","C"], [1,2,3])
theme!(b, Theme(backgroundColor = "#1b1b1b"))
source

title!

Missing docstring.

Missing docstring for title!. Check Documenter's build log for details.

toolbox!

Missing docstring.

Missing docstring for toolbox!. Check Documenter's build log for details.

tooltip!

ECharts.tooltip!Function
tooltip!(ec)

Adds or modifies the tooltip for an EChart.

Methods

tooltip!(ec::EChart; show, kwargs...)

Arguments

  • show::Bool = true : display the tooltip
  • kwargs : any additional field of the Tooltip struct (e.g. trigger, formatter)

Examples

b = bar(["A","B","C"], [1,2,3])
tooltip!(b, trigger = "axis")
source

xarea! / yarea!

Missing docstring.

Missing docstring for xarea!. Check Documenter's build log for details.

ECharts.yarea!Function
yarea!(ec, startval, endval)

Adds a shaded region along the y-axis to highlight a range of y values on an EChart.

Methods

yarea!(ec::EChart, startval, endval; series, kwargs...)

Arguments

  • startval : y-axis value where the shaded region starts
  • endval : y-axis value where the shaded region ends
  • series::Int = 1 : index of the series to attach the region to
  • kwargs : additional ItemStyle fields for the shaded area (e.g. color, opacity)

Examples

b = bar(["A","B","C"], [1,2,3])
yarea!(b, 1.5, 2.5, color = "rgba(200,200,200,0.4)")
source

xaxis! / yaxis!

ECharts.xaxis!Function
xaxis!(ec)

Modifies x-axis properties of an EChart.

Methods

xaxis!(ec::EChart; formatter, kwargs...)

Arguments

  • formatter::Union{String, JSFunction, Nothing} = nothing : axis label format string or JS function
  • kwargs : any field of the XAxis struct (e.g. name, type, boundaryGap)

Examples

b = bar(["A","B","C"], [1,2,3])
xaxis!(b, name = "Category")
source
ECharts.yaxis!Function
yaxis!(ec)

Modifies y-axis properties of an EChart.

Methods

yaxis!(ec::EChart; formatter, kwargs...)

Arguments

  • formatter::Union{String, JSFunction, Nothing} = nothing : axis label format string or JS function
  • kwargs : any field of the YAxis struct (e.g. name, min, max, type)

Examples

b = bar(["A","B","C"], [1000, 2000, 3000])
yaxis!(b, name = "Revenue", formatter = "${value}")
source

xgridlines! / ygridlines!

Missing docstring.

Missing docstring for xgridlines!. Check Documenter's build log for details.

ECharts.ygridlines!Function
ygridlines!(ec)

Configures the y-axis grid lines for an EChart.

Methods

ygridlines!(ec::EChart; show, interval, kwargs...)

Arguments

  • show::Bool = true : display grid lines
  • interval::Union{Int, String, JSFunction, Nothing} = "auto" : interval between grid lines
  • kwargs : additional LineStyle fields (e.g. color, width, type)

Examples

b = bar(["A","B","C"], [1,2,3])
ygridlines!(b, show = false)
source

xline! / yline!

Missing docstring.

Missing docstring for xline!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for yline!. Check Documenter's build log for details.