fix bugs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { COLORS, SUBTYPE_COLORS } from "./globals.js";
|
||||
import * as Charts from "./dashboard/globals.js";
|
||||
|
||||
let sequencingTotalChart;
|
||||
let covidLineageFrequencyChart;
|
||||
@@ -70,7 +70,7 @@ function renderSequencingTotalChart(rows) {
|
||||
|
||||
}
|
||||
});
|
||||
charts['sequencingTotalChart'] = sequencingTotalChart;
|
||||
Charts.charts['sequencingTotalChart'] = sequencingTotalChart;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ function loadCovidLineageFrequency(periodType, startYear, startWeek, endYear, en
|
||||
// borderColor: 'transparent',
|
||||
borderWidth: 0,
|
||||
pointRadius: 0,
|
||||
backgroundColor: hexToRGBA(COLORS[index % COLORS.length], 0.3),
|
||||
backgroundColor: hexToRGBA(Charts.COLORS[index % Charts.COLORS.length], 0.3),
|
||||
stack: 'total'
|
||||
};
|
||||
});
|
||||
@@ -203,7 +203,7 @@ function loadCovidLineageFrequency(periodType, startYear, startWeek, endYear, en
|
||||
}
|
||||
}
|
||||
});
|
||||
charts['covidLineageFrequency'] = covidLineageFrequencyChart;
|
||||
Charts.charts['covidLineageFrequency'] = covidLineageFrequencyChart;
|
||||
|
||||
// -------------------------
|
||||
// Custom right-side scrollable legend
|
||||
@@ -284,7 +284,7 @@ function loadInfluenzaSubtypeFrequency(periodType, startYear, startWeek, endYear
|
||||
)];
|
||||
|
||||
const lineageColors = lineages.map(
|
||||
label => SUBTYPE_COLORS[label] || '#9ca3af'
|
||||
label => Charts.SUBTYPE_COLORS[label] || '#9ca3af'
|
||||
);
|
||||
|
||||
const datasets = lineages.map((lineage, index) => {
|
||||
@@ -405,7 +405,7 @@ function loadInfluenzaSubtypeFrequency(periodType, startYear, startWeek, endYear
|
||||
|
||||
});
|
||||
|
||||
charts['influenzaSubtypeFrequency'] =
|
||||
Charts.charts['influenzaSubtypeFrequency'] =
|
||||
influenzaSubtypeFrequencyChart;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user