{"id":13749654,"url":"https://github.com/manumaticx/circularprogress","last_synced_at":"2025-05-09T12:33:33.930Z","repository":{"id":16564934,"uuid":"19318791","full_name":"manumaticx/circularprogress","owner":"manumaticx","description":"Circular Progressbar Widget for Alloy","archived":false,"fork":false,"pushed_at":"2017-09-30T08:11:14.000Z","size":156,"stargazers_count":87,"open_issues_count":4,"forks_count":19,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-08-04T07:03:42.925Z","etag":null,"topics":["alloy","titanium","widget"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/manumaticx.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}},"created_at":"2014-04-30T15:48:43.000Z","updated_at":"2022-05-19T18:36:59.000Z","dependencies_parsed_at":"2022-09-15T00:10:07.406Z","dependency_job_id":null,"html_url":"https://github.com/manumaticx/circularprogress","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/manumaticx%2Fcircularprogress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manumaticx%2Fcircularprogress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manumaticx%2Fcircularprogress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manumaticx%2Fcircularprogress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manumaticx","download_url":"https://codeload.github.com/manumaticx/circularprogress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224863101,"owners_count":17382279,"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":["alloy","titanium","widget"],"created_at":"2024-08-03T07:01:08.929Z","updated_at":"2024-11-16T00:31:12.487Z","avatar_url":"https://github.com/manumaticx.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# CircularProgressbar [![Titanium](http://www-static.appcelerator.com/badges/titanium-git-badge-sq.png)](http://www.appcelerator.com/titanium/) [![Appcelerator Titanium](http://www-static.appcelerator.com/badges/alloy-git-badge-sq.png)](http://www.appcelerator.com/alloy/)\n\nAlloy Widget for creating a circular progressbar.\n\n![](circularprogress.gif)\n\n## Quick Start\n\n### Installation [![gitTio](http://gitt.io/badge.png)](http://gitt.io/component/de.manumaticx.circularprogress)\nDownload the latest distribution ZIP-file and consult the [Titanium Documentation](http://docs.appcelerator.com/titanium/latest/#!/guide/Using_a_Module) on how install it, or simply use the [gitTio CLI](http://gitt.io/cli):\n\n`$ gittio install de.manumaticx.circularprogress`\n\n### Usage\n\ncreate in xml\n```xml\n\u003cAlloy\u003e\n\t\u003cWindow class=\"container\"\u003e\n\t\t\u003cWidget src=\"de.manumaticx.circularprogress\" id=\"progress\" /\u003e\n\t\u003c/Window\u003e\n\u003c/Alloy\u003e\n```\n\nstyle in tss\n```javascript\n\".container\": {\n\tbackgroundColor:\"#fff\"\n},\n\"#progress\" : {\n\tmargin:4,\n\tbackgroundColor:'#fff',\n\tprogressColor:'#33b5e5',\n\tprogressBackgroundColor:'#333',\n\tprogressWidth: 5,\n\tshowText: true,\n\tcolor: '#33b5e5',\n\tfont: {\n\t\tfontSize: 26,\n\t\tfontFamily: 'Roboto Condensed'\n\t}\n}\n\n```\n\nupdate in controller\n```javascript\n// either: step-by-step update with setValue\nfunction fakeProgress(){\n    var val = 0;\n    var pInterval = setInterval(function(){\n        $.progress.setValue(++val);\n        if (val \u003e= 100) clearInterval(pInterval);\n    }, 30);\n}\n\n// this is how you customize the value text\n$.progress.formatValue = function(val){ return (val / 100 * 360) + '°'};\n\n// or: to specific value at once with animation (does not work on iOS)\n$.progress.animate({\n\tvalue: 75,\n\tduration: 500\n});\n```\n\n## API\n### Properties\n* `progressColor` _(String)_ - the color of the progress layer (default: `\"#000\"`)\n* `progressBackgroundColor` _(String)_ - the color of the outstanding part of progress (default: `\"#666\"` 😈)\n* `progressBackgroundGradient` _(Gradient)_ - the progressBackground as [gradient](http://docs.appcelerator.com/platform/latest/#!/api/Gradient)\n* `progressWidth` _(Number)_ - the width of the progress (if not defined, progress becomes a cake)\n* `formatValue`_(Function)_ - formats the value displayed in the center\n* `showText` _(Boolean)_ - whether the current progress value should be displayed (default: `false`)\n* `margin` _(Number)_ - adds margin to progress (visible if backgroundColor != progressBackgroundColor)\n\n### Methods\n* `animate(args, callback)` - animate the progress to a given value\n\t* `args` _(Object)_ - the value `args.value` and the duration `args.duration`\n\t* `callback` _(Function)_ - gets called when the animation is finished\n* `getValue()` - Returns the current value\n* `setValue(value)` - Sets the current value\n\t* `value` _(Number)_ - the new value\n* `getText()` - Returns the text\n* `setText(text)` - Sets the text\n\t* `text` _(String)_ - the new text value\n* `hide()` - turns off the visibility\n* `show()` - turns on the visibility\n\n### Styles\nYou can add you own styles with the following classes:\n* `.circularprogress_view` _(Ti.UI.View)_\n* `.circularprogress_label` _(Ti.UI.Label)_\n\n## Credits\n\n* Malcolm Hollingsworth (for his [excellent description](http://developer.appcelerator.com/question/154274/is-there-a-way-to-create-circular-progress-bar#answer-265134))\n* Ronnie Swietek and Yaron Budowski (for Android [workaround](http://developer.appcelerator.com/question/154274/is-there-a-way-to-create-circular-progress-bar#answer-276757))\n\n## License\n\n    The MIT License (MIT)\n\n    Copyright (c) 2014 Manuel Lehner\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\n    all 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\n    THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanumaticx%2Fcircularprogress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanumaticx%2Fcircularprogress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanumaticx%2Fcircularprogress/lists"}