-
Notifications
You must be signed in to change notification settings - Fork 11
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
No plot showing up #2
Comments
you have to redraw the view pieChartView.setNeedsDisplay() Dott. Vito BelliniMobile: (+39) 348 8908593
|
Hi! Thanks for replying. I add the line but it still didn't show up. It seems after I set its class to pieChartView, then it didn't show in the interface after I ran the app. I tried to set the colour to grey but there was nothing at all. The other labels were showing up normally. |
Have you created the UIView programmatically or via IB? Dott. Vito BelliniMobile: (+39) 348 8908593
|
Hi, I created a View from storyboard and then linked it to the file. I also changed it in the identification column from UIView to PieChartView. and then follows It still didn’t show up... Hope you have a nice weekend! On 27 Feb 2015, at 17:21, Vito Bellini [email protected] wrote:
|
Hi, Had the same issue. The root cause is that the overidden drawRect is not being called when assigning the PiechartView directly to the IBOutlet. This usually happens when the views frame is invalid (CGRectZero); however, the views frame was set correctly, so the problem must be something else. Solution
|
Hi,
I tried to link the pieChartView to a UIView I created, but the codes didn't work.
How can I use this to draw a pie chart in the view controller?
The code I added in my app is:
@IBOutlet weak var pieChartView: PieChartView!
pieChartView.addItem(20, color: UIColor.blueColor())
pieChartView.addItem(20, color: UIColor.redColor())
pieChartView.addItem(60, color: UIColor.purpleColor())
The text was updated successfully, but these errors were encountered: