reportjs
v2.0.1Report.js
Dependancies
Report.js depend on Chart.js for graph rendering. You need to add an ES6 polyfill (core-js or babel-pollyfill) to use this library.
Usage
import {Processor, DOMAdapter} from 'reportjs';
const processor = new Processor();
const adapter = new DOMAdapter();
const report = {
data: {
fields: [ 'Year', 'My Count', 'My Sum' ],
rows: [
['2013', 10, 15],
['2014', null, 20]
]
},
layout: {
type: 'table',
rows: ['measures'],
columns: ['Year'],
measures: ['My Count', 'My Sum']
}
};
const output = processor.process(report);
adapter.renderTo(document.getElementById('#mycontainer'), output);
This will output
2013 | 2014 | |
---|---|---|
My Count | 10 | |
My Sum | 15 | 20 |
Contribute
Install the dependencies
git clone https://github.com/BI-joe/report.js.git && cd report.js
npm Install
Tests
npm test
npm i [email protected]
Metadata
- MIT
- Whatever
- Riad Benguella
- released 11/28/2014