Addepar / ember-charts

https://opensource.addepar.com/ember-charts/
Other
784 stars 131 forks source link

Remove mouseover event on time-series path #199

Closed billylittlefield closed 7 years ago

billylittlefield commented 7 years ago

Bug

Hovering over a time-series line chart will sometimes result in errors being thrown in the console where d3 tries to parse an undefined time.

Background

Currently, time series line charts have two mouseover events that can fire -- one attached to line, and one attached to the dot that appears when hovering. The data being passed into showDetails for the line's mouseover event contained all data for the line, not a specific point. In short, this mouseover event was not doing anything except throwing errors. The correct data for a point is passed in the line marker's mouseover event, found in updateLineMarkers (in has-time-series-rule.js).

Fix

This fix removes the mouseover handlers from the line itself, so that only the line marker mouseover is used to populate the tooltip. No errors will be thrown as a result of hovering over the line.