Fixed legend, about to implement stacked chart.
Got the stacked bars and sorting all figured out. Now I have lots of cleanup, including combining the sort functions and the other items on the todo list
in index.html.