Tech: rewrite of how the legend is implement, performance increase, and will make future legend enhancements easier
Graph: fix for legend show/hide toggle, broken by recent legend rewrite