Progressive Rendering
Render large datasets in chunks to keep UI responsive:Large Mode for Bar Charts
Optimize bar charts for large datasets:Data Sampling
Downsample data for better performance while preserving visual accuracy:Append Data for Streaming
Efficiently add data to existing large datasets:Virtual Scrolling with DataZoom
Combine dataZoom with large datasets for smooth interaction:Performance Configuration Options
Progressive Rendering
Large Mode
Sampling Strategies
- lttb (Largest Triangle Three Buckets): Best for preserving visual shape
- average: Average value in each bucket
- max: Maximum value in each bucket
- min: Minimum value in each bucket
- sum: Sum of values in each bucket
Animation Control
Best Practices
Memory Management
- Limit loaded data: Load only necessary time ranges
- Use appendData: More efficient than setOption for adding data
- Remove old data: Implement sliding window for streaming
Rendering Optimization
- Disable symbols: Use
symbol: 'none'for line charts - Reduce line width: Thinner lines render faster
- Simplify styles: Avoid shadows, gradients on large datasets
DataZoom Strategy
Performance Comparison
| Dataset Size | Without Optimization | With Progressive | With Sampling |
|---|---|---|---|
| 10,000 | Smooth | Smooth | Smooth |
| 100,000 | Laggy | Smooth | Smooth |
| 1,000,000 | Frozen | Usable | Smooth |
Troubleshooting
Chart is slow to render
- Enable
progressiverendering - Increase
progressiveThreshold - Use
samplingfor line charts - Disable
animation
Interactions are laggy
- Enable
largemode - Reduce visible data with
dataZoom - Use
symbol: 'none' - Set
silent: trueto disable interactions
Memory issues
- Implement data pagination
- Use
appendDatawith cleanup - Reduce precision of data values
Next Steps
Real-time Updates
Combine large datasets with live data streaming
Mobile Optimization
Optimize large datasets for mobile devices