Commit 86fb80b5 authored by Evgeny's avatar Evgeny

Update README

parent 296b4d40
......@@ -5,50 +5,62 @@ c3 is a D3-based reusable chart library that enables deeper integration of chart
Follow the link for more information: [http://c3js.org](http://c3js.org/)
## Tutorial and Examples
## Why fork?
C3 development got kinda stack in time. As Etersoft uses c3 for its projects we decided to fork it and improve it by outselves. All releases from origin will be merged as soon as they are out.
+ [Getting Started](http://c3js.org/gettingstarted.html)
+ [Examples](http://c3js.org/examples.html)
## How is this differ?
Additional samples can be found in this repository:
+ [https://github.com/masayuki0812/c3/tree/master/htdocs/samples](https://github.com/masayuki0812/c3/tree/master/htdocs/samples)
Our current improvments
You can run these samples as:
```
$ cd c3/htdocs
$ python -m SimpleHTTPServer 8080
```
#### Working with data
*chart.loadColumns([[id, values...], [...]])*
Loads given columns. Alias to chart.load({columns: [[id, values...], ...]});
## Google Group
For general C3.js-related discussion, please visit our [Google Group at https://groups.google.com/forum/#!forum/c3js](https://groups.google.com/forum/#!forum/c3js).
*chart.appendToColumn(column)*
## Gitter
[![Join the chat at https://gitter.im/masayuki0812/c3](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/masayuki0812/c3?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Append given values to sequence
## Using the issue queue
The [issue queue](https://github.com/masayuki0812/c3/issues) is to be used for reporting defects and problems with C3.js, in addition to feature requests and ideas. It is **not** a catch-all support forum. **For general support enquiries, please use the [Google Group](https://groups.google.com/forum/#!forum/c3js) at https://groups.google.com/forum/#!forum/c3js.** All questions involving the interplay between C3.js and any other library (such as AngularJS) should be posted there first!
Usage:
```js
// Say data was [0, 50]
chart.appendToColumn(['data', 100, 200]);
// Now data is [0, 50, 100, 200]
```
Before reporting an issue, please do the following:
1. [Search for existing issues](https://github.com/masayuki0812/c3/issues) to ensure you're not posting a duplicate.
*chart.popFromColumn(id, amount)*
1. [Search the Google Group](https://groups.google.com/forum/#!forum/c3js) to ensure it hasn't been addressed there already.
Pops given amount from sequence
1. Create a JSFiddle or Plunkr highlighting the issue. Please don't include any unnecessary dependencies so we can isolate that the issue is in fact with C3. *Please be advised that custom CSS can modify C3.js output!*
Usage:
```js
// Say data was [0, 100, 200, 300]
chart.popFromColumn('data', 2);
// Now data is [0, 100]
```
1. When posting the issue, please use a descriptive title and include the version of C3 (or, if cloning from Git, the commit hash — C3 is under active development and the master branch contains the latest dev commits!), along with any platform/browser/OS information that may be relevant.
*chart.setValue(id, index, value)*
## Pull requests
Pull requests are welcome, though please post an issue first to see whether such a change is desirable.
If you choose to submit a pull request, please do not bump the version number unless asked to, and please include test cases for any new features!
Sets value for given sequence and index. If no value is presented in index, new value is appended to sequence.
```js
// Say data was [0, 100, 200, 300]
chart.setValue('data', 2, 400);
// Now data is [0, 100, 400, 300]
## Playground
Please fork this fiddle:
+ [http://jsfiddle.net/masayuki0812/7kYJu/](http://jsfiddle.net/masayuki0812/7kYJu/)
// Set non-existing value
chart.setValue('data', 10, 20);
// Now data is [0, 100, 400, 300, 20]
```
## Dependency
+ [D3.js](https://github.com/mbostock/d3) `<=3.5.0`
*chart.getValue(id, index)*
## License
MIT
Gets value for given sequence and index.
```js
// Say data was [0, 100, 200]
chart.getValue('data', 1) === 100
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=masayuki0812&url=https://github.com/masayuki0812/c3&title=c3&language=javascript&tags=github&category=software)
// Non-existing sequence or index
chart.getValue('no such thing', 10) === undefined
chart.getValue('data', 100) === undefined
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment