How mhkeller/layercake works
Main Components Overview
a) Core Components:
• LayerCake Component (Central Wrapper)
• Layout Components (Svg, Html, Canvas, Webgl, ScaledSvg)
• Helper Functions
• Visualization Components
b) Data Flow System:
• Props/Configuration
• Scale Calculations
• Rendering Pipeline
[User Application]
• ↓
[LayerCake Wrapper Component]
• ↓
┌──────────────────────────────────┐
• Layout Components │
• ┬──────────┬────────────┤
• Svg │ Canvas │ Html │
• ┴──────────┴────────────┘
• ↓ ↓ ↓
[Visualization Components Library]
• ↓
[Helper Functions & Utilities]
Detailed Component Relationships
[Data Input] → [LayerCake Props]
• ↓
┌─────────────────────────────────┐
• Scale & Domain Handlers │
• ┤
• calcDomain │
• createScale │
• calcScaleExtents │
• ┘
• ↓
┌─────────────────────────────────┐
• Rendering Containers │
• ┬──────────┬──────────┤
• SVG │ Canvas │ HTML │
• Context │ Context │ Context │
• ┴──────────┴──────────┘
• ↓
┌─────────────────────────────────┐
• Visualization Components │
• ┤
• Charts (Line, Bar, etc.) │
• Axes │
• Annotations │
• ┘
Implementation Details
How the following key features are connected:
• Scale Management
• Component Communication
• Layout System
• Helper Functions
• Visualization Components