SimpleSlopeChart constructor
const
SimpleSlopeChart({
- Key? key,
- required List<
SimpleSlopeChartData> data, - String startLabel = 'Start',
- String endLabel = 'End',
- SimpleTrendChartStyle style = SimpleTrendChartStyle.elegant,
- double? minValue,
- double? maxValue,
- double height = 260,
- EdgeInsets padding = _defaultPadding,
- List<
Color> ? palette, - Color? lineColor,
- Color? positiveColor,
- Color? negativeColor,
- Color? gridColor,
- Color? axisColor,
- Color? activeColor,
- TextStyle? labelStyle,
- TextStyle? valueStyle,
- bool includeZero = false,
- bool colorByDelta = true,
- bool showGrid = true,
- bool showValues = true,
- bool showDelta = true,
- bool showEndLabels = true,
- bool showTooltip = true,
- bool showActiveLine = true,
- int gridLineCount = 4,
- double? strokeWidth,
- double? dotRadius,
- SimpleSlopeValueFormatter? valueFormatter,
- SimpleSlopeValueFormatter? deltaFormatter,
- SimpleSlopeTapCallback? onLineTap,
- SimpleSlopeTooltipBuilder? tooltipBuilder,
- WidgetBuilder? emptyBuilder,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- Duration animationDuration = const Duration(milliseconds: 700),
- Curve animationCurve = Curves.easeOutCubic,
Implementation
const SimpleSlopeChart({
super.key,
required this.data,
this.startLabel = 'Start',
this.endLabel = 'End',
this.style = SimpleTrendChartStyle.elegant,
this.minValue,
this.maxValue,
this.height = 260,
this.padding = _defaultPadding,
this.palette,
this.lineColor,
this.positiveColor,
this.negativeColor,
this.gridColor,
this.axisColor,
this.activeColor,
this.labelStyle,
this.valueStyle,
this.includeZero = false,
this.colorByDelta = true,
this.showGrid = true,
this.showValues = true,
this.showDelta = true,
this.showEndLabels = true,
this.showTooltip = true,
this.showActiveLine = true,
this.gridLineCount = 4,
this.strokeWidth,
this.dotRadius,
this.valueFormatter,
this.deltaFormatter,
this.onLineTap,
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(strokeWidth == null || strokeWidth > 0),
assert(dotRadius == null || dotRadius >= 0);