What determines what order the legend items are displayed in?

In a Tempo Bar Chart, what determines what order the legend items are displayed in, and what colors are chosen for those items....

OriginalPostID-84132

OriginalPostID-84132

  Discussion posts and replies are publicly visible