Add median to stacked graph legend

Addresses Feature Request anchor/machiavelli#61
There are more efficient ways to find the median; sorting is most likely fine for now, but keep in mind in case it's ever problematic.