Reference Source Test

GraphJS logo

GraphJS

Codacy Badge Build Status Coverage Status

A javascript library written in ES6 for parsing a simple grammar which is fully complient with C3.js.

Demo | API Documentation | Developer documentation | Contributing | Code of Conduct |

The GraphJS library is exported as a UMD module.

GraphJS is released under the MIT license & supports modern environments.

Gettings Started

Installation

In a browser:

<script src="graphjs.min.js"></script>

Using npm:

$ npm i --save @ivantha/graphjs

Usage

1) Initialize a chart using the Graph class

let chart = new Graph("generate <CHART_TYPE> from <JSON_DATASOURCE>")

Chart type can be any one of,

2) Modify your chart using the suitable grammar

chart.do("hide tooltip")
chart.do('set gridline x at 20 as another-x')

3) Export the JSON string of the chart using,

let jsonOut = chart.generateJson()

4) Generated JSON output is fully complient with the C3.js library

let chart = c3.generate(jsonOut)

Development

NPM scripts

Built With

Authors

Acknowledgments