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
Figure 1: The chart that is rendered when this project is run
Figure 2 shows a stack trace which highlights the problem area.
This stack trace was generated by tapping a point just after the 5th chart entry.
In the debug window it can be seen that the variable i is set to 11 indicating the partitionIndex func did not correctly find the index of the first item that matches the predicate on line 199.
Given the argument xValue having value 6 the expected return for i should be 6.
The values contained within the ChartDataSet, along with their indexes, are printed in the bottom right of figure 2.
The overall result is that the entriesForXValue func returns an empty array and the chart highlighting / selection fails for that tap.
Figure 2: Call stack showing where filtering goes wrong
The text was updated successfully, but these errors were encountered:
What did you do?
Added a line chart control to show time series chart data and enabled highlighting so that when the chart is tapped the tapped value is highlighted.
What did you expect to happen?
The entry closest to the tap point should be highlighted
What happened instead?
Charts Environment
Charts version/Branch/Commit Number: 4.0.1/master/e91ba716190836b013ef8a9ca53e220ad5051e21
Xcode version: 12.4
Swift version: 5
Platform(s) running Charts: simulator iPad Air (4th Generation) 14.4
macOS version running Xcode: 10.15.6
Demo Project
https://github.com/gavynriebau/DemoChartsBug
Details about the demo project
Figure 1: The chart that is rendered when this project is run
Figure 2 shows a stack trace which highlights the problem area.
This stack trace was generated by tapping a point just after the 5th chart entry.
In the debug window it can be seen that the variable
i
is set to11
indicating thepartitionIndex
func did not correctly find the index of the first item that matches the predicate on line 199.Given the argument
xValue
having value6
the expected return fori
should be6
.The values contained within the
ChartDataSet
, along with their indexes, are printed in the bottom right of figure 2.The overall result is that the
entriesForXValue
func returns an empty array and the chart highlighting / selection fails for that tap.Figure 2: Call stack showing where filtering goes wrong
The text was updated successfully, but these errors were encountered: