Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michał Woźniak
covid
Commits
197c6aa9
Commit
197c6aa9
authored
Apr 10, 2020
by
Michał Woźniak
Browse files
minor fixes for chart ticks min/max
parent
ee6feeec
Changes
1
Hide whitespace changes
Inline
Side-by-side
covid.js
View file @
197c6aa9
...
...
@@ -1252,7 +1252,7 @@ let updateChartSettings = () => {
}
else
{
var
chart_type_factor
=
1.1
}
theChart
.
options
.
scales
.
yAxes
[
0
].
ticks
.
max
=
max_cases
*
chart_type_factor
theChart
.
options
.
scales
.
yAxes
[
0
].
ticks
.
max
=
Math
.
round
(
max_cases
*
chart_type_factor
)
var
chart_start_setting
=
document
.
querySelector
(
'
input[type=radio][name=chart-start]:checked
'
).
value
if
(
chart_start_setting
===
"
date
"
)
{
...
...
@@ -1280,7 +1280,7 @@ let updateChartSettings = () => {
// showing new confirmed cases / recoveries / deaths / active cases
// notice: *new active cases* can be *negative!*
}
else
{
theChart
.
options
.
scales
.
yAxes
[
0
].
ticks
.
min
=
min_cases
*
chart_type_factor
theChart
.
options
.
scales
.
yAxes
[
0
].
ticks
.
min
=
Math
.
round
(
min_cases
*
chart_type_factor
)
theChart
.
options
.
scales
.
yAxes
[
0
].
scaleLabel
.
labelString
+=
"
, new
"
}
...
...
Write
Preview
Supports
Markdown
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