Skip to content

Commit

Permalink
docs(packages): update README for npm
Browse files Browse the repository at this point in the history
  • Loading branch information
serjilyashenko committed May 10, 2024
1 parent 9ac514f commit dc95227
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .changeset/fuzzy-crabs-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"react-simple-pie": patch
"simple-pie": patch
---

update README
17 changes: 11 additions & 6 deletions packages/react-simple-pie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
</div>
<hr/>

![NPM Version](https://img.shields.io/npm/v/react-simple-pie) ![NPM Downloads](https://img.shields.io/npm/dm/react-simple-pie)

![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-simple-pie) ![npm bundle size](https://img.shields.io/bundlephobia/min/react-simple-pie)


This project creates simple svg pie and doughnut charts for infographics like graphs and others.

**Note:** If you are going to use simple diagram in not react project, please check [Simple Pie](https://github.com/serjilyashenko/react-simple-pie/tree/master/src/packages/simple-pie) out.
`simple-pie` and `react-simple-pie` packages are parts of the [Simple Pie Project](https://github.com/serjilyashenko/simple-pie-project) repo
> If you are going to use simple diagram in not react project, please check [simple-pie](https://github.com/serjilyashenko/simple-pie-project/tree/master/packages/simple-pie) out.
> `simple-pie` and `react-simple-pie` packages are parts of the [simple-pie-project](https://github.com/serjilyashenko/simple-pie-project) repo
Check out the demo [here](https://simple-pie.netlify.app/)

Expand All @@ -25,7 +28,7 @@ And for obvious reasons it is not possible to use HighCharts, Chart.js or other
Well the `simple-pie` does exactly this thing. It generates tiny svg pie which can be integrated into network graph or
map or any other case, when you can't use data-visualization libraries.

![net and map cases](https://raw.githubusercontent.com/serjilyashenko/simple-pie-project/master/public/map-and-net-case.png)
![net and map cases](https://raw.githubusercontent.com/serjilyashenko/simple-pie-project/master/docs/images/map-and-net-case.png)


## Installation
Expand Down Expand Up @@ -58,9 +61,7 @@ export default function YourComponent() {
}
```

Since `simplePie` and `simpleDoughnut` return regular svg, you can use it as you wish.

**Note:** svg `height` and `width` are `100%`, so it trys to extend itself to available space. Thus, you should have wrapper with dimensions for your simple-pie diagram.
> ⚠️ The svg `height` and `width` are `100%`, so it trys to extend itself to available space. Thus, you should have wrapper with dimensions for your simple-pie diagram.
## Interface

Expand All @@ -76,3 +77,7 @@ export type TDoughnutProps = TPieProps & {
innerRadius?: number; // 0..1 - percent from outer radius
};
```

### Feedback

[[email protected]](mailto:[email protected])
8 changes: 6 additions & 2 deletions packages/simple-pie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

This project creates simple svg pie and doughnut charts for infographics like graphs and others.

> If you are going to use simple diagram in react project, please check [react-simple-pie](https://github.com/serjilyashenko/simple-pie-project/blob/afafff7c8eebb4a0772f71ffee49d09e8e08dcf1/packages/react-simple-pie/README.md) out.
> If you are going to use simple diagram in react project, please check [react-simple-pie](https://github.com/serjilyashenko/simple-pie-project/tree/master/packages/react-simple-pie) out.
> `simple-pie` and `react-simple-pie` packages are parts of the [simple-pie-project](https://github.com/serjilyashenko/simple-pie-project/blob/afafff7c8eebb4a0772f71ffee49d09e8e08dcf1/README.md) monorepo.
> `simple-pie` and `react-simple-pie` packages are parts of the [simple-pie-project](https://github.com/serjilyashenko/simple-pie-project) monorepo.
Check out the demo [here](https://simple-pie.netlify.app/)

Expand Down Expand Up @@ -110,3 +110,7 @@ export function simplePie(
```

`simpleDoughnut` has only new version of the interface

### Feedback

[rower_stats0g@icloud.com](mailto:rower_stats0g@icloud.com)

0 comments on commit dc95227

Please sign in to comment.