How to use the vega-lite.schema function in vega-lite

To help you get started, we’ve selected a few vega-lite 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 / compass / test / gen / marktypes.spec.js View on Github external
beforeEach(function() {
    opt = vl.schema.util.extend({}, consts.gen.encodings);
  });
github vega / compass / test / gen / marktypes.spec.js View on Github external
beforeEach(function() {
    opt = vl.schema.util.extend({}, consts.gen.encodings);
  });
github vega / compass / test / gen / encs.spec.js View on Github external
beforeEach(function() {
    opt = vl.schema.util.extend({}, consts.gen.encodings);
  });
github vega / compass / test / rank / rankEncodings.spec.js View on Github external
'use strict';
/*jshint -W069 */

var expect = require('chai').expect,
  vl = require('vega-lite'),
  fixture = require('../fixture'),
  setter = vl.setter;


var consts = require('../../src/consts'),
  rankEncodings = require('../../src/rank/rank').encoding,
  dimensionScore = rankEncodings.dimensionScore,
  measureScore = rankEncodings.measureScore,
  D = dimensionScore.consts,
  M = measureScore.consts,
  opt = vl.schema.util.extend(opt||{}, consts.gen.encodings);

describe('cp.rank.encoding', function () {
  var marktypes = consts.gen.encodings.properties.marktypeList.default;
  var encTypes = ['x', 'y', 'row', 'col', 'size', 'color', 'shape', 'text', 'detail'];
  var dFixtures = ['O', 'O_15', 'O_30', 'BIN(Q)'],
    mFixtures = ['Q'];


  var score = {};
  marktypes.forEach(function(marktype) {
    encTypes.forEach(function(encType) {
      mFixtures.forEach(function(q) {
        var Qf = fixture[q];
        setter(score, [q, marktype, encType], measureScore(Qf.fields[0], encType, marktype, Qf.stats, opt));
      });
github vega / compass / test / gen / encodings.spec.js View on Github external
beforeEach(function() {
    opt = vl.schema.util.extend({}, consts.gen.encodings);
  });