{"id":19195065,"url":"https://github.com/ksachdeva/angular2-progressbar","last_synced_at":"2025-05-08T23:01:17.479Z","repository":{"id":57179683,"uuid":"65592898","full_name":"ksachdeva/angular2-progressbar","owner":"ksachdeva","description":"Angular 2 component for progressbar.js","archived":false,"fork":false,"pushed_at":"2016-11-03T10:03:40.000Z","size":7,"stargazers_count":7,"open_issues_count":9,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T13:50:35.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ksachdeva.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}},"created_at":"2016-08-13T01:26:40.000Z","updated_at":"2017-11-10T04:23:26.000Z","dependencies_parsed_at":"2022-09-14T02:31:46.745Z","dependency_job_id":null,"html_url":"https://github.com/ksachdeva/angular2-progressbar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksachdeva","download_url":"https://codeload.github.com/ksachdeva/angular2-progressbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160764,"owners_count":21863627,"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":[],"created_at":"2024-11-09T12:08:14.625Z","updated_at":"2025-05-08T23:01:17.396Z","avatar_url":"https://github.com/ksachdeva.png","language":"TypeScript","readme":"# angular2-progressbar\n\n# Install\n\nnpm install angular2-progressbar --save\n\n# Usage\n\n```\nimport {\n  ShapeOptions,\n  LineProgressComponent,\n  CircleProgressComponent,\n  SemiCircleProgressComponent} from 'angular2-progressbar';\n\n@Component({\n  selector: 'app',\n  template: `\n    \u003cdiv class=\"line-container\"\u003e\n      \u003cks-line-progress [options]=\"lineOptions\"\u003e\u003c/ks-line-progress\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"circle-container\"\u003e\n      \u003cks-circle-progress [options]=\"circleOptions\"\u003e\u003c/ks-circle-progress\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"semi-circle-container\"\u003e\n      \u003cks-semi-circle-progress [options]=\"semiCircleOptions\"\u003e\u003c/ks-semi-circle-progress\u003e\n    \u003c/div\u003e\n  `\n})\nexport class AppComponent {\n\n  @ViewChild(LineProgressComponent) lineComp: LineProgressComponent;\n  @ViewChild(CircleProgressComponent) circleComp: CircleProgressComponent;\n  @ViewChild(SemiCircleProgressComponent) semiCircleComp: SemiCircleProgressComponent;\n\n  private lineOptions: ShapeOptions = {\n    strokeWidth: 4,\n    easing: 'easeInOut',\n    duration: 1400,\n    color: '#FFEA82',\n    trailColor: '#eee',\n    trailWidth: 1,\n    svgStyle: { width: '100%' }\n  };\n\n  private circleOptions: ShapeOptions = {\n    color: '#FFEA82',\n    trailColor: '#eee',\n    trailWidth: 1,\n    duration: 1400,\n    easing: 'bounce',\n    strokeWidth: 6,\n    from: { color: '#FFEA82', a: 0 },\n    to: { color: '#ED6A5A', a: 1 },\n    // Set default step function for all animate calls\n    step: function(state: any, circle: any) {\n      circle.path.setAttribute('stroke', state.color);\n    }\n  };\n\n  private semiCircleOptions: ShapeOptions = {\n    strokeWidth: 6,\n    color: '#FFEA82',\n    trailColor: '#eee',\n    trailWidth: 1,\n    easing: 'easeInOut',\n    duration: 1400,\n    text: {\n      value: '',\n      alignToBottom: false\n    },\n    from: { color: '#FFEA82' },\n    to: { color: '#ED6A5A' },\n    // Set default step function for all animate calls\n    step: (state: any, bar: any) =\u003e {\n      bar.path.setAttribute('stroke', state.color);\n      var value = Math.round(bar.value() * 100);\n      if (value === 0) {\n        bar.setText('');\n      } else {\n        bar.setText(value);\n      }\n\n      bar.text.style.color = state.color;\n    }\n  };\n\n  ngAfterViewInit() {\n    this.lineComp.animate(0.9);\n    this.circleComp.animate(0.8);\n    this.semiCircleComp.animate(0.9);\n  }\n\n}\n```\n\nSee [angular2-progressbar-example](https://github.com/ksachdeva/angular2-progressbar-example) repository for the full example\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksachdeva%2Fangular2-progressbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksachdeva%2Fangular2-progressbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksachdeva%2Fangular2-progressbar/lists"}