SimpleSmallMultiplesChart constructor

const SimpleSmallMultiplesChart({
  1. Key? key,
  2. required List<SimpleSmallMultiplePanel> panels,
  3. SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double height = 300,
  7. EdgeInsets padding = _defaultPadding,
  8. EdgeInsets chartPadding = _innerChartPadding,
  9. int? columns,
  10. double minPanelWidth = 170,
  11. double panelGap = 12,
  12. Color? lineColor,
  13. Color? fillColor,
  14. Color? gridColor,
  15. Color? axisColor,
  16. Color? dividerColor,
  17. TextStyle? labelStyle,
  18. TextStyle? valueStyle,
  19. TextStyle? subtitleStyle,
  20. bool sharedYAxis = true,
  21. bool includeZero = false,
  22. bool showGrid = true,
  23. bool showDots = true,
  24. bool showValues = false,
  25. bool showArea = false,
  26. bool showLegend = false,
  27. bool showTooltip = true,
  28. bool showPanelDividers = true,
  29. bool? smooth,
  30. double? strokeWidth,
  31. double? dotRadius,
  32. double? fillOpacity,
  33. int gridLineCount = 3,
  34. List<SimpleChartReferenceLine> referenceLines = const [],
  35. List<SimpleChartReferenceBand> referenceBands = const [],
  36. SimpleSmallMultiplesValueFormatter? valueFormatter,
  37. SimpleSmallMultiplesPointTapCallback? onPointTap,
  38. SimpleSmallMultiplesTooltipBuilder? tooltipBuilder,
  39. WidgetBuilder? emptyBuilder,
  40. String? semanticLabel,
  41. bool excludeFromSemantics = false,
  42. Duration animationDuration = const Duration(milliseconds: 680),
  43. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleSmallMultiplesChart({
  super.key,
  required this.panels,
  this.style = SimpleTrendChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 300,
  this.padding = _defaultPadding,
  this.chartPadding = _innerChartPadding,
  this.columns,
  this.minPanelWidth = 170,
  this.panelGap = 12,
  this.lineColor,
  this.fillColor,
  this.gridColor,
  this.axisColor,
  this.dividerColor,
  this.labelStyle,
  this.valueStyle,
  this.subtitleStyle,
  this.sharedYAxis = true,
  this.includeZero = false,
  this.showGrid = true,
  this.showDots = true,
  this.showValues = false,
  this.showArea = false,
  this.showLegend = false,
  this.showTooltip = true,
  this.showPanelDividers = true,
  this.smooth,
  this.strokeWidth,
  this.dotRadius,
  this.fillOpacity,
  this.gridLineCount = 3,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.valueFormatter,
  this.onPointTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 680),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(columns == null || columns > 0),
     assert(minPanelWidth > 0),
     assert(panelGap >= 0),
     assert(gridLineCount >= 2),
     assert(strokeWidth == null || strokeWidth > 0),
     assert(dotRadius == null || dotRadius >= 0),
     assert(fillOpacity == null || (fillOpacity >= 0 && fillOpacity <= 1));