refactoring
This commit is contained in:
@@ -24,15 +24,14 @@ class HistogramView {
|
|||||||
|
|
||||||
#displayHistograms(histoDescrs) {
|
#displayHistograms(histoDescrs) {
|
||||||
for (const histoDescr of histoDescrs.histograms) {
|
for (const histoDescr of histoDescrs.histograms) {
|
||||||
const canvas = document.createElement("canvas");
|
this.#uiContainer.appendChild(this.#createHistogram(histoDescr).canvas);
|
||||||
this.#uiContainer.appendChild(canvas);
|
|
||||||
this.#displayHistogram(histoDescr, canvas);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#displayHistogram(histoDescr, canvas) {
|
#createHistogram(histoDescr) {
|
||||||
// FK-TODO: brauchen Slider wie bei intensivstationen
|
// FK-TODO: brauchen Slider wie bei intensivstationen
|
||||||
new Chart(
|
const canvas = document.createElement("canvas");
|
||||||
|
return new Chart(
|
||||||
canvas,
|
canvas,
|
||||||
{
|
{
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
|
|||||||
Reference in New Issue
Block a user