Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/assets/js/alter_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`;
}
}
},
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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);
});
}
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/epiportal/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand Down
16 changes: 2 additions & 14 deletions src/templates/alternative_interface/alter_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<div class="col-lg-12">
<h1 class="hero-title">Respiratory Diseases Dashboard</h1>
<p class="hero-subtitle">
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.
</p>
</div>
</div>
Expand Down Expand Up @@ -115,8 +115,7 @@ <h1 class="hero-title">Respiratory Diseases Dashboard</h1>
<!-- Chart Section -->
<div class="chart-section">
<div class="card-header">
<h5 class="card-title">Indicator Visualization</h5>
<p class="text-muted mb-0">Visualize trends and patterns</p>
<h3 class="card-title text-center" id="chartTitle"></h3>
</div>
<div class="chart-container-wrapper">
<!-- Chart Interaction Hint -->
Expand Down Expand Up @@ -189,17 +188,6 @@ <h5 class="card-title">Indicator Visualization</h5>
{% endfor %}
];

// Pass geography names for typing animation (limited to 25)
window.geographyNames = [];
{% for geography in available_geos %}
{% for child in geography.children %}
window.geographyNames.push("{{ child.text }}");
{% endfor %}
{% endfor %}
// Limit to 25 total
if (window.geographyNames.length > 25) {
window.geographyNames = window.geographyNames.slice(0, 25);
}
</script>

<!-- Custom JavaScript -->
Expand Down
Loading