Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Latest commit

 

History

History
34 lines (23 loc) · 974 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 974 Bytes

hooq-reporting

Circle CI

Generates hit graph data for hooq/chartjs. Requires a driver to actually fetch data, so can be backed onto any data source.

There is a hooq driver you can look at - https://github.com/dwnz/hooq-reporting-drivers-mongo

Installing

npm install hooq-reporting --save

Example Usage

var reportEngine = require('hooq-reporting');
var reportDriver = require('DRIVERNAME');

reportEngine.generateReport(reportDriver, new Date(2014,09,01), new Date(2014,09,31), {filter} function(err, data) {
    console.log(data);
});

Methods

.generateReport(driver, start date, end date, filter, callback) - returns report data

.daysBetween(start date, end date) - returns number of days between two dates