diff options
| author | user <user@node5.net> | 2024-03-23 22:24:06 +0100 |
|---|---|---|
| committer | user <user@node5.net> | 2024-03-23 22:24:06 +0100 |
| commit | b70a9b7ed2f5ebea9d35d9bdf4a666b8cfdce29b (patch) | |
| tree | 3d20ef20b2835e004489b01f853c861350a2b14a /src/static/histogram.js | |
| parent | e06d7f926833d6fba19e57cb2211696e0bdbc6ad (diff) | |
chart stacked grouped by ip address
Diffstat (limited to 'src/static/histogram.js')
| -rw-r--r-- | src/static/histogram.js | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/static/histogram.js b/src/static/histogram.js index ce84bea..c65efd2 100644 --- a/src/static/histogram.js +++ b/src/static/histogram.js @@ -3,15 +3,30 @@ var ctx = document.getElementById("histogram"); var myChart = new Chart(ctx, { type: "line", options: { - aspectRatio: 5, + aspectRatio: 4, }, - data: { - labels: labels, - datasets: [ - { - label: "SSH Login attempts", - data: data, - }, - ], - }, + data: { + labels: labels, + datasets: datasets + }, + options: { + scales: { + y: { + stacked: true, + beginAtZero: true, + title: { + display: true, + text: 'Page Views' + } + }, + }, + layout: { + padding: { + left: 20, + right: 20, + top: 20, + bottom: 20 + } + } + } }); |
