1.0.7 • Published 4 years ago

st-ring-chart v1.0.7

Weekly downloads
23
License
MIT
Repository
github
Last release
4 years ago

npm version

Ring Chart

Simple Ring-Chart/Pie-Chart angular component with 1 or more sections (see demo)

Getting started

Install

NPM

npm install --save st-ring-chart

YARN

yarn add st-ring-chart

Import The Ring Chart module

import { RingChartModule } from 'st-ring-chart';

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

See Usage At The Demo Project

API

InputTypeDefaultRequiredDescription
sectionsRingSectionItem[][]Yesrepresents the chart sections, every section is in the form of: {"color": string, "percentage": number}. Sum of section percentages must be equal to 1
thicknessnumber (px)5NoThe width of the ring. When this number is half or greater the ring diameter it fills the ring entirely and it becomes a pie.
diameternumber (px)0YesThe Ring/Pie diameter.
centerColorstringbackgroundNoThe color of the ring center. It is recommended to pass this parameter in order to avoid some display artifacts where the sections intersect

Development

Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.4

4 years ago

1.0.3

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago