pombreda / gwt-google-apis

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

Visualization Charts should implement RequireResize interface #486

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:

gwt-visualization-1.1.2

Platform information (OS, Browser, GWT version).  Does the issue exist on
other platforms?

all plattforms

Give a Detailed description of the problem.  If possible, please include
some code that reproduces the problem and a verbatim copy of any error
messages you can find.

The new LayoutPanels of GWT 2.x make it possible to create desktop like 
applications which can handle resize events. Because most visualization charts 
require explicit sizes it is important to propagate resize events to the 
visualization charts. GWT provides the interface RequireResize for that. It 
would be practical if the Visualization and AbstractVisualization class 
implements those interfaces.

Workaround if you have one:

Extend AbstractVisualization and implement RequireResize interface and in the 
onResize() method retrieve new dimensions and re-draw the visualization. 
However because the option and DataTable instances are private it's not easily 
possible. Workaround: create setter method and store option and Datatable 
instances in the derived class. 

Links to the relevant Google Group posts:

Original issue reported on code.google.com by uemit.se...@gmail.com on 9 Nov 2011 at 3:08