SimpleHexbinChart constructor

const SimpleHexbinChart({
  1. Key? key,
  2. required List<SimpleHexbinPoint> 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? binColor,
  13. Color? emptyBinColor,
  14. Color? gridColor,
  15. Color? axisColor,
  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 showActiveBin = true,
  25. bool showAxisLabels = true,
  26. bool showOutlines = true,
  27. bool showEmptyBins = false,
  28. bool useLogScale = false,
  29. int gridLineCount = 4,
  30. double? cellRadius,
  31. double minOpacity = 0.28,
  32. double maxOpacity = 0.92,
  33. SimpleHexbinValueFormatter? valueFormatter,
  34. SimpleHexbinValueFormatter? xValueFormatter,
  35. SimpleHexbinValueFormatter? yValueFormatter,
  36. SimpleHexbinBinTapCallback? onBinTap,
  37. SimpleHexbinTooltipBuilder? 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 SimpleHexbinChart({
  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.binColor,
  this.emptyBinColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.palette,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showValues = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActiveBin = true,
  this.showAxisLabels = true,
  this.showOutlines = true,
  this.showEmptyBins = false,
  this.useLogScale = false,
  this.gridLineCount = 4,
  this.cellRadius,
  this.minOpacity = 0.28,
  this.maxOpacity = 0.92,
  this.valueFormatter,
  this.xValueFormatter,
  this.yValueFormatter,
  this.onBinTap,
  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(cellRadius == null || cellRadius > 0),
     assert(minOpacity >= 0 && minOpacity <= 1),
     assert(maxOpacity >= 0 && maxOpacity <= 1),
     assert(minOpacity <= maxOpacity);