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

toggle highlight for pie chart slice #2462

Closed
gaimanjing opened this issue May 22, 2017 · 1 comment
Closed

toggle highlight for pie chart slice #2462

gaimanjing opened this issue May 22, 2017 · 1 comment

Comments

@gaimanjing
Copy link

Pie chart should toggle highlight state if user taps the same slice, same as bar chart and line chart.

code in PieRadarChartViewBase.swift is:

    @objc fileprivate func tapGestureRecognized(_ recognizer: NSUITapGestureRecognizer)
    {
        if recognizer.state == NSUIGestureRecognizerState.ended
        {
            if !self.isHighLightPerTapEnabled { return }
            
            let location = recognizer.location(in: self)
            
            let high = self.getHighlightByTouchPoint(location)
            self.highlightValue(high, callDelegate: true)
        }
    }

code in BarLineChartViewBase.swift is:

            if h === nil || h!.isEqual(self.lastHighlighted)
            {
                self.highlightValue(nil, callDelegate: true)
                self.lastHighlighted = nil
            }
@liuxuan30
Copy link
Member

liuxuan30 commented May 24, 2017

note the gesture handler is private, so you can provide yours and do whatever you want. Someone just need this and others don't. So it will not change until many people asking.

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

2 participants