Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1280 - react-clay-charts #1281

Merged
merged 4 commits into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
}
},
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"<rootDir>.*(node_modules)(?!.*clay.*).*$"
]
},
"workspaces": [
"packages/*"
]
"workspaces": {
"packages":["packages/*"],
"nohoist": ["**/clay-charts-shared"]
}
}
11 changes: 11 additions & 0 deletions packages/clay-charts-react/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": [
"react"
],
"rules": {
"no-unused-vars": ["error", {"ignoreRestSiblings": true }],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"]
}
}
29 changes: 29 additions & 0 deletions packages/clay-charts-react/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Software License Agreement (BSD License)

Copyright (c) 2014, Liferay Inc.
All rights reserved.

Redistribution and use of this software in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:

* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.

* The name of Liferay Inc. may not be used to endorse or promote products
derived from this software without specific prior
written permission of Liferay Inc.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61 changes: 61 additions & 0 deletions packages/clay-charts-react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# clay-charts-react

React.js implementation of Clay built on [react-billboardjs](https://github.com/planttheidea/react-billboardjs)

## Setup

1. Install NodeJS >= v0.12.0 and NPM >= v3.0.0, if you don't have it yet. You
can find it [here](https://nodejs.org).

2. Install local dependencies:

```
npm install
```

3. Build the code:

```
npm run compile
```

## Running Demos

1. Install local dependencies:

```
npm install
```

2. Start development server

```
npm run start
```

3. Navigate to `localhost:8080`

## Basic Usage

See [billboard.js](https://naver.github.io/billboard.js/release/latest/doc/) and [react-billboardjs](https://github.com/planttheidea/react-billboardjs) for a more in depth API

```jsx
import ClayCharts from 'clay-charts-react';

<ClayCharts
data={{
columns: [['data1', 100, 20, 30], ['data2', 20, 70, 100]],
type: 'bar',
}}
/>;

// or

import { BarChart } from 'clay-charts-react';

<BarChart
data={{
columns: [['data1', 100, 20, 30], ['data2', 20, 70, 100]],
}}
/>;
```
Loading