How to use the vega-expression.functions function in vega-expression

To help you get started, we’ve selected a few vega-expression examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vega / vega / packages / vega-parser / src / parsers / codegen.js View on Github external
function expressionFunctions(codegen) {
  var fn = functions(codegen);
  eventFunctions.forEach(function(name) {
    fn[name] = eventPrefix + name;
  });
  for (var name in extendedFunctions) {
    fn[name] = thisPrefix + name;
  }
  return fn;
}
github vega / vega / packages / vega-parser / src / parsers / expression / codegen-params.js View on Github external
function expressionFunctions(codegen) {
  var fn = functions(codegen);
  eventFunctions.forEach(function(name) {
    fn[name] = eventPrefix + name;
  });
  for (var name in extendedFunctions) {
    fn[name] = thisPrefix + name;
  }
  return fn;
}
github vega / vega / packages / vega-parser / src / parsers / expression / codegen.js View on Github external
function buildFunctions(codegen) {
  var fn = functions(codegen);
  eventFunctions.forEach(function(name) { fn[name] = eventPrefix + name; });
  for (var name in functionContext) { fn[name] = thisPrefix + name; }
  return fn;
}
github vega / vega / src / parse / expr.js View on Github external
functions:   function(codegen) {
    var fn = expr.functions(codegen);
    fn.eventItem  = 'event.vg.getItem';
    fn.eventGroup = 'event.vg.getGroup';
    fn.eventX     = 'event.vg.getX';
    fn.eventY     = 'event.vg.getY';
    fn.open       = 'window.open';
    fn.scale      = scaleGen(codegen, false);
    fn.iscale     = scaleGen(codegen, true);
    fn.inrange    = 'this.defs.inrange';
    fn.indata     = indataGen(codegen);
    fn.format     = 'this.defs.format';
    fn.timeFormat = 'this.defs.timeFormat';
    fn.utcFormat  = 'this.defs.utcFormat';
    return fn;
  },
  functionDefs: function(/*codegen*/) {
github vega / vega / packages / vega-functions / src / codegen.js View on Github external
function buildFunctions(codegen) {
  const fn = functions(codegen);
  eventFunctions.forEach(name => fn[name] = eventPrefix + name);
  for (let name in functionContext) { fn[name] = thisPrefix + name; }
  return fn;
}

vega-expression

Vega expression parser and code generator.

BSD-3-Clause
Latest version published 5 months ago

Package Health Score

91 / 100
Full package analysis