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 am using react-timeseries-charts and in order to get my graph to show a different color if a price is high or low etc. i created different timeSeries variables and had them showing on my 1 Chart See below
I have my legend show the different charts, shown as: Price, Medium Price, High Price etc each with a different color.
My issue is that when i am over lets say the High Price bar, i expect the value on my legend to change on the High Price Section and return 0 on everything else... instead the variable shows the value of the closest element to that.
Below is how i get the price, first find the index using series.bisect(tracker) where tracker is an x:y co-ordinate, get the element of the series on that index, then get the value while adding a format.
I would like the index to be returned as 0 or NaN or -1 if I am not currently over that series so i can then have my legend show a value or null if those values above show up.
Hopefully i have provided with enough info.
The text was updated successfully, but these errors were encountered:
jckozy86
changed the title
series.bisect() returns closest index instead of -1 or null
with multi series.bisect() returns closest index instead of -1 when not over that series
Mar 13, 2019
Hi everyone,
I am using react-timeseries-charts and in order to get my graph to show a different color if a price is high or low etc. i created different timeSeries variables and had them showing on my 1 Chart See below
(https://i.stack.imgur.com/yhqUN.png)
I have my legend show the different charts, shown as: Price, Medium Price, High Price etc each with a different color.
My issue is that when i am over lets say the High Price bar, i expect the value on my legend to change on the High Price Section and return 0 on everything else... instead the variable shows the value of the closest element to that.
Below is how i get the price, first find the index using series.bisect(tracker) where tracker is an x:y co-ordinate, get the element of the series on that index, then get the value while adding a format.
I would like the index to be returned as 0 or NaN or -1 if I am not currently over that series so i can then have my legend show a value or null if those values above show up.
Hopefully i have provided with enough info.
The text was updated successfully, but these errors were encountered: