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

chartTranslated in a Pie Chart is not called #3821

Closed
1 task
jgbrittos opened this issue Jan 17, 2019 · 2 comments
Closed
1 task

chartTranslated in a Pie Chart is not called #3821

jgbrittos opened this issue Jan 17, 2019 · 2 comments

Comments

@jgbrittos
Copy link

jgbrittos commented Jan 17, 2019

What did you do?

I have created a simples Pie Chart, but chartTranslated is never called even thou the other ChartViewDelegate methods are working fine.

I have set pieChartView's delegate in the viewDidLoad of ViewController

override func viewDidLoad() {
    super.viewDidLoad()
    pieChartView.delegate = self
}

//...

func chartTranslated(_ chartView: ChartViewBase, dX: CGFloat, dY: CGFloat) {
    print("Point (\(dX), \(dY))")
}

What did you expect to happen?

I was expecting chartTranslated to be called whenever I drag the Pie chart and print every point variation in console.

What happened instead?

Nothing happens! chartTranslated method is not called and the print("") I have put inside it doesn't print anything.

Charts Environment

**Charts version/Branch/Commit Number:**3.2.1
**Xcode version:**10.1
**Swift version:**4.2
**Platform(s) running Charts:**iOS
**macOS version running Xcode:**10.13.6

@liuxuan30
Copy link
Member

liuxuan30 commented Jan 22, 2019

chartTranslated is never called in pie chart. I'm not sure why, but if you want it, you can override some methods and add it in your sub pie chart class.

@9SL9
Copy link

9SL9 commented Jun 4, 2019

chartTranslated is never called in pie chart. I'm not sure why, but if you want it, you can override some methods and add it in your sub pie chart class.

Any tips on how to get chartTranslated called from a piechart? How would I override 'some methods'?

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