{"id":25330833,"url":"https://github.com/mahozad/android-pie-chart","last_synced_at":"2025-10-04T11:26:54.674Z","repository":{"id":37545026,"uuid":"368245345","full_name":"mahozad/android-pie-chart","owner":"mahozad","description":"Highly customizable Android library for drawing Pie and Donut charts.","archived":false,"fork":false,"pushed_at":"2024-03-20T12:59:13.000Z","size":32558,"stargazers_count":35,"open_issues_count":50,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-20T14:01:36.688Z","etag":null,"topics":["android","android-library","chart","charting","charting-library","donut-chart","donutchart","doughnut-chart","kotlin","kotlin-library","pie-chart","piechart","plotting","ring-chart","ringchart","visualization"],"latest_commit_sha":null,"homepage":"https://mahozad.ir/android-pie-chart","language":"Kotlin","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/mahozad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-05-17T16:02:26.000Z","updated_at":"2024-03-18T05:27:55.000Z","dependencies_parsed_at":"2023-01-24T17:30:53.751Z","dependency_job_id":null,"html_url":"https://github.com/mahozad/android-pie-chart","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahozad%2Fandroid-pie-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahozad%2Fandroid-pie-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahozad%2Fandroid-pie-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahozad%2Fandroid-pie-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahozad","download_url":"https://codeload.github.com/mahozad/android-pie-chart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238777982,"owners_count":19528818,"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":["android","android-library","chart","charting","charting-library","donut-chart","donutchart","doughnut-chart","kotlin","kotlin-library","pie-chart","piechart","plotting","ring-chart","ringchart","visualization"],"created_at":"2025-02-14T03:55:35.702Z","updated_at":"2025-10-04T11:26:54.570Z","avatar_url":"https://github.com/mahozad.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[comment]: \u003c\u003e ([![Build Status]\u0026#40;https://www.travis-ci.com/mahozad/android-pie-chart.svg?branch=master\u0026#41;]\u0026#40;https://www.travis-ci.com/mahozad/android-pie-chart\u0026#41;)\n[comment]: \u003c\u003e (![Dependencies]\u0026#40;https://img.shields.io/librariesio/github/mahozad/android-pie-chart\u0026#41;)\n[comment]: \u003c\u003e (![Code Size]\u0026#40;https://img.shields.io/github/languages/code-size/mahozad/android-pie-chart\u0026#41;)\n[comment]: \u003c\u003e (![Repo Size]\u0026#40;https://img.shields.io/github/repo-size/mahozad/android-pie-chart\u0026#41;)\n[comment]: \u003c\u003e (![SLOC]\u0026#40;https://img.shields.io/tokei/lines/github/mahozad/android-pie-chart\u0026#41;)\n[comment]: \u003c\u003e (![Downloads]\u0026#40;https://img.shields.io/github/downloads/mahozad/android-pie-chart/total\u0026#41;)\n[comment]: \u003c\u003e (![Closed Issues]\u0026#40;https://img.shields.io/github/issues-closed/mahozad/android-pie-chart?color=green\u0026#41;)\n[comment]: \u003c\u003e (![Commits Since Last Release]\u0026#40;https://img.shields.io/github/commits-since/mahozad/android-pie-chart/latest\u0026#41;)\n[comment]: \u003c\u003e (![Release workflow]\u0026#40;https://img.shields.io/github/workflow/status/mahozad/android-pie-chart/Test?label=CI%2FCD\u0026#41;)\n[comment]: \u003c\u003e (![Tests]\u0026#40;https://img.shields.io/github/checks-status/mahozad/android-pie-chart/master\u0026#41;)\n[comment]: \u003c\u003e (![Milestone Progress]\u0026#40;https://img.shields.io/github/milestones/progress-percent/mahozad/android-pie-chart/1\u0026#41;)\n[comment]: \u003c\u003e (![Lines of code]\u0026#40;https://img.shields.io/tokei/lines/github/mahozad/android-pie-chart?color=%23efefef\u0026#41;)\n[comment]: \u003c\u003e ([![Latest release]\u0026#40;https://img.shields.io/github/v/release/mahozad/android-pie-chart\u0026#41;]\u0026#40;https://github.com/mahozad/android-pie-chart/releases/latest\u0026#41;)\n\n[comment]: \u003c\u003e (!*†‡;)\n\n\n\u003cimg align=\"right\" src=\"logo.svg\" height=\"84px\"\u003e\n\n[comment]: \u003c\u003e ([![CI workflow]]\u0026#40;https://github.com/mahozad/android-pie-chart/actions/workflows/ci.yml\u0026#41;)\n[![Codecov]](https://codecov.io/gh/mahozad/android-pie-chart)\n[![Latest Maven Central release]](https://search.maven.org/artifact/ir.mahozad.android/pie-chart)\n![Kotlin]\n\nA Pie/Donut\u003csup id=\"ref-1\"\u003e[*]\u003c/sup\u003e/Ring chart for Android, customizable to the most extent possible.  \nFor tutorial and examples refer to the [website].\n\n\n\u003cdiv align=\"center\"\u003e\n\n| Screenshot 1    | Screenshot 2    | Screenshot 3    | Screenshot 4    | Screenshot 5    |\n|-----------------|-----------------|-----------------|-----------------|-----------------|\n| ![Screenshot 2] | ![Screenshot 1] | ![Screenshot 3] | ![Screenshot 4] | ![Screenshot 5] |\n\n\u003c/div\u003e\n\n### build.gradle[.kts]\n```groovy\nimplementation(\"ir.mahozad.android:pie-chart:0.7.0\")\n```\n\n### XML layout\n```xml\n\u003cir.mahozad.android.PieChart\n    android:id=\"@+id/pieChart\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\" /\u003e\n```\n\n### Kotlin Activity\n```kotlin\nval pieChart = findViewById\u003cPieChart\u003e(R.id.pieChart)\npieChart.slices = listOf(\n    PieChart.Slice(0.2f, Color.BLUE),\n    PieChart.Slice(0.4f, Color.MAGENTA),\n    PieChart.Slice(0.3f, Color.YELLOW),\n    PieChart.Slice(0.1f, Color.CYAN)\n)\n```\n\n### Jetpack Compose\n```kotlin\n@Composable\nfun PieChartView() {\n    AndroidView(\n        modifier = Modifier.fillMaxSize(),\n        factory = { context -\u003e\n            PieChart(context).apply {\n                slices = listOf(\n                    PieChart.Slice(0.2f, Color.BLUE),\n                    PieChart.Slice(0.4f, Color.MAGENTA),\n                    PieChart.Slice(0.3f, Color.YELLOW),\n                    PieChart.Slice(0.1f, Color.CYAN)\n                )\n            }\n        },\n        update = { view -\u003e\n            // View's been inflated or state read in this block has been updated\n            // Add logic here if necessary\n        }\n    )\n}\n```\n\n## Contributing\n\nPlease help improve the library by fixing [the issues that I couldn't tackle myself].  \nAny other contributions are also welcome.\n\n\u003cbr\u003e\n\n\u003csub\u003e\u003cb id=\"footnote-1\"\u003e*\u003c/b\u003e Or *Doughnut* [↵]\u003c/sub\u003e\n\n  [*]: #footnote-1\n  [↵]: #ref-1\n  [Logo]: logo-animated.svg\n  [Kotlin]: https://img.shields.io/badge/kotlin-1.6.21-303030.svg?labelColor=303030\u0026logo=data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxOC45MyAxOC45MiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyYWRpYWxHcmFkaWVudCBpZD0iZ3JhZGllbnQiIHI9IjIxLjY3OSIgY3g9IjIyLjQzMiIgY3k9IjMuNDkzIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTQuMTMgLTIuNzE4KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgPHN0b3Agc3RvcC1jb2xvcj0iI2U0NDg1NyIgb2Zmc2V0PSIuMDAzIi8+CiAgICA8c3RvcCBzdG9wLWNvbG9yPSIjYzcxMWUxIiBvZmZzZXQ9Ii40NjkiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiM3ZjUyZmYiIG9mZnNldD0iMSIvPgogIDwvcmFkaWFsR3JhZGllbnQ+CiAgPHBhdGggZmlsbD0idXJsKCNncmFkaWVudCkiIGQ9Ik0gMTguOTMsMTguOTIgSCAwIFYgMCBIIDE4LjkzIEwgOS4yNyw5LjMyIFoiLz4KPC9zdmc+Cg==\n  [website]: https://mahozad.ir/android-pie-chart/#examples\n  [Codecov]: https://img.shields.io/codecov/c/github/mahozad/android-pie-chart?logo=codecov\u0026logoColor=FF50A1\u0026labelColor=303030\u0026token=ptnbmXaozw\n  [CI workflow]: https://img.shields.io/github/workflow/status/mahozad/android-pie-chart/CI?logo=github\u0026labelColor=303030\n  [Latest Maven Central release]: https://img.shields.io/maven-central/v/ir.mahozad.android/pie-chart?logo=android\u0026labelColor=303030\n  [the issues that I couldn't tackle myself]: https://github.com/mahozad/android-pie-chart/issues?q=is%3Aissue+is%3Aopen+label%3Ahelp-wanted\n  [Screenshot 1]: screenshots/screenshot-1.png\n  [Screenshot 2]: screenshots/screenshot-2.png\n  [Screenshot 3]: screenshots/screenshot-3.png\n  [Screenshot 4]: screenshots/screenshot-4.png\n  [Screenshot 5]: screenshots/screenshot-5.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahozad%2Fandroid-pie-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahozad%2Fandroid-pie-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahozad%2Fandroid-pie-chart/lists"}