Build C3 charts with CanJS components that can be loaded by:
StealJS + ES6
npm / browserify / CJS
RequireJS / AMD
Standalone with CanJS and jQuery
Install
Use NPM to install bit-c3:
npm install bit-c3 --save
Usage
Similar to how C3 constructs charts using a JavaScript object, bit-c3 provides an easy-to-use interface for building C3 charts using CanJS components. Creating a chart as quick as installing the NPM packages, importing the module using one of the methods below, and adding the elements to your template.
We are currently working on a getting started guide. Until then, we would recommend these resources:
bit-c3
Build C3 charts with CanJS components that can be loaded by:
Install
Use NPM to install
bit-c3
:npm install bit-c3 --save
Usage
Similar to how C3 constructs charts using a JavaScript object,
bit-c3
provides an easy-to-use interface for building C3 charts using CanJS components. Creating a chart as quick as installing the NPM packages, importing the module using one of the methods below, and adding the elements to your template.We are currently working on a getting started guide. Until then, we would recommend these resources:
ES6 use
With StealJS, you can import this module directly in a template that is autorendered:
Alternatively, you can import this module like:
CJS use
Use
require
to loadbit-c3
and everything else needed to create a template that usesbit-c3
:AMD use
Configure the
can
,jquery
,c3
, andd3
paths and thebit-c3s
package:Make sure you have the
css
plugin configured also!Use bit-c3 like:
Standalone use
Load the
global
css and js files: