{"id":15293694,"url":"https://github.com/micheltlutz/mllinechart","last_synced_at":"2025-10-21T10:43:28.300Z","repository":{"id":56920671,"uuid":"142870933","full_name":"micheltlutz/MLLineChart","owner":"micheltlutz","description":"A simple Line Chart Lib","archived":true,"fork":false,"pushed_at":"2021-02-09T12:51:52.000Z","size":531,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-09-22T16:51:24.364Z","etag":null,"topics":["carthage","chart","chart-library","charts","pod","swift","swift-framework","swift-package-manager","swift4"],"latest_commit_sha":null,"homepage":"http://micheltlutz.me","language":"Swift","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/micheltlutz.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-30T12:15:15.000Z","updated_at":"2024-12-18T19:48:04.000Z","dependencies_parsed_at":"2022-08-21T04:50:35.679Z","dependency_job_id":null,"html_url":"https://github.com/micheltlutz/MLLineChart","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/micheltlutz/MLLineChart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheltlutz%2FMLLineChart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheltlutz%2FMLLineChart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheltlutz%2FMLLineChart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheltlutz%2FMLLineChart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micheltlutz","download_url":"https://codeload.github.com/micheltlutz/MLLineChart/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micheltlutz%2FMLLineChart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278733232,"owners_count":26036384,"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-10-07T02:00:06.786Z","response_time":59,"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":["carthage","chart","chart-library","charts","pod","swift","swift-framework","swift-package-manager","swift4"],"created_at":"2024-09-30T16:50:38.596Z","updated_at":"2025-10-07T06:30:49.871Z","avatar_url":"https://github.com/micheltlutz.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MLLineChart\n\n\u003cp align=\"center\"\u003e\n \u003cimg width=\"300\" height=\"300\"src=\"http://micheltlutz.me/imagens/projetos/MLLineChart/logo.png\"\u003e\n\u003c/p\u003e\n\n\n[![Swift 5.0](https://img.shields.io/badge/swift-5.0-brightgreen.svg)](https://swift.org)\n[![Platforms](https://img.shields.io/cocoapods/p/MLLineChart.svg)](https://cocoapods.org/pods/MLLineChart)\n[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://raw.githubusercontent.com/micheltlutz/MLLineChart/master/LICENSE)\n[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods compatible](https://img.shields.io/cocoapods/v/MLLineChart.svg)](https://cocoapods.org/pods/MLLineChart)\n[![Travis](https://img.shields.io/travis/micheltlutz/MLLineChart/master.svg)](https://travis-ci.org/micheltlutz/MLLineChart/branches)\n\nA Simple Line Chart Library\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\n## Requirements\n\n- iOS 10.0+ / tvOS 9.0+ \n- Xcode 10.2.1+\n\n## Installation\n\n### CocoaPods\n\nAdd the following line to your Podfile:\n\n    pod \"MLLineChart\"\n\n\n``` $ pod install ```\n\n### Dependency Managers\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eCocoaPods\u003c/strong\u003e\u003c/summary\u003e\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate MLLineChart into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '10.0'\nuse_frameworks!\n\npod 'MLLineChart', '~\u003e 2.0.5'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eCarthage\u003c/strong\u003e\u003c/summary\u003e\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate MLLineChart into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"micheltlutz/MLLineChart\" ~\u003e 2.0.5\n```\n\n\u003c/details\u003e\n\n\n### Manually\n\nIf you prefer not to use either of the aforementioned dependency managers, you can integrate MLLineChart into your project manually.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eGit Submodules\u003c/strong\u003e\u003c/summary\u003e\u003cp\u003e\n\n- Open up Terminal, `cd` into your top-level project directory, and run the following command \"if\" your project is not initialized as a git repository:\n\n```bash\n$ git init\n```\n\n- Add MLLineChart as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command:\n\n```bash\n$ git submodule add https://github.com/micheltlutz/MLLineChart.git\n$ git submodule update --init --recursive\n```\n\n- Open the new `MLLineChart` folder, and drag the `MLLineChart.xcodeproj` into the Project Navigator of your application's Xcode project.\n\n    \u003e It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.\n\n- Select the `MLLineChart.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target.\n- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the \"Targets\" heading in the sidebar.\n- In the tab bar at the top of that window, open the \"General\" panel.\n- Click on the `+` button under the \"Embedded Binaries\" section.\n- You will see two different `MLLineChart.xcodeproj` folders each with two different versions of the `MLLineChart.framework` nested inside a `Products` folder.\n\n    \u003e It does not matter which `Products` folder you choose from.\n\n- Select the `MLLineChart.framework`.\n\n- And that's it!\n\n\u003e The `MLLineChart.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.\n\n\u003c/p\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003eEmbedded Binaries\u003c/strong\u003e\u003c/summary\u003e\u003cp\u003e\n\n- Download the latest release from https://github.com/micheltlutz/MLLineChart/releases\n- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the \"Targets\" heading in the sidebar.\n- In the tab bar at the top of that window, open the \"General\" panel.\n- Click on the `+` button under the \"Embedded Binaries\" section.\n- Add the downloaded `MLLineChart.framework`.\n- And that's it!\n\n\u003c/p\u003e\u003c/details\u003e\n\n\n## Usage\n\n\n```swift\nimport MLLineChart\n\nclass ViewController: UIViewController {\n\t private var lineChart: MLLineChart!\n    private var dataEntries: [MLPointEntry] = []\n    var widthChart = CGFloat(320)\n    var heightChart = CGFloat(275)\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        makeData()\n        setupChart()\n    }\n\n    private func makeData() {\n        dataEntries.append(MLPointEntry(value: 5, label: \"1\", color: .gray))\n        dataEntries.append(MLPointEntry(value: 6, label: \"2\", color: .green))\n        dataEntries.append(MLPointEntry(value: 4, label: \"3\", color: .blue))\n    }\n\n    private func setupChart() {\n        lineChart = MLLineChart(frame: CGRect(x: 0, y: 0, width: widthChart, height: heightChart))\n        lineChart.translatesAutoresizingMaskIntoConstraints = false\n        lineChart.dataEntries = dataEntries\n        lineChart.lineColor = .gray\n        lineChart.lineWidth = 2\n        lineChart.showShadows = true\n        lineChart.showAxisLine = true\n        lineChart.gradienLinesColors = [UIColor.gray.cgColor, UIColor.green.cgColor, UIColor.blue.cgColor]\n        lineChart.configLabelsBottom = MLLabelConfig(color: .white,\n                                                           backgroundColor: .gray,\n                                                           rounded: true,\n                                                           font: UIFont.systemFont(ofSize: 11),\n                                                           width: 16, height: 16, fontSize: 11)\n    }    \n    /// Cntinue your code\n    \n}\n\n```\n\n## Docs\n\n- In work\n[Documentation](http://htmlpreview.github.io/?https://github.com/micheltlutz/MLLineChart/blob/develop/docs/index.html)\n\nMLLineChart Docs (- documented)\n\n\n## Demo App\n\nUsing MLLineChartDemo Target on this project\n\n\n\u003cp align=\"center\"\u003e\n \u003cimg width=\"300\" height=\"358\"src=\"http://micheltlutz.me/imagens/projetos/MLLineChart/IMG_4604.jpg\"\u003e \n \n \n \u003cimg width=\"300\" height=\"358\"src=\"http://micheltlutz.me/imagens/projetos/MLLineChart/IMG_4605.jpg\"\u003e\n\u003c/p\u003e\n\n\n## Contributing\n\nIssues and pull requests are welcome!\n\n## Todo\n\n- [X] Migrate to Swift 4.2\n- [ ] Support again to line without curve\n- [ ] 100% documented\n\n## Author\n\nMichel Anderson Lutz Teixeira [@michel_lutz](https://twitter.com/michel_lutz)\n\nInspired on  [nhatminh12369/LineChart](https://github.com/nhatminh12369/LineChart)\n\n[My Site](http://micheltlutz.me)\n\n## Contributions\n\n\u003ca href=\"https://github.com/maclacerda\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4759987?v=3\" title=\"maclacerda\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\n## License\n\nMLLineChart is released under the MIT license. See [LICENSE](https://github.com/micheltlutz/MLLineChart/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicheltlutz%2Fmllinechart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicheltlutz%2Fmllinechart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicheltlutz%2Fmllinechart/lists"}