The charts works fine, but the total varies and it gets filled quickly, see
I need to be able to add + % to the max
I tried:
var scalesMaxTotalCasesTrend =(Math.max(...customConfirmed) * 1.1 ).toFixed(0);
var scalesMaxTotalPositiveTrend = (Math.max(...totPositivi) * 1.1 ).toFixed(0);
var scalesMaxIsolationTrend = (Math.max(...totIsolamento) * 1.1 ).toFixed(0);
var scalesMaxHospitalizationTrend = (Math.max(...totRicoverati) * 1.1 ).toFixed(0);
var scalesMaxHospitalizationWithSymptomsTrend = (Math.max(...totRicoveratiConSintomi) * 1.1 ).toFixed(0);
var scalesMaxIntensiveCareTrend = (Math.max(...totTerapiaIntensiva) * 1.1 ).toFixed(0);
But I get
Uncaught TypeError: t.toFixed is not a function
How can I add a % when i do:
ticks: {
beginAtZero: true,
suggestedMin: 0,
max: scalesMax + 50000
}
This is the log I get:
var scalesMaxTotalCasesTrend = Math.max(...customConfirmed);
console.log(scalesMaxTotalCasesTrend);
35788
Tried adding:
max: scalesMax * 1.1
But still not a solution, the chart needs to have more space on the Y axis