Skip to content

Commit d8cbcb7

Browse files
committed
initial
0 parents  commit d8cbcb7

23 files changed

+14857
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = false
9+
insert_final_newline = true
10+
indent_style = tab
11+
12+
[*.json]
13+
indent_style = space
14+
indent_size = 2

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.publish/*
2+
dist/*
3+
example/dist/*
4+
lib/*
5+
node_modules/*

.eslintrc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"plugins": [
8+
"react"
9+
],
10+
"rules": {
11+
"curly": [2, "multi-line"],
12+
"quotes": [2, "single", "avoid-escape"],
13+
"react/display-name": 0,
14+
"react/jsx-boolean-value": 1,
15+
"react/jsx-quotes": 1,
16+
"react/jsx-no-undef": 1,
17+
"react/jsx-sort-props": 0,
18+
"react/jsx-sort-prop-types": 1,
19+
"react/jsx-uses-react": 1,
20+
"react/jsx-uses-vars": 1,
21+
"react/no-did-mount-set-state": 1,
22+
"react/no-did-update-set-state": 1,
23+
"react/no-unknown-property": 1,
24+
"react/prop-types": 1,
25+
"react/react-in-jsx-scope": 1,
26+
"react/self-closing-comp": 1,
27+
"react/wrap-multilines": 1,
28+
"semi": 2,
29+
"strict": 0
30+
}
31+
}

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Coverage tools
11+
lib-cov
12+
coverage
13+
coverage.html
14+
.cover*
15+
16+
# Dependency directory
17+
node_modules
18+
19+
# Example build directory
20+
example/dist
21+
.publish
22+
23+
# Editor and other tmp files
24+
*.swp
25+
*.un~
26+
*.iml
27+
*.ipr
28+
*.iws
29+
*.sublime-*
30+
.idea/
31+
*.DS_Store

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# react-chartjs-2
2+
3+
React wrapper for [ChartJs 2](http://www.chartjs.org/docs/#getting-started)
4+
5+
6+
## Demo & Examples
7+
8+
Live demo: [gor181.github.io/react-chartjs-2](http://gor181.github.io/react-chartjs-2/)
9+
10+
To build the examples locally, run:
11+
12+
```
13+
npm install
14+
npm start
15+
```
16+
17+
Then open [`localhost:8000`](http://localhost:8000) in a browser.
18+
19+
20+
## Installation via NPM
21+
22+
```
23+
npm install react-chartjs-2 chart.js uid --save
24+
```
25+
26+
27+
## Usage
28+
29+
Check example/src/components/* for usage.
30+
31+
```
32+
import {Doughnut} from 'react-chartjs-2';
33+
34+
<Doughnut data={...} />
35+
```
36+
37+
### Properties
38+
39+
* data: PropTypes.object.isRequired,
40+
* height: PropTypes.number,
41+
* legend: PropTypes.object,
42+
* options: PropTypes.object,
43+
* redraw: PropTypes.bool,
44+
* width: PropTypes.number
45+
46+
47+
## Development (`src`, `lib` and the build process)
48+
49+
**NOTE:** The source code for the component is in `src`. A transpiled CommonJS version (generated with Babel) is available in `lib` for use with node.js, browserify and webpack. A UMD bundle is also built to `dist`, which can be included without the need for any build system.
50+
51+
To build, watch and serve the examples (which will also watch the component source), run `npm start`. If you just want to watch changes to `src` and rebuild `lib`, run `npm run watch` (this is useful if you are working with `npm link`).
52+
53+
## Thanks
54+
55+
Jed Watson for making react-component yo builder!
56+
57+
## License
58+
59+
MIT Licensed
60+
Copyright (c) 2016 Goran Udosic && Headstart App.

bower.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "react-chartjs-2",
3+
"version": "0.0.0",
4+
"description": "react-chartjs-2",
5+
"main": "dist/react-chartjs-2.min.js",
6+
"homepage": "https://github.com/gor181/react-chartjs-2",
7+
"authors": [
8+
"Goran Udosic"
9+
],
10+
"moduleType": [
11+
"amd",
12+
"globals",
13+
"node"
14+
],
15+
"keywords": [
16+
"react",
17+
"react-component"
18+
],
19+
"license": "MIT",
20+
"ignore": [
21+
".editorconfig",
22+
".gitignore",
23+
"package.json",
24+
"src",
25+
"node_modules",
26+
"example",
27+
"test"
28+
]
29+
}

0 commit comments

Comments
 (0)