bento-charts 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +43 -6
  2. package/package.json +1 -1
  3. package/.git-ignore +0 -6
package/README.md CHANGED
@@ -1,9 +1,46 @@
1
+ # Bento Charts
1
2
 
3
+ [![Build Status](https://travis-ci.org/bento-platform/Bento-Charts.svg?branch=master)](https://travis-ci.org/bento-platform/Bento-Charts)
4
+ [![Coverage Status](https://coveralls.io/repos/github/bento-platform/Bento-Charts/badge.svg?branch=master)](https://coveralls.io/github/bento-platform/Bento-Charts?branch=master)
5
+ [![npm version](https://badge.fury.io/js/bento-charts.svg)](https://badge.fury.io/js/bento-charts)
2
6
 
3
- // TODO: Add comments telling how can you translate
4
- // TODO: Add a way for default translation
5
- // TODO: Add theme selection for chart
6
- // TODO: Add comment on how to remove missing
7
+ Bento charts offers Bar and Pie charts for Bento project UI.
7
8
 
8
- There are two charts supported: Bar and Pie
9
- Refer
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install bento-charts
13
+ ```
14
+
15
+ ## Usage
16
+ Wrap your app in the ChartConfigProvider and pass in the Language of your site.
17
+
18
+ ```jsx
19
+ import { ChartConfigProvider } from 'bento-charts';
20
+ ```
21
+
22
+ ```jsx
23
+ <ChartConfigProvider Lng={language}>
24
+ <App />
25
+ </ChartConfigProvider>
26
+ ```
27
+ Language can be either `'en'` or `'fr'`.
28
+
29
+ You also can provide your own theme and translation dictionary.
30
+
31
+ ```jsx
32
+ <ChartConfigProvider
33
+ Lng={language}
34
+ theme={theme}
35
+ translations={translations}
36
+ >
37
+ <App />
38
+ </ChartConfigProvider>
39
+ ```
40
+ refer to [theme](https://github.com/bento-platform/Bento-Charts/blob/eee46541eec68e2dd7f62f8d786148480ce5105f/src/types/chartTypes.ts#L20) and [translations](https://github.com/bento-platform/Bento-Charts/blob/eee46541eec68e2dd7f62f8d786148480ce5105f/src/types/chartTypes.ts#L47) for more information.
41
+ ## Using a Chart
42
+
43
+ ```jsx
44
+ import { BarChart, PieChart } from 'bento-charts';
45
+ ```
46
+ Refer to [Props](https://github.com/bento-platform/Bento-Charts/blob/eee46541eec68e2dd7f62f8d786148480ce5105f/src/types/chartTypes.ts#L51) for information on their props.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bento-charts",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Charts library for Bento-platform",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/.git-ignore DELETED
@@ -1,6 +0,0 @@
1
- build/*
2
- node_modules/*
3
- dist/*
4
- .DS_Store
5
- .idea/
6
- .vscode/