Returns a pointer to a custom CObject - derived class associated with legend
A custom object should have been previously set in constructor or using SetCustomData().