Skip to content
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

infinite recursion in HorizontalBarChartHighlighter #1377

Closed
dbquarrel opened this issue Aug 30, 2016 · 5 comments
Closed

infinite recursion in HorizontalBarChartHighlighter #1377

dbquarrel opened this issue Aug 30, 2016 · 5 comments

Comments

@dbquarrel
Copy link

The else branch here calls itself recursively forever. It should be a call to super. Might want to check all similar code to see if it has the same issue. Issue is triggered when you have grouped charts and click just outside the bars.

public override func getXIndex(x: CGFloat) -> Int
{
    if let barData = self.chart?.data as? BarChartData
        where !barData.isGrouped
    {
        // create an array of the touch-point
        var pt = CGPoint(x: 0.0, y: x)

        // take any transformer to determine the x-axis value
        self.chart?.getTransformer(ChartYAxis.AxisDependency.Left).pixelToValue(&pt)

        return Int(round(pt.y))
    }
    else
    {
        return getXIndex(x)
    }
}
@danielgindi
Copy link
Collaborator

Irrelevant, this code does not exist anymore...

@dbquarrel
Copy link
Author

When did it go? It's in what came out of cocoapods for me.

@liuxuan30
Copy link
Member

in master branch, as v3 is merged

@dbquarrel
Copy link
Author

I'm asking because cocoapods is installing this as 2.2.5 and that's what you get if you use a cocoapods install and there's no newer one. So either I'm using cocoapods wrong (possible) or there's some kind of issue with that config. I can see in the repository here that it's been updated, yes, but I had no way of knowing beforehand. I thought I had the most up to date version and there's other broken things constantly so it's never clear what you can rely on.

@liuxuan30
Copy link
Member

v3.0 is not released, so pods not updated yet.
I just remember I merged the fix: #1213. If possible, you can fix it on your side. But it seems pod will not be update for this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants