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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ng-score-polygon

v1.1.0

Published

Angular lib to create regular SVG polygons, to represent and compare lists of scores

Downloads

64

Readme

NG SCORE POLYGON

Image of ng-polygon-score

Demo

Want a peek before downloading? There is a demo avaliable here

Latest release:

v.1.0 released! (23/12/19)

  • ng-score-polygon-comparer (new!)

Compare multiple score profiles, play as animation or navigate using the navigation menu.

Watch the graphic change over time in a cool evolution animation.

Check the score-polygon-comparer section for details.

  • Added more customization options for the score-polygon-component.Details in Extra Customization section.

Installation

  • In your Angular project: npm i ng-score-polygon --save
  1. Import the ScorePolygonModule in your Angular app.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import { ScorePolygonModule } from 'ng-score-polygon';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, ScorePolygonModule],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}

Basic usage ng-score-component

Description

This component automaticaly generates regular N-side polygons for a list of scores. This can be specialy apealing to display rated lists from 3 to 12 elements.

The component is totaly responsive, and most of the the styling is customizable. Check the Customization section for details.

  1. Create your scores, with the following format:

    { label: string; score: number; markerImage?: string; }

  • Label: The name of the entity represented by a score.
  • Score: A score in a scale from 0 to 10.
  • markerImage (optional): Path to the background image representing the score. If used, should be square-shaped to be properly displayed.
  • Example:
userScores = [
  { label: 'Proactivity', score: 8, markerImage: './assets/a.jpg' },
  { label: 'Effort', score: 7, markerImage: './assets/b.jpg' },
  { label: 'Creativity', score: 8, markerImage: './assets/c.jpg' }
];
  1. Define the component in your template.

    <ng-score-polygon [scores]="userScores"></ng-score-polygon>

Extra Customization:

Colors and maker´s format can be changed using [property binding].

NEW! [config] If you want to set up multiple variables at once, just send the configuration as a plain js object. Keys are listed below. Just send the ones you actualy want to change, the rest of variables will remain with the last value assigned or the default.

Colors (string)

| Variable | Description | | -------------------------- | ------------------------------------------------------- | | [ scorePolygonColor ] | Sets color of the score polygon. | | [ comparePolygonColor ] | Sets color of the compare polygon. ( NEW!) | | [ maxScorePolygonColor ] | Sets color of the wrapper polygon. | | [ innerLinesColor ] | Sets color of the lines from edge to center of polygon. | | [ iconBorderColor ] | Sets color of the icons border. | | [ outerCircleColor ] | Sets color for the surrounding circle. |

Labels & Text (boolean)

| Variable | Description | Default | | ----------------------- | ------------------------------------------------------------------------------- | ------- | | [ showText ] | Enables/disables the score labels at the polygon edges. | false | | [ showIcons ] | Enable/disables a rounded icon at the polygon edges. | true | | [showPercentPolygons] | Enables/disables small polygons from outside to the center with 10% separation. | true | | [ showOuterCircle ] | Shows/hides the circle surrounding the polygon | true |

ng-score-polygon-comparer ( NEW!)

This component provides a visible control UI that allows user to navigate between multiple score sets, or play them as a slide show.

Just provide the score sets, and it will automaticaly configurate the ng-score-polygon component for you.

<ng-score-polygon [scoreSets]="userScores"></ng-score-polygon>

Interface

interface ScoreSet {
  scores: [{ score: number; label: string; markerImage?: string }];
  setName: string;
}

Example

const myScores = [
  { setName: 'January', scores: [{ energy: 10, proactivity: 10 }]}
  { setName: 'February', scores: [{ energy: 8.5, proactivity: 6.5}]
]

Aditional config

| Variable | Description | Default | | -------------- | ---------------------------------------------------------------------------------------------------------- | ------- | | [ autoplay ] | Begins the slide when the component loads | true | | [ loop ] | Enables/disables the score labels at the polygon edges. | true | | [ speed ] | Time between a slide and the next (ms) | 1500 | | [ delay ] | Time before animation starts. (ms) | 1500 | | [ config ] | The config that will be set in the score-polygon. Check Extra customization section for the complete list. |

Contact

Hi! I´m Fer Ayguavives Oti, an Angular enthusiast. I am avaliable for hire! If you like what you see, this component was usefull to your project or want to contact for a job offer, here is my contact. Any feedback will be apreciated! :)

  • Contact: [email protected]
  • Github: https://github.com/FerAiwa
  • Linkdin: https://www.linkedin.com/in/ferayguavives