Overview
The Product Distribution Dashboard provides an interactive interface for visualizing and analyzing product shipments between warehouses and stores. Built with Angular and Leaflet, it offers real-time insights into distribution patterns, metrics, and assignments.Dashboard Components
The dashboard consists of four main components working together:Filters Component
Allows users to filter data by warehouse, store, or product:- Dropdown selectors for warehouses, stores, and products
- Multi-level filtering (combine filters for detailed analysis)
- Real-time data updates on filter changes
- Clear filter option to reset view
Interactive Map Component
Leaflet-based map visualization showing distribution routes:Markers
Markers
- Store Markers: Gray circular markers representing retail locations
- Warehouse Markers: Black circular markers representing distribution centers
- Marker Clustering: Automatically groups nearby markers at lower zoom levels
- Tooltips: Hover to see location IDs
Routes
Routes
- Polylines: Purple lines connecting warehouses to stores
- Direction Arrows: Indicate flow from warehouse to store
- Interactive Highlighting: Routes highlight on hover
- Route Popups: Click to see detailed shipment information
Clustering
Clustering
DashboardMapComponent:65-78
Table Component
Displays stock assignments in tabular format with sorting and pagination capabilities. Provides detailed view of all shipments with columns for:- Warehouse ID
- Store ID
- Product ID
- Size
- Quantity
- Distance (km)
Metrics Components
Global Metrics - High-level overview displayed at the top:- Total shipments
- Fulfilled units
- Unfulfilled units
- Average distance
Visualization Features
Route Visualization
Routes are drawn as polylines with decorative arrows:- Base: Semi-transparent purple (
#673ab7, opacity 0.13) - Highlighted: Dark purple (
#311b92, opacity 0.8) - Arrow decorators at 50% point along route
- Dynamic styling on hover and popup open
Route Popups
Click any route to see detailed shipment information:User Workflows
View Overall Distribution
Analyze Specific Warehouse
Track Product Distribution
Investigate Store Supply
Data Filtering and Selection
Filters can be combined for granular analysis:| Warehouse | Store | Product | Result |
|---|---|---|---|
| ✓ | - | - | All shipments from specific warehouse |
| - | ✓ | - | All shipments to specific store |
| - | - | ✓ | All shipments of specific product |
| ✓ | ✓ | - | Shipments from warehouse to store |
| ✓ | - | ✓ | Specific product from specific warehouse |
| - | ✓ | ✓ | Specific product to specific store |
| ✓ | ✓ | ✓ | Specific product from warehouse to store |
Tabs Navigation
The dashboard provides three view modes:- Map View
- Table View
- Metrics View
Interactive geographic visualization with routes and markers. Best for understanding spatial distribution patterns.
Performance Optimizations
- Marker Clustering: Reduces rendering load with many locations
- Lazy Loading: Metrics load only when tab is activated
- Route Grouping: Multiple assignments on same route are grouped
- Responsive Map: Auto-adjusts on window resize
- Filtered Rendering: Only displays relevant data based on filters
Next Steps
Distribution Algorithm
Understand the logic behind warehouse selection
Metrics
Learn about available metrics and analytics