From 3ab48fa399bca4fb2b13b0f1cd913b620beac664 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 2 Jan 2022 22:46:48 +0100 Subject: Improved bar chart for the history of articles. --- newspipe/templates/history.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/newspipe/templates/history.html b/newspipe/templates/history.html index 35712ca3..6ff5b537 100644 --- a/newspipe/templates/history.html +++ b/newspipe/templates/history.html @@ -83,15 +83,18 @@ data: { labels: labels, datasets: [{ - label: 'History of aggregated articles.', + label: 'Number of aggregated articles', data: Object.values(result), borderWidth: 1, backgroundColor: colors }], }, options: { + title: { + display: true, + text: 'Number of aggregated articles' + }, responsive: true, - maintainAspectRatio: false, onClick: function(evt) { const points = myChart.getElementsAtEventForMode(evt, 'nearest', { intersect: true }, true); if (points.length) { @@ -107,6 +110,16 @@ } } } + }, + scales: { + x: { + display: true, + }, + y: { + display: true, + beginAtZero: true, + type: 'logarithmic', + } } }); }).catch((error) => { -- cgit