Skip to content

Commit

Permalink
changed repository to react-easy-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Tettenborn committed Jan 18, 2016
1 parent d1b157e commit f178c29
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 31 deletions.
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of rc-d3 nor the names of its
* Neither the name of react-easy-chart nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

Expand All @@ -25,4 +25,3 @@ 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.

49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![animated graph](examples/images/animated-graph.gif)

# Introduction
## Introduction

This set of graphing components aims to be the easiest and fastest way of implementing a graph within a React application.

Expand All @@ -16,31 +16,48 @@ The graphs all have the following features:

Under the hood we use the fantastic [D3](http://d3js.org/) to create and render the charts into SVG. D3 requires some learning and will ultimately provide more flexible charts. The aim of React Easy Chart is to avoid that learning and have a common set of charts that can be set up in minutes.

We have concentrated on making an API that is consistent across a different set of graphs and so. Currently we provide a bar, line, area, scatter and pie chart.
We have concentrated on making an API that is consistent across a different set of graphs so allowing different graphs to be chosen for the same data set. Currently we provide a bar, line, area, scatter and pie chart.

The graphs though also support more advanced use cases such as mouseover, mousemove, mouseout, on-click events.
## Installation
`npm install react-easy-chart --save`

##Background and Motivation
There are quite a few d3/React libraries about including probably the most sophisticated being:
- https://github.com/esbullington/react-d3/
The chart component you wish to use can then be simply imported.
Area chart:

There are also a few different techniques for implementing D3
`import {AreaChart} from 'react-easy-chart';`

There are some subtle differences in how rc-d3 is implemented that react-d3.
Rather than re-develop the existing excellent (D3)[https://github.com/mbostock/d3/wiki/Gallery] charts into seperate
Bar chart:

`import BarChart from 'react-easy-chart/bar-chart';`

Line chart:

https://github.com/esbullington/react-d3
`import {LineChart} from 'react-easy-chart';`

It is aimed at
Pie chart:

`import PieChart from 'react-easy-chart/pie-chart';`

[![Build Status](https://travis-ci.org/rma-consulting/rc-d3.svg)](https://travis-ci.org/rma-consulting/rc-d3)
Scatter chart:

React component implementations of Mike Bostok's D3 visualisation library.
`import ScatterChart from 'react-easy-chart/scatter-chart';`

Inspired by http://oli.me.uk/2015/09/09/d3-within-react-the-right-way/

Using:
https://github.com/Olical/react-faux-dom
## Documentation
Each of the charts have had extensive documentation produced for them with working examples. These can be found here TODO ADD LINK

## Contributing
We welcome pull requests and forks of the current graph implementations. If you are able to follow the API we have set out and are developing a chart we currently do not have we would love to add to our existing library.

## Background and Motivation
The project started by trying to optimize D3 charts for React. After some reading and trial and error we came across this blog post http://oli.me.uk/2015/09/09/d3-within-react-the-right-way/
Oliver provided us with a solution that can utilize the react shadow DOM by creating a faux DOM to attach the SVG elements to. This is in our opinion the best current solution.

The complexity of developing D3 based graphs intermittently often means that even experienced JavaScript developers can take days getting back up to speed for making the most simple of Graphs. The React Easy Chart Library is flexible and robust enough to avoid needing to remember D3 syntax when simple graphs are required.


### Version
[![npm version](https://badge.fury.io/js/react-easy-chart.png)](https://www.npmjs.com/package/react-easy-chart)

### Build Status
[![Build Status](https://travis-ci.org/rma-consulting/react-easy-chart.svg)](https://travis-ci.org/rma-consulting/react-easy-chart)
2 changes: 1 addition & 1 deletion examples/area-chart/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import ReactDom from 'react-dom';
import {escapeHTML} from '../util';
import ToolTip from '../ToolTip';
import {AreaChart} from 'rc-d3';
import {AreaChart} from 'react-easy-chart';
import moment from 'moment';
import {format} from 'd3-time-format';

Expand Down
2 changes: 1 addition & 1 deletion examples/bar-chart/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import BarChart from 'rc-d3/bar-chart';
import BarChart from 'react-easy-chart/bar-chart';
import ToolTip from '../ToolTip';
import {escapeHTML} from '../util';

Expand Down
2 changes: 1 addition & 1 deletion examples/line-chart/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import ReactDom from 'react-dom';
import {escapeHTML} from '../util';
import ToolTip from '../ToolTip';
import {LineChart} from 'rc-d3';
import {LineChart} from 'react-easy-chart';
import moment from 'moment';
import {format} from 'd3-time-format';

Expand Down
2 changes: 1 addition & 1 deletion examples/pie-chart/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import ToolTip from '../ToolTip';
import {escapeHTML} from '../util';
import PieChart from 'rc-d3/pie-chart';
import PieChart from 'react-easy-chart/pie-chart';

export default class PieChartContainer extends React.Component {
constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {

resolve: {
alias: {
'rc-d3': path.join(__dirname, '..', 'modules')
'react-easy-chart': path.join(__dirname, '..', 'modules')
}
},

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = (config) => {
webpack: {
resolve: {
alias: {
'rc-d3': path.join(__dirname, 'modules')
'react-easy-chart': path.join(__dirname, 'modules')
}
},
module: {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rc-d3",
"name": "react-easy-chart",
"version": "0.0.1",
"description": "React component implementations of Mike Bostok's D3 visualisation library.",
"main": "lib/index.js",
Expand All @@ -11,13 +11,13 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/rma-consulting/rc-d3.git"
"url": "git+https://github.com/rma-consulting/react-easy-chart.git"
},
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/rma-consulting/rc-d3/issues"
"url": "https://github.com/rma-consulting/react-easy-chart/issues"
},
"homepage": "https://github.com/rma-consulting/rc-d3#readme",
"homepage": "https://github.com/rma-consulting/react-easy-chart#readme",
"devDependencies": {
"babel-cli": "^6.3.17",
"babel-core": "^6.3.21",
Expand Down
2 changes: 1 addition & 1 deletion tests/bar-chart/bar-chart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import chai, {should as chaiShould, expect} from 'chai';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react/lib/ReactTestUtils';
import {BarChart} from 'rc-d3';
import {BarChart} from 'react-easy-chart';
import spies from 'chai-spies';

const should = chaiShould();
Expand Down
2 changes: 1 addition & 1 deletion tests/line-chart/line-chart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {should as chaiShould, expect} from 'chai';
import React from 'react';
import TestUtils from 'react/lib/ReactTestUtils';
import {LineChart} from 'rc-d3';
import {LineChart} from 'react-easy-chart';

const should = chaiShould();
const testDataBasic = [[
Expand Down
2 changes: 1 addition & 1 deletion tests/pie-chart/pie-chart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {should as chaiShould, expect} from 'chai';
import React from 'react';
import TestUtils from 'react/lib/ReactTestUtils';
import {PieChart} from 'rc-d3';
import {PieChart} from 'react-easy-chart';

const should = chaiShould();

Expand Down

0 comments on commit f178c29

Please sign in to comment.