{"id":18671932,"url":"https://github.com/karn/charter","last_synced_at":"2025-05-13T04:42:21.466Z","repository":{"id":86753023,"uuid":"139297054","full_name":"Karn/charter","owner":"Karn","description":"Another chart library for Android.","archived":false,"fork":false,"pushed_at":"2020-06-06T08:20:53.000Z","size":145,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-01T06:32:00.252Z","etag":null,"topics":["android","android-library","charts","kotlin","kotlin-android","visualization"],"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/Karn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2018-07-01T03:19:30.000Z","updated_at":"2024-08-14T20:39:08.000Z","dependencies_parsed_at":"2023-03-13T19:53:54.073Z","dependency_job_id":null,"html_url":"https://github.com/Karn/charter","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"fd754abcff11840a48d1b0f26bf6c0bcf6976bda"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karn%2Fcharter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karn%2Fcharter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karn%2Fcharter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karn%2Fcharter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karn","download_url":"https://codeload.github.com/Karn/charter/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253877394,"owners_count":21977635,"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","charts","kotlin","kotlin-android","visualization"],"created_at":"2024-11-07T09:08:49.242Z","updated_at":"2025-05-13T04:42:21.459Z","avatar_url":"https://github.com/Karn.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Charter](./docs/assets/charter-logo.svg)\n\n\n## Charter\nAnother chart library for Android.\n\n[![Kotlin](https://img.shields.io/badge/Kotlin-1.2.41-blue.svg?style=flat-square)](http://kotlinlang.org)\n[![Build Status](https://img.shields.io/travis/Karn/charter.svg?style=flat-square)](https://travis-ci.org/Karn/charter)\n[![Codecov](https://img.shields.io/codecov/c/github/karn/charter.svg?style=flat-square)](https://codecov.io/gh/Karn/charter)\n[![GitHub (pre-)release](https://img.shields.io/github/release/karn/charter/all.svg?style=flat-square)\n](./../../releases)\n\n\n#### GETTING STARTED\nCharter (pre-)releases are available via JitPack. It is recommended that a specific release version is selected when using the library in production as there may be breaking changes at anytime.\n\n\u003e **Tip:** Test out the canary channel to try out features by using the latest develop snapshot; `develop-SNAPSHOT`.\n\n``` Groovy\n// Project level build.gradle\n// ...\nrepositories {\n    maven { url 'https://jitpack.io' }\n}\n// ...\n\n// Module level build.gradle\ndependencies {\n    // Replace version with release version, e.g. 1.0.0-alpha, -SNAPSHOT\n    implementation \"io.karn:charter:[VERSION]\"\n}\n```\n\n\n#### USAGE\n\nThe most basic case of the `LineChart` is as follows:\n\nCreate the object within your layout.\n```XML\n\u003cio.karn.charter.charts.LineChart\n    android:id=\"@+id/chart\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"200dp\"\n    app:axisColor=\"@android:color/darker_gray\"\n    app:labelColor=\"@android:color/black\" /\u003e\n```\nAttach the data to the Chart.\n```Kotlin\nval dataMatrix = LineChart.DataMatrix(\n    // X-Axis Labels\n    arrayListOf(\"0\", \"1\", \"2\", \"3\", \"4\"),\n    // Data\n    arrayListOf(\n         LineChart.DataObject(\n            \"Score\", // Label of the data which is used for the legend.\n            0x2CC1FF, // The color code of the data points.\n            arrayListOf(145f, 230f, 170f, 200f, 300f) // The data points -- must be of the same length as a the X-Axis labels.\n        )\n        // ...\n    )\n)\n\n// Settings the data automatically refreshes the chart.\nchart.setData(dataMatrix)\n// You can also react to the nodes that are clicked by attaching a click handler.\ndeltas_chart.setOnTooltipChanged { nodes -\u003e // nodes: List\u003cPair\u003cString, Float\u003e\u003e\n    // Iterate through the list of data points at that X-Axis index.\n    for (item in nodes) {\n        Log.v(TAG, \"${item.first}: ${item.second}.\")\n    }\n}\n```\n\nYou'll get something that looks like this:\n\n![Sample](./docs/assets/sample-graph.svg)\n\n \u003e The headings and legend are left to the developer who can add that data in surrounding views.\n\n#### CONTRIBUTING\nThere are many ways to [contribute](./.github/CONTRIBUTING.md), you can\n- submit bugs,\n- help track issues,\n- review code changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarn%2Fcharter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarn%2Fcharter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarn%2Fcharter/lists"}