Fix legend click indexing issue
Get lines transitions working correctly
Add selector for line type, add 'axis' to data
Clean up a bit and add some commenting