fix linting issues
This commit is contained in:
parent
36ceb0d1fa
commit
b0694ce8c1
@ -83,7 +83,7 @@ function createResourceUsageChart (container, resourceName, resourceAvail, resou
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
breakpoint: 680
|
breakpoint: 680
|
||||||
}
|
};
|
||||||
chart.style = "margin: 10px;";
|
chart.style = "margin: 10px;";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ class ResourceChart extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set data (data) {
|
set data (data) {
|
||||||
for (let line of data.title) {
|
for (const line of data.title) {
|
||||||
this.caption.innerHTML += `<span>${line}</span>`
|
this.caption.innerHTML += `<span>${line}</span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.canvas.role = "img";
|
this.canvas.role = "img";
|
||||||
@ -87,9 +87,9 @@ class ResourceChart extends HTMLElement {
|
|||||||
else {
|
else {
|
||||||
updateTooltipShow(e.chart, true);
|
updateTooltipShow(e.chart, true);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.chart = createChart(this.canvas, chartData);
|
this.chart = createChart(this.canvas, chartData);
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ class ResourceChart extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createChart (ctx, data) {
|
function createChart (ctx, data) {
|
||||||
return new Chart(ctx, data);
|
return new window.Chart(ctx, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is a really bad way to do this, but chartjs api does not expose many ways to dynamically set hover and tooltip options
|
// this is a really bad way to do this, but chartjs api does not expose many ways to dynamically set hover and tooltip options
|
||||||
|
Loading…
Reference in New Issue
Block a user