Better darkmode and chart.js start

This commit is contained in:
krzysztof Płaczek
2026-01-01 10:34:28 +01:00
parent 59c76c8414
commit 1535d450f3
16 changed files with 553 additions and 1685 deletions

34
src/chart.js Executable file
View File

@@ -0,0 +1,34 @@
import Chart from 'chart.js/auto'
const data = [
{year: 2009, count: 10},
{year: 2010, count: NaN},
{year: 2011, count: 20},
{year: 2012, count: 15},
{year: 2013, count: 25},
{year: 2014, count: 22},
{year: 2015, count: 30},
{year: 2016, count: 28},
];
// linechart.data.labels.push(label);
// linechart.data.datasets.forEach((dataset) => {
// dataset.data.push(newData);
// });
// linechart.update();
window.linechart = new Chart(
document.getElementById('acquisitions'),
{
type: 'bar',
data: {
labels: data.map(row => row.year),
datasets: [
{
label: 'Acquisitions by year',
data: data.map(row => row.count)
}
]
}
}
);