Skip to content
Branch: master
Go to file
Code

Latest commit

8 people committed 51b296d Jun 18, 2020
* Update docs

* rebuild docs

* Update docs

* Update docs (#190)

* Changelog casing fix

* decorate events and remove original decorations (#182)

* Fix warnings in tests and add SankeyNodeTerminal tests (#184)

* Update event handler test on XYPlot

* Fix Bar warnings in tests

* Fix XLine warnings in tests

* Fix AreaBarChart warnings

* Update SankeyDiagram tests

* Bump mixin-deep from 1.3.1 to 1.3.2 (#186)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-utils from 1.4.0 to 1.4.3 (#185)

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>

* 2.0.2 release (#188)

* 2.0.2 release

* Update package-lock

* 2.0.2

* Update docs

* Gh pages v3 (#210)

* Changelog casing fix

* decorate events and remove original decorations (#182)

* Fix warnings in tests and add SankeyNodeTerminal tests (#184)

* Update event handler test on XYPlot

* Fix Bar warnings in tests

* Fix XLine warnings in tests

* Fix AreaBarChart warnings

* Update SankeyDiagram tests

* Bump mixin-deep from 1.3.1 to 1.3.2 (#186)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-utils from 1.4.0 to 1.4.3 (#185)

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>

* 2.0.2 release (#188)

* 2.0.2 release

* Update package-lock

* 2.0.2

* Update docs in master (#189)

* Update docs

* rebuild docs

* Update docs

* Update docs

* Added Precommit hooks (#191)

* Added Precommit hooks

* Update package.json for precommit hooks

* Remove docs from build (#192)

* Update package-lock.json

* Remove docs from build process

* Disable cache for travis builds

* Revert "Added Precommit hooks (#191)" (#193)

This reverts commit 777320a.

* v3.0.0 release (#195)

* Revert "Revert "Added Precommit hooks (#191)" (#193)" (#194)

This reverts commit c6ae448.

* Update dependencies to enable Greenkeeper 🌴 (#187)

* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* chore(package): update lockfile package-lock.json

* Fix issues with cross-env upgrade

* Update jsdom setup

* Remove docs from npm build command

* Remove support for node < 8

* Update docs based on raw-loader upgrade

* Add Pie Chart Styles  (#201)

* WIP: PieChart prop of getValue -> slice, added pieSliceStyle prop to PieChart

* replace example code color picker with d3 function

* update docs

* address pr comments

* undo slice destructure

* update docs and fix CleanWebpack package usage

* doc update

* docs update

* remove doc build config

* Doc updates (#207)

* update punctuation for AreaBarChart

* require data as a prop for AreaBarChart

* update docs for AreaChart && add required next to props that are required

* update Bar docs

* update BarChart docs

* update ColorHeatmap docs

* FunnelChart docs

* update FunnelChart docs

* update Histogram docs

* update KernelDensityEstimation docs

* update LineChart docs

* MarkerLineChart docs update

* RangeBarChart doc update

* add iteration through enum types for docs, update sankey diagram docs

* remove extra spaces

* update docs for TreeMap

* Bar doc updates

* update all the docs with more descriptive prop types

* docs update for XLine

* update the rest of the docs

* 3.0.0

* v3.0.0 release

* Gh pages v3 0 1 (#213)

* Changelog casing fix

* decorate events and remove original decorations (#182)

* Fix warnings in tests and add SankeyNodeTerminal tests (#184)

* Update event handler test on XYPlot

* Fix Bar warnings in tests

* Fix XLine warnings in tests

* Fix AreaBarChart warnings

* Update SankeyDiagram tests

* Bump mixin-deep from 1.3.1 to 1.3.2 (#186)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-utils from 1.4.0 to 1.4.3 (#185)

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>

* 2.0.2 release (#188)

* 2.0.2 release

* Update package-lock

* 2.0.2

* Update docs in master (#189)

* Update docs

* rebuild docs

* Update docs

* Update docs

* Added Precommit hooks (#191)

* Added Precommit hooks

* Update package.json for precommit hooks

* Remove docs from build (#192)

* Update package-lock.json

* Remove docs from build process

* Disable cache for travis builds

* Revert "Added Precommit hooks (#191)" (#193)

This reverts commit 777320a.

* v3.0.0 release (#195)

* Revert "Revert "Added Precommit hooks (#191)" (#193)" (#194)

This reverts commit c6ae448.

* Update dependencies to enable Greenkeeper 🌴 (#187)

* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* chore(package): update lockfile package-lock.json

* Fix issues with cross-env upgrade

* Update jsdom setup

* Remove docs from npm build command

* Remove support for node < 8

* Update docs based on raw-loader upgrade

* Add Pie Chart Styles  (#201)

* WIP: PieChart prop of getValue -> slice, added pieSliceStyle prop to PieChart

* replace example code color picker with d3 function

* update docs

* address pr comments

* undo slice destructure

* update docs and fix CleanWebpack package usage

* doc update

* docs update

* remove doc build config

* Doc updates (#207)

* update punctuation for AreaBarChart

* require data as a prop for AreaBarChart

* update docs for AreaChart && add required next to props that are required

* update Bar docs

* update BarChart docs

* update ColorHeatmap docs

* FunnelChart docs

* update FunnelChart docs

* update Histogram docs

* update KernelDensityEstimation docs

* update LineChart docs

* MarkerLineChart docs update

* RangeBarChart doc update

* add iteration through enum types for docs, update sankey diagram docs

* remove extra spaces

* update docs for TreeMap

* Bar doc updates

* update all the docs with more descriptive prop types

* docs update for XLine

* update the rest of the docs

* 3.0.0

* v3.0.0 release

* Fix xy plot lesson in docs (#211)

* Fix xy plot lesson in docs

* Add TODO regarding Interaction and GettersAndAccessors lesson and fix those imports just in case

* Prettier ignore build (#212)

* Add prettierignore to ignore build files

* ignore node modules

* 3.0.1

* v3.0.1 release

* Gh pages v3.0.2 (#237)

* Changelog casing fix

* decorate events and remove original decorations (#182)

* Fix warnings in tests and add SankeyNodeTerminal tests (#184)

* Update event handler test on XYPlot

* Fix Bar warnings in tests

* Fix XLine warnings in tests

* Fix AreaBarChart warnings

* Update SankeyDiagram tests

* Bump mixin-deep from 1.3.1 to 1.3.2 (#186)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-utils from 1.4.0 to 1.4.3 (#185)

Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.4.0...v1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>

* 2.0.2 release (#188)

* 2.0.2 release

* Update package-lock

* 2.0.2

* Update docs in master (#189)

* Update docs

* rebuild docs

* Update docs

* Update docs

* Added Precommit hooks (#191)

* Added Precommit hooks

* Update package.json for precommit hooks

* Remove docs from build (#192)

* Update package-lock.json

* Remove docs from build process

* Disable cache for travis builds

* Revert "Added Precommit hooks (#191)" (#193)

This reverts commit 777320a.

* v3.0.0 release (#195)

* Revert "Revert "Added Precommit hooks (#191)" (#193)" (#194)

This reverts commit c6ae448.

* Update dependencies to enable Greenkeeper 🌴 (#187)

* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* chore(package): update lockfile package-lock.json

* Fix issues with cross-env upgrade

* Update jsdom setup

* Remove docs from npm build command

* Remove support for node < 8

* Update docs based on raw-loader upgrade

* Add Pie Chart Styles  (#201)

* WIP: PieChart prop of getValue -> slice, added pieSliceStyle prop to PieChart

* replace example code color picker with d3 function

* update docs

* address pr comments

* undo slice destructure

* update docs and fix CleanWebpack package usage

* doc update

* docs update

* remove doc build config

* Doc updates (#207)

* update punctuation for AreaBarChart

* require data as a prop for AreaBarChart

* update docs for AreaChart && add required next to props that are required

* update Bar docs

* update BarChart docs

* update ColorHeatmap docs

* FunnelChart docs

* update FunnelChart docs

* update Histogram docs

* update KernelDensityEstimation docs

* update LineChart docs

* MarkerLineChart docs update

* RangeBarChart doc update

* add iteration through enum types for docs, update sankey diagram docs

* remove extra spaces

* update docs for TreeMap

* Bar doc updates

* update all the docs with more descriptive prop types

* docs update for XLine

* update the rest of the docs

* 3.0.0

* v3.0.0 release

* Fix xy plot lesson in docs (#211)

* Fix xy plot lesson in docs

* Add TODO regarding Interaction and GettersAndAccessors lesson and fix those imports just in case

* Prettier ignore build (#212)

* Add prettierignore to ignore build files

* ignore node modules

* 3.0.1

* v3.0.1 release

* Update sinon to the latest version 🚀 (#216)

* chore(package): update sinon to version 8.0.0

* chore(package): update lockfile package-lock.json

* Update eslint-config-prettier to the latest version 🚀 (#217)

* chore(package): update eslint-config-prettier to version 6.8.0

* chore(package): update lockfile package-lock.json

* Update cross-env to the latest version 🚀 (#225)

* chore(package): update cross-env to version 7.0.0

* chore(package): update lockfile package-lock.json

* Update mocha to the latest version 🚀 (#226)

* chore(package): update mocha to version 7.0.1

* chore(package): update lockfile package-lock.json

* Rename upcoming deprecated Lifecycle methods (#214)

* rename lifecycle methods in src

* update examples

* fix weird prettier stuff

* Greenkeeper/@spotify/eslint config base 6.0.0 (#227)

* chore(package): update @spotify/eslint-config-base to version 6.0.0

Closes #219

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>

* Greenkeeper/@spotify/prettier config 6.0.0 (#230)

* chore(package): update @spotify/prettier-config to version 6.0.0

Closes #221

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>

* Greenkeeper/@spotify/eslint config react 6.0.0 (#228)

* chore(package): update @spotify/eslint-config-react to version 6.0.0

Closes #220

* chore(package): update lockfile package-lock.json

* fix lint errors

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>

* Remove deprecated Lifecycle hooks (#234)

* remove unsafe calls from animated examples

* remove unsafe calls from TreeMap

* remove unsafe calls from KernelDensityEstimation

* remove unsafe calls from LineChart

* remove Unsafe calls from SankeyDiagram

* remove deprecated lifecycle hooks from ZoomContainer

* 3.0.2

* v3.0.2 release

Co-authored-by: Kris Salvador <krissalvador27@gmail.com>
Co-authored-by: Tanay Vardhan <tvardha2@illinois.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anita <acmei@users.noreply.github.com>
Co-authored-by: Ian MacIntosh <ianjmacintosh@users.noreply.github.com>
Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
Co-authored-by: Erica Hyman <ekhyman@gmail.com>

* docs

Co-authored-by: Kris Salvador <krissalvador27@gmail.com>
Co-authored-by: Isaac Ezer <isaac.ezer@gmail.com>
Co-authored-by: Tanay Vardhan <tvardha2@illinois.edu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian MacIntosh <ianjmacintosh@users.noreply.github.com>
Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
Co-authored-by: Erica Hyman <ekhyman@gmail.com>

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

version build

Reactochart

Overview

Greenkeeper badge

Reactochart is a library of React components for creating data visualization charts and graphs. Components include line chart, bar chart, area chart, heat maps, scatterplot, histogram, pie chart, sankey diagram, and tree map.

Getting started

  1. Install reactochart using npm.
npm i reactochart --save
  1. Then you can import an individual Reactochart component:
import LineChart from 'reactochart/LineChart';
  1. If you prefer, you can import all of Reactochart at once, though this may hinder some optimizations, such as webpack tree-shaking:
import { XYPlot, XAxis, YAxis, LineChart } from 'reactochart';

or

import * as Reactochart from 'reactochart';
  1. Import reactochart's base styles
import 'reactochart/styles.css';
  1. Build your first chart and see it rendered! For example, the following code snippet:
import XYPlot from 'reactochart/XYPlot';
import XAxis from 'reactochart/XAxis';
import YAxis from 'reactochart/YAxis';
import LineChart from 'reactochart/LineChart';
import 'reactochart/styles.css';

const MyFirstLineChart = props => (
  <XYPlot>
    <XAxis title="Phase" />
    <YAxis title="Intensity" />
    <LineChart
      data={Array(100)
        .fill()
        .map((e, i) => i + 1)}
      x={d => d}
      y={d => Math.sin(d * 0.1)}
    />
  </XYPlot>
);

results in this:

Live Examples

The examples contain more details about each component and the prop-types it accepts. To run the examples locally and play with the different types of charts in a live code editor:

  1. Clone this repo and cd to the newly-created directory
  2. Run npm run serve in your terminal (note: if you're running Python in v3 or higher you'll need to run python -m http.server)
  3. Go to http://localhost:8000

Reactochart Components

Chart Foundations

XY Plot

XY Axis Components

Chart Types

Non-XY charts

XY charts

XY datum components (used by charts/axes)

Other

Development

If you'd like to contribute to the development this project, first fork & clone this repo, and then follow these steps:

Global dependencies

  • This project uses NPM to manage dependencies and run scripts. Run npm -v to check if you already have it installed. If you don't have it, NPM is packaged with Node.js - download and run the install package located on nodejs.org to install.
  • Babel is used to transpile ES6+ code to ES5 syntax. Install by running npm install --global babel
  • Webpack is used to bundle the JS & styles for the examples. Install by running npm install --global webpack

Project dependencies

  • Run npm install in the project root directory. This will install all of the project dependencies into the node_modules directory.

Development process

  • Run npm run dev to run the development server (webpack-dev-server), which will serve a live development version of the examples at localhost:9876.
  • Make changes to the library code in the src directory, and/or changes to the examples in the examples/src directory.
  • If you'd like to make changes or add further component documentation, follow the example on react-docgen.
  • Once you're happy with your library and/or documentation changes, run npm run docs. This allows the documentation build to run with your updated src code. git add and git commit the updated build.
  • git push to your forked version of the repo.
  • Open a Github pull request with your changes against master. 🎉

Notes

  • Do not make any changes in the lib or examples/build directories, as these directories are destroyed and regenerated on each build.
  • The development server uses react-hot-loader to automatically "hot reload" changes to React components, so refreshing your web browser is not necessary.

Code of Conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

You can’t perform that action at this time.