Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(function() {
opt = vl.schema.util.extend({}, consts.gen.encodings);
});
beforeEach(function() {
opt = vl.schema.util.extend({}, consts.gen.encodings);
});
beforeEach(function() {
opt = vl.schema.util.extend({}, consts.gen.encodings);
});
'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));
});
beforeEach(function() {
opt = vl.schema.util.extend({}, consts.gen.encodings);
});