Dear all,
I want to use chart.js with oh4, preferable as widget.
I created attached static external html-page as xample which is properly displayed by including in a oh-webframe-card.
Does anybody see a chance to dynamically create something like this by a widget?
If not as layout-page, maybe in habpanel?
Thx in advance. o.
<!DOCTYPE html>
<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.js"></script>
<body>
<canvas id="myChart" style="width:100%;max-width:600px"></canvas>
<script>
const xValues = [100,200,300,400,500,600,700,800,900,1000];
new Chart("myChart", {
type: "line",
data: {
datasets: [{
data: [{
x: '2021-11-06 23:39:30',
y: 50
}, {
x: '2021-11-07 01:00:28',
y: 60
}, {
x: '2021-11-07 09:00:28',
y: 20
}]
}],
},
options: {
scales: {
x: {
}
}
}
}
);
</script>