Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ngx-round-progress
Advanced tools
Angular module that uses SVG to create a circular progressbar
Updated version of angular-svg-round-progressbar for Angular 9.
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 {};
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 |
<round-progress [current]="current" [max]="max"></round-progress>
<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>
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 {};
Note: Some older browsers may require (a polyfill for requestAnimationFrame
).
Read more about the requestAnimationFrame
browser support.
FAQs
Angular module that uses SVG to create a circular progressbar
The npm package ngx-round-progress receives a total of 2 weekly downloads. As such, ngx-round-progress popularity was classified as not popular.
We found that ngx-round-progress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.