Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
eue
Commits
ea3ce4bf
Commit
ea3ce4bf
authored
Aug 11, 2021
by
KangMin An
Browse files
Update: 시간 표시 갱신.
parent
408fa3ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/src/components/ChartTabs.js
View file @
ea3ce4bf
...
@@ -57,7 +57,13 @@ function ChartTabs() {
...
@@ -57,7 +57,13 @@ function ChartTabs() {
new
Date
(
userWeather
[
i
].
collected_at
).
getTime
()
new
Date
(
userWeather
[
i
].
collected_at
).
getTime
()
);
);
tempLabelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
`
);
tempLabelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()
<
10
?
`0
${
date
.
getMinutes
()}
`
:
date
.
getMinutes
()
}
`
);
labelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
`
);
labelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
`
);
}
}
for
(
let
j
=
0
;
j
<
userWeatherPredict
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
userWeatherPredict
.
length
;
j
++
)
{
...
@@ -65,7 +71,13 @@ function ChartTabs() {
...
@@ -65,7 +71,13 @@ function ChartTabs() {
let
date
=
new
Date
(
let
date
=
new
Date
(
new
Date
(
userWeatherPredict
[
j
].
collected_at
).
getTime
()
new
Date
(
userWeatherPredict
[
j
].
collected_at
).
getTime
()
);
);
tempLabelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
`
);
tempLabelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()
<
10
?
`0
${
date
.
getMinutes
()}
`
:
date
.
getMinutes
()
}
`
);
}
}
setTemp
(
tempArray
);
setTemp
(
tempArray
);
...
@@ -96,8 +108,20 @@ function ChartTabs() {
...
@@ -96,8 +108,20 @@ function ChartTabs() {
let
date
=
new
Date
(
new
Date
(
outWeather
[
i
].
collected_at
).
getTime
());
let
date
=
new
Date
(
new
Date
(
outWeather
[
i
].
collected_at
).
getTime
());
tempLabelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
`
);
tempLabelArray
.
push
(
labelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()}
`
);
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()
<
10
?
`0
${
date
.
getMinutes
()}
`
:
date
.
getMinutes
()
}
`
);
labelArray
.
push
(
`
${
date
.
getHours
()}
:
${
date
.
getMinutes
()
<
10
?
`0
${
date
.
getMinutes
()}
`
:
date
.
getMinutes
()
}
`
);
}
}
setTemp
(
tempArray
);
setTemp
(
tempArray
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment