Update get-gov-reports.js

This commit is contained in:
zandercymatics 2025-02-10 14:07:41 -07:00
parent e900255e68
commit 12fa9548a1
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -59,7 +59,6 @@
/** An IIFE to initialize the analytics page
*/
(function () {
// Store chart instances globally within this IIFE
const chartInstances = new Map();
function createComparativeColumnChart(canvasId, title, labelOne, labelTwo) {
var canvas = document.getElementById(canvasId);
@ -117,12 +116,10 @@
},
};
// Destroy existing chart instance if it exists
if (chartInstances.has(canvasId)) {
chartInstances.get(canvasId).destroy();
}
// Create and store new chart instance
const chart = new Chart(ctx, {
type: "bar",
data: data,