getPoint method
DatumPoint<D>
getPoint(
- Object? datum,
- D? domainValue,
- D? domainLowerBoundValue,
- D? domainUpperBoundValue,
- ImmutableSeries<D> series,
- ImmutableAxis<D> domainAxis,
- num? measureValue,
- num? measureLowerBoundValue,
- num? measureUpperBoundValue,
- num? measureOffsetValue,
- ImmutableAxis<num> measureAxis,
)
Implementation
@protected
DatumPoint<D> getPoint(
Object? datum,
D? domainValue,
D? domainLowerBoundValue,
D? domainUpperBoundValue,
ImmutableSeries<D> series,
ImmutableAxis<D> domainAxis,
num? measureValue,
num? measureLowerBoundValue,
num? measureUpperBoundValue,
num? measureOffsetValue,
ImmutableAxis<num> measureAxis,
) {
final domainPosition = domainAxis.getLocation(domainValue);
final domainLowerBoundPosition = domainLowerBoundValue != null
? domainAxis.getLocation(domainLowerBoundValue)
: null;
final domainUpperBoundPosition = domainUpperBoundValue != null
? domainAxis.getLocation(domainUpperBoundValue)
: null;
final measurePosition = measureValue != null && measureOffsetValue != null
? measureAxis.getLocation(measureValue + measureOffsetValue)
: null;
final measureLowerBoundPosition = measureLowerBoundValue != null
? measureAxis.getLocation(measureLowerBoundValue + measureOffsetValue!)
: null;
final measureUpperBoundPosition = measureUpperBoundValue != null
? measureAxis.getLocation(measureUpperBoundValue + measureOffsetValue!)
: null;
return DatumPoint<D>(
datum: datum,
domain: domainValue,
series: series,
x: domainPosition,
xLower: domainLowerBoundPosition,
xUpper: domainUpperBoundPosition,
y: measurePosition,
yLower: measureLowerBoundPosition,
yUpper: measureUpperBoundPosition,
);
}