cleaned up some legend code and enabled the following ordering options: "color", "id", "size", "text"