Homepage: open_in_new echarts.apache.org .
Example
const profitGraph = echarts.init(document.getElementById('profit-graph'));
const option = {
tooltip: {},
legend: {
data: ['Sales']
},
xAxis: {
data: ['shirt', 'cardigan', 'chiffon shirt', 'pants', 'heels', 'socks']
},
yAxis: {},
series: [{
name: 'Sales',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}]
};
profitGraph.setOption(option);
Options
Full option reference: open_in_new echarts.apache.org/en/option.html .
legend— which series appear in the legend (count and names).series— main data property: the list of series / points. For coordinate charts, values map to the axes (x then y depending on series type).
Andrew Dorokhov