{"id":20758220,"url":"https://github.com/swapnil1104/lineargraphview","last_synced_at":"2025-04-29T23:58:51.506Z","repository":{"id":144134283,"uuid":"217683206","full_name":"swapnil1104/LinearGraphView","owner":"swapnil1104","description":"An Android custom view library to display color coded information in a graphical format","archived":false,"fork":false,"pushed_at":"2020-03-15T07:01:56.000Z","size":174,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T23:58:45.152Z","etag":null,"topics":["andr","custom-vi","graphics"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swapnil1104.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-10-26T09:03:16.000Z","updated_at":"2024-12-20T14:55:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9fcf52d-10c4-4a12-a1db-a41fbcfa85e5","html_url":"https://github.com/swapnil1104/LinearGraphView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swapnil1104%2FLinearGraphView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swapnil1104%2FLinearGraphView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swapnil1104%2FLinearGraphView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swapnil1104%2FLinearGraphView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swapnil1104","download_url":"https://codeload.github.com/swapnil1104/LinearGraphView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251602814,"owners_count":21615963,"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":["andr","custom-vi","graphics"],"created_at":"2024-11-17T09:49:39.180Z","updated_at":"2025-04-29T23:58:51.499Z","avatar_url":"https://github.com/swapnil1104.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LinearGraphView\n\n[![](https://jitpack.io/v/swapnil1104/LinearGraphView.svg)](https://jitpack.io/#swapnil1104/LinearGraphView)\n[![](https://jitpack.io/v/swapnil1104/LinearGraphView/month.svg)](https://jitpack.io/#swapnil1104/LinearGraphView)\n\nA custom view to display information in a Linear Graph with smooth animations! \n\n![Demo with underline](images/demo.gif)\n![Demo with underline](images/demo2.gif)\n\n## How to integrate the library in your app?\nStep 1: Add it in your root build.gradle at the end of repositories:\n\n```\nallprojects {\n    repositories {\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\nStep 2. Add the dependency\n\n```\ndependencies {\n    implementation 'com.github.swapnil1104:LinearGraphView:{current_lib_ver}'\n}\n```\nStep 3. Add OtpEditText to your layout file\n\n```\n\u003ccom.broooapps.lineargraphview2.LinearGraphView\n    android:id=\"@+id/linear_graph_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\" /\u003e\n```\n\nStep 4. Refer this View in your activity file, create a List\u003cDataModel\u003e and populate it with your values, use this list and invoke `setData(List\u003cDataModel\u003e dataModel, int range)`.\n\nThe second param is the entire span graph view, and `value` param in each DataModel object will occupy a percent length.\nWidth of each item is calculated by `model.value / range * viewWidth`.\n```\nLinearGraphView lgv = findViewById(R.id.linear_graph_view);\n\nList\u003cDataModel\u003e dataList = new ArrayList\u003c\u003e();\n\ndataList.add(new DataModel(\"One\", \"#00ffff\", 100));\ndataList.add(new DataModel(\"Two\", \"#74EEA1\", 250));\ndataList.add(new DataModel(\"Three\", \"#f2002f\", 100));\ndataList.add(new DataModel(\"four\", \"#B61CB3\", 180));\n\nlgv.setData(dataList, 1000);\n\n```\nThe above code will result in this:\n\n![Demo with underline](images/demo2.gif)\n\n## How to customize the view.\n### Setting custom border color\n\nTo use a custom color for the border of LinearGraphView, use\n\n```app:lgv_border_color=\"@color/colorAccent\"```\n\n### Setting border animation duration\nTo change the animation duration of the initial border transition, use\n\n```app:lgv_border_anim_duration=\"{TIME_IN_MS}\"```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswapnil1104%2Flineargraphview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswapnil1104%2Flineargraphview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswapnil1104%2Flineargraphview/lists"}