Added jasmine specs for new legend creating functionality