SimpleRoseChart constructor

const SimpleRoseChart({
  1. Key? key,
  2. required List<SimpleRoseChartData> data,
  3. SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
  4. SimpleRoseScale scale = SimpleRoseScale.area,
  5. double? maxValue,
  6. double height = 250,
  7. EdgeInsets padding = _defaultPadding,
  8. List<Color>? palette,
  9. Color? trackColor,
  10. Color? gridColor,
  11. Color? activeColor,
  12. TextStyle? labelStyle,
  13. TextStyle? valueStyle,
  14. bool showGrid = true,
  15. bool showLabels = true,
  16. bool showLegend = true,
  17. bool showValues = true,
  18. bool showTooltip = true,
  19. bool showActiveSegment = true,
  20. int gridRingCount = 4,
  21. double innerRadiusFactor = 0.08,
  22. double segmentSpacing = 0.018,
  23. double startAngle = -math.pi / 2,
  24. SimpleRoseValueFormatter? valueFormatter,
  25. SimpleRoseValueFormatter? normalizedFormatter,
  26. SimpleRoseTapCallback? onSegmentTap,
  27. SimpleRoseTooltipBuilder? tooltipBuilder,
  28. WidgetBuilder? emptyBuilder,
  29. String? semanticLabel,
  30. bool excludeFromSemantics = false,
  31. Duration animationDuration = const Duration(milliseconds: 760),
  32. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

const SimpleRoseChart({
  super.key,
  required this.data,
  this.style = SimpleBarChartStyle.elegant,
  this.scale = SimpleRoseScale.area,
  this.maxValue,
  this.height = 250,
  this.padding = _defaultPadding,
  this.palette,
  this.trackColor,
  this.gridColor,
  this.activeColor,
  this.labelStyle,
  this.valueStyle,
  this.showGrid = true,
  this.showLabels = true,
  this.showLegend = true,
  this.showValues = true,
  this.showTooltip = true,
  this.showActiveSegment = true,
  this.gridRingCount = 4,
  this.innerRadiusFactor = 0.08,
  this.segmentSpacing = 0.018,
  this.startAngle = -math.pi / 2,
  this.valueFormatter,
  this.normalizedFormatter,
  this.onSegmentTap,
  this.tooltipBuilder,
  this.emptyBuilder,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.animationDuration = const Duration(milliseconds: 760),
  this.animationCurve = Curves.easeOutCubic,
}) : assert(height > 0),
     assert(maxValue == null || maxValue > 0),
     assert(gridRingCount >= 2),
     assert(innerRadiusFactor >= 0 && innerRadiusFactor < 0.8),
     assert(segmentSpacing >= 0 && segmentSpacing <= 0.12);