Re: Funny animation behavior with ColumnChart, a bug / feat?

42 views
Skip to first unread message

asgallant

unread,
Nov 30, 2012, 12:35:14 PM11/30/12
to google-visua...@googlegroups.com
The different animations are caused by the chart seeing two different things happening, depending on what the initial state is.  When you start with 2011 and add 2012, the chart is seeing a new data series added, and thus goes through that animation.  When you start with 2012 and add 2011, the chart is seeing the first data series change value and color (2012 becomes 2011) and a second data series being added. When you start with both 2011 and 2012 and remove 2011, the chart sees the first data series change value and color again.

It's important to distinguish here that the chart only sees series of data.  What those series are, what they represent, is all transparent to the charts.

On Friday, November 30, 2012 10:50:56 AM UTC-5, Lippo Järviö wrote:
Hey all, 

how come the animation works differently (nicely) when adding/removing a column on the right hand side of the existing one, but
when adding one on the left hand side, I cannot follow the bars: http://jsfiddle.net/Mc3Wu/

Try this:
1. check 2012 --> OK
2. uncheck 2011 & 2012, check 2012 and then check 2011 --> WEIRD
3. also now having both years checked, removing 2011 looks makes a weird animation

I appreciate if anyone has deeper insights to offer regarding the animation dynamics!

best, Lippo

Lippo Järviö

unread,
Dec 3, 2012, 6:21:32 AM12/3/12
to google-visua...@googlegroups.com
Thanks for enlightening me, what you're saying is indeed how the chart sees things happening. Too bad this behavior seems to be quite hard-coded in the ColumnChart, at least I can't think of an easy workaround... If anyone else can, let's hear it! 

Maybe it's time to look into something more generic like D3 etc.

many thanks!

asgallant

unread,
Dec 3, 2012, 1:24:51 PM12/3/12
to google-visua...@googlegroups.com
I can think of a workaround, but it's rather complicated to implement, and doesn't work for an arbitrary number of data series - it would work if and only if you are displaying a maximum of two series at a time.  There is a slightly less elegant solution that would work with an arbitrary number of columns, but you end up with weird column spacing issues.

I'll try to work up an example for these.
Reply all
Reply to author
Forward
0 new messages