# poly-rating

> A ReactJS component that Creates Polygons of Assigned Ratings and Summary Polygons.

Latest version **0.2.5** (published 2017-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install poly-rating
pnpm add poly-rating
yarn add poly-rating
bun add poly-rating
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2017-04-28 |
| First published | 2017-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.2.4 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ajay More |
| Maintainers | ajaymore |
| Keywords | react-component, polygon-rating, summary-polygons, html5-canvas |

## Links

- npm: https://www.npmjs.com/package/poly-rating
- Repository: https://github.com/ajaymore/poly-rating
- Homepage: http://./
- Issues: https://github.com/ajaymore/poly-rating/issues
- npm.io page: https://npm.io/package/poly-rating

## Dependencies (3)

- [react](https://npm.io/package/react.md) ^15.5.4
- [react-dom](https://npm.io/package/react-dom.md) ^15.5.4
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.2.5 (latest) — 2017-04-28
- 0.2.4 — 2017-04-28
- 0.1.4 — 2017-04-27
- 0.1.3 — 2017-04-27
- 0.1.2 — 2017-04-27
- 0.1.1 — 2017-04-27
- 0.1.0 — 2017-04-27

## README

# poly-rating

**A polygon based user rating component built using React**

Demo: [https://ajaymore.github.io/poly-rating](https://ajaymore.github.io/poly-rating)

## Installation

Install `poly-rating` with [npm](https://www.npmjs.com/):

```
$ npm install poly-rating --save
```

For [CommonJS](http://wiki.commonjs.org/wiki/CommonJS) users:

```javascript
import { SinglePolygon, SummaryPolygon } from 'poly-rating';
```
Please use context_blender.js from [https://github.com/Phrogz/context-blender](https://raw.githubusercontent.com/Phrogz/context-blender/master/context_blender.js) for SummaryPolygon to work.

Include the file in <head> section of the index.html like

```
<script src="./context_blender.js"></script>
```

## Usage:

```
const ratingArray = [{ name: 'AB', rating: 2 }, { name: 'CD', rating: 2 }, { name: 'EF', rating: 3 },
    { name: 'GH', rating: 4 }, { name: 'HI', rating: 5 }];
const polygonStyles = {
    polygonSides: 5,
    width: 500
}


<SinglePolygon
    ratingArray={ratingArray} // required
    polygonStyles={polygonStyles} // required
    canvasId="single-polygon" // required
    colorOverlay="#2ECC71" // optional
    colorStroke="#E8E5DF" // optional
    ratingLimit={5} // Rating Scale - optional
/>


<SummaryPolygon
    polygonStyles={polygonStyles} //required
    ratingDimensions={['AB', 'CD', 'EF', 'GH', 'HI']} // required
    canvasId="single-polygon" // required
    colorOverlay="#2ECC71" // optional
    colorStroke="#E8E5DF" // optional
    ratingLimit={5} // Rating Scale - optional
/>
```

---
_Source: https://npm.io/package/poly-rating · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
