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
ℹ Please fill out this template when filing an issue.
All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.
Per our *CONTRIBUTING guidelines, we use GitHub for
bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag ios-charts.
Please remove this line and everything above it before submitting.
What did you do?
ℹ Please replace this with what you did.
I have created a method for selecting the current date where the x-axis values are dates.
It works correctly if the entry to highlight has a value inside the dataset.
If this entry does not exist, the closest value is highlighted (apparently) even though the x-axis is selected correctly. The highlighted no.
https://ibb.co/hLMRBrY
ℹ Please replace this with what you expected to happen.
expected the highlight line to match the selected x-axis value
ℹ Please replace this with of what happened instead.
Charts Environment
Charts version/Branch/Commit Number: 3.2.0
Xcode version: 11.3.1
Swift version: 4.2
Platform(s) running Charts: iOS app
macOS version running Xcode:
Demo Project
I'm testing this
@objc private func selectedCurrent() { if let dataSets = graphicsView.data?.dataSets as? [LineChartDataSet] { let entry = ChartDataEntry(x: Double(currentDate - 1), y: 0.0) let currentSelection = graphicsView.getPosition(entry: entry, axis: YAxis.AxisDependency.left) let highlight = Highlight(x: Double(currentSelection.x), y: Double(currentSelection.y), xPx: currentSelection.x, yPx: currentSelection.y, dataSetIndex: currentDate, stackIndex: currentDate, axis: YAxis.AxisDependency.left) graphicsView.highlightValue(graphicsView.getHighlightByTouchPoint(currentSelection)) self.chartValueSelected(graphicsView, entry: entry, highlight: highlight) } }
The text was updated successfully, but these errors were encountered: