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

linear graph always for active:new and cfr:new

parent f01d8b87
......@@ -1441,12 +1441,16 @@ let updateChartSettings = () => {
}
}
// get the y-axis type from the controls
theChart.options.scales.yAxes[0].type = document.querySelector('input[type=radio][name=chart-type]:checked').value
// which dataset are we using? confirmed, recovered, deaths, active, cfr?
var chart_dataset = document.querySelector('input[type=radio][name=chart-data]:checked').value
// get the y-axis type from the controls
if ( (document.querySelector('input[type=radio][name=chart-cases]:checked').value === "new") && ( (chart_dataset === 'cfr') || (chart_dataset === 'active') ) ) {
theChart.options.scales.yAxes[0].type = "linear"
} else {
theChart.options.scales.yAxes[0].type = document.querySelector('input[type=radio][name=chart-type]:checked').value
}
// for cfr, start with min=0, max=1
// also, no guidelines
if (chart_dataset === 'cfr') {
......
Markdown is supported
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