CHART()

Syntax: CHART(chartOption() [,size()] [, theme()] [, chartJSCode()]) Since v8.0.8

Options

chartOption()

Syntax: chartOption( { json in apache echarts options } )

chartJSCode()

Syntax: chartJSCode( { user javascript code } )

size()

Syntax: size(width, height)

  • width string chart width in HTML syntax ex) '800px'
  • height string chart height in HTML syntax ex) '800px'

theme()

Syntax: theme(name)

  • name string theme name

Apply a chart theme.

Available themes : white, dark, chalk, essos, infographic, macarons, purple-passion, roma, romantic, shine, vintage, walden, westeros, wonderland

Please refer to this section for the preview of the each theme.

plugins()

Syntax: plugins(plugin...)

  • plugin string pre-defined plugin name or url of plugin module.
Pre-defined pluginActual module url
liquidfill/web/echarts/echarts-liquidfill.min.js
wordcloud/web/echarts/echarts-wordcloud.min.js
gl/web/echarts/echarts-gl.min.js

New Charts

The new CHART() provides more fine-tunable options to create attractive charts. It is the new version of API that replaces for the previous CHART_LINE(), CHART_BAR(), CHART_SCATTER, CHART_LINE3D, CHART_BAR3D() and CHART_SCATTER3D() functions.

Line

Bar

Pie

Scatter

Radar

Gauge

Candlestick

Boxplot

GeoJSON

Heatmap

Liquidfill

3D Globe

3D Bar

3D Line

Others

Themes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
FAKE( arrange(1, 100, 1))
MAPVALUE(1, sin(2 * PI * 5 * value(0)/100) )
MAPVALUE(2, sin(2 * PI * 5 * (value(0)+5)/100) )
MAPVALUE(3, sin(2 * PI * 5 * (value(0)+10)/100) )
CHART(  size("500px", "200px"),
        theme("dark"),
        chartOption({
            title:{ text:"theme(dark)" },
            xAxis:{ data:column(0), axisLabel:{show: false} },
            yAxis:{},
            series:[
                {type:"line", data:column(1), name:"series1"},
                {type:"line", data:column(2), name:"series2"},
                {type:"line", data:column(3), name:"series3"},
            ],
            legend:{ bottom: 10 }
        })
)

white

dark

chalk

essos

infographic

macarons

purple-passion

roma

romantic

shine

vintage

walden

westeros

wonderland

Last updated on