question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Graph not changing on input change

See original GitHub issue

According to the docs: This component currently creates a new plot every time the input changes. It seems like the graph would do a redraw once the data changed. When passing updated props to the <Plot/> data attribute the plot stays the same.

Even when checking in componentWillReceiveProps() the nextProps.data is different than the this.props.data.

Update: The same seems true when incrementing the revision attribute.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Dec 27, 2018

Hey, everyone! Take a look in this solution with explanations in how to create a graph using React and Plot.ly with the life cycle of the React.

https://medium.com/@jmmccota/plotly-react-and-dynamic-data-d40c7292dbfb

1reaction
nicolaskruchtencommented, Jan 14, 2019

I would also like to replace componentWillUpdate with componentDidUpdate

we can do this anyway, without bumping the major version number IMO. It might be nicer to use shouldComponentUpdate but this is the smaller change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Solution for on change doesn't work when input is ...
The onchange event only fires if the user changes the value of the input. It isn't supposed to fire if the input is...
Read more >
Update the data in an existing chart - Microsoft Support
Changes you make will instantly show up in the chart. Right-click the item you want to change and input the data--or type a...
Read more >
Excel- Graphs do not update when input data is changed
Annoying but possible solution: 1.Create your graph while using the macro recorder. 2.Take that code and add it to a sheet change or...
Read more >
Detect Changes in Data and Expression Values - MathWorks
Limitations of Change Detection · Standalone Stateflow charts in MATLAB: Local only · Charts in Simulink ® that use MATLAB as the action...
Read more >
Updating Charts | Chart.js
Sometimes when a chart updates, you may not want an animation. To achieve this you can call update with 'none' as mode. myChart.update( ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found