Comments (4)
On second thoughts, is there a way to use 'shouldComponentUpdate' to prevent unnecessary updates?
from react-google-charts.
Hey @hari-rangarajan,
Re-creating a new visualization object on each re-draw would make the library feel sluggish, and all animations when changing the data will be lost, so I'm not sure it would be the best idea.
Can you provide me with some code that I can run to help debug this issue ?
Cheers !
from react-google-charts.
I don't how to package a runnable version but here is the idea to trigger the bug. Set new data when processing any event. The old tool tips get stuck. This is what the stack overflow link I posted earlier talks about.
componentDidMount: function() {
var chart_events = [
{
eventName : 'onmouseover',
callback : function(Chart) {
// Returns Chart so you can access props and the ChartWrapper object from chart.wrapper
console.log("mouseover the chart");
>>>>>> this.setState(columns: newColumnData); <<<<<<
}
}
];
},
render: function() {
<Chart chartType = "ScatterChart" rows = {this.state.rows} columns = {this.state.columns} options = {this.state.options} graph_id = "ScatterChart" width={"100%"} height={"400px"} chartEvents = {chart_events} />
}
from react-google-charts.
Another way to do it would be to create a component containing any html element and the google chart. When handling any event on the google chart, update the html element with a setState. This will force a redraw on the entire component and produce the problem.
from react-google-charts.
Related Issues (20)
- Add support for Marker GeoCharts and ISO-3166:2 district codes
- Options are not documented
- Allow to close tooltips programmatically
- Storage size formats
- [Bug]: addOneTimeListener this doesn't seem to be supported?
- [Bug]: Can't seem to get MutationObserver to work inside an event, but it works with the underlying library
- [Bug]: Bar Chart (and Other?) Examples Broken
- [Bug]: No Material UI Support?
- [Bug]: Scatter chart options not recognized (Material)
- Remove deprecated dependency react-scripts
- [Bug]: Diff tooltips prefix option
- [Bug]: Stacked Column Chart - Show Annotation on Bars HOT 1
- [Bug]: ReferenceError: Property 'document' doesn't exist
- [Bug]: sort and page events are not working with Table chart HOT 1
- [Bug]: Geo chart (maybe other) doesn't respect React@18 StrictMode
- [Bug]: Select event is not working in strict mode. HOT 1
- [Bug]: loadingStatus state for react-google-charts is set as loading permanantly HOT 5
- [Bug]: Org Chart does not render label on top node HOT 1
- [Bug]: Charts with spreadsheets does not work
- [Bug]: can't only show lable in tooltip
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-google-charts.