reportjs

3.3.0 • Public • Published

Report.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

Readme

Keywords

none

Package Sidebar

Install

npm i reportjs

Weekly Downloads

7

Version

3.3.0

License

MIT

Last publish

Collaborators

  • riad