BezierChart constructor
BezierChart({
- Key? key,
- BezierChartConfig? config,
- List<
double> ? xAxisCustomValues, - FooterValueBuilder? bubbleLabelValueBuilder,
- FooterDateTimeBuilder? bubbleLabelDateTimeBuilder,
- DateTime? fromDate,
- DateTime? toDate,
- DateTime? selectedDate,
- ValueChanged<
bool> ? onIndicatorVisible, - ValueChanged<
DateTime?> ? onDateTimeSelected, - ValueChanged<
double?> ? onValueSelected, - double? selectedValue,
- BezierChartAggregation bezierChartAggregation = BezierChartAggregation.sum,
- required BezierChartScale bezierChartScale,
- required List<
BezierLine> series, - ValueChanged<
BezierChartScale?> ? onScaleChanged,
Implementation
BezierChart({
Key? key,
this.config,
this.xAxisCustomValues,
this.footerValueBuilder,
this.bubbleLabelValueBuilder,
this.footerDateTimeBuilder,
this.bubbleLabelDateTimeBuilder,
this.fromDate,
this.toDate,
this.selectedDate,
this.onIndicatorVisible,
this.onDateTimeSelected,
this.onValueSelected,
this.selectedValue,
this.bezierChartAggregation = BezierChartAggregation.sum,
required this.bezierChartScale,
required this.series,
this.onScaleChanged,
}) : assert(
(bezierChartScale == BezierChartScale.custom &&
xAxisCustomValues != null) ||
bezierChartScale != BezierChartScale.custom,
"The xAxisCustomValues and series must not be null",
),
assert(
bezierChartScale == BezierChartScale.custom &&
_isSorted(xAxisCustomValues!) ||
bezierChartScale != BezierChartScale.custom,
"The xAxisCustomValues must be sorted in increasing way",
),
assert(
bezierChartScale == BezierChartScale.custom &&
_compareLengths(xAxisCustomValues!.length, series) ||
bezierChartScale != BezierChartScale.custom,
"xAxisCustomValues lenght must be equals to series length",
),
assert(
(bezierChartScale == BezierChartScale.custom &&
_areAllPositive(xAxisCustomValues!) &&
_checkCustomValues(series)) ||
bezierChartScale != BezierChartScale.custom,
"xAxisCustomValues and series must be positives",
),
assert(
(((bezierChartScale != BezierChartScale.custom) &&
fromDate != null &&
toDate != null) ||
(bezierChartScale == BezierChartScale.custom &&
fromDate == null &&
toDate == null)),
"fromDate and toDate must not be null",
),
assert(
(((bezierChartScale != BezierChartScale.custom) &&
toDate!.isAfter(fromDate!)) ||
(bezierChartScale == BezierChartScale.custom &&
fromDate == null &&
toDate == null)),
"toDate must be after of fromDate",
),
super(key: key);