From b70a9b7ed2f5ebea9d35d9bdf4a666b8cfdce29b Mon Sep 17 00:00:00 2001 From: user Date: Sat, 23 Mar 2024 22:24:06 +0100 Subject: chart stacked grouped by ip address --- src/static/histogram.js | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) (limited to 'src/static') 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 + } + } + } }); -- cgit v1.2.3