Unified the data formats for layeredGraph and springLayout