Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-OpenSourceSW
/
Probability Death
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
조민지
2018-12-09 21:25:55 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
625e6e5879fd44f8ebaca96216bcc5fd0d54bbe5
625e6e58
1 parent
dd143390
ejs 초기값 받아오기
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
41 deletions
views/index.ejs
views/index.ejs
View file @
625e6e5
...
...
@@ -110,24 +110,27 @@
time
=
new
Date
().
getTime
();
var
length
=
<%=
dataLen
%>
;
var
i
=-
9
;
for
(
i
;
i
<-
9
+
length
;
i
++
)
var
j
=
0
;
for
(
j
;
j
<
10
-
length
;
j
++
)
{
deathArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
0
})
i
++
;
}
<%
probArr
.
forEach
((
probArr
)
=>
{
%>
temp
;
temp
=
<%=
probArr
%>
;
for
(
i
+
1
;
i
<=
0
;
i
++
)
for
(
j
;
j
<
10
;
j
++
)
{
deathArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
temp
})
j
++
;
}
<%
})
%>
...
...
@@ -153,7 +156,7 @@
var
x
=
new
Date
().
getTime
(),
// 현재 시간
y
=
Math
.
random
();
//
series
.
addPoint
([
x
,
y
],
true
,
true
);
},
3
000
);
//1000=1초
},
60
000
);
//1000=1초
}
}
},
...
...
@@ -205,18 +208,35 @@
{
name
:
"기온"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
time
=
new
Date
().
getTime
(),
i
;
for
(
i
=
-
19
;
i
<=
0
;
i
+=
1
)
{
data
.
push
({
x
:
time
+
i
*
3000
,
y
:
0
});
var
tempArr
=
[],
time
=
new
Date
().
getTime
();
var
length
=
<%=
dataLen
%>
;
var
i
=-
9
;
var
j
=
0
;
for
(
j
;
j
<
10
-
length
;
j
++
)
{
tempArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
0
})
i
++
;
}
return
data
;
<%
ptArr
.
forEach
((
ptArr
)
=>
{
%>
temp
;
temp
=
<%=
ptArr
%>
;
for
(
j
;
j
<
10
;
j
++
)
{
tempArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
temp
})
j
++
;
}
<%
})
%>
return
tempArr
;
})()
}
]
...
...
@@ -238,7 +258,7 @@
var
x
=
new
Date
().
getTime
(),
// 현재 시간
y
=
Math
.
random
();
//
series
.
addPoint
([
x
,
y
],
true
,
true
);
},
3
000
);
//1000=1초
},
60
000
);
//1000=1초
}
}
},
...
...
@@ -290,22 +310,39 @@
{
name
:
"풍속"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
time
=
new
Date
().
getTime
(),
i
;
for
(
i
=
-
19
;
i
<=
0
;
i
+=
1
)
{
data
.
push
({
x
:
time
+
i
*
3000
,
y
:
0
});
var
windArr
=
[],
time
=
new
Date
().
getTime
();
var
length
=
<%=
dataLen
%>
;
var
i
=-
9
;
var
j
=
0
;
for
(
j
;
j
<
10
-
length
;
j
++
)
{
windArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
0
})
i
++
;
}
return
data
;
<%
wsArr
.
forEach
((
wsArr
)
=>
{
%>
temp
;
temp
=
<%=
wsArr
%>
;
for
(
j
;
j
<
10
;
j
++
)
{
windArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
temp
})
j
++
;
}
<%
})
%>
return
windArr
;
})()
}
]
});
]
});
</script>
<!-- 네번째 그래프 -->
...
...
@@ -323,7 +360,7 @@
var
x
=
new
Date
().
getTime
(),
// 현재 시간
y
=
Math
.
random
();
//
series
.
addPoint
([
x
,
y
],
true
,
true
);
},
3
000
);
//1000=1초
},
60
000
);
//1000=1초
}
}
},
...
...
@@ -375,21 +412,38 @@
{
name
:
"강수량"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
time
=
new
Date
().
getTime
(),
i
;
for
(
i
=
-
19
;
i
<=
0
;
i
+=
1
)
{
data
.
push
({
x
:
time
+
i
*
3000
,
y
:
0
});
var
rainArr
=
[],
time
=
new
Date
().
getTime
();
var
length
=
<%=
dataLen
%>
;
var
i
=-
9
;
var
j
=
0
;
for
(
j
;
j
<
10
-
length
;
j
++
)
{
rainArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
0
})
i
++
;
}
return
data
;
<%
rainArr
.
forEach
((
rainArr
)
=>
{
%>
temp
;
temp
=
<%=
rainArr
%>
;
for
(
j
;
j
<
10
;
j
++
)
{
rainArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
temp
})
j
++
;
}
<%
})
%>
return
rainArr
;
})()
}
]
]
});
</script>
</body>
...
...
Please
register
or
login
to post a comment