How To Draw Graphs with Core Plot, Part 1

Discussion of the official tutorials published on raywenderlich.com. Please only discuss the official tutorials here - for general questions, use the General Discussion forum instead.

How To Draw Graphs with Core Plot, Part 1

Postby rwenderlich » Tue Jun 05, 2012 11:00 am

This is the official thread to discuss the following blog post: How To Draw Graphs with Core Plot, Part 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Team Member
Site Admin
 
Posts: 2230
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 28 times
Been thanked: 366 times

Re: How To Draw Graphs with Core Plot, Part 1

Postby ChrisD » Tue Jun 05, 2012 4:20 pm

The link for the project's resources does not work.
-Chris
User avatar
ChrisD
n00b
 
Posts: 1
Joined: Fri Nov 11, 2011 7:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Draw Graphs with Core Plot, Part 1

Postby rwenderlich » Tue Jun 05, 2012 5:17 pm

Oops - sorry about that, should be fixed now!
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ray Wenderlich
Blog: http://www.raywenderlich.com
Twitter: http://twitter.com/rwenderlich
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
User avatar
rwenderlich
Team Member
Site Admin
 
Posts: 2230
Joined: Thu Dec 23, 2010 4:14 pm
Has thanked: 28 times
Been thanked: 366 times

Re: How To Draw Graphs with Core Plot, Part 1

Postby zeiteisen » Tue Jun 05, 2012 8:23 pm

Everything is working. This could be a cool feature for statistics in our apps.
zeiteisen
Uber Haxx0r
 
Posts: 79
Joined: Mon May 02, 2011 8:41 pm
Has thanked: 5 times
Been thanked: 4 times

Re: How To Draw Graphs with Core Plot, Part 1

Postby simmsmo » Tue Jun 05, 2012 10:55 pm

Thanks a bunch for this tutorial!!! Very informative.
User avatar
simmsmo
Hacker
 
Posts: 22
Joined: Mon Oct 10, 2011 2:52 pm
Location: Baltimore,MD
Has thanked: 1 time
Been thanked: 2 times

Re: How To Draw Graphs with Core Plot, Part 1

Postby SSteve » Wed Jun 06, 2012 1:55 am

Thanks for the tutorial. I've been using SM2DGraphView for some internal applications for years. It was great to have but there hasn't been any development on it since I started using it and it's starting to show its age. I've had my eye on Core Plot for quite a while. Maybe this will give me the impetus to make the switch.
User avatar
SSteve
Hacker
 
Posts: 13
Joined: Fri Dec 16, 2011 1:18 am
Location: Sierra Foothills, California
Has thanked: 0 time
Been thanked: 0 time

Hello

Postby earlystar » Wed Jun 20, 2012 8:17 am

When i following core plot1 tutorial i get this error? How do i solve? Any solution?

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CPDStockPriceStore", referenced from:
objc-class-ref in CPDPieChartViewController.o
"_CPDThemeNameDarkGradient", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNamePlainBlack", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNamePlainWhite", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNameSlate", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNameStocks", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
SC2-Stalker Quote (It shall be as you say)
User avatar
earlystar
Hacker
 
Posts: 14
Joined: Tue Jan 04, 2011 4:32 am
Has thanked: 1 time
Been thanked: 0 time

Re: Hello

Postby sabaranski » Tue Jun 26, 2012 12:14 am

earlystar wrote:When i following core plot1 tutorial i get this error? How do i solve? Any solution?

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_CPDStockPriceStore", referenced from:
objc-class-ref in CPDPieChartViewController.o
"_CPDThemeNameDarkGradient", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNamePlainBlack", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNamePlainWhite", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNameSlate", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o
"_CPDThemeNameStocks", referenced from:
-[CPDPieChartViewController themeTapped:] in CPDPieChartViewController.o
-[CPDPieChartViewController actionSheet:clickedButtonAtIndex:] in CPDPieChartViewController.o


CPDStockPriceStore is a class that the tutorial prompted you to import. Did you happen to download & incorporate the project resources? Hopefully that will fix it for you.
User avatar
sabaranski
Hacker
 
Posts: 37
Joined: Mon May 02, 2011 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: How To Draw Graphs with Core Plot, Part 1

Postby Electro123 » Thu Jul 05, 2012 4:52 am

This tutorial was awesome! Thank you so much. I can't wait until tutorial #2 if finished. I looked at Core Plot a year ago and couldn't get a handle on it so I built my own graphing tools using Quartz2D. It was a great learning experience but an immense amount of work.

Again - thanks for such a great tutorial. It should be easier to understand the documentation now and move forward on my own. I hope. :)


Sincerely,
Gerry O.
Electro123
Hacker
 
Posts: 27
Joined: Tue Oct 18, 2011 5:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How To Draw Graphs with Core Plot, Part 1

Postby silverhand31 » Mon Jul 23, 2012 4:50 am

I got an error with
Code: Select all
'NSInvalidArgumentException', reason: '-[__NSCFConstantString sizeWithTextStyle:]

when trying add graph.tittle, step 3

Code: Select all

-(void)configureGraph {   
    // 1 - Create and initialise graph
   CPTGraph *graph = [[CPTXYGraph alloc] initWithFrame:self.hostView.bounds];
   self.hostView.hostedGraph = graph;
   graph.paddingLeft = 0.0f;
   graph.paddingTop = 0.0f;
   graph.paddingRight = 0.0f;
   graph.paddingBottom = 0.0f;
   graph.axisSet = nil;
   // 2 - Set up text style
   
   
   
   CPTMutableTextStyle *textStyle = [CPTMutableTextStyle textStyle];
   textStyle.color = [CPTColor grayColor];
   
   textStyle.fontName = @"Helvetica-Bold";
   textStyle.fontSize = 16.0f;   
   // 3 - Configure title
//   NSString *title = @"Portfolio Prices: May 1, 2012";
   graph.title = @"dkjslf";   
   
   graph.titleTextStyle = textStyle;
   graph.titlePlotAreaFrameAnchor = CPTRectAnchorTop;   
   graph.titleDisplacement = CGPointMake(0.0f, -12.0f);   
   
   
   
   // 4 - Set theme
   self.selectedTheme = [CPTTheme themeNamed:kCPTPlainWhiteTheme];   
   [graph applyTheme:self.selectedTheme];

}

Did search, all the answers are add lag "all load" but not work for me. iOS5.1
Anyone help me plz, it already took 4h of my life :(
silverhand31
Baby Hacker
 
Posts: 7
Joined: Mon Nov 28, 2011 2:24 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Official Tutorials

Who is online

Users browsing this forum: No registered users and 15 guests