Kombucha - 2011-09-21

Hi,

There's a bug with the function :

:::java
public T setSize(int width, int height, boolean animated)

Whether you set the animated flag to true or false, the resizing gets animated.
So to whomever still roams these forums, here's a fix :
In the BaseChart class, just change this function :

~~~~~~~~~~~~~~~~
:::java
public T setSize(int width, int height, Animation animation) {

// Avoid monkeying with anything if we got bad values
if (width <= 0 || height <= 0) {
    return returnThis();
}

if (isRendered()) {
    // If we re already on the screen, then do the resize natively
    if (animation == null) {
        nativeSetSize(chart, width, height, false);
    } else if (animation.getOptions() == null) {
        nativeSetSize(chart, width, height, true);
    } else {
        nativeSetSize(chart, width, height, animation.getOptions().getJavaScriptObject());
    }
} else {
    // In we're invoked before the chart is rendered, keep the width and height around in our configuration
    setOption("/chart/width", width);
    setOption("/chart/height", height);
}

return returnThis();

}
~~~~~~~~~~~~~~~~~

kthxbai