diff --git a/.editorconfig b/.editorconfig
new file mode 100755
index 0000000..04ba039
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,20 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..615af61
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,10 @@
+sudo: false
+language: node_js
+node_js:
+- stable
+cache:
+ directories:
+ - node_modules
+branches:
+ only:
+ - master
diff --git a/README.md b/README.md
index 2e1789d..cf26b56 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
-react-chartist
+rc-chartist
==============
[![NPM version][npm-image]][npm-url]
[![Downloads][downloads-image]][downloads-url]
-
+[]()
React component for [Chartist.js](https://gionkunz.github.io/chartist-js/)
### Installation
```
-$ npm install react-chartist --save
+$ npm install rc-chartist --save
```
### Usage
@@ -18,10 +18,10 @@ $ npm install react-chartist --save
```JavaScript
import React from 'react';
import ReactDOM from 'react-dom';
-import ChartistGraph from '../index';
+import { Graph, Interpolation } from '../index';
class Pie extends React.Component {
- render() {
+ render () {
var data = {
labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'],
@@ -33,6 +33,7 @@ class Pie extends React.Component {
var options = {
high: 10,
low: -10,
+ // lineSmoothing: Interpolation.simple(),
axisX: {
labelInterpolationFnc: function(value, index) {
return index % 2 === 0 ? value : null;
@@ -44,7 +45,7 @@ class Pie extends React.Component {
return (
-
+
)
}
@@ -67,7 +68,7 @@ Please check out [Chartist.js API documentation](http://gionkunz.github.io/chart
To add support for aspect ratio
```HTML
-
+
```
### Note
@@ -76,7 +77,6 @@ This module does not include the css files for Chartist. If you want to add it,
```HTML
-
```
Or use `bower` or `npm` to install Chartist and include it in your build process.
@@ -101,14 +101,14 @@ To build run `npm run build`
### Changelog
-If you want to support react version under v0.13, use `npm install react-chartist@0.9.0`
+Updated package to expose the entire Chartist API.
### License
MIT
-[npm-image]: https://img.shields.io/npm/v/react-chartist.svg?style=flat-square
-[npm-url]: https://npmjs.org/package/react-chartist
-[downloads-image]: http://img.shields.io/npm/dm/react-chartist.svg?style=flat-square
-[downloads-url]: https://npmjs.org/package/react-chartist
+[npm-image]: https://img.shields.io/npm/v/rc-chartist.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/rc-chartist
+[downloads-image]: https://img.shields.io/npm/dm/rc-chartist.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/rc-chartist
diff --git a/example/main.js b/example/main.js
index 793b378..f69b142 100644
--- a/example/main.js
+++ b/example/main.js
@@ -1,14 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
-import ChartistGraph from '../index';
+import { Graph, Interpolation } from '../index';
class Pie extends React.Component {
- render() {
+ render () {
var data = {
- labels: ['W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10'],
+ labels: [ 'W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9', 'W10' ],
series: [
- [1, 2, 4, 8, 6, -2, -1, -4, -6, -2]
+ [ 1, 2, 4, 8, 6, -2, -1, -4, -6, -2 ]
]
};
@@ -27,10 +27,10 @@ class Pie extends React.Component {
return (