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

Question: using of methods #22

Open
joeSaad opened this issue Aug 2, 2019 · 1 comment
Open

Question: using of methods #22

joeSaad opened this issue Aug 2, 2019 · 1 comment

Comments

@joeSaad
Copy link

joeSaad commented Aug 2, 2019

Question: How do I use react method and redraw?
I am having the data updated with another fetch from the backend but it is not reflecting the change in the chart.

Thanks

@nicomoya123
Copy link

<vue-plotly
                        :data="plotTelems(inv.telems)"
                        :layout="layout"
                        :options="layouts.options"
                      />

plotTelems(data) {
      let time = data.map(a => a.time);
      let foo= data.map(a => a.foo);
      let trace1 = {
        name: "foo",
        x: time,
        y: foo,
        type: "scatter",
        yaxis: "y"
      };
      let pData = [trace1];
      return pData);
    },

If you give example i could help you more

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