SimpleRoseChart constructor
const
SimpleRoseChart({
- Key? key,
- required List<
SimpleRoseChartData> data, - SimpleBarChartStyle style = SimpleBarChartStyle.elegant,
- SimpleRoseScale scale = SimpleRoseScale.area,
- double? maxValue,
- double height = 250,
- EdgeInsets padding = _defaultPadding,
- List<
Color> ? palette, - Color? trackColor,
- Color? gridColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool showGrid = true,
- bool showLabels = true,
- bool showLegend = true,
- bool showValues = true,
- bool showTooltip = true,
- bool showActiveSegment = true,
- int gridRingCount = 4,
- double innerRadiusFactor = 0.08,
- double segmentSpacing = 0.018,
- double startAngle = -math.pi / 2,
- SimpleRoseValueFormatter? valueFormatter,
- SimpleRoseValueFormatter? normalizedFormatter,
- SimpleRoseTapCallback? onSegmentTap,
- SimpleRoseTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 760),
- 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);