echarts4.0折线图让某个点闪烁

时间:2023-03-09 17:47:13
echarts4.0折线图让某个点闪烁
 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="static/jquery.js"></script>
<script src="static/echarts4.js"></script>
</head>
<script>
$(function() {
var x = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
var series = [{
name: '总量',
type: 'line',
label: {
normal: {
show: true,
position: 'top'
}
},
data: [0, 50, 100, 150, 200, 150, 100]
}]
var option = {
xAxis: [{
type: 'category',
boundaryGap: false,
data: x
}],
yAxis: [{
type: 'value'
}],
series: series
};
var effectScatterData = [0, 50, 100, 150, 200, {value:150,symbolSize:30,}, 100]
var effectScatter = {
type: 'effectScatter',
coordinateSystem: 'cartesian2d',
data: effectScatterData, //2d坐标系
symbolSize:0,
showEffectOn: 'render',
rippleEffect: {
brushType: 'stroke'
},
hoverAnimation: true,
itemStyle: {
normal: {
color: 'red',
shadowBlur: 10,
shadowColor: '#333'
}
},
zlevel: 1
};
option.series.push(effectScatter);
myChart = echarts.init(document.getElementById('fleshChart'));
myChart.setOption(option)
})
</script> <body>
<div id="fleshChart" style="width:100%;height:500px;">
</div>
</body> </html>