Understanding dashboards
Dashboards are where the magic happens - they combine all your components into beautiful, interactive energy monitoring solutions. With React Grid Layout, you get drag-and-drop functionality and responsive design that make your energy data come alive.Creating your first dashboard
Basic dashboard setup
cols: Number of columns in the grid (default: 12)row_height: Height of each grid row in pixelsmargin: Margin between grid items [x, y]container_padding: Padding around the grid container [x, y]is_draggable: Whether components can be draggedis_resizable: Whether components can be resized
Advanced dashboard configuration
Dashboard layouts
Layout management
Layout is managed separately from dashboard creation. After creating a dashboard, its layout is updated through the API when saving the dashboard on the frontend:i: Component IDx,y: Grid position (0-based)w,h: Width and height in grid unitsmin_w,min_h: Minimum size constraintsstatic: Whether the component can be moved
layout: Array of layout objects for each componentcomponentState: Optional object for component-specific state (layer order, settings, etc.)
Grid-based layouts
The most flexible layout system using CSS Grid:Dashboard templates
Energy monitoring template
Weather analysis template
Dashboard management
Creating dashboards
Updating dashboard layout
Retrieving dashboards
Deleting dashboards
Important Limitations
- Layout updates separate: Layout is updated via separate endpoint, not during creation
- No theme customization: Custom themes and CSS are not supported
- No sharing features: Dashboard sharing and embedding are not implemented
- No real-time updates: Auto-refresh and real-time updates are not supported
- No component interactions: Cross-component communication is not implemented
- No responsive breakpoints: Only single layout configuration is supported
- No auto-save: Dashboard changes are not automatically saved
Best practices
Layout design
- Use a logical grid system (12 columns recommended)
- Group related components together
- Leave space for future additions
- Consider component sizes and proportions
Performance optimization
- Limit the number of components per dashboard
- Use appropriate component sizes
- Optimize data queries and caching
- Monitor dashboard load times
User experience
- Provide clear component organization
- Use consistent component sizing
- Consider component relationships
- Test dashboard performance with your actual data
Data management
- Organize data logically across components
- Use appropriate data filtering at the component level
- Implement proper error handling
- Monitor data quality and freshness