Adding Legend support.