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-radial-progress

v0.1.1

Published

A simple radial progress component for Angular. Responsive and highly customizable.

Downloads

8

Readme

Angular Radial Progress

A simple radial progress component for Angular. Responsive and highly customizable.

Installation

Import in your Angular AppModule like:

// Import radial-progress
import {RadialProgressModule} from "ngx-radial-progress";

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    RadialProgressModule // Import RadialProgressModule here
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}

Use it in your Angular application like:

<radial-progress
  [percent]="85"
  [circleSize]="250"
  [title]="'Title goes here'"
></radial-progress>

Options

Option | Type | Default | Description --- | --- | --- | --- addClass | string | '' | add custom class(es) to component animation | boolean | true | whether to animate drawing of outer circle or not circleSize | number | 0 | size of circle. If 0 the circle is scaled relative to parent clockwise | boolean | false | whether to rotate clockwise or counter-clockwise delay | number | 0 | delay drawing of outer circle (in ms) fill | string | 'transparent' | color of fill of outer circle. Pass any color values you want fillBackground | string | 'transparent' | color of fill of inner circle. Pass any color values you want percent | number | 50 | number of percent percentUnit | string | '%' | unit after percentage counter showPercent | boolean | true | whether to show (percentage) counter or not strokeBackground | string | 'transparent' | color of inner stroke. Pass any color values you want strokeLinecap | string | 'butt' | stroke linecap of outer circle. Possible values: 'butt', 'round', 'square', 'inherit' strokeSteps | array | [{strokeColor: 'red',strokeStep: 10}, {strokeColor: 'green',strokeStep: 100}] | array with json object(s). Only relevant if animation == true strokeSteps.strokeColor | string | ['red', 'green'] | color of outer circle until current step. Pass any color values you want. Only relevant if animation == true strokeSteps.strokeStep | number | [10, 100] | defines color to given percentage value. Make sure to define strokeColor for strokeStep == 100. Only relevant if animation == true strokeWidth | number | 10 | width of outer circle stroke strokeWidthBackground | number | 10 | width of inner circle stroke title | string | '' | text to display. Leave empty to hide transitionDuration | number | 5000 | time to draw outer circle to 100% (in ms). Only relevant if animation == true

How stroke steps work

As mentioned in the options, there is one option strokeSteps. In here, you can define multiple intervals for your radial progress.

For example

   <radial-progress
     [percent]="85"
     [strokeSteps]="[{
         strokeColor: '#e00079',
         strokeStep: 25
      }, {
         strokeColor: '#ff7300',
         strokeStep: 50
      }, {
         strokeColor: 'rgb(149, 193, 31)',
         strokeStep: 75
      }, {
         strokeColor: 'rgb(58, 65, 68)',
         strokeStep: 100
      }]"
   ></radial-progress>

will result in something like this alt text depending on the given percentage. That means:

  • color = #e00079 for percentage interval between 0 - 24
  • color = #ff7300 for percentage interval between 25 - 49
  • color = rgb(149, 193, 31) for percentage interval between 50 - 74
  • color = rgb(58, 65, 68) for percentage interval between 75 - 100

NOTE: If you want only one single color, define strokeSteps like this:

   <radial-progress
     [strokeSteps]="[{
        strokeColor: 'red',
        strokeStep: 100
     }]"
   ></radial-progress>

Thank you

BrowserStack

Thank you BrowserStack for prodiving us with the infrastructure needed to test ngx-radial-progress.

License

ngx-radial-progress is released under the Apache 2.0 license.