SimpleContourChart constructor

const SimpleContourChart({
  1. Key? key,
  2. required List<SimpleContourPoint> points,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. double? minX,
  5. double? maxX,
  6. double? minY,
  7. double? maxY,
  8. double? minValue,
  9. double? maxValue,
  10. double height = 260,
  11. EdgeInsets padding = _defaultPadding,
  12. String? xAxisLabel,
  13. String? yAxisLabel,
  14. Color? lowColor,
  15. Color? highColor,
  16. Color? lineColor,
  17. Color? pointColor,
  18. Color? gridColor,
  19. Color? axisColor,
  20. Color? activeColor,
  21. List<Color>? palette,
  22. TextStyle? labelStyle,
  23. TextStyle? valueStyle,
  24. bool showGrid = true,
  25. bool showFilledBands = true,
  26. bool showContourLines = true,
  27. bool showSamplePoints = true,
  28. bool showLabels = true,
  29. bool showValues = false,
  30. bool showLegend = true,
  31. bool showTooltip = true,
  32. bool showActiveSelection = true,
  33. bool showAxisLabels = true,
  34. int gridLineCount = 4,
  35. int gridResolution = 26,
  36. int levelCount = 6,
  37. double contourLineWidth = 1.2,
  38. double pointRadius = 4,
  39. double interpolationPower = 2,
  40. List<double> levels = const [],
  41. SimpleContourValueFormatter? xValueFormatter,
  42. SimpleContourValueFormatter? yValueFormatter,
  43. SimpleContourValueFormatter? valueFormatter,
  44. SimpleContourTapCallback? onSelectionTap,
  45. SimpleContourTooltipBuilder? tooltipBuilder,
  46. WidgetBuilder? emptyBuilder,
  47. String? semanticLabel,
  48. bool excludeFromSemantics = false,
  49. Duration animationDuration = const Duration(milliseconds: 700),
  50. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleContourChart({
  super.key,
  required this.points,
  this.style = SimpleBarChartStyle.elegant,
  this.minX,
  this.maxX,
  this.minY,
  this.maxY,
  this.minValue,
  this.maxValue,
  this.height = 260,
  this.padding = _defaultPadding,
  this.xAxisLabel,
  this.yAxisLabel,
  this.lowColor,
  this.highColor,
  this.lineColor,
  this.pointColor,
  this.gridColor,
  this.axisColor,
  this.activeColor,
  this.palette,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showFilledBands = true,
  this.showContourLines = true,
  this.showSamplePoints = true,
  this.showLabels = true,
  this.showValues = false,
  this.showLegend = true,
  this.showTooltip = true,
  this.showActiveSelection = true,
  this.showAxisLabels = true,
  this.gridLineCount = 4,
  this.gridResolution = 26,
  this.levelCount = 6,
  this.contourLineWidth = 1.2,
  this.pointRadius = 4,
  this.interpolationPower = 2,
  this.levels = const [],
  this.xValueFormatter,
  this.yValueFormatter,
  this.valueFormatter,
  this.onSelectionTap,
  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(gridResolution >= 8),
     assert(levelCount >= 2),
     assert(contourLineWidth > 0),
     assert(pointRadius >= 0),
     assert(interpolationPower > 0);