1.0.8 • Published 3 years ago

mi-pie-chart v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Installation

npm install mi-pie-chart

Usage

To use first import PieChart class from mi-pie-chart.

import { PieChart } from 'mi-pie-chart';

Next instantiate the pie chart.

const pieChart = new PieChart('#figure-1', someData, someConfig, someStyles);

The PieChart class accepts four arguments:

ArgumentRequiredDescription
elementIdYesThe id of the html element you would like to contain the pie chart
dataYesThe data you wish to display
configNoConfig options
stylesNoOverride the default styles

Data

Data must conform to the PieData interface. This can be imported:

import { PieChart, PieData } from 'mi-pie-chart';

Config

Data must conform to the PieConfig interface. This can be imported:

import { PieChart, PieConfig } from 'mi-pie-chart';

Styles

Data must conform to the PieStyles interface. This can be imported:

import { PieChart, PieStyles } from 'mi-pie-chart';
1.0.1

3 years ago

1.0.8

3 years ago

1.0.5

3 years ago

1.0.0

3 years ago