clamp method
Kept so that at least keep rows stay in view on either side.
Implementation
GraphViewport clamp(int count, double width, {int keep = 2}) {
if (count == 0 || width <= 0) return this;
final k = math.min(keep, count);
final most = width / barSpacing - k, least = (k - count).toDouble();
return GraphViewport(barSpacing: barSpacing, rightOffset: most < least ? least : rightOffset.clamp(least, most));
}