HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.45k stars 528 forks source link

Do not show mouse tracker if empty #207

Closed nicofrand closed 11 years ago

nicofrand commented 11 years ago

In hit.js, line 312, the mouse tracker is filled and inserted even if the content returned by the trackFormatter function is empty (null, "", undefined, etc.).

mouseTrack.innerHTML = n.mouse.trackFormatter({
      x: x,
      y: y,
      series: n.series,
      index: n.index,
      nearest: n,
      fraction: n.fraction
    });
    D.show(mouseTrack);
cesutherland commented 11 years ago

I'll leave it if they return an empty string, but hide for null and undefined. Does that work for you?

nicofrand commented 11 years ago

That will be fine thanks !