Trim to depend on diagram type