Skip to content

Commit 2886f9e

Browse files
authored
Merge pull request #232 from cmu-delphi/development
Development
2 parents 57b8174 + 0e90bc6 commit 2886f9e

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

src/assets/js/alter_dashboard.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ class AlterDashboard {
653653
if (value === null || value === undefined || Number.isNaN(value)) {
654654
return `${label}: n/a`;
655655
}
656-
return `${label}: ${value.toFixed(1)}%`;
656+
return `${label}: ${value.toFixed(1)}`;
657657
}
658658
}
659659
},
@@ -722,11 +722,11 @@ class AlterDashboard {
722722
ticks: {
723723
font: { size: 11 },
724724
color: '#64748b',
725-
callback: (value) => `${value.toFixed(0)}%`
725+
callback: (value) => `${value.toFixed(0)}`
726726
},
727727
title: {
728728
display: true,
729-
text: 'Scaled value (%)',
729+
text: 'Scaled value',
730730
font: { size: 12, weight: '500' },
731731
color: '#64748b',
732732
padding: { top: 5, bottom: 5 }
@@ -1069,7 +1069,7 @@ async function handlePathogenChange() {
10691069
if (data.available_geos && Array.isArray(data.available_geos)) {
10701070
data.available_geos.forEach(group => {
10711071
if (group.children && Array.isArray(group.children)) {
1072-
group.children.forEach(child => {
1072+
group.children.slice(0, parseInt(MAX_GEOGRAPHY_NAMES / data.available_geos.length)).forEach(child => {
10731073
window.geographyNames.push(child.text);
10741074
});
10751075
}
@@ -1142,6 +1142,9 @@ async function handleGeographyChange() {
11421142

11431143
if (data.chart_data && dashboard) {
11441144
dashboard.updateChart(data.chart_data);
1145+
document.getElementById('chartTitle').textContent = `${selectedPathogen} in ${geographySelect.options[geographySelect.selectedIndex].text}`;
1146+
} else {
1147+
document.getElementById('chartTitle').textContent = '';
11451148
}
11461149

11471150
} catch (error) {

src/epiportal/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from sentry_sdk.integrations.redis import RedisIntegration
2626

2727
APP_VERSION = "1.0.14"
28-
ALTERNATIVE_INTERFACE_VERSION = "1.0.4"
28+
ALTERNATIVE_INTERFACE_VERSION = "1.0.5"
2929

3030

3131
EPIVIS_URL = os.environ.get("EPIVIS_URL", "https://delphi.cmu.edu/epivis/")

src/templates/alternative_interface/alter_dashboard.html

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<div class="col-lg-12">
6565
<h1 class="hero-title">Respiratory Diseases Dashboard</h1>
6666
<p class="hero-subtitle">
67-
Track COVID-19, influenza, and RSV activity across the United States with real-time data from multiple sources.
67+
Track COVID-19, influenza, RSV and other viral activity anywhere in the United States with real-time data from multiple sources.
6868
</p>
6969
</div>
7070
</div>
@@ -115,8 +115,7 @@ <h1 class="hero-title">Respiratory Diseases Dashboard</h1>
115115
<!-- Chart Section -->
116116
<div class="chart-section">
117117
<div class="card-header">
118-
<h5 class="card-title">Indicator Visualization</h5>
119-
<p class="text-muted mb-0">Visualize trends and patterns</p>
118+
<h3 class="card-title text-center" id="chartTitle"></h3>
120119
</div>
121120
<div class="chart-container-wrapper">
122121
<!-- Chart Interaction Hint -->
@@ -189,17 +188,6 @@ <h5 class="card-title">Indicator Visualization</h5>
189188
{% endfor %}
190189
];
191190

192-
// Pass geography names for typing animation (limited to 25)
193-
window.geographyNames = [];
194-
{% for geography in available_geos %}
195-
{% for child in geography.children %}
196-
window.geographyNames.push("{{ child.text }}");
197-
{% endfor %}
198-
{% endfor %}
199-
// Limit to 25 total
200-
if (window.geographyNames.length > 25) {
201-
window.geographyNames = window.geographyNames.slice(0, 25);
202-
}
203191
</script>
204192

205193
<!-- Custom JavaScript -->

0 commit comments

Comments
 (0)