refactoring
This commit is contained in:
@@ -3,13 +3,15 @@ class HistogramView {
|
||||
constructor() {
|
||||
}
|
||||
|
||||
show(batchcode, div) {
|
||||
show(batchcode, uiContainer) {
|
||||
fetch(`data/histograms/${batchcode}.json`)
|
||||
.then(response => response.json())
|
||||
.then(json => {
|
||||
const data = json.histograms[3].histogram;
|
||||
const canvas = document.createElement("canvas");
|
||||
uiContainer.appendChild(canvas);
|
||||
new Chart(
|
||||
div.querySelector('#symptomByBatchcodeHisto'),
|
||||
canvas,
|
||||
{
|
||||
type: 'bar',
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user