take the official tutorial as an example, assume that there are six buttons outside the canvas, corresponding to each item in the xAxis.data.
Click a button to make the opposite column green.
how can I implement it?
do I need to myChart.setOption (option) again every time I change color?
var myChart = echarts.init(document.getElementById("main"));
var option = {
title: {
text: "ECharts "
},
tooltip: {},
legend: {
data:[""]
},
xAxis: {
data: ["","","","","",""]
},
yAxis: {},
series: [{
name: "",
type: "bar",
data: [5, 20, 36, 10, 10, 20]
}]
};
myChart.setOption(option);