This document describes the new platform comparison charts added to the main page of the CryptoTrading application.
New comparison charts have been added below the existing charts to provide comprehensive data comparison between different cryptocurrency data sources:
- LiveCoinWatch
- CoinGecko
- CoinMarketCal
- CryptoCompare
- Type: Bar Chart
- Purpose: Compares total coins, market cap, and volume across all platforms
- Data: Shows three metrics for each platform side by side
- Type: Doughnut Chart
- Purpose: Visualizes market cap distribution by platform
- Data: Shows relative market cap percentages for each platform
- Type: Pie Chart
- Purpose: Displays volume distribution across platforms
- Data: Shows relative trading volume percentages
- Type: Bar Chart
- Purpose: Compares the number of coins tracked by each platform
- Data: Simple count comparison
- Type: Bar Chart
- Purpose: Analyzes gaining vs losing coins by platform
- Data: Shows positive and negative price movements
- Type: Data Table
- Purpose: Comprehensive overview of all platform metrics
- Columns: Platform, Total Coins, Market Cap, Volume, Gaining Coins, Losing Coins, Last Updated
The charts pull data from the following database tables:
live_coin_watches- Main coin datafiats- Fiat currency dataexchanges- Exchange information
coin_gecko_coins- Coin informationcoin_gecko_markets- Market datacoingecko_exchanges- Exchange datacoin_gecko_trendings- Trending coins
coinmarketcals- Calendar eventsevents- Event details
crypto_compare_coins- Coin datacrypto_compare_markets- Market informationcrypto_compare_exchanges- Exchange datacrypto_compare_news- News articlescrypto_compare_top_pairs- Top trading pairs
- Charts: Built using Chart.js library
- Responsive: All charts are responsive and resize with window changes
- Error Handling: Robust error handling for missing canvas elements
- AJAX Loading: Data is loaded asynchronously to prevent page blocking
- Controller:
MarketsComparizonControllerhandles data aggregation - Data Methods: Separate methods for each platform data source
- Error Handling: Graceful fallbacks for missing or corrupted data
- CSS: Modern, responsive design with gradient backgrounds
- Mobile: Optimized for mobile devices
- Dark Mode: Compatible with existing dark mode toggle
The new charts support multiple languages:
- English (en)
- Russian (ru)
- Finnish (fi)
- Armenian (hy)
All chart labels, titles, and table headers are translatable.
- Navigate to the main page (
/) - Scroll down to see the new comparison charts below existing charts
- Charts automatically load data via AJAX
- Use the refresh button to reload comparison data
- Charts are responsive and work on all device sizes
- Automatic: Data loads when the page loads
- Manual: Use the refresh button in the comparison section header
- Real-time: Data is fetched from the database, not cached
- Modern Browsers: Chrome, Firefox, Safari, Edge (latest versions)
- Mobile: iOS Safari, Chrome Mobile, Samsung Internet
- Requirements: JavaScript enabled, Canvas support
- Lazy Loading: Charts only render when data is available
- Debounced Resize: Window resize events are debounced to prevent performance issues
- Memory Management: Old chart instances are properly destroyed before creating new ones
- Error Boundaries: Graceful degradation if individual charts fail to load
Potential improvements for future versions:
- Real-time data updates via WebSockets
- Interactive chart tooltips with detailed information
- Export functionality for chart data
- Customizable chart types and layouts
- Historical data comparison over time
- Platform-specific filtering options