LineChart constructor
const
LineChart({
- Key? key,
- required LineChartData data,
- int visibleLabels = 3,
- int? initialIndex,
- SelectedPointerStyle? selectedPointerStyle,
- GridLinesStyle? gridLinesStyle,
- LineLabelStyle? lineLabelStyle,
- DataMarkerStyle? dataMarkerStyle,
- ZeroLineStyle zeroLineStyle = const ZeroLineStyle(),
- XAxisStyle xAxisStyle = const XAxisStyle(),
- XAxisLabelStyle xAxisLabelStyle = const XAxisLabelStyle(),
- YAxisStyle yAxisStyle = const YAxisStyle(),
- LabelTransformer labelTransformer = defaultLabelTransformer,
- MissingDataBehavior missingDataBehavior = MissingDataBehavior.zero,
- YAxisAnimationConfig yAxisAnimationConfig = YAxisAnimationConfig.smooth,
- ScrollPhysicsConfig scrollPhysicsConfig = ScrollPhysicsConfig.smooth,
- OnVisibleRangeChanged? onVisibleRangeChanged,
- OnSelectedChanged? onSelectedChanged,
- bool smooth = false,
- bool selectOnTap = false,
Implementation
const LineChart({
super.key,
required this.data,
this.visibleLabels = 3,
this.initialIndex,
this.selectedPointerStyle,
this.gridLinesStyle,
this.lineLabelStyle,
this.dataMarkerStyle,
this.zeroLineStyle = const ZeroLineStyle(),
this.xAxisStyle = const XAxisStyle(),
this.xAxisLabelStyle = const XAxisLabelStyle(),
this.yAxisStyle = const YAxisStyle(),
this.labelTransformer = defaultLabelTransformer,
this.missingDataBehavior = MissingDataBehavior.zero,
this.yAxisAnimationConfig = YAxisAnimationConfig.smooth,
this.scrollPhysicsConfig = ScrollPhysicsConfig.smooth,
this.onVisibleRangeChanged,
this.onSelectedChanged,
this.smooth = false,
this.selectOnTap = false,
});