SimpleQuadrantChart constructor

const SimpleQuadrantChart({
  1. Key? key,
  2. required List<SimpleQuadrantPoint> points,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? minX,
  5. double? maxX,
  6. double? minY,
  7. double? maxY,
  8. double? xSplit,
  9. double? ySplit,
  10. double height = 260,
  11. EdgeInsets padding = _defaultPadding,
  12. String? xAxisLabel,
  13. String? yAxisLabel,
  14. SimpleQuadrantLabels quadrantLabels = const SimpleQuadrantLabels(),
  15. List<Color>? palette,
  16. List<Color>? quadrantColors,
  17. Color? pointColor,
  18. Color? gridColor,
  19. Color? axisColor,
  20. Color? splitLineColor,
  21. Color? activeColor,
  22. TextStyle? labelStyle,
  23. TextStyle? valueStyle,
  24. bool showGrid = true,
  25. bool showAxisLabels = true,
  26. bool showQuadrantLabels = true,
  27. bool showPointLabels = false,
  28. bool showLegend = true,
  29. bool showTooltip = true,
  30. bool showActivePoint = true,
  31. List<SimpleChartReferenceLine> referenceLines = const [],
  32. int gridLineCount = 4,
  33. double? pointRadius,
  34. double? minPointRadius,
  35. double? maxPointRadius,
  36. double quadrantOpacity = 0.08,
  37. SimpleQuadrantValueFormatter? xValueFormatter,
  38. SimpleQuadrantValueFormatter? yValueFormatter,
  39. SimpleQuadrantValueFormatter? sizeFormatter,
  40. SimpleQuadrantPointTapCallback? onPointTap,
  41. SimpleQuadrantTooltipBuilder? tooltipBuilder,
  42. WidgetBuilder? emptyBuilder,
  43. String? semanticLabel,
  44. bool excludeFromSemantics = false,
  45. Duration animationDuration = const Duration(milliseconds: 700),
  46. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleQuadrantChart({
  super.key,
  required this.points,
  this.style = SimpleBarChartStyle.elegant,
  this.minX,
  this.maxX,
  this.minY,
  this.maxY,
  this.xSplit,
  this.ySplit,
  this.height = 260,
  this.padding = _defaultPadding,
  this.xAxisLabel,
  this.yAxisLabel,
  this.quadrantLabels = const SimpleQuadrantLabels(),
  this.palette,
  this.quadrantColors,
  this.pointColor,
  this.gridColor,
  this.axisColor,
  this.splitLineColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showAxisLabels = true,
  this.showQuadrantLabels = true,
  this.showPointLabels = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActivePoint = true,
  this.referenceLines = const [],
  this.gridLineCount = 4,
  this.pointRadius,
  this.minPointRadius,
  this.maxPointRadius,
  this.quadrantOpacity = 0.08,
  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),
     assert(quadrantOpacity >= 0 && quadrantOpacity <= 1);