addMeasureValuesFor method
void
addMeasureValuesFor(
- MutableSeries<
D> series, - Axis<
num> measureAxis, - int startIndex,
- int endIndex,
Implementation
void addMeasureValuesFor(
MutableSeries<D> series,
Axis<num> measureAxis,
int startIndex,
int endIndex,
) {
final measureFn = series.measureFn;
final measureOffsetFn = series.measureOffsetFn!;
final measureLowerBoundFn = series.measureLowerBoundFn;
final measureUpperBoundFn = series.measureUpperBoundFn;
for (var i = startIndex; i <= endIndex; i++) {
final measure = measureFn(i);
final measureOffset = measureOffsetFn(i);
if (measure != null && measureOffset != null) {
measureAxis.addDomainValue(measure + measureOffset);
if (measureLowerBoundFn != null && measureUpperBoundFn != null) {
measureAxis
.addDomainValue((measureLowerBoundFn(i) ?? 0) + measureOffset);
measureAxis
.addDomainValue((measureUpperBoundFn(i) ?? 0) + measureOffset);
}
}
}
}