Added support for weight of legend terms