mmbsoftware-it / gwt-charts

Automatically exported from code.google.com/p/gwt-charts
0 stars 0 forks source link

Re-attachin a chart with selection != null causes Exception #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a chart 
2. call setSelection() and select a row/column 
3. hide chart (onUnload called)
4.) show chart (onLoad called). 

What is the expected output? What do you see instead?

Chart should be displayed with the previously selected row/column. 

However an Exception is thrown: 

Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot 
call method 'setSelection' of null
    at Unknown.Y.setSelection(http://www.google.com/uds/api/visualization/1.0/4c2447db544d51e9c1e1331ad80…format+de,default,geochart,orgchart,motionchart+de,corechart.I.js@430:1330)
    at Unknown.$setSelection(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@15:166856)
    at Unknown.recreate_0(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@32:167068)
    at Unknown.onLoad_17(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@8:166913)
    at Unknown.$onAttach(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@15:433)
    at Unknown.onAttach(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@3:558)
    at Unknown.execute_53(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@5:149942)
    at Unknown.tryCommand_0(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@9:149912)
    at Unknown.doAttachChildren_0(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@3:7379)
    at Unknown.$onAttach(http://localhost:9876/browser/E14856CD84E426CBDA4DD10653F4A2F0.cache.js@15:432) 

Possibly the call to setSelection has to be deferred because the chart hasn't 
fully be initialized. 

Original issue reported on code.google.com by uemit.se...@gmail.com on 18 Jun 2013 at 8:52

GoogleCodeExporter commented 8 years ago
Replace 'recreate' for 'redrawNow' in 
com.googlecode.gwt.charts.client.corechart.CoreChart to avoid setting selection 
when the chart hasn't fully be initialized.

Original comment by rglafo...@gmail.com on 27 Aug 2014 at 3:35

GoogleCodeExporter commented 8 years ago

Original comment by rglafo...@gmail.com on 3 Sep 2014 at 11:07