getPoint method

  1. @protected
DatumPoint<D> getPoint(
  1. Object? datum,
  2. D? domainValue,
  3. D? domainLowerBoundValue,
  4. D? domainUpperBoundValue,
  5. ImmutableSeries<D> series,
  6. ImmutableAxis<D> domainAxis,
  7. num? measureValue,
  8. num? measureLowerBoundValue,
  9. num? measureUpperBoundValue,
  10. num? measureOffsetValue,
  11. 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);
}