zoomAt method

void zoomAt(
  1. double px,
  2. double factor
)

px is from the plot's left.

Implementation

void zoomAt(double px, double factor) {
  if (linear) {
    // The position under the pointer stays under it.
    final at = indexAt(px), lo = at - (at - from) / factor;
    return _setLinear(lo, lo + (to - from) / factor);
  }
  _setViewport(
      viewport.zoomAt(px - plotLeft, factor, plotWidth, min: spec.x.minBarSpacing, max: spec.x.maxBarSpacing));
}