fix bugs
This commit is contained in:
@@ -563,11 +563,11 @@ function renderProgramTrend(rows = []) {
|
||||
|
||||
}),
|
||||
|
||||
color: '#d21919'
|
||||
color: '#ef4444'
|
||||
},
|
||||
|
||||
{
|
||||
label: 'COVID-19 %',
|
||||
label: 'SARS-CoV-2 %',
|
||||
|
||||
data: labels.map(label => {
|
||||
|
||||
@@ -843,12 +843,10 @@ function renderAFITrend(
|
||||
|
|
||||
*/
|
||||
|
||||
const donutTotal =
|
||||
|
||||
totalCases.reduce(
|
||||
(a, b) => a + b,
|
||||
0
|
||||
);
|
||||
const donutTotal = rows.reduce(
|
||||
(sum, row) => sum + Number(row.total_positive || 0),
|
||||
0
|
||||
);
|
||||
|
||||
if (Charts.charts[canvasId]) {
|
||||
|
||||
@@ -946,6 +944,11 @@ function renderSentinel(rows = []) {
|
||||
}
|
||||
function renderSubtypeChart(rows = []) {
|
||||
|
||||
rows.forEach(row => {
|
||||
if (row.subtype === 'B/VIC') {
|
||||
row.subtype = 'B/Vic';
|
||||
}
|
||||
});
|
||||
|
||||
Charts.buildDistributionChart(
|
||||
'subtypeChart',
|
||||
|
||||
Reference in New Issue
Block a user