How plotly/dash-pivottable works
Main Components
a. Frontend Layer:
• React Component (PivotTable.react.js)
• Webpack Bundle (dash_pivottable.dev.js)
• Demo Application (App.js)
b. Python Layer:
• Dash Component Wrapper (PivotTable.py)
• Data Handling Layer (data.py)
• Testing Infrastructure (tests/)
c. R Layer:
• R Package Interface (R/dashPivotTable.R)
• R Dependencies
Component Relationships
[Data Sources] → [Python/R Interface Layer] → [Dash Component] → [React PivotTable] → [User Interface]
Use the following structure:
Top Level (User Interface)
• Filters, drag-drop areas, and visualization options
Middle Layer (Component Implementation)
• React Component (PivotTable.react.js)
• Connection to the underlying react-pivottable library
• Input data
• Configuration options
• User interactions
• Callback outputs
Bottom Layer (Backend Integration)
• Python wrapper (dash_pivottable)
• R package interface
• Data processing components
• Blue: Frontend components
• Green: Data processing layers
• Orange: Integration layers
• Gray: External dependencies
Important Elements to Highlight:
Data Flow
• How data moves from source through the Python/R layer
• How it's processed by the React component
• Demonstrate callback patterns
Configuration Options
• Main parameters (hiddenAttributes, menuLimit, etc.)
• How they affect the component
Integration Points
• Dash callback interface
• R package bindings
• React component communication
Special Considerations:
Multi-Language Support
• Boundaries between Python, R, and JavaScript
• How the different languages interact
Build Process
• Webpack bundling step
• How the component is packaged for different platforms
Testing Layer
• Test infrastructure
• Percy visual testing integration
Abstraction Level:
• Keep main component interaction visible
• Abstract internal react-pivottable implementation details
• Integration points between languages