https://github.com/missingdays/c3-old-fork
https://github.com/missingdays/c3-old-fork
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/missingdays/c3-old-fork
- Owner: missingdays
- License: mit
- Created: 2015-11-11T15:46:55.000Z (over 10 years ago)
- Default Branch: 0.4.9d
- Last Pushed: 2016-01-28T10:17:13.000Z (about 10 years ago)
- Last Synced: 2025-02-05T07:15:19.600Z (about 1 year ago)
- Language: JavaScript
- Size: 4.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
c3 [](https://travis-ci.org/masayuki0812/c3) [](https://david-dm.org/masayuki0812/c3) [](https://david-dm.org/masayuki0812/c3#info=devDependencies) [](https://github.com/masayuki0812/c3/blob/master/LICENSE)
==
c3 is a D3-based reusable chart library that enables deeper integration of charts into web applications.
Follow the link for more information: [http://c3js.org](http://c3js.org/)
## 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.
## How is this differ?
Our current improvements
#### Working with data
**chart.loadColumns([[id, values...], [...]])**
Loads given columns. Alias to chart.load({columns: [[id, values...], ...]});
**chart.appendToColumn(column)**
Append given values to sequence
Usage:
```js
// Say data was [0, 50]
chart.appendToColumn(['data', 100, 200]);
// Now data is [0, 50, 100, 200]
```
**chart.popFromColumn(id, amount)**
Pops given amount from sequence
Usage:
```js
// Say data was [0, 100, 200, 300]
chart.popFromColumn('data', 2);
// Now data is [0, 100]
```
**chart.setValue(id, index, value)**
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]
// Set non-existing value
chart.setValue('data', 10, 20);
// Now data is [0, 100, 400, 300, 20]
```
**chart.getValue(id, index)**
Gets value for given sequence and index.
```js
// Say data was [0, 100, 200]
chart.getValue('data', 1) === 100
// Non-existing sequence or index
chart.getValue('no such thing', 10) === undefined
chart.getValue('data', 100) === undefined
```