ATLAS-103 : Allow legend to be passed as a parameter