SimpleBubbleChart constructor

const SimpleBubbleChart({
  1. Key? key,
  2. required List<SimpleBubbleChartData> data,
  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. String sizeLabel = 'Size',
  13. Color? bubbleColor,
  14. Color? gridColor,
  15. Color? axisColor,
  16. Color? trendLineColor,
  17. Color? activeColor,
  18. List<Color>? palette,
  19. TextStyle? labelStyle,
  20. TextStyle? valueStyle,
  21. bool showGrid = true,
  22. bool showLabels = false,
  23. bool showLegend = true,
  24. bool showTooltip = true,
  25. bool showActiveBubble = true,
  26. bool showTrendLine = false,
  27. bool showAxisLabels = true,
  28. List<SimpleScatterReferenceLine> referenceLines = const [],
  29. List<SimpleScatterReferenceBand> referenceBands = const [],
  30. int gridLineCount = 4,
  31. double? minBubbleRadius,
  32. double? maxBubbleRadius,
  33. SimpleBubbleValueFormatter? xValueFormatter,
  34. SimpleBubbleValueFormatter? yValueFormatter,
  35. SimpleBubbleValueFormatter? sizeFormatter,
  36. SimpleBubbleTapCallback? onBubbleTap,
  37. SimpleBubbleTooltipBuilder? 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 SimpleBubbleChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.minX,
  this.maxX,
  this.minY,
  this.maxY,
  this.height = 260,
  this.padding = _defaultPadding,
  this.xAxisLabel,
  this.yAxisLabel,
  this.sizeLabel = 'Size',
  this.bubbleColor,
  this.gridColor,
  this.axisColor,
  this.trendLineColor,
  this.activeColor,
  this.palette,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showLabels = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActiveBubble = true,
  this.showTrendLine = false,
  this.showAxisLabels = true,
  this.referenceLines = const [],
  this.referenceBands = const [],
  this.gridLineCount = 4,
  this.minBubbleRadius,
  this.maxBubbleRadius,
  this.xValueFormatter,
  this.yValueFormatter,
  this.sizeFormatter,
  this.onBubbleTap,
  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(minBubbleRadius == null || minBubbleRadius >= 0),
     assert(maxBubbleRadius == null || maxBubbleRadius >= 0);