@@ -962,10 +962,10 @@ <h2 class="chart-title">🏛️ Treasury Account</h2>
962962 const isDark = document . documentElement . classList . contains ( 'dark' ) ;
963963
964964 container . innerHTML = `
965- <div class="h-full flex items- center justify-center ${ isDark ? 'bg-slate-700' : 'bg-slate-100' } rounded-lg ">
966- <div class ="text-center">
967- <div class="animate-spin rounded-full h-8 w-8 border-b-2 ${ isDark ? 'border-blue-400' : 'border-blue-600' } mx- auto mb-2 "></div>
968- <div class=" ${ isDark ? 'text-slate-300' : 'text-slate-600' } text-sm ">Loading data...</div>
965+ <div style="height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border-radius: 10px; ">
966+ <div style ="text-align: center; ">
967+ <div class="spinner" style="margin: 0 auto 10px; "></div>
968+ <div style="color: rgba(255,255,255,0.8); font-size: 14px; ">Loading data...</div>
969969 </div>
970970 </div>
971971 ` ;
@@ -976,7 +976,7 @@ <h2 class="chart-title">🏛️ Treasury Account</h2>
976976 if ( ! canvas ) return ;
977977
978978 const container = canvas . parentElement ;
979- const isDark = document . documentElement . classList . contains ( 'dark' ) ;
979+ const isDark = document . body . classList . contains ( 'dark' ) ;
980980
981981 // Only show error after 3 failed attempts
982982 if ( retryCount < 3 ) {
@@ -985,15 +985,13 @@ <h2 class="chart-title">🏛️ Treasury Account</h2>
985985
986986 // Replace canvas with error message
987987 container . innerHTML = `
988- <div class="h-full flex items-center justify-center ${ isDark ? 'bg-red-900/20 border-red-800' : 'bg-red-50 border-red-200' } border-2 rounded-lg">
989- <div class="text-center p-4">
990- <div class="${ isDark ? 'text-red-400' : 'text-red-600' } text-lg font-medium mb-2">❌ Data Unavailable</div>
991- <div class="${ isDark ? 'text-red-300' : 'text-red-500' } text-sm mb-3">${ errorMessage } </div>
992- <div class="space-y-2">
993- <button onclick="retryChart('${ chartId } ')" class="block w-full px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors text-sm">
994- 🔄 Retry Chart
995- </button>
996- </div>
988+ <div style="height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 10px;">
989+ <div style="text-align: center; padding: 20px;">
990+ <div style="color: #ef4444; font-size: 16px; font-weight: 600; margin-bottom: 8px;">❌ Data Unavailable</div>
991+ <div style="color: rgba(239, 68, 68, 0.8); font-size: 14px; margin-bottom: 12px;">${ errorMessage } </div>
992+ <button onclick="retryChart('${ chartId } ')" class="btn" style="background: rgba(239, 68, 68, 0.3); border-color: rgba(239, 68, 68, 0.5);">
993+ 🔄 Retry Chart
994+ </button>
997995 </div>
998996 </div>
999997 ` ;
@@ -1081,7 +1079,7 @@ <h2 class="chart-title">🏛️ Treasury Account</h2>
10811079 for ( const section of sections ) {
10821080 const title = section . querySelector ( 'h2' ) ;
10831081 if ( title && title . textContent . includes ( chartContainers [ canvasId ] ) ) {
1084- const container = section . querySelector ( '.h-48.mb-2 ' ) ;
1082+ const container = section . querySelector ( '.chart-container ' ) ;
10851083 if ( container ) {
10861084 container . innerHTML = `<canvas id="${ canvasId } "></canvas>` ;
10871085 canvas = document . getElementById ( canvasId ) ;
@@ -1256,7 +1254,7 @@ <h2 class="chart-title">🏛️ Treasury Account</h2>
12561254 for ( const section of sections ) {
12571255 const title = section . querySelector ( 'h2' ) ;
12581256 if ( title && title . textContent . includes ( chartContainers [ canvasId ] ) ) {
1259- const container = section . querySelector ( '.h-48.mb-2 ' ) ;
1257+ const container = section . querySelector ( '.chart-container ' ) ;
12601258 if ( container ) {
12611259 container . innerHTML = `<canvas id="${ canvasId } "></canvas>` ;
12621260 canvas = document . getElementById ( canvasId ) ;
0 commit comments