ChartTheme.light constructor
ChartTheme.light()
Create light theme with enhanced colors.
Returns a professionally designed light theme with:
- White background
- Dark text for contrast
- Subtle grid and axis colors
- Vibrant gradient color palette
- Modern rounded corners
Example
final theme = ChartTheme.light();
Implementation
factory ChartTheme.light() {
return const ChartTheme(
backgroundColor: Color(0xFFFFFFFF),
textColor: Color(0xFF1F2937), // Gray 900
gridColor: Color(0xFFE5E7EB), // Gray 200
axisColor: Color(0xFF9CA3AF), // Gray 400
gradientColors: [
Color(0xFF6366F1), // Indigo 500
Color(0xFF8B5CF6), // Violet 500
Color(0xFFEC4899), // Pink 500
Color(0xFF10B981), // Emerald 500
Color(0xFFF59E0B), // Amber 500
],
axisLabelStyle: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w500,
color: Color(0xFF6B7280), // Gray 500
),
);
}