Legend toggle

close #406 

Here's a preliminary version. There may be a better way to organize this to make it easier to customize, so this is open to any suggestions.