{"id":20023980,"url":"https://github.com/vrajroham/vue-circle-progress","last_synced_at":"2025-04-05T21:07:38.365Z","repository":{"id":21548721,"uuid":"93238886","full_name":"vrajroham/vue-circle-progress","owner":"vrajroham","description":"A Vue.js component to draw animated circular progress bars","archived":false,"fork":false,"pushed_at":"2022-12-08T15:02:56.000Z","size":2349,"stargazers_count":145,"open_issues_count":25,"forks_count":27,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:04:01.384Z","etag":null,"topics":["jquery","vuejs","vuejs-components"],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrajroham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-03T09:41:38.000Z","updated_at":"2025-03-15T20:58:44.000Z","dependencies_parsed_at":"2023-01-11T21:15:43.477Z","dependency_job_id":null,"html_url":"https://github.com/vrajroham/vue-circle-progress","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrajroham%2Fvue-circle-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrajroham%2Fvue-circle-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrajroham%2Fvue-circle-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrajroham%2Fvue-circle-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrajroham","download_url":"https://codeload.github.com/vrajroham/vue-circle-progress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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":["jquery","vuejs","vuejs-components"],"created_at":"2024-11-13T08:48:51.076Z","updated_at":"2025-04-05T21:07:38.334Z","avatar_url":"https://github.com/vrajroham.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-circle-progress\n\n\u003e A Vue.js component to draw animated circular progress bars\n\nDraw animated progress circle like below,\n\n![](http://i.imgur.com/zV5VUQG.png)\n\n---\n## Install\n````\n// For Vue.js 2.0+\nnpm install vue2-circle-progress\n````\n## Usage\n1. Import the module\n2. Register it as a component as you would any other Vue component\n3. Use it within your template\n\n### Example\n````vue\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\"\u003e\n    \u003cp\u003e\n      A Vue.js component to draw animated circular progress bars!\n    \u003c/p\u003e\n      \u003cvue-circle\n        :progress=\"50\"\n        :size=\"100\"\n        :reverse=\"false\"\n        line-cap=\"round\"\n        :fill=\"fill\"\n        empty-fill=\"rgba(0, 0, 0, .1)\"\n        :animation-start-value=\"0.0\"\n        :start-angle=\"0\"\n        insert-mode=\"append\"\n        :thickness=\"5\"\n        :show-percent=\"true\"\n        @vue-circle-progress=\"progress\"\n        @vue-circle-end=\"progress_end\"\u003e\n          \u003cp\u003eSlot!\u003c/p\u003e\n      \u003c/vue-circle\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  import VueCircle from 'vue2-circle-progress'\n  export default {\n    components: {\n      VueCircle\n    },\n    data(){\n      return{\n        fill : { gradient: [\"red\", \"green\", \"blue\"] },\n      }\n    },\n    methods:{\n      progress(event,progress,stepValue){\n        console.log(stepValue);\n      },\n      progress_end(event){\n        console.log(\"Circle progress end\");\n      }\n    }\n  }\n\u003c/script\u003e\n````\n\n## Props\nFollwing `props` are used while initialization\n\u003e Note : Only `progress` is a required prop. Others are optional\n\n| Prop Name | Type | Description |\n|----------|------|--------------|\n| progress `(required)`| Number | Total progress of circle (filled area) |\n| size | Number | Size of circle\u003cbr\u003eDefault : `200` |\n| reverse | Boolean | Reverse animation and arc draw \u003cbr\u003eDefault:`false`|\n| line-cap | String | Arc line cap: \"butt\", \"round\" or \"square\" \u003cbr\u003e `Default: \"butt\"` |\n| fill | Object | The arc fill config. You may specify next:  \u003cbr\u003e- `\"#ff1e41\"` \u003cbr\u003e- `{ color: \"#ff1e41\" }` \u003cbr\u003e- `{ color: 'rgba(255, 255, 255, .3)' }` \u003cbr\u003e- `{ gradient: [\"red\", \"green\", \"blue\"] }` \u003cbr\u003e- `{ gradient: [[\"red\", .2], [\"green\", .3], [\"blue\", .8]] }` \u003cbr\u003e- `{ gradient: [ ... ], gradientAngle: Math.PI / 4 }` \u003cbr\u003e- `{ gradient: [ ... ], gradientDirection: [x0, y0, x1, y1] }` \u003cbr\u003e- `{ image: \"http://i.imgur.com/pT0i89v.png\" }`\u003cbr\u003e- `{ image: imageInstance }`\u003cbr\u003e- `{ color: \"lime\", image: \"http://i.imgur.com/pT0i89v.png\" }` \u003cbr\u003e Default: `{ gradient: [\"#3aeabb\", \"#fdd250\"] }` |\n| empty-fill | String | Color of the \"empty\" arc. Only a color fill supported by now \u003cbr\u003e Default: `\"rgba(0, 0, 0, .1)\"` |\n| animation  | Mixed | Animation config. See [jQuery animations](http://api.jquery.com/animate/). \u003cbr\u003e You may also set it to `false` \u003cbr\u003e Default: `{ duration: 1200, easing: \"circleProgressEasing\" }`  \u003cbr\u003e `\"circleProgressEasing\"` *is just a ease-in-out-cubic easing* |\n| animation-start-value | Number | Default animation starts at `0.0` and ends at specified `value`. Let's call this direct animation. If you want to make reversed animation then you should set `animationStartValue` to `1.0`. Also you may specify any other value from `0.0` to `1.0` \u003cbr\u003e Default: `0.0` |\n| start-angle | Number | Initial angle (for `0` value) \u003cbr\u003e Default: `-Math.PI` |\n| insert-mode | String | Canvas insertion mode: append or prepend it into the parent element \u003cbr\u003e Default: `\"prepend\"` |\n| thickness | Number | Width of the arc. By default it's automatically calculated as 1/14 of `size` but you may set your own number \u003cbr\u003e Default: `\"auto\"` |\n| show-percent | Boolean | Show loaded percentage inside circle. If `inner-text` property is set then percentage will not be shown. \u003cbr\u003e Default : `true`|\n---\n\n## Events\nEvents emitted by the component to the parent.\n\n|Event Name|Description|\n|----------|-----------|\n|vue-circle-init(event)| This event is emmited after the circle is initialized |\n|vue-circle-progress(event,progress,stepValue)|This event is emitted on every progress step|\n|vue-circle-end(event)|This event is emitted after completing progress|\n------------------\n\n## Methods\nMethods you can call on the component.\n\n| Method | Description |\n|------------|-------------|\n| updateProgress(value) | It will update component progress value and animate the change. **It doesn't redraw the widget.** |\n| updateFill(fill) | It will update component fill color. |\n\n## Using Methods\nMethods can be called from your parent component by making use of the \u003ca href=\"https://vuejs.org/v2/api/#ref\"\u003especial tag \"ref\"\u003c/a\u003e.\n\nWhen you initialize the component add a unique ID to the component using the ref tag, like this\n\n```html\n\u003cvue-circle ref=\"myUniqueID\"\u003e\u003c/vue-circle\u003e\n```\nThen from your parent Vue instance, you can call the methods by using the following:\n\n```javascript\nthis.$refs.myUniqueID.updateProgress(21);\nthis.$refs.myUniqueID.updateFill(\"#ff1e41\");\n```\n\n## Development\nIf you feel you can make this better, you are welcome to contribute. I'd love to see your ideas.\n``` bash\n# install dependencies\nnpm install\n\n# serve example at localhost:8080\nnpm run dev\n\n# build any changes made\nnpm run build\n```\n## Thanks\nThis is a Vue2 component built with wrapper around [this library](https://github.com/kottenator/jquery-circle-progress) Thanks to **Rostyslav Bryzgunov**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrajroham%2Fvue-circle-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrajroham%2Fvue-circle-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrajroham%2Fvue-circle-progress/lists"}