From 7cf27ecfd4bfab6c9ca82a7f55daff3d4aa29c5e Mon Sep 17 00:00:00 2001 From: Michelle Bourdon Date: Fri, 28 Jun 2024 13:41:32 -0400 Subject: [PATCH] descriptions2 --- script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 18ccd8b..0a52353 100644 --- a/script.js +++ b/script.js @@ -2,9 +2,9 @@ google.charts.load('current', {'packages':['treemap']}); google.charts.setOnLoadCallback(drawChart); const itemDescriptions = { - 'MassHealth': 'Description for Item 1', - 'Item2': 'Description for Item 2', - 'Item3': 'Description for Item 3', + 'MassHealth': 'Description for Healthcare services', + 'TAFDC': 'Description for Education services', + 'Transportation': 'Description for Transportation services', // Add more items and descriptions as needed }; @@ -24,6 +24,7 @@ function drawChart() { var selection = chart.getSelection(); if (selection.length > 0) { var item = data.getValue(selection[0].row, 0); + console.log('Selected item:', item); // Debug log var description = itemDescriptions[item] || 'No description available for ' + item; document.getElementById('info').innerText = description; chart.setSelection([]); // Clear the selection to prevent zooming