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 --saveUsage
Similar to how C3 constructs charts using a JavaScript object,
bit-c3provides 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
requireto loadbit-c3and everything else needed to create a template that usesbit-c3:AMD use
Configure the
can,jquery,c3, andd3paths and thebit-c3spackage:Make sure you have the
cssplugin configured also!Use bit-c3 like:
Standalone use
Load the
globalcss and js files: