{"id":13607404,"url":"https://github.com/TheChance101/AAY-chart","last_synced_at":"2025-04-12T11:32:33.638Z","repository":{"id":184850972,"uuid":"672345206","full_name":"TheChance101/AAY-chart","owner":"TheChance101","description":"A chart library for Compose Multiplatform ","archived":false,"fork":false,"pushed_at":"2025-04-11T19:56:54.000Z","size":3093,"stargazers_count":587,"open_issues_count":34,"forks_count":48,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T20:42:34.348Z","etag":null,"topics":["android","charts","compose","desktop","ios","kmp","kotlin","multiplatform"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/TheChance101.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-29T18:53:04.000Z","updated_at":"2025-04-09T17:59:15.000Z","dependencies_parsed_at":"2023-07-30T16:22:11.151Z","dependency_job_id":"f4675c89-fa4d-450e-a771-258579b03f8d","html_url":"https://github.com/TheChance101/AAY-chart","commit_stats":null,"previous_names":["thechance101/aay-chart"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheChance101%2FAAY-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheChance101%2FAAY-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheChance101%2FAAY-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheChance101%2FAAY-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheChance101","download_url":"https://codeload.github.com/TheChance101/AAY-chart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560253,"owners_count":21124616,"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","charts","compose","desktop","ios","kmp","kotlin","multiplatform"],"created_at":"2024-08-01T19:01:18.341Z","updated_at":"2025-04-12T11:32:28.628Z","avatar_url":"https://github.com/TheChance101.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Kotlin"],"sub_categories":["🍎 Compose UI"],"readme":"\n\u003cdiv align=\"center\"\u003e\n \u003ch1\u003eAAY-chart\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"left\"\u003e\nThe library contains several chart composables for usage in \u003cstrong\u003eKotlin Multiplatform\u003c/strong\u003e projects and \u003cstrong\u003eAndroid Native\u003c/strong\u003e.   \nCurrently supported platforms are \u003cstrong\u003eDesktop\u003c/strong\u003e \u003cstrong\u003eAndroid\u003c/strong\u003e \u003cstrong\u003eIOS \u003c/strong\u003e and \u003cstrong\u003eWeb \u003c/strong\u003e\u003c/strong\u003e\n\u003c/div\u003e\n\n\u0026nbsp;\n\n[![API](https://img.shields.io/badge/API-21%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=21)\n[![linkedin](https://img.shields.io/badge/linkedin-blue.svg?style=flat)](https://www.linkedin.com/company/thechance101/)\n![](https://img.shields.io/github/actions/workflow/status/patrykandpatrick/vico/build-debug-apk.yml?branch=master)\n![Release](https://img.shields.io/github/release/TheChance101/AAY-chart.svg?style=flat)\n\n\n![charts](/assets/allCharts.png)\n\n\n## How to use?\n\nAdd dependency in your module `build.gradle`\n\n```kotlin\ndependencies {\n    implementation(\"io.github.thechance101:chart:$latest_release\")\n}\n```\n\n## Examples\n\n1. Show Line Chart in Jetpack Compose:\n\n```kotlin\n@Composable\nfun LineChartSample() {\n\n    val testLineParameters: List\u003cLineParameters\u003e = listOf(\n        LineParameters(\n            label = \"revenue\",\n            data = listOf(70.0, 00.0, 50.33, 40.0, 100.500, 50.0),\n            lineColor = Color.Gray,\n            lineType = LineType.CURVED_LINE,\n            lineShadow = true,\n        ),\n        LineParameters(\n            label = \"Earnings\",\n            data = listOf(60.0, 80.6, 40.33, 86.232, 88.0, 90.0),\n            lineColor = Color(0xFFFF7F50),\n            lineType = LineType.DEFAULT_LINE,\n            lineShadow = true\n        ),\n        LineParameters(\n            label = \"Earnings\",\n            data = listOf(1.0, 40.0, 11.33, 55.23, 1.0, 100.0),\n            lineColor = Color(0xFF81BE88),\n            lineType = LineType.CURVED_LINE,\n            lineShadow = false,\n        )\n    )\n\n    Box(Modifier) {\n        LineChart(\n            modifier = Modifier.fillMaxSize(),\n            linesParameters = testLineParameters,\n            isGrid = true,\n            gridColor = Color.Blue,\n            xAxisData = listOf(\"2015\", \"2016\", \"2017\", \"2018\", \"2019\", \"2020\"),\n            animateChart = true,\n            showGridWithSpacer = true,\n            yAxisStyle = TextStyle(\n                fontSize = 14.sp,\n                color = Color.Gray,\n            ),\n            xAxisStyle = TextStyle(\n                fontSize = 14.sp,\n                color = Color.Gray,\n                fontWeight = FontWeight.W400\n            ),\n            yAxisRange = 14,\n            oneLineChart = false,\n            gridOrientation = GridOrientation.VERTICAL\n        )\n    }\n}\n```\n\n![charts](/assets/line_chart.gif)\n![charts](/assets/special_line_chart.gif)\n\n2. Show Bar Chart in Jetpack Compose:\n\n```kotlin\n@Composable\nfun BarChartSample() {\n\n    val testBarParameters: List\u003cBarParameters\u003e = listOf(\n        BarParameters(\n            dataName = \"Completed\",\n            data = listOf(0.6, 10.6, 80.0, 50.6, 44.0, 100.6, 10.0),\n            barColor = Color(0xFF6C3428)\n        ),\n        BarParameters(\n            dataName = \"Completed\",\n            data = listOf(50.0, 30.6, 77.0, 69.6, 50.0, 30.6, 80.0),\n            barColor = Color(0xFFBA704F),\n        ),\n        BarParameters(\n            dataName = \"Completed\",\n            data = listOf(100.0, 99.6, 60.0, 80.6, 10.0, 100.6, 55.99),\n            barColor = Color(0xFFDFA878),\n        ),\n    )\n\n    Box(Modifier.fillMaxSize()) {\n        BarChart(\n            chartParameters = testBarParameters,\n            gridColor = Color.DarkGray,\n            xAxisData = listOf(\"2016\", \"2017\", \"2018\", \"2019\", \"2020\", \"2021\", \"2022\"),\n            isShowGrid = true,\n            animateChart = true,\n            showGridWithSpacer = true,\n            yAxisStyle = TextStyle(\n                fontSize = 14.sp,\n                color = Color.DarkGray,\n            ),\n            xAxisStyle = TextStyle(\n                fontSize = 14.sp,\n                color = Color.DarkGray,\n                fontWeight = FontWeight.W400\n            ),\n            yAxisRange = 15,\n            barWidth = 20.dp\n        )\n    }\n}\n```\n\n![charts](/assets/bar_chart.gif)\n\n3. Show Pie Chart in Jetpack Compose:\n\n```kotlin\n@Composable\nfun PieChartSample() {\n\n    val testPieChartData: List\u003cPieChartData\u003e = listOf(\n        PieChartData(\n            partName = \"part A\",\n            data = 500.0,\n            color = Color(0xFF22A699),\n        ),\n        PieChartData(\n            partName = \"Part B\",\n            data = 700.0,\n            color = Color(0xFFF2BE22),\n        ),\n        PieChartData(\n            partName = \"Part C\",\n            data = 500.0,\n            color = Color(0xFFF29727),\n        ),\n        PieChartData(\n            partName = \"Part D\",\n            data = 100.0,\n            color = Color(0xFFF24C3D),\n        ),\n    )\n\n    PieChart(\n        modifier = Modifier.fillMaxSize(),\n        pieChartData = testPieChartData,\n        ratioLineColor = Color.LightGray,\n        textRatioStyle = TextStyle(color = Color.Gray),\n    )\n}\n```\n![charts](/assets/pie_chart.gif)\n\n4. Show Donut Chart in Jetpack Compose:\n   \n```kotlin\n@Composable\nfun DonutChartSample() {\n\n    val testPieChartData: List\u003cPieChartData\u003e = listOf(\n        PieChartData(\n            partName = \"part A\",\n            data = 500.0,\n            color = Color(0xFF0B666A),\n        ),\n        PieChartData(\n            partName = \"Part B\",\n            data = 700.0,\n            color = Color(0xFF35A29F),\n        ),\n        PieChartData(\n            partName = \"Part C\",\n            data = 500.0,\n            color = Color(0xFF97FEED),\n        ),\n        PieChartData(\n            partName = \"Part D\",\n            data = 100.0,\n            color = Color(0xFF071952),\n        ),\n    )\n\n    DonutChart(\n        modifier = Modifier.fillMaxSize(),\n        pieChartData = testPieChartData,\n        centerTitle = \"Orders\",\n        centerTitleStyle = TextStyle(color = Color(0xFF071952)),\n        outerCircularColor = Color.LightGray,\n        innerCircularColor = Color.Gray,\n        ratioLineColor = Color.LightGray,\n    )\n}\n```\n![charts](/assets/donut_chart.gif)\n\n5. Show Radar Chart in Jetpack Compose:\n\n```kotlin\n@Composable\nfun RadarChartSample() {\n    val radarLabels =\n        listOf(\n            \"Party A\",\n            \"Party A\",\n            \"Party A\",\n            \"Part A\",\n            \"Party A\",\n            \"Party A\",\n            \"Party A\",\n            \"Party A\",\n            \"Party A\"\n        )\n    val values2 = listOf(120.0, 160.0, 110.0, 112.0, 200.0, 120.0, 145.0, 101.0, 200.0)\n    val values = listOf(180.0, 180.0, 165.0, 135.0, 120.0, 150.0, 140.0, 190.0, 200.0)\n    val labelsStyle = TextStyle(\n        color = Color.Black,\n        fontFamily = FontFamily.Serif,\n        fontWeight = FontWeight.Medium,\n        fontSize = 10.sp\n    )\n\n    val scalarValuesStyle = TextStyle(\n        color = Color.Black,\n        fontFamily = FontFamily.Serif,\n        fontWeight = FontWeight.Medium,\n        fontSize = 10.sp\n    )\n\n    RadarChart(\n        modifier = Modifier.fillMaxSize(),\n        radarLabels = radarLabels,\n        labelsStyle = labelsStyle,\n        netLinesStyle = NetLinesStyle(\n            netLineColor = Color(0x90ffD3CFD3),\n            netLinesStrokeWidth = 2f,\n            netLinesStrokeCap = StrokeCap.Butt\n        ),\n        scalarSteps = 2,\n        scalarValue = 200.0,\n        scalarValuesStyle = scalarValuesStyle,\n        polygons = listOf(\n            Polygon(\n                values = values,\n                unit = \"$\",\n                style = PolygonStyle(\n                    fillColor = Color(0xffc2ff86),\n                    fillColorAlpha = 0.5f,\n                    borderColor = Color(0xffe6ffd6),\n                    borderColorAlpha = 0.5f,\n                    borderStrokeWidth = 2f,\n                    borderStrokeCap = StrokeCap.Butt,\n                )\n            ),\n            Polygon(\n                values = values2,\n                unit = \"$\",\n                style = PolygonStyle(\n                    fillColor = Color(0xffFFDBDE),\n                    fillColorAlpha = 0.5f,\n                    borderColor = Color(0xffFF8B99),\n                    borderColorAlpha = 0.5f,\n                    borderStrokeWidth = 2f,\n                    borderStrokeCap = StrokeCap.Butt\n                )\n            )\n        )\n    )\n}\n\n```\n\n![charts](/assets/radar_chart.png)\n\n## Contributors\n\u003ca href=\"https://github.com/TheChance101/AAY-chart/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=TheChance101/AAY-chart\" /\u003e\n\u003c/a\u003e\n\n## MIT License\n\n    Copyright (c) 2023 The Chance\n\n    permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n    \n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheChance101%2FAAY-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheChance101%2FAAY-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheChance101%2FAAY-chart/lists"}