Skip to content

Commit 19633c1

Browse files
committed
开关量设置成阶梯图
1 parent 659bbb0 commit 19633c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

echarts/dynamicData.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let myChart = echarts.init(document.getElementById('root'));
55

66
let now = +Date.now();
77
// let value = Math.random() * 1000;
8-
const oneSecond = 1000 * 60;
8+
const oneSecond = 1000;
99

1010
const socket = io('http://localhost:3000');
1111

@@ -25,7 +25,7 @@ function randomData(time, lower, upper) {
2525
const diff = upper - lower + 1;
2626
const value = Math.floor(Math.random() * diff + lower);
2727
return {
28-
name: now.toString(),
28+
name: time.toString(),
2929
value: [
3030
time,
3131
value
@@ -106,6 +106,7 @@ let option = {
106106
name: '开关量数据',
107107
yAxisIndex: 1,
108108
type: 'line',
109+
step: true,
109110
showSymbol: false,
110111
hoverAnimation: false,
111112
data: digitalData

0 commit comments

Comments
 (0)