making use of new legend in svg