mode / alamode

A community-maintained library of visualizations for Mode reports
MIT License
70 stars 67 forks source link

Fix customChartColors() to only set one `mousemove` handler #19

Closed laughinghan closed 7 years ago

laughinghan commented 7 years ago

Rather than twice a second attaching a new 'mousemove' event handler, do all the other color-overwriting twice a second but just attach one 'mousemove' event handler when first configuring the custom chart colors.

Factor preparatory data massaging needed by both mousemove handler and drawColors() into its own function called by each.

Also cherry-pick #17 which heavily conflicts with this. It fixes the tooltip legend colors not being affected:

screen shot 2017-05-23 at 3 54 56 pm

Thanks @leqilong!