-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bar chart click on outside of bar calling delegate #2741
Comments
open func getHighlight(xValue xVal: Double, x: CGFloat, y: CGFloat) -> Highlight?
{
guard let chart = chart
else { return nil }
let closestValues = getHighlights(xValue: xVal, x: x, y: y)
if closestValues.isEmpty
{
return nil
}
let leftAxisMinDist = getMinimumDistance(closestValues: closestValues, y: y, axis: YAxis.AxisDependency.left)
let rightAxisMinDist = getMinimumDistance(closestValues: closestValues, y: y, axis: YAxis.AxisDependency.right)
let axis = leftAxisMinDist < rightAxisMinDist ? YAxis.AxisDependency.left : YAxis.AxisDependency.right
let detail = closestSelectionDetailByPixel(closestValues: closestValues, x: x, y: y, axis: axis, minSelectionDistance: chart.maxHighlightDistance)
return detail
}
|
You edited this function? I saw the code and actually is different of it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I implemented bar chart. If i selected out side area of bar also "chartValueSelected delegate"
is calling.
Thank you....
The text was updated successfully, but these errors were encountered: