diff options
| author | Paul-Christian Volkmer | 2023-07-26 09:34:05 +0200 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2023-07-26 09:39:31 +0200 |
| commit | 5c6384e878318c0e86ed8bf59a973a063ab13f63 (patch) | |
| tree | 2d985e086da43024e9ef411f3c112b81668826b6 /src/main/resources/templates/statistics.html | |
| parent | 26312c86205681723dd8a9c249e886c8655aa078 (diff) | |
Add statistics for state per patient
Diffstat (limited to 'src/main/resources/templates/statistics.html')
| -rw-r--r-- | src/main/resources/templates/statistics.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/main/resources/templates/statistics.html b/src/main/resources/templates/statistics.html index 007303e..752b768 100644 --- a/src/main/resources/templates/statistics.html +++ b/src/main/resources/templates/statistics.html @@ -10,20 +10,27 @@ <main> <h1>Statistiken</h1> - <div id="piechart" class="chart" style="width: 320px; height: 320px; display: inline-block"></div> - <div id="barchart" class="chart" style="width: 720px; height: 320px; display: inline-block"></div> + <div> + <div id="piechart1" class="chart chart-50pc"></div> + <div id="piechart2" class="chart chart-50pc"></div> + </div> + <div id="barchart" class="chart"></div> </main> <script th:src="@{/echarts.min.js}"></script> <script th:src="@{/scripts.js}"></script> <script> window.onload = () => { - drawPieChart('statistics/requeststates', 'piechart', 'Statusverteilung aller Anfragen'); + drawPieChart('statistics/requeststates', 'piechart1', 'Statusverteilung aller Anfragen'); + drawPieChart('statistics/requestpatientstates', 'piechart2', 'Statusverteilung nach Patient'); drawBarChart('statistics/requestslastmonth', 'barchart', 'Anfragen der letzten 30 Tage'); const eventSource = new EventSource('statistics/events'); eventSource.addEventListener('requeststates', event => { - drawPieChart('statistics/requeststates', 'piechart', 'Statusverteilung aller Anfragen', JSON.parse(event.data)); + drawPieChart('statistics/requeststates', 'piechart1', 'Statusverteilung aller Anfragen', JSON.parse(event.data)); + }); + eventSource.addEventListener('requestpatientstates', event => { + drawPieChart('statistics/requestpatientstates', 'piechart2', 'Statusverteilung nach Patient', JSON.parse(event.data)); }); eventSource.addEventListener('requestslastmonth', event => { drawBarChart('statistics/requestslastmonth', 'barchart', 'Anfragen des letzten Monats', JSON.parse(event.data)); |
