{"id":843,"url":"https://github.com/ArthurGuibert/FSLineChart","last_synced_at":"2025-07-30T19:32:27.083Z","repository":{"id":21338366,"uuid":"24655283","full_name":"ArthurGuibert/FSLineChart","owner":"ArthurGuibert","description":"A line chart library for iOS","archived":false,"fork":false,"pushed_at":"2017-08-09T21:02:30.000Z","size":308,"stargazers_count":847,"open_issues_count":17,"forks_count":119,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-07-13T08:44:21.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArthurGuibert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-30T20:55:28.000Z","updated_at":"2025-04-21T18:15:28.000Z","dependencies_parsed_at":"2022-08-18T06:22:17.012Z","dependency_job_id":null,"html_url":"https://github.com/ArthurGuibert/FSLineChart","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ArthurGuibert/FSLineChart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurGuibert%2FFSLineChart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurGuibert%2FFSLineChart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurGuibert%2FFSLineChart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurGuibert%2FFSLineChart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArthurGuibert","download_url":"https://codeload.github.com/ArthurGuibert/FSLineChart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArthurGuibert%2FFSLineChart/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267928985,"owners_count":24167431,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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.739Z","updated_at":"2025-07-30T19:32:26.787Z","avatar_url":"https://github.com/ArthurGuibert.png","language":"Objective-C","funding_links":[],"categories":["Charts","UI"],"sub_categories":["Other free courses","Getting Started"],"readme":"FSLineChart\n===========\n\nA line chart library for iOS.\n\nScreenshots\n---\n\u003cimg src=\"Screenshots/fslinechart.png\" width=\"320px\" /\u003e\u0026nbsp;\n\u003cimg src=\"Screenshots/fslinechart2.png\" width=\"320px\" /\u003e\n\nInstalling FSLineChart\n---\nAdd the contents of the FSLineChart project to your directory or simply add the following line to your Podfile:\n\n    pod \"FSLineChart\"\n\nHow to use\n---\nFSLineChart is a subclass of UIView so it can be added as regular view. The block structure allows you to format the values displayed on the chart the way you want. Here is a simple swift example:\n\n```swift\nvar data: [Int] = []\n        \n// Generate some dummy data\nfor _ in 0...10 {\n    data.append(Int(20 + (arc4random() % 100)))\n}\n\nverticalGridStep = 5\nhorizontalGridStep = 9\nlabelForIndex = { \"\\($0)\" }\nlabelForValue = { \"$\\($0)\" }\nsetChartData(data)\n```\n\nOr in objective-c\n\n```objc\nNSArray* months = @[@\"January\", @\"February\", @\"March\", @\"April\", @\"May\", @\"June\", @\"July\"];\n    \nFSLineChart* lineChart = [[FSLineChart alloc] initWithFrame:frame];\n\nlineChart.labelForIndex = ^(NSUInteger item) {\n    return months[item];\n};\n\nlineChart.labelForValue = ^(CGFloat value) {\n    return [NSString stringWithFormat:@\"%.02f €\", powf(10,value)];\n};\n\n[lineChart setChartData:chartData];\n```\n\nYou can also set several parameters. Some of the parameters including `color` and `fillColor` must be set before calling the `setChartData` method. All those properties are available:\n\n```objc\n// Index label properties\n@property (copy) FSLabelForIndexGetter labelForIndex;\n@property (nonatomic, strong) UIFont* indexLabelFont;\n@property (nonatomic) UIColor* indexLabelTextColor;\n@property (nonatomic) UIColor* indexLabelBackgroundColor;\n\n// Value label properties\n@property (copy) FSLabelForValueGetter labelForValue;\n@property (nonatomic, strong) UIFont* valueLabelFont;\n@property (nonatomic) UIColor* valueLabelTextColor;\n@property (nonatomic) UIColor* valueLabelBackgroundColor;\n@property (nonatomic) ValueLabelPositionType valueLabelPosition;\n\n// Number of visible step in the chart\n@property (nonatomic) int gridStep;\n@property (nonatomic) int verticalGridStep;\n@property (nonatomic) int horizontalGridStep;\n\n// Margin of the chart\n@property (nonatomic) CGFloat margin;\n\n@property (nonatomic) CGFloat axisWidth;\n@property (nonatomic) CGFloat axisHeight;\n\n// Decoration parameters, let you pick the color of the line as well as the color of the axis\n@property (nonatomic, strong) UIColor* axisColor;\n@property (nonatomic) CGFloat axisLineWidth;\n\n// Chart parameters\n@property (nonatomic, strong) UIColor* color;\n@property (nonatomic, strong) UIColor* fillColor;\n@property (nonatomic) CGFloat lineWidth;\n\n// Data points\n@property (nonatomic) BOOL displayDataPoint;\n@property (nonatomic, strong) UIColor* dataPointColor;\n@property (nonatomic, strong) UIColor* dataPointBackgroundColor;\n@property (nonatomic) CGFloat dataPointRadius;\n\n// Grid parameters\n@property (nonatomic) BOOL drawInnerGrid;\n@property (nonatomic, strong) UIColor* innerGridColor;\n@property (nonatomic) CGFloat innerGridLineWidth;\n\n// Smoothing\n@property (nonatomic) BOOL bezierSmoothing;\n@property (nonatomic) CGFloat bezierSmoothingTension;\n\n// Animations\n@property (nonatomic) CGFloat animationDuration;\n```\n\n\nExamples\n---\nYou can clone the repo to see a simple example. I'm also using FSLineChart on [ChartLoot](https://github.com/ArthurGuibert/ChartLoot) if you want to see the integration in a bigger project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArthurGuibert%2FFSLineChart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FArthurGuibert%2FFSLineChart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArthurGuibert%2FFSLineChart/lists"}