aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2022-01-02 22:46:48 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2022-01-02 22:46:48 +0100
commit3ab48fa399bca4fb2b13b0f1cd913b620beac664 (patch)
tree2b0ca312113b623c28086545011a8c2f9f2957c0
parentAdded new blueprint for future stats and added a new (diff)
downloadnewspipe-3ab48fa399bca4fb2b13b0f1cd913b620beac664.tar.gz
newspipe-3ab48fa399bca4fb2b13b0f1cd913b620beac664.tar.bz2
newspipe-3ab48fa399bca4fb2b13b0f1cd913b620beac664.zip
Improved bar chart for the history of articles.
-rw-r--r--newspipe/templates/history.html17
1 files 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) => {
bgstack15