ProductPromotion
Logo

Angular.JS

made by https://0x3d.site

GitHub - crisbeto/angular-svg-round-progressbar: Angular module that uses SVG to create a circular progressbar
Angular module that uses SVG to create a circular progressbar - crisbeto/angular-svg-round-progressbar
Visit Site

GitHub - crisbeto/angular-svg-round-progressbar: Angular module that uses SVG to create a circular progressbar

GitHub - crisbeto/angular-svg-round-progressbar: Angular module that uses SVG to create a circular progressbar

Angular SVG round progressbar

Angular module that uses SVG to create a circular progressbar

Demo

Click here for the Angular 1.x version

Install

First you have to install the module through npm:

npm install angular-svg-round-progressbar --save

Afterwards you need to import the RoundProgressModule in your module:

import {NgModule} from '@angular/core';
import {RoundProgressModule} from 'angular-svg-round-progressbar';

@NgModule({
  imports: [RoundProgressModule]
})
export class YourModule {}

Or RoundProgressComponent, if you're using standalone:

import {Component} from '@angular/core';
import {RoundProgressComponent} from 'angular-svg-round-progressbar';

@Component({
  standalone: true,
  imports: [RoundProgressComponent],
  template: '...'
})
export class YourComponent {}

If you're using SystemJS as your module loader, there is also a UMD bundle at ./node_modules/angular-svg-round-progressbar/bundles/angular-svg-round-progressbar.umd.js.

Options

Name Description Required Default value Possible values
current The current progress. Limited by the max option. Yes undefined number
max The progress' maximum value. Yes undefined number
radius Radius of the circle. No 125 number
color The color of the current value on the circle. No #45ccce string
background Color of the circle's background. No #eaeaea string
stroke Specifies the circle's thickness. No 15 number
semicircle Whether the progressbar should be a full circle or a semicircle. No false boolean
clockwise Whether the progressbar should rotate clockwise or counter-clockwise. No true boolean
responsive Whether the progressbar should fit inside its parent container. Note Turning this option on will override the specified radius in order to make the circle fit in its parent. The radius to stroke ratio won't change. No false boolean
rounded Whether the current progress ending should be rounded or straight. No false boolean
duration The duration of the animation. Pass 0 for no animation. No 800 number
animationDelay Milliseconds to wait before starting an animation. No 0 number
onRender Callback function that gets executed every time the circle is animated. The function gets called with the current progress as it is being animated. No undefined Function
animation The easing function that will be used when animating. No easeOutCubic linearEase easeInQuad easeOutQuad easeInOutQuad easeInCubic easeOutCubic easeInOutCubic easeInQuart easeOutQuart easeInOutQuart easeInQuint easeOutQuint easeInOutQuint easeInSine easeOutSine easeInOutSine easeInExpo easeOutExpo easeInOutExpo easeInCirc easeOutCirc easeInOutCirc easeInElastic easeOutElastic easeInOutElastic easeInBack easeOutBack easeInOutBack easeInBounce easeOutBounce easeInOutBounce

Minimal example:

<round-progress [current]="current" [max]="max"/>

Full example:

<round-progress
    [current]="current"
    [max]="max"
    [color]="'#45ccce'"
    [background]="'#eaeaea'"
    [radius]="125"
    [stroke]="20"
    [semicircle]="true"
    [rounded]="true"
    [clockwise]="false"
    [responsive]="false"
    [duration]="800"
    [animation]="'easeInOutQuart'"
    [animationDelay]="0"
    (onRender)="doSomethingWithCurrentValue($event)"/>

Configuring the default values

The module comes with some pre-configured options for things like colors, size, stroke etc. If these don't match your app's design, you can change the global defaults by providing a new value for the ROUND_PROGRESS_DEFAULTS injection token. Whenever an option isn't defined on a round-progress element, it's value will be taken from the defaults.

import {NgModule} from '@angular/core';
import {
  RoundProgressModule,
  RoundProgressConfig,
  ROUND_PROGRESS_DEFAULTS
} from 'angular-svg-round-progressbar';

@NgModule({
  imports: [RoundProgressModule],
  providers: [{
    provide: ROUND_PROGRESS_DEFAULTS,
    useValue: {
      color: '#f00',
      background: '#0f0'
    }
  }]
})
export class YourModule {};

Browser support

  • Internet Explorer 9+
  • Firefox 28.0+
  • Chrome 31+
  • Safari 5.1+
  • and pretty much any browser that supports SVG

Note: Some older browsers may require (a polyfill for requestAnimationFrame). Read more about the requestAnimationFrame browser support.

Development

The project uses yarn to manage dependencies to make sure that you have it installed.

  • yarn to install development dependencies.
  • yarn lint to lint the source files.
  • yarn start to run a development server. Go to localhost:4200 to see the demo.
  • yarn build-lib to build the library in production mode.
  • yarn build-demo to build the demo in production mode.
  • yarn release-lib to build the library and release it to npm.
  • yarn release-demo to build the demo and deploy it to GitHub Pages.

Credits

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory