Animation nodes, barchart, I can generate the bars, but how do I animate them?
Click on the image to enlarge it.

I prefer to do the math on single values with Math nodes, which is why I have moved the Combine Vector to the back.

To get the time offset in the scaling animation, we start with the index of each cube from the Index output. With the Time Info node, we can get the current frame.

If we subtract the index from the frame we can get an offset for each element. If we multiply the index with an arbitrary factor before that, we'll get a bigger or smaller offset

frame   -   index  *  3   =  result
  9     -     0    *  3   =  9
  9     -     1    *  3   =  6
  9     -     2    *  3   =  3
  9     -     3    *  3   =  0
  9     -     4    *  3   =  -3


We can clamp the result from 0 to 1 and use it as the input to a MapRange node. The MapRange node also has the advantage of having an interpolation mode input. As you can see with the frame offset by the index, the first bars from left to right switch from 0 to 1 earlier.

This switch from 0 to 1 plays back the animation in the MapRange nodes output, so make sure to set the OuputMin to 0 and the OutputMax to our desired height of the value which you obtain from the ParseNumber node. (This part remains as in your original node graph.)

Because this switch from 0 to 1 only takes a single frame the animation of the bars change from one frame to another (and thus is not visible as an animation). Simply add another multiply node after our previous result, scaling the time downwards so that the 0-1 happens over multiple frames. I named this multiplier StrechAnimTime.



You may have noticed that this animation takes the same time for all bars making the longer bars move faster than the shorter bars. To make the animation time more proportional, use a multiplied version of the height (Parse Number result) for the InputMax of the MapRange node.


Much more dramatic.