mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 13:09:41 +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
|
/** An IIFE to initialize the analytics page
|
||||||
*/
|
*/
|
||||||
(function () {
|
(function () {
|
||||||
// Store chart instances globally within this IIFE
|
|
||||||
const chartInstances = new Map();
|
const chartInstances = new Map();
|
||||||
function createComparativeColumnChart(canvasId, title, labelOne, labelTwo) {
|
function createComparativeColumnChart(canvasId, title, labelOne, labelTwo) {
|
||||||
var canvas = document.getElementById(canvasId);
|
var canvas = document.getElementById(canvasId);
|
||||||
|
@ -117,12 +116,10 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Destroy existing chart instance if it exists
|
|
||||||
if (chartInstances.has(canvasId)) {
|
if (chartInstances.has(canvasId)) {
|
||||||
chartInstances.get(canvasId).destroy();
|
chartInstances.get(canvasId).destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create and store new chart instance
|
|
||||||
const chart = new Chart(ctx, {
|
const chart = new Chart(ctx, {
|
||||||
type: "bar",
|
type: "bar",
|
||||||
data: data,
|
data: data,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue