SimpleEcdfChart constructor

const SimpleEcdfChart({
  1. Key? key,
  2. required List<SimpleEcdfSeries> series,
  3. SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
  4. double? minValue,
  5. double? maxValue,
  6. double height = 260,
  7. EdgeInsets padding = _defaultPadding,
  8. List<Color>? palette,
  9. Color? lineColor,
  10. Color? fillColor,
  11. Color? medianColor,
  12. Color? p90Color,
  13. Color? gridColor,
  14. Color? axisColor,
  15. Color? activeColor,
  16. TextStyle? labelStyle,
  17. TextStyle? valueStyle,
  18. bool includeZero = false,
  19. bool showGrid = true,
  20. bool showDots = true,
  21. bool showValues = false,
  22. bool showArea = false,
  23. bool showLegend = true,
  24. bool showTooltip = true,
  25. bool showActivePoint = true,
  26. bool showMedianLine = true,
  27. bool showP90Line = false,
  28. List<SimpleChartReferenceLine> referenceLines = const [],
  29. List<SimpleChartReferenceBand> referenceBands = const [],
  30. int gridLineCount = 4,
  31. double? strokeWidth,
  32. double? dotRadius,
  33. double? fillOpacity,
  34. SimpleEcdfValueFormatter? valueFormatter,
  35. SimpleEcdfValueFormatter? percentileFormatter,
  36. SimpleEcdfTapCallback? onPointTap,
  37. SimpleEcdfTooltipBuilder? tooltipBuilder,
  38. WidgetBuilder? emptyBuilder,
  39. String? semanticLabel,
  40. bool excludeFromSemantics = false,
  41. Duration animationDuration = const Duration(milliseconds: 700),
  42. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleEcdfChart({
  super.key,
  required this.series,
  this.style = SimpleTrendChartStyle.elegant,
  this.minValue,
  this.maxValue,
  this.height = 260,
  this.padding = _defaultPadding,
  this.palette,
  this.lineColor,
  this.fillColor,
  this.medianColor,
  this.p90Color,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.includeZero = false,
  this.showGrid = true,
  this.showDots = true,
  this.showValues = false,
  this.showArea = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActivePoint = true,
  this.showMedianLine = true,
  this.showP90Line = false,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.strokeWidth,
  this.dotRadius,
  this.fillOpacity,
  this.valueFormatter,
  this.percentileFormatter,
  this.onPointTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 700),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(gridLineCount >= 2),
     assert(strokeWidth == null || strokeWidth > 0),
     assert(dotRadius == null || dotRadius >= 0),
     assert(fillOpacity == null || (fillOpacity >= 0 && fillOpacity <= 1));