Plots not updating on data changes
See original GitHub issueHi there! I think the calls to Plotly.react
may be broken? (or I could be changing them incorrectly … I just started Vue.js)
Try this in your App.vue
to recreate it
<template>
<div id="app">
<plotly :data="plot_data" :layout="layout"></plotly>
<dat-gui closeText="Close controls" openText="Open controls" closePosition="bottom">
<dat-string v-model="layout.title" label="Title" />
<dat-number v-model="plot_data[0].y[0]" :min="-100" :max="100" :step="1" label="Offset y[0]"/>
</dat-gui>
<h3>{{layout}}</h3>
<h3>Y values are currently: {{this.plot_data[0].y}}</h3>
</div>
</template>
<script>
// the javascript below goes here
</script>
import {Plotly}from "vue-plotly";
import Vue from "vue";
import DatGui from "@cyrilf/vue-dat-gui";
Vue.use(DatGui);
export default {
name: "app",
components: { Plotly },
data() {
return {
layout: {
title: 'Plot update test'
},
plot_data: [{
x: [1,2,3,4],
y: [10, 15, 13, 17],
type: "scatter"
}]
};
},
};
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (3 by maintainers)
Top Results From Across the Web
Charts not updating when data is updated
Charts not updating when data is updated. Hello,. I have built an Excel dashboard template that has 46 charts referencing cells in a...
Read more >Excel Chart Not Updating with New Data (2 Suitable Solutions)
2 Solutions If Excel Chart Is Not Updating with New Data. First, look at the following data and the corresponding chart. It's a...
Read more >Plot not updating even after changing plot data - MathWorks
I am plotting lines on a surface plot in a GUI and trying to update the lines by changing XData,YData and ZData, but...
Read more >Shiny plot not updating when inputs are changed
I am running into an issue where my plot is not updating when any of my inputs are changed. I think the issue...
Read more >Graphs not updating when data changes - Mr. Excel
I have a workbook that looksup values and does reports and has some graphs in it. The graphs used to automatically update when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have a look at this demo for what I used to make statnett’s version reactive
The code of interest is here (albeit a bit messy 😨): https://github.com/Tehsurfer/vue-plotsvy/blob/netlify-hosting/src/App.vue
Ok for statnett! I must have found a special case. I found another one with this wrapper too anyway (I ve posted my “special” case in this issue #11) I actually use this wrapper and build my own component around it to fetch the data. So now you handle the call to plot or replot on your own, and you have a complete control on options, resposiveness? Might be a good idea for me too…