Added a legend "sorted" option to control sorting of legend entries
   independent of their series order.