shouldRepaint method

  1. @override
bool shouldRepaint(
  1. ISparklinesData other
)
override

Check if this chart should repaint compared to other Returns true if any property that affects rendering has changed

Implementation

@override
bool shouldRepaint(ISparklinesData other) {
  if (other is! BetweenLineData) return true;
  if (visible != other.visible) return true;
  if (rotation != other.rotation) return true;
  if (flip != other.flip) return true;
  if (origin != other.origin) return true;
  if (layout != other.layout) return true;
  if (areaColor != other.areaColor) return true;
  if (areaGradient != other.areaGradient) return true;
  if (areaFillType != other.areaFillType) return true;

  if (from.shouldRepaint(other.from) || to.shouldRepaint(other.to)) {
    return true;
  }

  return false;
}