How to use vega-parser - 2 common examples

To help you get started, we’ve selected a few vega-parser 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 / lyra / src / js / components / pipelines / transforms / Filter.tsx View on Github external
public updateFilter = (value) => {
    const val = value.target ? value.target.value : value;

    try {
      parseExpr(val);
      this.props.update({type: 'filter', expr: val});
    } catch (e) {
      // TODO: Indicate error in parsing expression.
    }
  }
github vega / lyra / src / js / components / pipelines / transforms / Formula.tsx View on Github external
public updateFormula = (evt) => {
    const props = this.props;
    const def = props.def;
    const as = evt.target ? evt.target.value : def.as;
    const expr = evt.target ? def.expr : evt;

    try {
      parseExpr(expr);
      props.update({type: 'formula', as, expr});
    } catch (e) {
      // TODO: Indicate error in parsing expression.
    }
  }

vega-parser

Parse Vega specifications to runtime dataflows.

BSD-3-Clause
Latest version published 2 months ago

Package Health Score

98 / 100
Full package analysis

Popular vega-parser functions