How to use the victory-chart/src/components/victory-zoom/helper-methods.pan function in victory-chart

To help you get started, we’ve selected a few victory-chart examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FormidableLabs / victory-chart-native / lib / components / victory-zoom.js View on Github external
handlePan(deltaX) {
    const calculatedDx = -(deltaX / this.getDomainScale());
    const nextXDomain = ZoomHelpers.pan(
      this.lastDomain.x,
      this.getDataDomain().x,
      calculatedDx
    );
    this.setDomain({x: nextXDomain});
  }
github FormidableLabs / victory-native / lib / components / victory-zoom.js View on Github external
handlePan(deltaX) {
    const calculatedDx = -(deltaX / this.getDomainScale());
    const nextXDomain = ZoomHelpers.pan(
      this.lastDomain.x,
      this.getDataDomain().x,
      calculatedDx
    );
    this.setDomain({ x: nextXDomain });
  }