How to use the victory.VictoryAnimation function in victory

To help you get started, we’ve selected a few victory 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 mathisonian / hyperchart / components / wrapper.js View on Github external
render () {
      const animationData = this.state.expanded ? {left: 0} : {left: 75};
      const inner = React.createElement('div', {style: {position: 'relative'}}, this.mapChildren());
      const dynamicStyles = {
        borderColor: this.props.foregroundColor,
        backgroundColor: this.props.backgroundColor
      };

      return React.createElement(Animation, {data: animationData, duration: 350}, (d) => {
        if (d.left > 0) {
          d = Object.assign({}, {
            left: d.left + '%',
            // top: d.top + '%'
          });
        }
        return React.createElement('div', {style: Object.assign({}, overlayStyles, d, dynamicStyles), onClick: this.handleClick, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave}, inner);
      });
    }
  }