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

a bit of explanation in the comments

parent 71971630
......@@ -1445,8 +1445,10 @@ let updateChartSettings = () => {
var chart_dataset = document.querySelector('input[type=radio][name=chart-data]:checked').value
// get the y-axis type from the controls
// for datasets active and cfr, deltas can only be graphed on linear scale, since they can (and will) get negative
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"
// for everything else, just heed the user setting
} else {
theChart.options.scales.yAxes[0].type = document.querySelector('input[type=radio][name=chart-type]:checked').value
}
......
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