JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.1.0/echarts-en.common.js"></script>
<div id="container" style="width:100%; height: 90vh;"></div>
JavaScript
var myChart = echarts.init(document.getElementById('container'));
var option = {
"dataset": {
"source": [
["asd", "sdf", "sage", "erter"],
["t131283", 166, 19, 385],
["t251284", 360, 38, 1466],
["t191285", 49, 0, 0],
["t021286", 13, 0, 0],
["t561287", 14, 1, 2],
["t871288", 10, 3, 24],
]
},
"tooltip": {
"trigger": "axis",
},
"toolbox": {
"feature": {
"dataZoom": {
}
}
},
"legend": {
},
"grid": {
"left": 100,
"right": 100,
"bottom": 100,
"top": 100,
"containLabel": true
},
"xAxis": [{
"type": "category",
}],
"yAxis": [{
"type": "value",
}],
"series": [{
"type": "bar",
"encode": {
"x": 0,
"y": 1
},
"stack": "asd"
}, {
"type": "bar",
"encode": {
"x": 0,
"y": 2
},
"stack": "asd"
}, {
"type": "bar",
"encode": {
"x": 0,
"y": 3
},
"stack": "asd"
}, ]
}
myChart.setOption(option)