重新加载动画
itemChart4.clear();
itemChart4.setOption(itemoption1);
var mychart = echarts.init(document.getElementById('center-top-chart'));
var option = {
title: {
text: ''
},
tooltip: {},
legend: {
data: []
},
grid: {
top: "3%",
left: "4%",
right: "4%",
bottom: 60,
},
xAxis: {
data: ["00:00", "01:00", "02:00", "03:00"],
"axisTick": { //x轴刻度线
"show": false
},
axisLine: {
lineStyle: {
color: '#C4C6CF', // 颜色
width: 1 // 粗细
},
},
axisLabel: {
textStyle: {
color: '#000', //更改坐标轴文字颜色
fontSize: 12 //更改坐标轴文字大小
}
}
},
yAxis: {
"axisLine": { // y轴
"show": false
},
"axisTick": { //y轴刻度线
"show": false
},
splitLine: { // y轴网格线
show: true,
lineStyle: {
color: ['#EBECF0'],
width: 1,
type: 'solid'
}
}
},
series: [{
name: '销量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20],
stack: '总量',
itemStyle: {
normal: {
color: yellow, // 拐点颜色
// borderColor: green, // 拐点边框颜色
}
},
}, {
name: '销量2',
type: 'bar',
data: [5, 20, 36, 10, 10, 20],
stack: '总量',
itemStyle: {
normal: {
color: '#F7F8FA', // 拐点颜色
// borderColor: green, // 拐点边框颜色
}
},
}]
};
mychart .setOption(option);