npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-round-progress

v16.1.1

Published

Angular module that uses SVG to create a circular progressbar

Downloads

18

Readme

NGX Round Progress (Angular SVG round progressbar)

Angular module that uses SVG to create a circular progressbar

Updated version of angular-svg-round-progressbar for Angular 9.

Demo

Click here for the Angular 1.x version

Install

First you have to install the module through npm:

npm install ngx-round-progress --save

Afterwards you need to import the RoundProgressModule in your module:

import {NgModule} from '@angular/core';
import {RoundProgressModule} from 'ngx-round-progress';

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

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"></round-progress>

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)"></round-progress>

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 'ngx-round-progress';

@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.

Credits