Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant use function animate #21

Open
mmoskorz opened this issue Jun 13, 2019 · 1 comment
Open

Cant use function animate #21

mmoskorz opened this issue Jun 13, 2019 · 1 comment

Comments

@mmoskorz
Copy link

I tried to do some animation, but I receive this error:

vue.runtime.esm.js:1888 TypeError: _statnett_vue_plotly__WEBPACK_IMPORTED_MODULE_0___default.a.animate is not a function

this is my function:

    test()
    {
      VuePlotly.animate(
        {
          data: [{y: [Math.random(), Math.random(), Math.random()]}],
          traces: [0],
          layout: {}
        }, {
        transition: {
        duration: 500,
        easing: 'cubic-in-out'
        },
        frame: {
        duration: 500
        }
      })
    }
@SumNeuron
Copy link

@mmoskorz this is because 1. animate is not exposed and 2. whenever data changes, it calls this.react twice resulting in any animation attempts to be moot (as your data is already where you say it should be. See: #27 for my solution to how to animate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants