https://github.com/sazzadsazib/cohort-react-graph
https://github.com/sazzadsazib/cohort-react-graph
cohort graph react
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sazzadsazib/cohort-react-graph
- Owner: sazzadsazib
- License: mit
- Created: 2018-10-15T06:24:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-15T23:22:53.000Z (over 5 years ago)
- Last Synced: 2025-03-16T08:12:46.394Z (3 months ago)
- Topics: cohort, graph, react
- Language: JavaScript
- Homepage:
- Size: 2.77 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cohort React Graph · [](https://github.com/sazzadsazib/cohort-react-graph/blob/master/LICENSE)
A library of to show React cohort graph
## Installation
Run the following command:
`npm start`## How to use:
### Props:
`width: any integer`
#### Day Wise Cohort:
```
data: [
{date: "2018-09-25T00:00:00", retention: "100", user: 201, data: [100,20,30,20,0,40,60]},
{date: "2018-09-26T00:00:00",retention: "38.0", user: 210, data: [100,20,30,20,0,40]},
{date: "2018-09-27T00:00:00",retention: "20.6", user: 121, data: [100,20,30,20,0]},
{date: "2018-09-28T00:00:00",retention: "14.2", user: 104, data: [100,20,30,20]},
{date: "2018-09-29T00:00:00",retention: "6.7", user: 69, data: [100,20,30]},
{date: "2018-09-30T00:00:00",retention: "6.8", user: 57, data: [100,20]},
{date: "2018-10-01T00:00:00",retention: "100", user: 23, data: [100]},
]
```
#### Month Wise Cohort: (3 month data)
```
data: [
{date: "2018-09-25T00:00:00", retention: "100", user: 201, data: [100,20,15]},
{date: "2018-09-26T00:00:00",retention: "38.0", user: 210, data: [100,20]},
{date: "2018-09-27T00:00:00",retention: "20.6", user: 121, data: [100]},
]
```
#### Week Wise Cohort:(4 week data)
```
data: [
{date: "2018-09-25T00:00:00", retention: "100", user: 201, data: [100,40,20,15]},
{date: "2018-09-26T00:00:00",retention: "38.0", user: 210, data: [100,40,20]},
{date: "2018-09-27T00:00:00",retention: "20.6", user: 121, data: [100,40]},
{date: "2018-09-25T00:00:00", retention: "100", user: 201, data: [100]},
]
```
## Simple Usage:
```$xslt
import { CohortBasic } from 'cohort-graph-react';```