detectOutsideLabelCollision method

  1. @override
bool detectOutsideLabelCollision(
  1. num labelY,
  2. bool labelLeftOfChart,
  3. num? previousOutsideLabelY,
  4. bool? previousLabelLeftOfChart,
)
override

Detects whether the current outside label collides with the previous label.

Implementation

@override
bool detectOutsideLabelCollision(
  num labelY,
  bool labelLeftOfChart,
  num? previousOutsideLabelY,
  bool? previousLabelLeftOfChart,
) {
  if (!extendLeaderLine) {
    return super.detectOutsideLabelCollision(
      labelY,
      labelLeftOfChart,
      previousOutsideLabelY,
      previousLabelLeftOfChart,
    );
  } else {
    return _collisionDetectionParams.any(
      (param) => super.detectOutsideLabelCollision(
        labelY,
        labelLeftOfChart,
        param.previousOutsideLabelY,
        param.previousLabelLeftOfChart,
      ),
    );
  }
}