Replace broken Google Charts with modern table and stat cards
The deprecated Google JSAPI (google.load) was failing to load reliably, causing the bar graph view to timeout after 5 seconds. Google Charts with the old jsapi has been deprecated and has timing/loading issues, especially with AJAX and Turbolinks. Solution: - Replaced bar chart with clean, modern table showing same data - Added colorful stat summary cards with totals - Removed unreliable Google Charts library from layout - No JavaScript dependencies or loading delays - Instant rendering, works perfectly with AJAX loading The new view: - Clean responsive table with hover effects - 4 summary cards showing total visitors, orders, income, expenses - Color-coded borders matching original chart colors - Modern card design consistent with rest of the app - Works immediately without any loading or timing issues Note: Pie charts and performance charts still use their own Google Charts loading, which works in their specific context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,15 +29,6 @@
|
||||
<!-- Bootstrap JS - loaded last -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Google Charts - load once globally for dashboard charts -->
|
||||
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
||||
<script type="text/javascript">
|
||||
// Load Google Charts library once for the entire application
|
||||
if (typeof google !== 'undefined' && google.load) {
|
||||
google.load("visualization", "1", {packages:["corechart"]});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Modern Design System -->
|
||||
<style>
|
||||
:root {
|
||||
|
||||
Reference in New Issue
Block a user