This example, using satirical data from The Onion, demonstrates how to wrap long axis labels to fit on multiple lines.
UPDATE: In order to make this code work for horizontal bar charts, the code for setting the 'y' attribute must be used when setting the 'x' attribute. I've included only the wrap function in this fork.