88 lines
3.5 KiB
Plaintext
88 lines
3.5 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<base href="/" />
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
|
|
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
|
|
|
|
<ResourcePreloader />
|
|
<link rel="stylesheet" href="@Assets["lib/bootstrap/dist/css/bootstrap.min.css"]" />
|
|
<link rel="stylesheet" href="@Assets["app.css"]" />
|
|
<link rel="stylesheet" href="@Assets["ZahlenAnalyse.Web.styles.css"]" />
|
|
<ImportMap />
|
|
<link rel="icon" type="image/png" href="favicon.png" />
|
|
<HeadOutlet @rendermode="InteractiveServer" />
|
|
|
|
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
|
<script>
|
|
// Wir merken uns die Daten global für den Vollbild-Wechsel
|
|
window._sankeyData = null;
|
|
window._sankeyElementId = null;
|
|
|
|
window.drawSankeyChart = function (elementId, dataArray) {
|
|
window._sankeyData = dataArray;
|
|
window._sankeyElementId = elementId;
|
|
|
|
google.charts.load('current', {'packages':['sankey']});
|
|
google.charts.setOnLoadCallback(function() {
|
|
var data = new google.visualization.DataTable();
|
|
data.addColumn('string', 'Von');
|
|
data.addColumn('string', 'Nach');
|
|
data.addColumn('number', 'Betrag');
|
|
data.addRows(dataArray);
|
|
|
|
var options = {
|
|
backgroundColor: 'transparent',
|
|
sankey: {
|
|
node: {
|
|
nodePadding: 20,
|
|
colors: ['#3b82f6', '#10b981', '#f59e0b', '#ef4444', '#8b5cf6'],
|
|
label: { color: '#ffffff', fontName: 'Urbanist', fontSize: 14, bold: true }
|
|
},
|
|
link: { colorMode: 'gradient' }
|
|
}
|
|
};
|
|
|
|
var chart = new google.visualization.Sankey(document.getElementById(elementId));
|
|
chart.draw(data, options);
|
|
});
|
|
};
|
|
|
|
// NEU: Wenn sich das Fenster (oder Vollbild) ändert, zeichne neu!
|
|
window.addEventListener('resize', function() {
|
|
if (window._sankeyData && window._sankeyElementId && document.getElementById(window._sankeyElementId)) {
|
|
clearTimeout(window._resizeTimer);
|
|
window._resizeTimer = setTimeout(function() {
|
|
window.drawSankeyChart(window._sankeyElementId, window._sankeyData);
|
|
}, 100); // Minimaler Delay für weiche Übergänge
|
|
}
|
|
});
|
|
|
|
// NEU: Die Fullscreen-Umschaltung
|
|
window.toggleFullscreen = function (elementId) {
|
|
var elem = document.getElementById(elementId);
|
|
if (!document.fullscreenElement) {
|
|
elem.requestFullscreen().catch(err => console.error(err));
|
|
} else {
|
|
document.exitFullscreen();
|
|
}
|
|
};
|
|
</script>
|
|
</head>
|
|
|
|
<body style="background-color: var(--mud-palette-background); color: var(--mud-palette-text-primary);"> <Routes @rendermode="InteractiveServer" />
|
|
<ReconnectModal />
|
|
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
|
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
|
|
</body>
|
|
|
|
</html>
|