work in progress

This commit is contained in:
2026-04-15 16:32:01 +07:00
parent 6cefcccd10
commit 4e69a28096
3 changed files with 3 additions and 116 deletions

View File

@@ -240,12 +240,12 @@ function buildChart(id, type, labels, data) {
x: { x: {
beginAtZero: true, beginAtZero: true,
grid: { grid: {
display: false // cleaner look display: false
} }
}, },
y: { y: {
grid: { grid: {
color: '#f3f4f6' // subtle grid color: '#f3f4f6'
} }
} }
}; };
@@ -393,113 +393,3 @@ function buildMixedTrendChart(canvasId, labels, samples, fluRate, covidRate) {
} }
}); });
} }
// function buildMixedTrendChart(canvasId, labels, samples, positivity) {
// const ctx = document.getElementById(canvasId);
// if (!ctx) return;
// if (charts[canvasId]) charts[canvasId].destroy();
// charts[canvasId] = new Chart(ctx, {
// data: {
// labels: labels,
// datasets: [
// {
// type: 'line',
// label: '% Positive',
// data: positivity,
// borderColor: '#1e6ef2',
// borderWidth: 2,
// tension: 0.4,
// fill: false,
// pointRadius: 2,
// pointStyle: 'line',
// yAxisID: 'y1',
// },
// {
// type: 'bar',
// label: 'Total sample ',
// data: samples,
// backgroundColor: '#2ecc71',
// borderRadius: 2,
// barPercentage: 0.8,
// categoryPercentage: 0.7,
// yAxisID: 'y',
// }
// ]
// },
// plugins: [ChartDataLabels],
// options: {
// responsive: true,
// maintainAspectRatio: false,
// plugins: {
// legend: {
// position: 'bottom',
// align: 'center',
// labels: {
// usePointStyle: true,
// padding: 20,
// boxWidth: 30,
// font: { size: 12 }
// }
// },
// datalabels: {
// align: "top",
// anchor: "end",
// color: "#555",
// font: {
// size: 10
// },
// formatter: function (value, context) {
// if (Number(value) === 0) return null;
// if (context.dataset.type === 'line') {
// console.log(value);
// return value + '%';
// }
// return value;
// }
// }
// },
// layout: {
// padding: {
// top: 20,
// bottom: 50
// }
// },
// scales: {
// y: {
// position: 'left',
// title: {
// display: true,
// text: 'Total sample'
// }
// },
// y1: {
// position: 'right',
// grid: {
// drawOnChartArea: false
// },
// title: {
// display: true,
// text: '% Positive'
// },
// ticks: {
// callback: value => value + '%'
// }
// }
// }
// }
// });
// }

View File

@@ -87,7 +87,6 @@ async function exportSelectedCharts() {
let y = 35; let y = 35;
// ===== HEADER =====
pdf.setFontSize(18); pdf.setFontSize(18);
pdf.setFont(undefined, "bold"); pdf.setFont(undefined, "bold");
pdf.text(getReportTitle(), margin, 15); pdf.text(getReportTitle(), margin, 15);
@@ -99,7 +98,6 @@ async function exportSelectedCharts() {
pdf.setDrawColor(200); pdf.setDrawColor(200);
pdf.line(margin, 25, pageWidth - margin, 25); pdf.line(margin, 25, pageWidth - margin, 25);
// ===== PREPARE ITEMS =====
const items = []; const items = [];
for (const cb of selected) { for (const cb of selected) {

View File

@@ -4,7 +4,6 @@
<div class="container-fluid"> <div class="container-fluid">
<!-- Page Header -->
<div class="d-flex justify-content-between align-items-center mb-2 flex-shrink-0"> <div class="d-flex justify-content-between align-items-center mb-2 flex-shrink-0">
<div> <div>
<h3 class="fw-bold mb-1">Dashboard Overview</h3> <h3 class="fw-bold mb-1">Dashboard Overview</h3>