View Full Version : How to zoom Ext GWT Chart?
sagneta
9 Feb 2010, 6:06 AM
Does anybody know how to zoom a chart (regardless of type) in and out? I'm sure it is simple to do but it is not clear how to do it.
Thanks in advance,
Steve
you can add a slider to your chart and then add a listener or simplily add a listener on your chart which will attribute new value (height and width) to the content panel of your chart when the event type is fire.
for example
*with a slider:
slider.addListener(Events.Change, new Listener<SliderEvent>(){
public void handleEvent(SliderEvent se){
YourContenPanel.setSize(height, width);
}
});
*directly on the chart:
pie.addChartListener(new ChartListener() {
public void chartClick(ChartEvent ce) {
YourContenPanel.setSize(height, width);
}
});
sagneta
21 Feb 2010, 12:28 PM
That worked. In particular the zooming of the chart itself appeared to work better in most instances than zoom the ContentPanel which makes sense. I appreciate the help jocy. Thanks again.
-Steve
jocy
21 Feb 2010, 11:52 PM
it was a pleasure!!!
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.