Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김가영
/
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 19:44:26 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
34471c486a730b1c16b128ed3d64b950e0d40483
34471c48
1 parent
d483d657
page error revised
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
31 deletions
graph/index.html
views/index.ejs
graph/index.html
View file @
34471c4
...
...
@@ -8,16 +8,16 @@
<style
type=
"text/css"
></style>
</head>
<body>
<script
src=
"../
../
code/highcharts.js"
></script>
<script
src=
"../
../
code/modules/exporting.js"
></script>
<script
src=
"../
../
code/modules/export-data.js"
></script>
<script
src=
"../code/highcharts.js"
></script>
<script
src=
"../code/modules/exporting.js"
></script>
<script
src=
"../code/modules/export-data.js"
></script>
<div
id=
"container1"
style=
"width:1260px; height: 400px; margin: 0 auto"
></div>
<div
style=
"width:1275px; margin:0 auto;"
>
<div
style=
"width:1275px; margin:0 auto;"
>
<div
style=
"display: inline-block;"
>
<div
id=
"container2"
...
...
@@ -37,9 +37,9 @@
style=
"width:400px; height: 300px; padding:0; margin-left:0px;"
></div>
</div>
</div>
</div>
<!--첫번째 그래프-->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container1"
,
{
chart
:
{
...
...
@@ -52,7 +52,7 @@
var
series
=
this
.
series
[
0
];
setInterval
(
function
()
{
var
x
=
new
Date
().
getTime
(),
// 현재 시간
y
=
0.7
//여기에 새로 넣을 값
y
=
0.7
;
//여기에 새로 넣을 값
series
.
addPoint
([
x
,
y
],
true
,
true
);
},
1000
);
//1000=1초 -> 1분=60000
}
...
...
@@ -64,7 +64,7 @@
},
title
:
{
text
:
"
환또기바보
"
text
:
"
실시간 사망률
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -104,14 +104,14 @@
},
series
:
[
{
name
:
"사망률
(%)
"
,
name
:
"사망률"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
time
=
new
Date
().
getTime
(),
i
;
for
(
i
=
-
1
9
;
i
<=
0
;
i
+=
1
)
{
for
(
i
=
-
9
;
i
<=
0
;
i
+=
1
)
{
data
.
push
({
x
:
time
+
i
*
1000
,
y
:
0
...
...
@@ -122,7 +122,10 @@
}
]
});
</script>
<!--두번째 그래프-->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container2"
,
{
chart
:
{
type
:
"spline"
,
...
...
@@ -146,7 +149,7 @@
},
title
:
{
text
:
"
실시간 사망률
"
text
:
"
기온
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -186,7 +189,7 @@
},
series
:
[
{
name
:
"
사망률(%)
"
,
name
:
"
기온
"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
...
...
@@ -204,7 +207,10 @@
}
]
});
</script>
<!--세번째 그래프-->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container3"
,
{
chart
:
{
type
:
"spline"
,
...
...
@@ -228,7 +234,7 @@
},
title
:
{
text
:
"
실시간 사망률
"
text
:
"
풍속
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -268,7 +274,7 @@
},
series
:
[
{
name
:
"
사망률(%)
"
,
name
:
"
풍속
"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
...
...
@@ -286,7 +292,10 @@
}
]
});
</script>
<!--네번째 그래프-->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container4"
,
{
chart
:
{
type
:
"spline"
,
...
...
@@ -310,7 +319,7 @@
},
title
:
{
text
:
"
실시간 사망률
"
text
:
"
강수량
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -350,7 +359,7 @@
},
series
:
[
{
name
:
"
사망률(%)
"
,
name
:
"
강수량
"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
...
...
@@ -368,7 +377,6 @@
}
]
});
</script>
</body>
</html>
...
...
views/index.ejs
View file @
34471c4
...
...
@@ -17,7 +17,7 @@
style=
"width:1260px; height: 400px; margin: 0 auto"
></div>
<div
style=
"width:1275px; margin:0 auto;"
>
<div
style=
"width:1275px; margin:0 auto;"
>
<div
style=
"display: inline-block;"
>
<div
id=
"container2"
...
...
@@ -37,9 +37,9 @@
style=
"width:400px; height: 300px; padding:0; margin-left:0px;"
></div>
</div>
</div>
</div>
<!-- 첫번째 그래프 -->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container1"
,
{
chart
:
{
...
...
@@ -52,9 +52,9 @@
var
series
=
this
.
series
[
0
];
setInterval
(
function
()
{
var
x
=
new
Date
().
getTime
(),
// 현재 시간
y
=
0.7
//여기에 새로 넣을 값
y
=
0.7
;
//여기에 새로 넣을 값
series
.
addPoint
([
x
,
y
],
true
,
true
);
},
1
000
);
//1000=1초 -> 1분=60000
},
60
000
);
//1000=1초 -> 1분=60000
}
}
},
...
...
@@ -104,16 +104,41 @@
},
series
:
[
{
name
:
"사망률
(%)
"
,
name
:
"사망률"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
time
=
new
Date
().
getTime
(),
i
;
var
deathArr
=
new
Arr
();
length
=
<%=
dataLen
%>
;
var
i
=-
9
;
for
(
var
i
;
i
<
length
;
i
++
)
{
deathArr
.
push
({
x
:
time
+
i
*
60000
,
y
:
0
})
}
<%
probArr
.
forEach
((
probArr
)
=>
{
%>
temp
;
temp
=
<%=
probArr
%>
;
for
(
var
j
=
length
;
i
<
10
;
j
++
)
{
deathArr
.
push
({
x
:
time
+
j
*
60000
,
y
:
})
}
<%
})
%>
for
(
i
=
-
19
;
i
<=
0
;
i
+=
1
)
{
data
.
push
({
x
:
time
+
i
*
1
000
,
x
:
time
+
i
*
60
000
,
y
:
0
});
}
...
...
@@ -122,7 +147,10 @@
}
]
});
</script>
<!-- 두번째 그래프 -->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container2"
,
{
chart
:
{
type
:
"spline"
,
...
...
@@ -146,7 +174,7 @@
},
title
:
{
text
:
"
실시간 사망률
"
text
:
"
기온
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -186,7 +214,7 @@
},
series
:
[
{
name
:
"
사망률(%)
"
,
name
:
"
기온
"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
...
...
@@ -204,7 +232,10 @@
}
]
});
</script>
<!-- 세번째 그래프 -->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container3"
,
{
chart
:
{
type
:
"spline"
,
...
...
@@ -228,7 +259,7 @@
},
title
:
{
text
:
"
실시간 사망률
"
text
:
"
풍속
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -268,7 +299,7 @@
},
series
:
[
{
name
:
"
사망률(%)
"
,
name
:
"
풍속
"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
...
...
@@ -286,7 +317,10 @@
}
]
});
</script>
<!-- 네번째 그래프 -->
<script
type=
"text/javascript"
>
Highcharts
.
chart
(
"container4"
,
{
chart
:
{
type
:
"spline"
,
...
...
@@ -310,7 +344,7 @@
},
title
:
{
text
:
"
실시간 사망률
"
text
:
"
강수량
"
},
xAxis
:
{
type
:
"datetime"
,
...
...
@@ -350,7 +384,7 @@
},
series
:
[
{
name
:
"
사망률(%)
"
,
name
:
"
강수량
"
,
data
:
(
function
()
{
// generate an array of random data
var
data
=
[],
...
...
@@ -368,7 +402,6 @@
}
]
});
</script>
</body>
</html>
...
...
Please
register
or
login
to post a comment