mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 16:32:15 +02:00
Update get-gov-reports.js
This commit is contained in:
parent
e900255e68
commit
12fa9548a1
1 changed files with 0 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue