How to use the victory-core.addEvents function in victory-core

To help you get started, we’ve selected a few victory-core 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 / packages / victory-errorbar / src / victory-errorbar.js View on Github external
}

  render() {
    const { animationWhitelist, role } = VictoryErrorBar;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const children = this.renderData(props);
    return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
  }
}

export default addEvents(VictoryErrorBar);
github FormidableLabs / victory-sunburst / src / components / victory-sunburst.js View on Github external
}

  render() {
    const { role } = this.constructor;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const children = this.renderSunburstData(props);
    return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
  }
}

export default addEvents(VictorySunburst);
github FormidableLabs / victory / packages / victory-line / src / victory-line.js View on Github external
return !!this.props.animate;
  }

  render() {
    const { animationWhitelist, role } = VictoryLine;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const children = this.renderContinuousData(props);
    return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
  }
}
export default addEvents(VictoryLine);
github FormidableLabs / victory / packages / victory-line / src / victory-line.js View on Github external
return !!this.props.animate;
  }

  render() {
    const { animationWhitelist, role } = VictoryLine;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const children = this.renderContinuousData(props);
    return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
  }
}
export default addEvents(VictoryLine, options);
github FormidableLabs / victory / packages / victory-area / src / victory-area.js View on Github external
}

  render() {
    const { animationWhitelist, role } = VictoryArea;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const children = this.renderContinuousData(props);
    return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
  }
}

export default addEvents(VictoryArea);
github FormidableLabs / victory-chart / src / components / victory-voronoi-tooltip / victory-voronoi-tooltip.js View on Github external
render() {
    const {role} = this.constructor;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);
    if (this.shouldAnimate()) {
      return (
        
          {React.createElement(this.constructor, props)}
        
      );
    }
    const children = this.renderData(props);
    return this.renderContainer(props, children);
  }
}
export default addEvents(VictoryVoronoiTooltip);
github FormidableLabs / victory / packages / victory-box-plot / src / victory-box-plot.js View on Github external
}

  render() {
    const { animationWhitelist, role } = VictoryBoxPlot;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const children = this.renderBoxPlot(props);
    return props.standalone ? this.renderContainer(props.containerComponent, children) : children;
  }
}

export default addEvents(VictoryBoxPlot, options);
github FormidableLabs / victory-chart / src / components / victory-area / victory-area.js View on Github external
const { role } = this.constructor;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);

    if (this.shouldAnimate()) {
      return (
        
          {React.createElement(this.constructor, props)}
        
      );
    }
    const children = this.renderData(props);
    return this.renderContainer(props.containerComponent, children);
  }
}

export default addEvents(VictoryArea);
github FormidableLabs / victory-chart / src / components / victory-scatter / victory-scatter.js View on Github external
render() {
    const {role} = this.constructor;
    const props = Helpers.modifyProps(this.props, fallbackProps, role);
    if (this.shouldAnimate()) {
      return (
        
          {React.createElement(this.constructor, props)}
        
      );
    }
    const children = this.renderData(props);
    return this.renderContainer(props.containerComponent, children);
  }
}

export default addEvents(VictoryScatter);
github FormidableLabs / victory / packages / victory-axis / src / victory-axis.js View on Github external
if (this.shouldAnimate()) {
      return this.animateComponent(props, animationWhitelist);
    }

    const gridAndTicks = this.renderGridAndTicks(props);
    const modifiedGridAndTicks = props.fixLabelOverlap
      ? this.fixLabelOverlap(gridAndTicks, props)
      : gridAndTicks;
    const children = [this.renderLine(props), this.renderLabel(props), ...modifiedGridAndTicks];
    return props.standalone
      ? this.renderContainer(props.containerComponent, children)
      : React.cloneElement(props.groupComponent, {}, children);
  }
}

export default addEvents(VictoryAxis, options);