How donatso/family-chart works
Main Components
a. Core Library Components:
• Visualization Engine (D3.js Integration)
• Tree Calculator Module
• Card Rendering System
• Event Handling System
• Data Store
• View Management
b. External Interfaces:
• WikiData Integration
• Framework Integrations (React, Vue, Vanilla JS)
Component Relationships
• Data flow from WikiData API to the store
• Tree calculation flow from raw data to rendered visualization
• Event handling paths from user interactions to tree updates
• Component communication between modules
Detailed Component Breakdown
CalculateTree Module:
• Tree calculation handlers
• Link creation system
• Layout algorithms
Cards Module:
• SVG and HTML rendering options
• Card templates and utilities
CreateTree Module:
• Form handling
• History management
• Relative management
View Module:
• Card rendering
• Link rendering
• Event handling
• HTML components
Implementation Notes
Annotations for:
• Customization points
• Framework integration methods
• Event flow patterns
• Data structure requirements
• The modular nature of the system
• Clear separation of concerns
• Extensibility points
• Integration capabilities
Remember to:
• Keep the main flow clear and visible
• Version information
• Document key interaction patterns
This visualization library requires a balance between showing the technical complexity of the D3.js integration while maintaining clarity about how different components work together to create interactive family trees.