{"id":19195109,"url":"https://github.com/ksachdeva/angular2-progressbar-example","last_synced_at":"2025-02-23T04:38:05.083Z","repository":{"id":136497290,"uuid":"65593733","full_name":"ksachdeva/angular2-progressbar-example","owner":"ksachdeva","description":"Example for using angular2-progressbar component","archived":false,"fork":false,"pushed_at":"2016-09-16T17:09:12.000Z","size":11,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-04T08:35:52.198Z","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-13T01:51:09.000Z","updated_at":"2017-06-14T05:31:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"88ee9871-d9ae-48bc-baf6-ddaf919801f5","html_url":"https://github.com/ksachdeva/angular2-progressbar-example","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-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksachdeva%2Fangular2-progressbar-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksachdeva","download_url":"https://codeload.github.com/ksachdeva/angular2-progressbar-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240271526,"owners_count":19774859,"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:36.033Z","updated_at":"2025-02-23T04:38:05.070Z","avatar_url":"https://github.com/ksachdeva.png","language":"TypeScript","readme":"# angular2-progressbar-example\n\nExample of how to use progressbar.js in angular 2 application\n\n# Install require global applications\n\n- npm install -g tslint\n- npm install -g typings\n- npm install -g typescript\n\n# Install local dependencies\n\nnpm install\n\n# Run the application\n\nnpm start\n\n# Example\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksachdeva%2Fangular2-progressbar-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksachdeva%2Fangular2-progressbar-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksachdeva%2Fangular2-progressbar-example/lists"}