diff --git a/src/assets/js/alter_dashboard.js b/src/assets/js/alter_dashboard.js index 47c7032..2cd33fa 100644 --- a/src/assets/js/alter_dashboard.js +++ b/src/assets/js/alter_dashboard.js @@ -653,7 +653,7 @@ class AlterDashboard { if (value === null || value === undefined || Number.isNaN(value)) { return `${label}: n/a`; } - return `${label}: ${value.toFixed(1)}%`; + return `${label}: ${value.toFixed(1)}`; } } }, @@ -722,11 +722,11 @@ class AlterDashboard { ticks: { font: { size: 11 }, color: '#64748b', - callback: (value) => `${value.toFixed(0)}%` + callback: (value) => `${value.toFixed(0)}` }, title: { display: true, - text: 'Scaled value (%)', + text: 'Scaled value', font: { size: 12, weight: '500' }, color: '#64748b', padding: { top: 5, bottom: 5 } @@ -1069,7 +1069,7 @@ async function handlePathogenChange() { if (data.available_geos && Array.isArray(data.available_geos)) { data.available_geos.forEach(group => { if (group.children && Array.isArray(group.children)) { - group.children.forEach(child => { + group.children.slice(0, parseInt(MAX_GEOGRAPHY_NAMES / data.available_geos.length)).forEach(child => { window.geographyNames.push(child.text); }); } @@ -1142,6 +1142,9 @@ async function handleGeographyChange() { if (data.chart_data && dashboard) { dashboard.updateChart(data.chart_data); + document.getElementById('chartTitle').textContent = `${selectedPathogen} in ${geographySelect.options[geographySelect.selectedIndex].text}`; + } else { + document.getElementById('chartTitle').textContent = ''; } } catch (error) { diff --git a/src/epiportal/settings.py b/src/epiportal/settings.py index 4bc3b5e..dec8618 100644 --- a/src/epiportal/settings.py +++ b/src/epiportal/settings.py @@ -25,7 +25,7 @@ from sentry_sdk.integrations.redis import RedisIntegration APP_VERSION = "1.0.14" -ALTERNATIVE_INTERFACE_VERSION = "1.0.4" +ALTERNATIVE_INTERFACE_VERSION = "1.0.5" EPIVIS_URL = os.environ.get("EPIVIS_URL", "https://delphi.cmu.edu/epivis/") diff --git a/src/templates/alternative_interface/alter_dashboard.html b/src/templates/alternative_interface/alter_dashboard.html index f2c1427..f71c2bf 100644 --- a/src/templates/alternative_interface/alter_dashboard.html +++ b/src/templates/alternative_interface/alter_dashboard.html @@ -64,7 +64,7 @@
- Track COVID-19, influenza, and RSV activity across the United States with real-time data from multiple sources. + Track COVID-19, influenza, RSV and other viral activity anywhere in the United States with real-time data from multiple sources.
Visualize trends and patterns
+