Skip to content

Commit 344da07

Browse files
committed
Add chart
1 parent b585333 commit 344da07

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

_posts/2025-07-02-this-month-in-servo.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,52 @@ categories:
321321
webdriver
322322
-->
323323

324+
<canvas id="_stats" style="min-height: 400px;"></canvas>
325+
326+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
327+
<script>
328+
const ctx = document.querySelector("#_stats");
329+
330+
new Chart(ctx, {
331+
type: "bar",
332+
data: {
333+
labels: ["2022-01", "2022-02", "2022-03", "2022-04", "2022-05", "2022-06", "2022-07", "2022-08", "2022-09", "2022-10", "2022-11", "2022-12", "2023-01", "2023-02", "2023-03", "2023-04", "2023-05", "2023-06", "2023-07", "2023-08", "2023-09", "2023-10", "2023-11", "2023-12", "2024-01", "2024-02", "2024-03", "2024-04", "2024-05", "2024-06", "2024-07", "2024-08", "2024-09", "2024-10", "2024-11", "2024-12", "2025-01", "2025-02", "2025-03", "2025-04", "2025-05", "2025-06"],
334+
datasets: [{
335+
label: "Merged PRs",
336+
data: [9, 3, 21, 78, 0, 0, 0, 24, 5, 15, 30, 30, 53, 70, 60, 64, 77, 73, 70, 167, 132, 120, 97, 111, 193, 167, 324, 185, 164, 158, 174, 273, 224, 341, 241, 230, 289, 304, 318, 314, 251, 349],
337+
borderWidth: 2
338+
}]
339+
},
340+
options: {
341+
responsive: true,
342+
maintainAspectRatio: false,
343+
scales: {
344+
y: {
345+
beginAtZero: true
346+
},
347+
y1: {
348+
position: "right",
349+
grid: {
350+
drawOnChartArea: false
351+
},
352+
}
353+
},
354+
plugins: {
355+
title: {
356+
display: true,
357+
text: "Pull requests landed each month",
358+
font: {
359+
size: "20pt",
360+
}
361+
},
362+
legend: {
363+
position: 'none',
364+
},
365+
}
366+
}
367+
});
368+
</script>
369+
324370
## Donations
325371

326372
Thanks again for your generous support!

0 commit comments

Comments
 (0)