SimpleScatterChart constructor

const SimpleScatterChart({
  1. Key? key,
  2. required List<SimpleScatterPoint> points,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? minX,
  5. double? maxX,
  6. double? minY,
  7. double? maxY,
  8. double height = 260,
  9. EdgeInsets padding = _defaultPadding,
  10. String? xAxisLabel,
  11. String? yAxisLabel,
  12. Color? pointColor,
  13. Color? gridColor,
  14. Color? axisColor,
  15. Color? trendLineColor,
  16. Color? activeColor,
  17. List<Color>? palette,
  18. TextStyle? labelStyle,
  19. TextStyle? valueStyle,
  20. bool showGrid = true,
  21. bool showValues = false,
  22. bool showLegend = true,
  23. bool showTooltip = true,
  24. bool showActivePoint = true,
  25. bool showTrendLine = false,
  26. bool showAxisLabels = true,
  27. List<SimpleScatterReferenceLine> referenceLines = const [],
  28. List<SimpleScatterReferenceBand> referenceBands = const [],
  29. int gridLineCount = 4,
  30. double? pointRadius,
  31. double? minPointRadius,
  32. double? maxPointRadius,
  33. SimpleScatterValueFormatter? xValueFormatter,
  34. SimpleScatterValueFormatter? yValueFormatter,
  35. SimpleScatterValueFormatter? sizeFormatter,
  36. SimpleScatterPointTapCallback? onPointTap,
  37. SimpleScatterTooltipBuilder? 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 SimpleScatterChart({
  super.key,
  required this.points,
  this.style = SimpleBarChartStyle.elegant,
  this.minX,
  this.maxX,
  this.minY,
  this.maxY,
  this.height = 260,
  this.padding = _defaultPadding,
  this.xAxisLabel,
  this.yAxisLabel,
  this.pointColor,
  this.gridColor,
  this.axisColor,
  this.trendLineColor,
  this.activeColor,
  this.palette,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showValues = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActivePoint = true,
  this.showTrendLine = false,
  this.showAxisLabels = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.pointRadius,
  this.minPointRadius,
  this.maxPointRadius,
  this.xValueFormatter,
  this.yValueFormatter,
  this.sizeFormatter,
  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(pointRadius == null || pointRadius >= 0),
     assert(minPointRadius == null || minPointRadius >= 0),
     assert(maxPointRadius == null || maxPointRadius >= 0);