UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

24 lines (21 loc) 648 B
var reduce = require('../lib/reduce.js'); var Chainable = require('../lib/classes/chainable'); module.exports = new Chainable('subtract', { args: [ { name: 'inputSeries', types: ['seriesList'] }, { name: 'term', types: ['seriesList', 'number'], help: 'Number or series to subtract from input. If passing a seriesList it must contain exactly 1 series.' } ], help: 'Subtract the values of one or more series in a seriesList to each position, in each series, of the input seriesList', fn: function subtractFn(args) { return reduce(args, function (a, b) { return a - b; }); } });