You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for assistance in understanding the tooltip display.
Problem: I only see the minimal date text in the tooltip, instead of the additional label and coloring.
This bit of code is why
serie.find = function (date) {
var bisect = d3.bisector(fk(aes.x)).left;
var i = bisect(serie.data, date) - 1
if (i == -1)
return null
//look to far after serie is defined
if (i == serie.data.length - 1 && serie.data.length > 1 &&
Number(date) - Number(serie.data[i][aes.x]) > Number(serie.data[i][aes.x]) - Number(serie.data[i - 1][aes.x]))
return null /******** this is always returned *************/
return serie.data[i]
}
Hi Luke! Sorry I'm so late to this. I ran into the same problem. I figured that the problem is in the subtraction of the dates. If your dates have hours (which usually happens on the constructor of Date because of localization) then there is the possibility that Number(date) - Number(serie.data[i][aes.x]) will indeed be greater than Number(serie.data[i][aes.x]) - Number(serie.data[i - 1][aes.x]). The solution is to remove hours.
I'm looking for assistance in understanding the tooltip display.
Problem: I only see the minimal date text in the tooltip, instead of the additional label and coloring.
This bit of code is why
Data looks like this
Chart config:
Any ideas greatly appreciated!
The text was updated successfully, but these errors were encountered: