ChartTheme constructor

const ChartTheme({
  1. required Color backgroundColor,
  2. required Color textColor,
  3. required Color gridColor,
  4. required Color axisColor,
  5. required List<Color> gradientColors,
  6. double shadowElevation = 4.0,
  7. double borderRadius = 16.0,
  8. bool showGrid = true,
  9. bool showAxis = true,
  10. bool showLegend = true,
  11. bool showTooltip = true,
  12. Color cardBorderColor = const Color(0x00000000),
  13. Color overlayColor = const Color(0x14000000),
  14. Color crosshairColor = const Color(0x66000000),
  15. Color tooltipBackgroundColor = const Color(0xFF111827),
  16. Color tooltipBorderColor = const Color(0x1FFFFFFF),
  17. List<BoxShadow> tooltipShadow = const [BoxShadow(color: Color(0x1A000000), blurRadius: 18, offset: Offset(0, 8), spreadRadius: -6), BoxShadow(color: Color(0x0F000000), blurRadius: 10, offset: Offset(0, 4), spreadRadius: -6)],
  18. double gridLineWidth = 1.0,
  19. double gridDashWidth = 4.0,
  20. double gridDashSpace = 4.0,
  21. int xAxisLabelRotation = 0,
  22. int yAxisLabelRotation = 0,
  23. TextStyle? axisLabelStyle,
  24. TextStyle? tooltipStyle,
  25. EdgeInsets padding = const EdgeInsets.fromLTRB(40, 20, 20, 40),
})

Implementation

const ChartTheme({
  required this.backgroundColor,
  required this.textColor,
  required this.gridColor,
  required this.axisColor,
  required this.gradientColors,
  this.shadowElevation = 4.0,
  this.borderRadius = 16.0,
  this.showGrid = true,
  this.showAxis = true,
  this.showLegend = true,
  this.showTooltip = true,
  this.cardBorderColor = const Color(0x00000000),
  this.overlayColor = const Color(0x14000000),
  this.crosshairColor = const Color(0x66000000),
  this.tooltipBackgroundColor = const Color(0xFF111827),
  this.tooltipBorderColor = const Color(0x1FFFFFFF),
  this.tooltipShadow = const [
    BoxShadow(
      color: Color(0x1A000000),
      blurRadius: 18,
      offset: Offset(0, 8),
      spreadRadius: -6,
    ),
    BoxShadow(
      color: Color(0x0F000000),
      blurRadius: 10,
      offset: Offset(0, 4),
      spreadRadius: -6,
    ),
  ],
  this.gridLineWidth = 1.0,
  this.gridDashWidth = 4.0,
  this.gridDashSpace = 4.0,
  this.xAxisLabelRotation = 0,
  this.yAxisLabelRotation = 0,
  this.axisLabelStyle,
  this.tooltipStyle,
  this.padding = const EdgeInsets.fromLTRB(40, 20, 20, 40),
});