Graph CSS fixes

This commit is contained in:
Magnus Åhall 2024-06-27 09:14:02 +02:00
parent 617e025be4
commit 4b21b0ac07
4 changed files with 18 additions and 9 deletions

View File

@ -69,6 +69,8 @@
}
.graph {
width: 99%;
height: 600px;
border: 1px solid #fff;
border: 1px solid #aaa;
}
.graph #graph-values {
height: 600px;
}

View File

@ -69,6 +69,8 @@
}
.graph {
width: 99%;
height: 600px;
border: 1px solid #fff;
border: 1px solid #aaa;
}
.graph #graph-values {
height: 600px;
}

View File

@ -84,6 +84,9 @@
.graph {
width: 99%;
height: 600px;
border: 1px solid #fff;
border: 1px solid #aaa;
#graph-values {
height: 600px;
}
}

View File

@ -21,14 +21,16 @@
<br><br>
{{ if $graph }}
<div class="graph" id="tester"></div>
<div class="graph">
<div id="graph-values"></div>
</div>
<script type="text/javascript">
const tester = document.getElementById('tester');
const graphValues = document.getElementById('graph-values');
let data = {{ .Data }}
let x = data.Values.map(d => d.Ts)
let y = data.Values.map(d => d.ValueInt.Int64)
Plotly.newPlot(
tester,
graphValues,
[
{
x,