diff --git a/dashboard/public/js/dashboard/charts.js b/dashboard/public/js/dashboard/charts.js index aaa62d2..bdda7d7 100644 --- a/dashboard/public/js/dashboard/charts.js +++ b/dashboard/public/js/dashboard/charts.js @@ -240,12 +240,12 @@ function buildChart(id, type, labels, data) { x: { beginAtZero: true, grid: { - display: false // cleaner look + display: false } }, y: { grid: { - color: '#f3f4f6' // subtle grid + color: '#f3f4f6' } } }; @@ -392,114 +392,4 @@ 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 + '%' -// } -// } -// } -// } -// }); -// } \ No newline at end of file +} \ No newline at end of file diff --git a/dashboard/public/js/dashboard/export.js b/dashboard/public/js/dashboard/export.js index f3d5cb3..fbae928 100644 --- a/dashboard/public/js/dashboard/export.js +++ b/dashboard/public/js/dashboard/export.js @@ -87,7 +87,6 @@ async function exportSelectedCharts() { let y = 35; - // ===== HEADER ===== pdf.setFontSize(18); pdf.setFont(undefined, "bold"); pdf.text(getReportTitle(), margin, 15); @@ -99,7 +98,6 @@ async function exportSelectedCharts() { pdf.setDrawColor(200); pdf.line(margin, 25, pageWidth - margin, 25); - // ===== PREPARE ITEMS ===== const items = []; for (const cb of selected) { diff --git a/dashboard/resources/views/dashboard/overview.blade.php b/dashboard/resources/views/dashboard/overview.blade.php index 037d1f5..92f6985 100644 --- a/dashboard/resources/views/dashboard/overview.blade.php +++ b/dashboard/resources/views/dashboard/overview.blade.php @@ -4,7 +4,6 @@