This is based on the Protovis layout; virtually no changes were needed to the code aside from handling of previous and next siblings.