|
@@ -912,27 +912,35 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ type: 'lines',
|
|
|
+ coordinateSystem: 'cartesian2d',
|
|
|
+ data: valueData.map((item, index) => {
|
|
|
+ return {
|
|
|
+ coords: [
|
|
|
+ [0, index],
|
|
|
+ [item , index],
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ effect: {
|
|
|
+ show: true,
|
|
|
+ period: 2.5,
|
|
|
+ trailLength: 0.5, //控制拖尾长度
|
|
|
+ symbolSize: [15,2],
|
|
|
+ symbol:'path://M891.733333 554.666667H132.266667a4.266667 4.266667 0 0 1-4.266667-4.266667v-76.8a4.266667 4.266667 0 0 1 4.266667-4.266667h759.466666a4.266667 4.266667 0 0 1 4.266667 4.266667v76.8a4.266667 4.266667 0 0 1-4.266667 4.266667z',
|
|
|
+ loop: true,
|
|
|
+ color: '#fff' //流光颜色
|
|
|
+ },
|
|
|
+ lineStyle: {
|
|
|
+ width: 0,
|
|
|
+ opacity: 0.6,
|
|
|
+ curveness: 0
|
|
|
+ },
|
|
|
+ z: 99
|
|
|
+ },
|
|
|
],
|
|
|
};
|
|
|
- var currentIndex = -1;
|
|
|
- var timer = setInterval(function () {
|
|
|
- // 生成新的随机数据
|
|
|
- currentIndex++;
|
|
|
- if (currentIndex >= 4) {
|
|
|
- currentIndex = 0;
|
|
|
- for (var i = 0; i < valueData.length; i++) {
|
|
|
- valueData[i] = Math.floor(Math.random() * 1000);
|
|
|
- }
|
|
|
- } else {
|
|
|
- valueData[currentIndex] = Math.floor(Math.random() * 1000);
|
|
|
- }
|
|
|
-
|
|
|
- // 更新 option 中的数据
|
|
|
- option.series[0].data = valueData;
|
|
|
-
|
|
|
- // 重新渲染图表
|
|
|
- myChart.setOption(option);
|
|
|
- }, 1000); // 每秒更新一次数据
|
|
|
if (option) {
|
|
|
myChart.setOption(option);
|
|
|
}
|
|
@@ -1013,32 +1021,39 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ type: 'lines',
|
|
|
+ coordinateSystem: 'cartesian2d',
|
|
|
+ data: valueData.map((item, index) => {
|
|
|
+ return {
|
|
|
+ coords: [
|
|
|
+ [0, index],
|
|
|
+ [item , index],
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ }),
|
|
|
+ effect: {
|
|
|
+ show: true,
|
|
|
+ period: 2.5,
|
|
|
+ trailLength: 0.5, //控制拖尾长度
|
|
|
+ symbolSize: [15,2],
|
|
|
+ symbol:'path://M891.733333 554.666667H132.266667a4.266667 4.266667 0 0 1-4.266667-4.266667v-76.8a4.266667 4.266667 0 0 1 4.266667-4.266667h759.466666a4.266667 4.266667 0 0 1 4.266667 4.266667v76.8a4.266667 4.266667 0 0 1-4.266667 4.266667z',
|
|
|
+ loop: true,
|
|
|
+ color: '#fff' //流光颜色
|
|
|
+ },
|
|
|
+ lineStyle: {
|
|
|
+ width: 0,
|
|
|
+ opacity: 0.6,
|
|
|
+ curveness: 0
|
|
|
+ },
|
|
|
+ z: 99
|
|
|
+ },
|
|
|
],
|
|
|
};
|
|
|
- var currentIndex = -1;
|
|
|
- var timer = setInterval(function () {
|
|
|
- // 生成新的随机数据
|
|
|
- currentIndex++;
|
|
|
- if (currentIndex >= 22) {
|
|
|
- currentIndex = 0;
|
|
|
- for (var i = 0; i < valueData.length; i++) {
|
|
|
- valueData[i] = Math.floor(Math.random() * 1000);
|
|
|
- }
|
|
|
- } else {
|
|
|
- valueData[currentIndex] = Math.floor(Math.random() * 1000);
|
|
|
- }
|
|
|
-
|
|
|
- // 更新 option 中的数据
|
|
|
- option.series[0].data = valueData;
|
|
|
-
|
|
|
- // 重新渲染图表
|
|
|
- myChart.setOption(option);
|
|
|
- }, 1000); // 每秒更新一次数据
|
|
|
if (option) {
|
|
|
myChart.setOption(option);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
xbbl() {
|
|
|
// 性别比例
|
|
|
var myChart = echarts.init(document.getElementById('sprh-xbbl'));
|