Basic convenience functions for D3. Work in progress.