compareDomainValueToViewport method

  1. @override
int compareDomainValueToViewport(
  1. num domainValue
)

Tests whether the given domainValue is within the axis' range.

Returns < 0 if the domainValue would plot before the viewport, 0 if it would plot within the viewport and > 0 if it would plot beyond the viewport of the axis.

Implementation

@override
int compareDomainValueToViewport(num domainValue) {
  final dataExtent = _viewportSettings.domainExtent ?? _domainInfo.extent;
  return dataExtent.compareValue(domainValue);
}