Commit 197c6aa9 authored by Michał Woźniak's avatar Michał Woźniak
Browse files

minor fixes for chart ticks min/max

parent ee6feeec
......@@ -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"
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment