Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var dl = require('datalib'),
log = require('vega-logging'),
df = require('vega-dataflow'),
Node = df.Node, // jshint ignore:line
Tuple = df.Tuple,
Deps = df.Dependencies;
var Types = {
INSERT: "insert",
REMOVE: "remove",
UPSERT: "upsert",
TOGGLE: "toggle",
CLEAR: "clear"
};
var EMPTY = [];
function filter(fields, value, src, dest) {
if ((fields = dl.array(fields)) && !fields.length) {
fields = dl.isObject(value) ? dl.keys(value) : ['data'];
}
var dl = require('datalib'),
df = require('vega-dataflow'),
Node = df.Node, // jshint ignore:line
Deps = df.Dependencies,
Tuple = df.Tuple,
Collector = df.Collector,
log = require('vega-logging'),
Builder = require('./Builder'),
Scale = require('./Scale'),
parseAxes = require('../parse/axes'),
parseLegends = require('../parse/legends');
function GroupBuilder() {
this._children = {};
this._scaler = null;
this._recursor = null;
this._scales = {};
this.scale = scale.bind(this);
return arguments.length ? this.init.apply(this, arguments) : this;
}
var dl = require('datalib'),
log = require('vega-logging'),
Item = require('vega-scenegraph').Item,
df = require('vega-dataflow'),
Node = df.Node, // jshint ignore:line
Deps = df.Dependencies,
Tuple = df.Tuple,
ChangeSet = df.ChangeSet,
Sentinel = {},
Encoder = require('./Encoder'),
Bounder = require('./Bounder'),
parseData = require('../parse/data');
function Builder() {
return arguments.length ? this.init.apply(this, arguments) : this;
}
var Status = Builder.STATUS = {
ENTER: 'enter',
UPDATE: 'update',
EXIT: 'exit'
};
var d3 = require('d3'),
dl = require('datalib'),
log = require('vega-logging'),
Tuple = require('vega-dataflow').Tuple;
var DEPS = ["signals", "scales", "data", "fields"];
function properties(model, mark, spec) {
var config = model.config(),
code = "",
names = dl.keys(spec),
exprs = [], // parsed expressions injected in the generated code
i, len, name, ref, vars = {},
deps = {
signals: {},
scales: {},
data: {},
fields: {},
nested: [],
_nRefs: {}, // Temp stash to de-dupe nested refs.
var df = require('vega-dataflow'),
Tuple = df.Tuple,
log = require('vega-logging'),
Transform = require('./Transform');
function CountPattern(graph) {
Transform.prototype.init.call(this, graph);
Transform.addParameters(this, {
field: {type: 'field', default: 'data'},
pattern: {type: 'value', default: '[\\w\']+'},
case: {type: 'value', default: 'lower'},
stopwords: {type: 'value', default: ''}
});
this._output = {text: 'text', count: 'count'};
return this.router(true).produces(true);
}
var df = require('vega-dataflow'),
Tuple = df.Tuple,
log = require('vega-logging'),
Transform = require('./Transform');
function Formula(graph) {
Transform.prototype.init.call(this, graph);
Transform.addParameters(this, {
field: {type: 'value'},
expr: {type: 'expr'}
});
return this.mutates(true);
}
var prototype = (Formula.prototype = Object.create(Transform.prototype));
prototype.constructor = Formula;
var Tuple = require('vega-dataflow').Tuple,
log = require('vega-logging'),
Transform = require('./Transform'),
BatchTransform = require('./BatchTransform');
function Rank(graph) {
BatchTransform.prototype.init.call(this, graph);
Transform.addParameters(this, {
field: {type: 'field', default: null},
normalize: {type: 'value', default: false}
});
this._output = {
'rank': 'rank'
};
return this.mutates(true);
var dl = require('datalib'),
Tuple = require('vega-dataflow').Tuple,
log = require('vega-logging'),
Transform = require('./Transform'),
BatchTransform = require('./BatchTransform');
function Treeify(graph) {
BatchTransform.prototype.init.call(this, graph);
Transform.addParameters(this, {
groupby: {type: 'array'}
});
this._output = {
'children': 'children',
'parent': 'parent'
};
return this.router(true).produces(true);
}
var d3 = require('d3'),
bound = require('vega-scenegraph').bound,
Tuple = require('vega-dataflow').Tuple,
Status = require('./Builder').STATUS;
function Transition(duration, ease) {
this.duration = duration || 500;
this.ease = ease && d3.ease(ease) || d3.ease('cubic-in-out');
this.updates = {next: null};
}
var prototype = Transition.prototype;
var skip = {
'text': 1,
'url': 1
};
prototype.interpolate = function(item, values) {
var dl = require('datalib'),
Aggregator = dl.Aggregator,
Base = Aggregator.prototype,
df = require('vega-dataflow'),
Tuple = df.Tuple,
log = require('vega-logging'),
facetID = 0;
function Facetor() {
Aggregator.call(this);
this._facet = null;
this._facetID = ++facetID;
}
var prototype = (Facetor.prototype = Object.create(Base));
prototype.constructor = Facetor;
prototype.facet = function(f) {
return arguments.length ? (this._facet = f, this) : this._facet;
};