{"id":840,"url":"https://github.com/xyfeng/XYPieChart","last_synced_at":"2025-07-30T19:32:20.431Z","repository":{"id":2648523,"uuid":"3638663","full_name":"xyfeng/XYPieChart","owner":"xyfeng","description":"A simple and animated Pie Chart for your iOS app.","archived":false,"fork":false,"pushed_at":"2016-03-18T06:29:19.000Z","size":822,"stargazers_count":1729,"open_issues_count":42,"forks_count":301,"subscribers_count":68,"default_branch":"master","last_synced_at":"2024-11-30T04:06:46.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyfeng.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-06T14:26:28.000Z","updated_at":"2024-08-05T21:58:59.000Z","dependencies_parsed_at":"2022-09-07T19:00:09.066Z","dependency_job_id":null,"html_url":"https://github.com/xyfeng/XYPieChart","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyfeng%2FXYPieChart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyfeng%2FXYPieChart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyfeng%2FXYPieChart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyfeng%2FXYPieChart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyfeng","download_url":"https://codeload.github.com/xyfeng/XYPieChart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228178890,"owners_count":17881105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:32.665Z","updated_at":"2024-12-04T19:31:58.717Z","avatar_url":"https://github.com/xyfeng.png","language":"Objective-C","funding_links":[],"categories":["Charts","UI","Objective-C  Stars 1000以内排名整理"],"sub_categories":["Other free courses","Getting Started"],"readme":"h1. XYPieChart\n\n\nXYPieChart is an simple and easy-to-use pie chart for iOS app. It started from a \"Potion\":http://www.potiondesign.com Project which needs an animated pie graph without interaction. All animation was implemented in the drawRect: method. After played with \"BTSPieChart\":https://github.com/briancoyner/Core-Animation-Pie-Chart, really like its code structure, it's clean, has well named functions, structure like a UITableView. XYPieChart rewrote the code, based on CALayers for the animation. Compared to BTSPieChart, XYPieChart is a prettier version, it has a simpler insert/delete slices algorithm, different design of slice selection, more flexible to customize. \"Video Demo\":http://vimeo.com/38069395\n\n\n\u003cdiv class=\"macbuildserver-block\"\u003e\n    \u003ca class=\"macbuildserver-button\" href=\"http://macbuildserver.com/project/github/build/?xcode_project=Demo%2FXYPieChart.xcodeproj\u0026amp;target=XYPieChart\u0026amp;repo_url=git%3A%2F%2Fgithub.com%2Fxyfeng%2FXYPieChart.git\u0026amp;build_conf=Release\" target=\"_blank\"\u003e\u003cimg src=\"http://com.macbuildserver.github.s3-website-us-east-1.amazonaws.com/button_up.png\"/\u003e\u003c/a\u003e\u003cbr/\u003e\u003csup\u003e\u003ca href=\"http://macbuildserver.com/github/opensource/\" target=\"_blank\"\u003eby MacBuildServer\u003c/a\u003e\u003c/sup\u003e\n\u003c/div\u003e\n\n\n\n!https://dl.dropboxusercontent.com/u/11819416/blog/XYPieChart_Screenshot.png!\n\n\n\nh2. Features\n\n* Customized color for slices (default color supported)\n* animated insert/delete slice(s)\n* slice selection animation\n* text label option of showing percentage or actual value\n* text label auto-hide when slice is too small\n* customizable text label font and relative postion\n* pie opening/closing animation\n* pie starting angle support\n* ARC(Automatic Reference Counting) support\n* interface builder support\n\nh2. Installation\n\n* Drag the @XYPieChart/XYPieChart@ folder into your project. \n* Add the *QuartzCore* framework to your project. \n\nh2. Usage\n\n(see sample Xcode project in @/Demo@)\n\nSet PieChart properties:\n\n\u003cpre\u003e\n[self.pieChart setDelegate:self];\n[self.pieChart setDataSource:self];\n[self.pieChart setStartPieAngle:M_PI_2];\t//optional\n[self.pieChart setAnimationSpeed:1.0];\t//optional\n[self.pieChart setLabelFont:[UIFont fontWithName:@\"DBLCDTempBlack\" size:24]];\t//optional\n[self.pieChart setLabelColor:[UIColor blackColor]];\t//optional, defaults to white\n[self.pieChart setLabelShadowColor:[UIColor blackColor]];\t//optional, defaults to none (nil)\n[self.pieChart setLabelRadius:160];\t//optional\n[self.pieChart setShowPercentage:YES];\t//optional\n[self.pieChart setPieBackgroundColor:[UIColor colorWithWhite:0.95 alpha:1]];\t//optional\n[self.pieChart setPieCenter:CGPointMake(240, 240)];\t//optional\n\u003c/pre\u003e\n\nImplement Data Source Methods:\n\n\u003cpre\u003e\n- (NSUInteger)numberOfSlicesInPieChart:(XYPieChart *)pieChart;\n- (CGFloat)pieChart:(XYPieChart *)pieChart valueForSliceAtIndex:(NSUInteger)index;\n- (UIColor *)pieChart:(XYPieChart *)pieChart colorForSliceAtIndex:(NSUInteger)index;\t//optional\n- (NSString *)pieChart:(XYPieChart *)pieChart textForSliceAtIndex:(NSUInteger)index;\t//optional\n\u003c/pre\u003e\n\nImplement  Delegate Methods (OPTIONAL):\n\n\u003cpre\u003e\n- (void)pieChart:(XYPieChart *)pieChart willSelectSliceAtIndex:(NSUInteger)index;\n- (void)pieChart:(XYPieChart *)pieChart didSelectSliceAtIndex:(NSUInteger)index;\n- (void)pieChart:(XYPieChart *)pieChart willDeselectSliceAtIndex:(NSUInteger)index;\n- (void)pieChart:(XYPieChart *)pieChart didDeselectSliceAtIndex:(NSUInteger)index;\n\u003c/pre\u003e\n\nh2. Credits\n\nXYPieChart is brought to you by \"XY Feng\":http://xystudio.cc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyfeng%2FXYPieChart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyfeng%2FXYPieChart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyfeng%2FXYPieChart/lists"}