This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathvega-lite.js.map
137 lines (137 loc) · 539 KB
/
vega-lite.js.map
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"version": 3,
"sources": [
"node_modules/browser-pack/_prelude.js",
"node_modules/browser-resolve/empty.js",
"node_modules/datalib/src/util.js",
"node_modules/json-stable-stringify/index.js",
"node_modules/jsonify/index.js",
"node_modules/jsonify/lib/parse.js",
"node_modules/jsonify/lib/stringify.js",
"package.json",
"src/aggregate.ts",
"src/axis.ts",
"src/bin.ts",
"src/channel.ts",
"src/compile/axis.ts",
"src/compile/common.ts",
"src/compile/compile.ts",
"src/compile/config.ts",
"src/compile/data/bin.ts",
"src/compile/data/colorrank.ts",
"src/compile/data/data.ts",
"src/compile/data/filter.ts",
"src/compile/data/formatparse.ts",
"src/compile/data/formula.ts",
"src/compile/data/nonpositivenullfilter.ts",
"src/compile/data/nullfilter.ts",
"src/compile/data/source.ts",
"src/compile/data/stackscale.ts",
"src/compile/data/summary.ts",
"src/compile/data/timeunit.ts",
"src/compile/data/timeunitdomain.ts",
"src/compile/facet.ts",
"src/compile/layer.ts",
"src/compile/layout.ts",
"src/compile/legend.ts",
"src/compile/mark/area.ts",
"src/compile/mark/bar.ts",
"src/compile/mark/line.ts",
"src/compile/mark/mark.ts",
"src/compile/mark/point.ts",
"src/compile/mark/rule.ts",
"src/compile/mark/text.ts",
"src/compile/mark/tick.ts",
"src/compile/model.ts",
"src/compile/scale.ts",
"src/compile/unit.ts",
"src/config.ts",
"src/data.ts",
"src/datetime.ts",
"src/encoding.ts",
"src/fielddef.ts",
"src/filter.ts",
"src/legend.ts",
"src/mark.ts",
"src/scale.ts",
"src/shorthand.ts",
"src/sort.ts",
"src/spec.ts",
"src/stack.ts",
"src/timeunit.ts",
"src/type.ts",
"src/util.ts",
"src/validate.ts",
"src/vega.schema.ts",
"src/vl.ts"
],
"names": [],
"mappings": "AAAA;ACAA;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvFA,IAAY,WAqBX;AArBD,WAAY,WAAW;IACnB,oCAAS,QAAe,YAAA,CAAA;IACxB,mCAAQ,OAAc,WAAA,CAAA;IACtB,mCAAQ,OAAc,WAAA,CAAA;IACtB,qCAAU,SAAgB,aAAA,CAAA;IAC1B,sCAAW,UAAiB,cAAA,CAAA;IAC5B,iCAAM,KAAY,SAAA,CAAA;IAClB,kCAAO,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AAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,8BAA8B,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AACd,CAAC;AA5BD,0DA4BC;;;;ACrFD,+BAA+B;AAkE/B,yBAAgC,MAAyC;IACvE,EAAE,CAAC,CAAC,CAAC,cAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC;IAC5B,CAAC;IACD,MAAM,CAAC,KAAK,CAAC;AACf,CAAC;AALD,0CAKC;AAED,yBAAgC,MAAyC;IACvE,EAAE,CAAC,CAAC,CAAC,cAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;IAC1B,CAAC;IACD,MAAM,CAAC,KAAK,CAAC;AACf,CAAC;AALD,0CAKC;;;;AC9ED,iCAAuC;AACvC,2CAAiD;AACjD,+BAAqC;AACrC,uCAA6C;AAChC,QAAA,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC;AAC5D,qCAA2C;AAC3C,iCAAuC;AACvC,yCAA+C;AAC/C,yCAA+C;AAC/C,mCAAyC;AACzC,yCAA+C;AAC/C,qCAA2C;AAC3C,iCAAuC;AACvC,mCAAyC;AACzC,2CAAiD;AACjD,iCAAuC;AACvC,iCAAuC;AACvC,mCAAyC;AACzC,yCAA+C;AAC/C,2CAAiD;AACjD,iCAAuC;AACvC,iCAAuC;AACvC,yCAA+C;AAElC,QAAA,OAAO,GAAW,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC",
"file": "generated.js",
"sourceRoot": "",
"sourcesContent": [
"(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})",
"",
"var u = module.exports;\n\n// utility functions\n\nvar FNAME = '__name__';\n\nu.namedfunc = function(name, f) { return (f[FNAME] = name, f); };\n\nu.name = function(f) { return f==null ? null : f[FNAME]; };\n\nu.identity = function(x) { return x; };\n\nu.true = u.namedfunc('true', function() { return true; });\n\nu.false = u.namedfunc('false', function() { return false; });\n\nu.duplicate = function(obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n\nu.equal = function(a, b) {\n return JSON.stringify(a) === JSON.stringify(b);\n};\n\nu.extend = function(obj) {\n for (var x, name, i=1, len=arguments.length; i<len; ++i) {\n x = arguments[i];\n for (name in x) { obj[name] = x[name]; }\n }\n return obj;\n};\n\nu.length = function(x) {\n return x != null && x.length != null ? x.length : null;\n};\n\nu.keys = function(x) {\n var keys = [], k;\n for (k in x) keys.push(k);\n return keys;\n};\n\nu.vals = function(x) {\n var vals = [], k;\n for (k in x) vals.push(x[k]);\n return vals;\n};\n\nu.toMap = function(list, f) {\n return (f = u.$(f)) ?\n list.reduce(function(obj, x) { return (obj[f(x)] = 1, obj); }, {}) :\n list.reduce(function(obj, x) { return (obj[x] = 1, obj); }, {});\n};\n\nu.keystr = function(values) {\n // use to ensure consistent key generation across modules\n var n = values.length;\n if (!n) return '';\n for (var s=String(values[0]), i=1; i<n; ++i) {\n s += '|' + String(values[i]);\n }\n return s;\n};\n\n// type checking functions\n\nvar toString = Object.prototype.toString;\n\nu.isObject = function(obj) {\n return obj === Object(obj);\n};\n\nu.isFunction = function(obj) {\n return toString.call(obj) === '[object Function]';\n};\n\nu.isString = function(obj) {\n return typeof value === 'string' || toString.call(obj) === '[object String]';\n};\n\nu.isArray = Array.isArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n};\n\nu.isNumber = function(obj) {\n return typeof obj === 'number' || toString.call(obj) === '[object Number]';\n};\n\nu.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) == '[object Boolean]';\n};\n\nu.isDate = function(obj) {\n return toString.call(obj) === '[object Date]';\n};\n\nu.isValid = function(obj) {\n return obj != null && obj === obj;\n};\n\nu.isBuffer = (typeof Buffer === 'function' && Buffer.isBuffer) || u.false;\n\n// type coercion functions\n\nu.number = function(s) {\n return s == null || s === '' ? null : +s;\n};\n\nu.boolean = function(s) {\n return s == null || s === '' ? null : s==='false' ? false : !!s;\n};\n\n// parse a date with optional d3.time-format format\nu.date = function(s, format) {\n var d = format ? format : Date;\n return s == null || s === '' ? null : d.parse(s);\n};\n\nu.array = function(x) {\n return x != null ? (u.isArray(x) ? x : [x]) : [];\n};\n\nu.str = function(x) {\n return u.isArray(x) ? '[' + x.map(u.str) + ']'\n : u.isObject(x) || u.isString(x) ?\n // Output valid JSON and JS source strings.\n // See http://timelessrepo.com/json-isnt-a-javascript-subset\n JSON.stringify(x).replace('\\u2028','\\\\u2028').replace('\\u2029', '\\\\u2029')\n : x;\n};\n\n// data access functions\n\nvar field_re = /\\[(.*?)\\]|[^.\\[]+/g;\n\nu.field = function(f) {\n return String(f).match(field_re).map(function(d) {\n return d[0] !== '[' ? d :\n d[1] !== \"'\" && d[1] !== '\"' ? d.slice(1, -1) :\n d.slice(2, -2).replace(/\\\\([\"'])/g, '$1');\n });\n};\n\nu.accessor = function(f) {\n /* jshint evil: true */\n return f==null || u.isFunction(f) ? f :\n u.namedfunc(f, Function('x', 'return x[' + u.field(f).map(u.str).join('][') + '];'));\n};\n\n// short-cut for accessor\nu.$ = u.accessor;\n\nu.mutator = function(f) {\n var s;\n return u.isString(f) && (s=u.field(f)).length > 1 ?\n function(x, v) {\n for (var i=0; i<s.length-1; ++i) x = x[s[i]];\n x[s[i]] = v;\n } :\n function(x, v) { x[f] = v; };\n};\n\n\nu.$func = function(name, op) {\n return function(f) {\n f = u.$(f) || u.identity;\n var n = name + (u.name(f) ? '_'+u.name(f) : '');\n return u.namedfunc(n, function(d) { return op(f(d)); });\n };\n};\n\nu.$valid = u.$func('valid', u.isValid);\nu.$length = u.$func('length', u.length);\n\nu.$in = function(f, values) {\n f = u.$(f);\n var map = u.isArray(values) ? u.toMap(values) : values;\n return function(d) { return !!map[f(d)]; };\n};\n\n// comparison / sorting functions\n\nu.comparator = function(sort) {\n var sign = [];\n if (sort === undefined) sort = [];\n sort = u.array(sort).map(function(f) {\n var s = 1;\n if (f[0] === '-') { s = -1; f = f.slice(1); }\n else if (f[0] === '+') { s = +1; f = f.slice(1); }\n sign.push(s);\n return u.accessor(f);\n });\n return function(a, b) {\n var i, n, f, c;\n for (i=0, n=sort.length; i<n; ++i) {\n f = sort[i];\n c = u.cmp(f(a), f(b));\n if (c) return c * sign[i];\n }\n return 0;\n };\n};\n\nu.cmp = function(a, b) {\n return (a < b || a == null) && b != null ? -1 :\n (a > b || b == null) && a != null ? 1 :\n ((b = b instanceof Date ? +b : b),\n (a = a instanceof Date ? +a : a)) !== a && b === b ? -1 :\n b !== b && a === a ? 1 : 0;\n};\n\nu.numcmp = function(a, b) { return a - b; };\n\nu.stablesort = function(array, sortBy, keyFn) {\n var indices = array.reduce(function(idx, v, i) {\n return (idx[keyFn(v)] = i, idx);\n }, {});\n\n array.sort(function(a, b) {\n var sa = sortBy(a),\n sb = sortBy(b);\n return sa < sb ? -1 : sa > sb ? 1\n : (indices[keyFn(a)] - indices[keyFn(b)]);\n });\n\n return array;\n};\n\n// permutes an array using a Knuth shuffle\nu.permute = function(a) {\n var m = a.length,\n swap,\n i;\n\n while (m) {\n i = Math.floor(Math.random() * m--);\n swap = a[m];\n a[m] = a[i];\n a[i] = swap;\n }\n};\n\n// string functions\n\nu.pad = function(s, length, pos, padchar) {\n padchar = padchar || \" \";\n var d = length - s.length;\n if (d <= 0) return s;\n switch (pos) {\n case 'left':\n return strrep(d, padchar) + s;\n case 'middle':\n case 'center':\n return strrep(Math.floor(d/2), padchar) +\n s + strrep(Math.ceil(d/2), padchar);\n default:\n return s + strrep(d, padchar);\n }\n};\n\nfunction strrep(n, str) {\n var s = \"\", i;\n for (i=0; i<n; ++i) s += str;\n return s;\n}\n\nu.truncate = function(s, length, pos, word, ellipsis) {\n var len = s.length;\n if (len <= length) return s;\n ellipsis = ellipsis !== undefined ? String(ellipsis) : '\\u2026';\n var l = Math.max(0, length - ellipsis.length);\n\n switch (pos) {\n case 'left':\n return ellipsis + (word ? truncateOnWord(s,l,1) : s.slice(len-l));\n case 'middle':\n case 'center':\n var l1 = Math.ceil(l/2), l2 = Math.floor(l/2);\n return (word ? truncateOnWord(s,l1) : s.slice(0,l1)) +\n ellipsis + (word ? truncateOnWord(s,l2,1) : s.slice(len-l2));\n default:\n return (word ? truncateOnWord(s,l) : s.slice(0,l)) + ellipsis;\n }\n};\n\nfunction truncateOnWord(s, len, rev) {\n var cnt = 0, tok = s.split(truncate_word_re);\n if (rev) {\n s = (tok = tok.reverse())\n .filter(function(w) { cnt += w.length; return cnt <= len; })\n .reverse();\n } else {\n s = tok.filter(function(w) { cnt += w.length; return cnt <= len; });\n }\n return s.length ? s.join('').trim() : tok[0].slice(0, len);\n}\n\nvar truncate_word_re = /([\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u2028\\u2029\\u3000\\uFEFF])/;\n",
"var json = typeof JSON !== 'undefined' ? JSON : require('jsonify');\n\nmodule.exports = function (obj, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var space = opts.space || '';\n if (typeof space === 'number') space = Array(space+1).join(' ');\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n var replacer = opts.replacer || function(key, value) { return value; };\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (parent, key, node, level) {\n var indent = space ? ('\\n' + new Array(level + 1).join(space)) : '';\n var colonSeparator = space ? ': ' : ':';\n\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n node = replacer.call(parent, key, node);\n\n if (node === undefined) {\n return;\n }\n if (typeof node !== 'object' || node === null) {\n return json.stringify(node);\n }\n if (isArray(node)) {\n var out = [];\n for (var i = 0; i < node.length; i++) {\n var item = stringify(node, i, node[i], level+1) || json.stringify(null);\n out.push(indent + space + item);\n }\n return '[' + out.join(',') + indent + ']';\n }\n else {\n if (seen.indexOf(node) !== -1) {\n if (cycles) return json.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n else seen.push(node);\n\n var keys = objectKeys(node).sort(cmp && cmp(node));\n var out = [];\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node, key, node[key], level+1);\n\n if(!value) continue;\n\n var keyValue = json.stringify(key)\n + colonSeparator\n + value;\n ;\n out.push(indent + space + keyValue);\n }\n seen.splice(seen.indexOf(node), 1);\n return '{' + out.join(',') + indent + '}';\n }\n })({ '': obj }, '', obj, 0);\n};\n\nvar isArray = Array.isArray || function (x) {\n return {}.toString.call(x) === '[object Array]';\n};\n\nvar objectKeys = Object.keys || function (obj) {\n var has = Object.prototype.hasOwnProperty || function () { return true };\n var keys = [];\n for (var key in obj) {\n if (has.call(obj, key)) keys.push(key);\n }\n return keys;\n};\n",
"exports.parse = require('./lib/parse');\nexports.stringify = require('./lib/stringify');\n",
"var at, // The index of the current character\n ch, // The current character\n escapee = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n },\n text,\n\n error = function (m) {\n // Call error when something is wrong.\n throw {\n name: 'SyntaxError',\n message: m,\n at: at,\n text: text\n };\n },\n \n next = function (c) {\n // If a c parameter is provided, verify that it matches the current character.\n if (c && c !== ch) {\n error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\n }\n \n // Get the next character. When there are no more characters,\n // return the empty string.\n \n ch = text.charAt(at);\n at += 1;\n return ch;\n },\n \n number = function () {\n // Parse a number value.\n var number,\n string = '';\n \n if (ch === '-') {\n string = '-';\n next('-');\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n if (ch === '.') {\n string += '.';\n while (next() && ch >= '0' && ch <= '9') {\n string += ch;\n }\n }\n if (ch === 'e' || ch === 'E') {\n string += ch;\n next();\n if (ch === '-' || ch === '+') {\n string += ch;\n next();\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n }\n number = +string;\n if (!isFinite(number)) {\n error(\"Bad number\");\n } else {\n return number;\n }\n },\n \n string = function () {\n // Parse a string value.\n var hex,\n i,\n string = '',\n uffff;\n \n // When parsing for string values, we must look for \" and \\ characters.\n if (ch === '\"') {\n while (next()) {\n if (ch === '\"') {\n next();\n return string;\n } else if (ch === '\\\\') {\n next();\n if (ch === 'u') {\n uffff = 0;\n for (i = 0; i < 4; i += 1) {\n hex = parseInt(next(), 16);\n if (!isFinite(hex)) {\n break;\n }\n uffff = uffff * 16 + hex;\n }\n string += String.fromCharCode(uffff);\n } else if (typeof escapee[ch] === 'string') {\n string += escapee[ch];\n } else {\n break;\n }\n } else {\n string += ch;\n }\n }\n }\n error(\"Bad string\");\n },\n\n white = function () {\n\n// Skip whitespace.\n\n while (ch && ch <= ' ') {\n next();\n }\n },\n\n word = function () {\n\n// true, false, or null.\n\n switch (ch) {\n case 't':\n next('t');\n next('r');\n next('u');\n next('e');\n return true;\n case 'f':\n next('f');\n next('a');\n next('l');\n next('s');\n next('e');\n return false;\n case 'n':\n next('n');\n next('u');\n next('l');\n next('l');\n return null;\n }\n error(\"Unexpected '\" + ch + \"'\");\n },\n\n value, // Place holder for the value function.\n\n array = function () {\n\n// Parse an array value.\n\n var array = [];\n\n if (ch === '[') {\n next('[');\n white();\n if (ch === ']') {\n next(']');\n return array; // empty array\n }\n while (ch) {\n array.push(value());\n white();\n if (ch === ']') {\n next(']');\n return array;\n }\n next(',');\n white();\n }\n }\n error(\"Bad array\");\n },\n\n object = function () {\n\n// Parse an object value.\n\n var key,\n object = {};\n\n if (ch === '{') {\n next('{');\n white();\n if (ch === '}') {\n next('}');\n return object; // empty object\n }\n while (ch) {\n key = string();\n white();\n next(':');\n if (Object.hasOwnProperty.call(object, key)) {\n error('Duplicate key \"' + key + '\"');\n }\n object[key] = value();\n white();\n if (ch === '}') {\n next('}');\n return object;\n }\n next(',');\n white();\n }\n }\n error(\"Bad object\");\n };\n\nvalue = function () {\n\n// Parse a JSON value. It could be an object, an array, a string, a number,\n// or a word.\n\n white();\n switch (ch) {\n case '{':\n return object();\n case '[':\n return array();\n case '\"':\n return string();\n case '-':\n return number();\n default:\n return ch >= '0' && ch <= '9' ? number() : word();\n }\n};\n\n// Return the json_parse function. It will have access to all of the above\n// functions and variables.\n\nmodule.exports = function (source, reviver) {\n var result;\n \n text = source;\n at = 0;\n ch = ' ';\n result = value();\n white();\n if (ch) {\n error(\"Syntax error\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the result\n // in an empty key. If there is not a reviver function, we simply return the\n // result.\n\n return typeof reviver === 'function' ? (function walk(holder, key) {\n var k, v, value = holder[key];\n if (value && typeof value === 'object') {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = walk(value, k);\n if (v !== undefined) {\n value[k] = v;\n } else {\n delete value[k];\n }\n }\n }\n }\n return reviver.call(holder, key, value);\n }({'': result}, '')) : result;\n};\n",
"var cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\n gap,\n indent,\n meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"' : '\\\\\"',\n '\\\\': '\\\\\\\\'\n },\n rep;\n\nfunction quote(string) {\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n \n escapable.lastIndex = 0;\n return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\n var c = meta[a];\n return typeof c === 'string' ? c :\n '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n }) + '\"' : '\"' + string + '\"';\n}\n\nfunction str(key, holder) {\n // Produce a string from holder[key].\n var i, // The loop counter.\n k, // The member key.\n v, // The member value.\n length,\n mind = gap,\n partial,\n value = holder[key];\n \n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' &&\n typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n \n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n if (typeof rep === 'function') {\n value = rep.call(holder, key, value);\n }\n \n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value);\n \n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null';\n \n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n return String(value);\n \n case 'object':\n if (!value) return 'null';\n gap += indent;\n partial = [];\n \n // Array.isArray\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n \n // Join all of the elements together, separated with commas, and\n // wrap them in brackets.\n v = partial.length === 0 ? '[]' : gap ?\n '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\n '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n \n // If the replacer is an array, use it to select the members to be\n // stringified.\n if (rep && typeof rep === 'object') {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n k = rep[i];\n if (typeof k === 'string') {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n else {\n // Otherwise, iterate through all of the keys in the object.\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n }\n \n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0 ? '{}' : gap ?\n '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n }\n}\n\nmodule.exports = function (value, replacer, space) {\n var i;\n gap = '';\n indent = '';\n \n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n if (typeof space === 'number') {\n for (i = 0; i < space; i += 1) {\n indent += ' ';\n }\n }\n // If the space parameter is a string, it will be used as the indent string.\n else if (typeof space === 'string') {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n rep = replacer;\n if (replacer && typeof replacer !== 'function'\n && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {\n throw new Error('JSON.stringify');\n }\n \n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return str('', {'': value});\n};\n",
"module.exports={\n \"name\": \"vega-lite\",\n \"author\": \"Jeffrey Heer, Dominik Moritz, Kanit \\\"Ham\\\" Wongsuphasawat\",\n \"version\": \"1.3.1\",\n \"collaborators\": [\n \"Kanit Wongsuphasawat <[email protected]> (http://kanitw.yellowpigz.com)\",\n \"Dominik Moritz <[email protected]> (http://www.domoritz.de)\",\n \"Jeffrey Heer <[email protected]> (http://jheer.org)\"\n ],\n \"description\": \"Vega-lite provides a higher-level grammar for visual analysis, comparable to ggplot or Tableau, that generates complete Vega specifications.\",\n \"main\": \"src/vl.js\",\n \"types\": \"src/vl.d.ts\",\n \"bin\": {\n \"vl2png\": \"./bin/vl2png\",\n \"vl2svg\": \"./bin/vl2svg\",\n \"vl2vg\": \"./bin/vl2vg\"\n },\n \"directories\": {\n \"test\": \"test\"\n },\n \"scripts\": {\n \"build\": \"browserify src/vl.ts -p tsify -d -s vl | exorcist vega-lite.js.map > vega-lite.js \",\n \"postbuild\": \"uglifyjs vega-lite.js -cm --source-map vega-lite.min.js.map > vega-lite.min.js && npm run schema\",\n \"build:all\": \"npm run clean && npm run data && npm run build && npm test && npm run lint && npm run build:images\",\n \"build:images\": \"npm run data && scripts/generate-images.sh\",\n \"build:toc\": \"bundle exec jekyll build --incremental -q && scripts/generate-toc\",\n \"cover\": \"npm run pretest && istanbul cover node_modules/.bin/_mocha -- --recursive\",\n \"clean\": \"rm -f vega-lite.* vega-lite-schema.json & find -E src test site -regex '.*\\\\.(js|js.map|d.ts)' -delete & rm -rf examples/_diff examples/_original examples/_output examples/images && rm -rf data\",\n \"data\": \"rsync -r node_modules/vega-datasets/data/* data\",\n \"deploy\": \"scripts/deploy.sh\",\n \"deploy:gh\": \"scripts/deploy-gh.sh\",\n \"lint\": \"tslint -c tslint.json 'src/**/*.ts' 'test/**/*.ts' --exclude '**/*.d.ts'\",\n \"prestart\": \"npm run build && npm run data && scripts/index-examples\",\n \"start\": \"npm run watch & browser-sync start --server --files 'vega-lite.js' --index 'test-gallery.html'\",\n \"poststart\": \"rm examples/all-examples.json\",\n \"schema\": \"typescript-json-schema --required true src/spec.ts ExtendedSpec > vega-lite-schema.json\",\n \"presite\": \"tsc && npm run build && bower install && npm run data && npm run build:toc\",\n \"site\": \"bundle exec jekyll serve --incremental\",\n \"pretest\": \"tsc && npm run data\",\n \"test\": \"npm run schema && mocha --recursive --require source-map-support/register test examples\",\n \"test:debug\": \"npm run schema && mocha --debug-brk --recursive --require source-map-support/register test examples\",\n \"watch:build\": \"watchify src/vl.ts -p tsify -v -d -s vl -o 'exorcist vega-lite.js.map > vega-lite.js'\",\n \"watch:test\": \"nodemon -x 'npm test && npm run lint'\",\n \"watch\": \"nodemon -x 'npm run build && npm test && npm run lint'\",\n \"x-compile\": \"./scripts/examples-compile.sh\",\n \"x-diff\": \"./scripts/examples-diff.sh\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/vega/vega-lite.git\"\n },\n \"license\": \"BSD-3-Clause\",\n \"bugs\": {\n \"url\": \"https://github.com/vega/vega-lite/issues\"\n },\n \"homepage\": \"https://github.com/vega/vega-lite\",\n \"devDependencies\": {\n \"@types/chai\": \"^3.4.34\",\n \"@types/d3\": \"^3.5.36\",\n \"@types/json-stable-stringify\": \"^1.0.29\",\n \"@types/mocha\": \"^2.2.32\",\n \"@types/node\": \"^6.0.45\",\n \"browser-sync\": \"~2.17.3\",\n \"browserify\": \"~13.1.0\",\n \"chai\": \"~3.5.0\",\n \"cheerio\": \"~0.22.0\",\n \"exorcist\": \"~0.4.0\",\n \"istanbul\": \"~0.4.5\",\n \"mocha\": \"~3.1.2\",\n \"nodemon\": \"~1.11.0\",\n \"source-map-support\": \"~0.4.2\",\n \"tsify\": \"~2.0.2\",\n \"tslint\": \"~3.15.1\",\n \"typescript\": \"^2.0.3\",\n \"typescript-json-schema\": \"~0.3.4\",\n \"uglify-js\": \"~2.7.3\",\n \"vega\": \"~2.6.3\",\n \"vega-datasets\": \"vega/vega-datasets#gh-pages\",\n \"watchify\": \"~3.7.0\",\n \"yaml-front-matter\": \"~3.4.0\",\n \"z-schema\": \"~3.18.0\"\n },\n \"dependencies\": {\n \"datalib\": \"~1.7.2\",\n \"json-stable-stringify\": \"~1.0.1\",\n \"yargs\": \"~6.3.0\"\n }\n}\n",
"\nexport enum AggregateOp {\n VALUES = 'values' as any,\n COUNT = 'count' as any,\n VALID = 'valid' as any,\n MISSING = 'missing' as any,\n DISTINCT = 'distinct' as any,\n SUM = 'sum' as any,\n MEAN = 'mean' as any,\n AVERAGE = 'average' as any,\n VARIANCE = 'variance' as any,\n VARIANCEP = 'variancep' as any,\n STDEV = 'stdev' as any,\n STDEVP = 'stdevp' as any,\n MEDIAN = 'median' as any,\n Q1 = 'q1' as any,\n Q3 = 'q3' as any,\n MODESKEW = 'modeskew' as any,\n MIN = 'min' as any,\n MAX = 'max' as any,\n ARGMIN = 'argmin' as any,\n ARGMAX = 'argmax' as any,\n}\n\nexport const AGGREGATE_OPS = [\n AggregateOp.VALUES,\n AggregateOp.COUNT,\n AggregateOp.VALID,\n AggregateOp.MISSING,\n AggregateOp.DISTINCT,\n AggregateOp.SUM,\n AggregateOp.MEAN,\n AggregateOp.AVERAGE,\n AggregateOp.VARIANCE,\n AggregateOp.VARIANCEP,\n AggregateOp.STDEV,\n AggregateOp.STDEVP,\n AggregateOp.MEDIAN,\n AggregateOp.Q1,\n AggregateOp.Q3,\n AggregateOp.MODESKEW,\n AggregateOp.MIN,\n AggregateOp.MAX,\n AggregateOp.ARGMIN,\n AggregateOp.ARGMAX,\n];\n\n/** Additive-based aggregation operations. These can be applied to stack. */\nexport const SUM_OPS = [\n AggregateOp.COUNT,\n AggregateOp.SUM,\n AggregateOp.DISTINCT,\n AggregateOp.VALID,\n AggregateOp.MISSING\n];\n\nexport const SHARED_DOMAIN_OPS = [\n AggregateOp.MEAN,\n AggregateOp.AVERAGE,\n AggregateOp.STDEV,\n AggregateOp.STDEVP,\n AggregateOp.MEDIAN,\n AggregateOp.Q1,\n AggregateOp.Q3,\n AggregateOp.MIN,\n AggregateOp.MAX,\n];\n",
"import {DateTime} from './datetime';\n\nexport enum AxisOrient {\n TOP = 'top' as any,\n RIGHT = 'right' as any,\n LEFT = 'left' as any,\n BOTTOM = 'bottom' as any\n}\n\nexport interface AxisConfig {\n // ---------- General ----------\n /**\n * Width of the axis line\n */\n axisWidth?: number;\n /**\n * A string indicating if the axis (and any gridlines) should be placed above or below the data marks.\n */\n layer?: string;\n /**\n * The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n */\n offset?: number;\n\n // ---------- Axis ----------\n /**\n * Color of axis line.\n */\n axisColor?: string;\n\n // ---------- Grid ----------\n /**\n * A flag indicate if gridlines should be created in addition to ticks. If `grid` is unspecified, the default value is `true` for ROW and COL. For X and Y, the default value is `true` for quantitative and time fields and `false` otherwise.\n */\n grid?: boolean;\n\n /**\n * Color of gridlines.\n */\n gridColor?: string;\n\n /**\n * The offset (in pixels) into which to begin drawing with the grid dash array.\n */\n gridDash?: number[];\n\n /**\n * The stroke opacity of grid (value between [0,1])\n */\n gridOpacity?: number;\n\n /**\n * The grid width, in pixels.\n */\n gridWidth?: number;\n\n // ---------- Labels ----------\n /**\n * Enable or disable labels.\n */\n labels?: boolean;\n /**\n * The rotation angle of the axis labels.\n */\n labelAngle?: number;\n /**\n * Text alignment for the Label.\n */\n labelAlign?: string;\n /**\n * Text baseline for the label.\n */\n labelBaseline?: string;\n /**\n * Truncate labels that are too long.\n * @minimum 1\n */\n labelMaxLength?: number;\n /**\n * Whether month and day names should be abbreviated.\n */\n shortTimeLabels?: boolean;\n\n // ---------- Ticks ----------\n /**\n * If provided, sets the number of minor ticks between major ticks (the value 9 results in decimal subdivision). Only applicable for axes visualizing quantitative scales.\n */\n subdivide?: number;\n /**\n * A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\n * @minimum 0\n */\n ticks?: number;\n\n /**\n * The color of the axis's tick.\n */\n tickColor?: string;\n\n /**\n * The color of the tick label, can be in hex color code or regular color name.\n */\n tickLabelColor?: string;\n\n /**\n * The font of the tick label.\n */\n tickLabelFont?: string;\n\n /**\n * The font size of label, in pixels.\n */\n tickLabelFontSize?: number;\n\n /**\n * The padding, in pixels, between ticks and text labels.\n */\n tickPadding?: number;\n /**\n * The size, in pixels, of major, minor and end ticks.\n * @minimum 0\n */\n tickSize?: number;\n /**\n * The size, in pixels, of major ticks.\n * @minimum 0\n */\n tickSizeMajor?: number;\n /**\n * The size, in pixels, of minor ticks.\n * @minimum 0\n */\n tickSizeMinor?: number;\n /**\n * The size, in pixels, of end ticks.\n * @minimum 0\n */\n tickSizeEnd?: number;\n\n /**\n * The width, in pixels, of ticks.\n */\n tickWidth?: number;\n\n // ---------- Title ----------\n /**\n * Color of the title, can be in hex color code or regular color name.\n */\n titleColor?: string;\n\n /**\n * Font of the title.\n */\n titleFont?: string;\n\n /**\n * Size of the title.\n */\n titleFontSize?: number;\n\n /**\n * Weight of the title.\n */\n titleFontWeight?: string;\n\n /**\n * A title offset value for the axis.\n */\n titleOffset?: number;\n /**\n * Max length for axis title if the title is automatically generated from the field's description. By default, this is automatically based on cell size and characterWidth property.\n * @minimum 0\n */\n titleMaxLength?: number;\n /**\n * Character width for automatically determining title max length.\n */\n characterWidth?: number;\n\n // ---------- Other ----------\n /**\n * Optional mark property definitions for custom axis styling.\n */\n properties?: any; // TODO: replace\n}\n\n// TODO: add comment for properties that we rely on Vega's default to produce\n// more concise Vega output.\n\nexport const defaultAxisConfig: AxisConfig = {\n offset: undefined, // implicitly 0\n grid: undefined, // automatically determined\n labels: true,\n labelMaxLength: 25,\n tickSize: undefined, // implicitly 6\n characterWidth: 6\n};\n\nexport const defaultFacetAxisConfig: AxisConfig = {\n axisWidth: 0,\n labels: true,\n grid: false,\n tickSize: 0\n};\n\nexport interface Axis extends AxisConfig {\n /**\n * The rotation angle of the axis labels.\n * @minimum 0\n * @maximum 360\n */\n labelAngle?: number;\n /**\n * The formatting pattern for axis labels.\n */\n format?: string; // default value determined by config.format anyway\n /**\n * The orientation of the axis. One of top, bottom, left or right. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart).\n */\n orient?: AxisOrient;\n /**\n * A title for the axis. Shows field name and its function by default.\n */\n title?: string;\n values?: number[] | DateTime[];\n}\n",
"import {Channel, ROW, COLUMN, SHAPE, SIZE} from './channel';\n\n/**\n * Binning properties or boolean flag for determining whether to bin data or not.\n */\nexport interface Bin {\n /**\n * The minimum bin value to consider. If unspecified, the minimum value of the specified field is used.\n */\n min?: number;\n /**\n * The maximum bin value to consider. If unspecified, the maximum value of the specified field is used.\n */\n max?: number;\n /**\n * The number base to use for automatic bin determination (default is base 10).\n */\n base?: number;\n /**\n * An exact step size to use between bins. If provided, options such as maxbins will be ignored.\n */\n step?: number;\n /**\n * An array of allowable step sizes to choose from.\n */\n steps?: number[];\n /**\n * A minimum allowable step size (particularly useful for integer values).\n */\n minstep?: number;\n /**\n * Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n */\n div?: number[];\n /**\n * Maximum number of bins.\n * @minimum 2\n */\n maxbins?: number;\n}\n\nexport function autoMaxBins(channel: Channel): number {\n switch (channel) {\n case ROW:\n case COLUMN:\n case SIZE:\n // Facets and Size shouldn't have too many bins\n // We choose 6 like shape to simplify the rule\n case SHAPE:\n return 6; // Vega's \"shape\" has 6 distinct values\n default:\n return 10;\n }\n}\n",
"/*\n * Constants and utilities for encoding channels (Visual variables)\n * such as 'x', 'y', 'color'.\n */\n\nimport {Mark} from './mark';\nimport {contains, without} from './util';\n\nexport enum Channel {\n X = 'x' as any,\n Y = 'y' as any,\n X2 = 'x2' as any,\n Y2 = 'y2' as any,\n ROW = 'row' as any,\n COLUMN = 'column' as any,\n SHAPE = 'shape' as any,\n SIZE = 'size' as any,\n COLOR = 'color' as any,\n TEXT = 'text' as any,\n DETAIL = 'detail' as any,\n LABEL = 'label' as any,\n PATH = 'path' as any,\n ORDER = 'order' as any,\n OPACITY = 'opacity' as any\n}\n\nexport const X = Channel.X;\nexport const Y = Channel.Y;\nexport const X2 = Channel.X2;\nexport const Y2 = Channel.Y2;\nexport const ROW = Channel.ROW;\nexport const COLUMN = Channel.COLUMN;\nexport const SHAPE = Channel.SHAPE;\nexport const SIZE = Channel.SIZE;\nexport const COLOR = Channel.COLOR;\nexport const TEXT = Channel.TEXT;\nexport const DETAIL = Channel.DETAIL;\nexport const LABEL = Channel.LABEL;\nexport const PATH = Channel.PATH;\nexport const ORDER = Channel.ORDER;\nexport const OPACITY = Channel.OPACITY;\n\nexport const CHANNELS = [X, Y, X2, Y2, ROW, COLUMN, SIZE, SHAPE, COLOR, PATH, ORDER, OPACITY, TEXT, DETAIL, LABEL];\n\nexport const UNIT_CHANNELS = without(CHANNELS, [ROW, COLUMN]);\nexport const UNIT_SCALE_CHANNELS = without(UNIT_CHANNELS, [PATH, ORDER, DETAIL, TEXT, LABEL, X2, Y2]);\nexport const NONSPATIAL_CHANNELS = without(UNIT_CHANNELS, [X, Y, X2, Y2]);\nexport const NONSPATIAL_SCALE_CHANNELS = without(UNIT_SCALE_CHANNELS, [X, Y, X2, Y2]);\n\n/** Channels that can serve as groupings for stacked charts. */\nexport const STACK_GROUP_CHANNELS = [COLOR, DETAIL, ORDER, OPACITY, SIZE];\n\nexport interface SupportedMark {\n point?: boolean;\n tick?: boolean;\n rule?: boolean;\n circle?: boolean;\n square?: boolean;\n bar?: boolean;\n line?: boolean;\n area?: boolean;\n text?: boolean;\n};\n\n/**\n * Return whether a channel supports a particular mark type.\n * @param channel channel name\n * @param mark the mark type\n * @return whether the mark supports the channel\n */\nexport function supportMark(channel: Channel, mark: Mark) {\n return !!getSupportedMark(channel)[mark];\n}\n\n/**\n * Return a dictionary showing whether a channel supports mark type.\n * @param channel\n * @return A dictionary mapping mark types to boolean values.\n */\nexport function getSupportedMark(channel: Channel): SupportedMark {\n switch (channel) {\n case X:\n case Y:\n case COLOR:\n case DETAIL:\n case ORDER:\n case OPACITY:\n case ROW:\n case COLUMN:\n return { // all marks\n point: true, tick: true, rule: true, circle: true, square: true,\n bar: true, line: true, area: true, text: true\n };\n case X2:\n case Y2:\n return {\n rule: true, bar: true, area: true\n };\n case SIZE:\n return {\n point: true, tick: true, rule: true, circle: true, square: true,\n bar: true, text: true\n };\n case SHAPE:\n return {point: true};\n case TEXT:\n return {text: true};\n case PATH:\n return {line: true};\n }\n return {};\n}\n\nexport interface SupportedRole {\n measure: boolean;\n dimension: boolean;\n};\n\n/**\n * Return whether a channel supports dimension / measure role\n * @param channel\n * @return A dictionary mapping role to boolean values.\n */\nexport function getSupportedRole(channel: Channel): SupportedRole {\n switch (channel) {\n case X:\n case Y:\n case COLOR:\n case OPACITY:\n case LABEL:\n case DETAIL:\n return {\n measure: true,\n dimension: true\n };\n case ROW:\n case COLUMN:\n case SHAPE:\n return {\n measure: false,\n dimension: true\n };\n case X2:\n case Y2:\n case SIZE:\n case TEXT:\n return {\n measure: true,\n dimension: false\n };\n case PATH:\n return {\n measure: false,\n dimension: true\n };\n }\n throw new Error('Invalid encoding channel' + channel);\n}\n\nexport function hasScale(channel: Channel) {\n return !contains([DETAIL, PATH, TEXT, LABEL, ORDER], channel);\n}\n",
"import {AxisOrient} from '../axis';\nimport {COLUMN, ROW, X, Y, Channel} from '../channel';\nimport {DateTime, isDateTime, timestamp} from '../datetime';\nimport {title as fieldDefTitle} from '../fielddef';\nimport {NOMINAL, ORDINAL, TEMPORAL} from '../type';\nimport {contains, keys, extend, truncate, Dict} from '../util';\nimport {VgAxis} from '../vega.schema';\n\nimport {numberFormat, timeTemplate} from './common';\nimport {Model} from './model';\nimport {UnitModel} from './unit';\n\n// https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#11-ambient-declarations\ndeclare let exports;\n\nexport function parseAxisComponent(model: Model, axisChannels: Channel[]): Dict<VgAxis> {\n return axisChannels.reduce(function(axis, channel) {\n if (model.axis(channel)) {\n axis[channel] = parseAxis(channel, model);\n }\n return axis;\n }, {} as Dict<VgAxis>);\n}\n\n/**\n * Make an inner axis for showing grid for shared axis.\n */\nexport function parseInnerAxis(channel: Channel, model: Model): VgAxis {\n const isCol = channel === COLUMN,\n isRow = channel === ROW,\n type = isCol ? 'x' : isRow ? 'y': channel;\n\n // TODO: support adding ticks as well\n\n // TODO: replace any with Vega Axis Interface\n let def: any = {\n type: type,\n scale: model.scaleName(channel),\n grid: true,\n tickSize: 0,\n properties: {\n labels: {\n text: {value: ''}\n },\n axis: {\n stroke: {value: 'transparent'}\n }\n }\n };\n\n const axis = model.axis(channel);\n\n ['layer', 'ticks', 'values', 'subdivide'].forEach(function(property) {\n let method: (model: Model, channel: Channel, def:any)=>any;\n\n const value = (method = exports[property]) ?\n // calling axis.format, axis.grid, ...\n method(model, channel, def) :\n axis[property];\n if (value !== undefined) {\n def[property] = value;\n }\n });\n\n const props = model.axis(channel).properties || {};\n\n // For now, only need to add grid properties here because innerAxis is only for rendering grid.\n // TODO: support add other properties for innerAxis\n ['grid'].forEach(function(group) {\n const value = properties[group] ?\n properties[group](model, channel, props[group] || {}, def) :\n props[group];\n if (value !== undefined && keys(value).length > 0) {\n def.properties = def.properties || {};\n def.properties[group] = value;\n }\n });\n\n return def;\n}\n\nexport function parseAxis(channel: Channel, model: Model): VgAxis {\n const isCol = channel === COLUMN,\n isRow = channel === ROW,\n type = isCol ? 'x' : isRow ? 'y': channel;\n\n const axis = model.axis(channel);\n\n // TODO: replace any with Vega Axis Interface\n let def: any = {\n type: type,\n scale: model.scaleName(channel)\n };\n\n // 1.2. Add properties\n [\n // a) properties with special rules (so it has axis[property] methods) -- call rule functions\n 'format', 'grid', 'layer', 'offset', 'orient', 'tickSize', 'ticks', 'tickSizeEnd', 'title', 'titleOffset', 'values',\n // b) properties without rules, only produce default values in the schema, or explicit value if specified\n 'tickPadding', 'tickSize', 'tickSizeMajor', 'tickSizeMinor','subdivide'\n ].forEach(function(property) {\n let method: (model: Model, channel: Channel, def:any)=>any;\n\n const value = (method = exports[property]) ?\n // calling axis.format, axis.grid, ...\n method(model, channel, def) :\n axis[property];\n if (value !== undefined) {\n def[property] = value;\n }\n });\n\n // 2) Add mark property definition groups\n const props = model.axis(channel).properties || {};\n\n [\n 'axis', 'labels', // have special rules\n 'grid', 'title', 'ticks', 'majorTicks', 'minorTicks' // only default values\n ].forEach(function(group) {\n const value = properties[group] ?\n properties[group](model, channel, props[group] || {}, def) :\n props[group];\n if (value !== undefined && keys(value).length > 0) {\n def.properties = def.properties || {};\n def.properties[group] = value;\n }\n });\n\n return def;\n}\n\nexport function format(model: Model, channel: Channel) {\n return numberFormat(model.fieldDef(channel), model.axis(channel).format, model.config(), channel);\n}\n\nexport function offset(model: Model, channel: Channel) {\n return model.axis(channel).offset;\n}\n\n// TODO: we need to refactor this method after we take care of config refactoring\n/**\n * Default rules for whether to show a grid should be shown for a channel.\n * If `grid` is unspecified, the default value is `true` for ordinal scales that are not binned\n */\nexport function gridShow(model: Model, channel: Channel) {\n const grid = model.axis(channel).grid;\n if (grid !== undefined) {\n return grid;\n }\n\n return !model.isOrdinalScale(channel) && !model.fieldDef(channel).bin;\n}\n\nexport function grid(model: Model, channel: Channel) {\n if (channel === ROW || channel === COLUMN) {\n // never apply grid for ROW and COLUMN since we manually create rule-group for them\n return undefined;\n }\n\n return gridShow(model, channel) && (\n // TODO refactor this cleanly -- essentially the condition below is whether\n // the axis is a shared / union axis.\n (channel === Y || channel === X) && !(model.parent() && model.parent().isFacet())\n );\n}\n\nexport function layer(model: Model, channel: Channel, def) {\n const layer = model.axis(channel).layer;\n if (layer !== undefined) {\n return layer;\n }\n if (def.grid) {\n // if grid is true, need to put layer on the back so that grid is behind marks\n return 'back';\n }\n return undefined; // otherwise return undefined and use Vega's default.\n};\n\nexport function orient(model: Model, channel: Channel) {\n const orient = model.axis(channel).orient;\n if (orient) {\n return orient;\n } else if (channel === COLUMN) {\n // FIXME test and decide\n return AxisOrient.TOP;\n }\n return undefined;\n}\n\nexport function ticks(model: Model, channel: Channel) {\n const ticks = model.axis(channel).ticks;\n if (ticks !== undefined) {\n return ticks;\n }\n\n // FIXME depends on scale type too\n if (channel === X && !model.fieldDef(channel).bin) {\n // Vega's default ticks often lead to a lot of label occlusion on X without 90 degree rotation\n return 5;\n }\n\n return undefined;\n}\n\nexport function tickSize(model: Model, channel: Channel) {\n const tickSize = model.axis(channel).tickSize;\n if (tickSize !== undefined) {\n return tickSize;\n }\n return undefined;\n}\n\nexport function tickSizeEnd(model: Model, channel: Channel) {\n const tickSizeEnd = model.axis(channel).tickSizeEnd;\n if (tickSizeEnd !== undefined) {\n return tickSizeEnd;\n }\n return undefined;\n}\n\nexport function title(model: Model, channel: Channel) {\n const axis = model.axis(channel);\n if (axis.title !== undefined) {\n return axis.title;\n }\n\n // if not defined, automatically determine axis title from field def\n const fieldTitle = fieldDefTitle(model.fieldDef(channel), model.config());\n\n let maxLength;\n if (axis.titleMaxLength) {\n maxLength = axis.titleMaxLength;\n } else if (channel === X && !model.isOrdinalScale(X)) {\n const unitModel: UnitModel = model as any; // only unit model has channel x\n // For non-ordinal scale, we know cell size at compile time, we can guess max length\n maxLength = unitModel.width / model.axis(X).characterWidth;\n } else if (channel === Y && !model.isOrdinalScale(Y)) {\n const unitModel: UnitModel = model as any; // only unit model has channel y\n // For non-ordinal scale, we know cell size at compile time, we can guess max length\n maxLength = unitModel.height / model.axis(Y).characterWidth;\n }\n\n // FIXME: we should use template to truncate instead\n return maxLength ? truncate(fieldTitle, maxLength) : fieldTitle;\n}\n\nexport function titleOffset(model: Model, channel: Channel) {\n const titleOffset = model.axis(channel).titleOffset;\n if (titleOffset !== undefined) {\n return titleOffset;\n }\n return undefined;\n}\n\nexport function values(model: Model, channel: Channel) {\n const vals = model.axis(channel).values;\n if (vals && isDateTime(vals[0])) {\n return (vals as DateTime[]).map((dt) => {\n // normalize = true as end user won't put 0 = January\n return timestamp(dt, true);\n });\n }\n return vals;\n}\n\nexport namespace properties {\n export function axis(model: Model, channel: Channel, axisPropsSpec) {\n const axis = model.axis(channel);\n\n return extend(\n axis.axisColor !== undefined ?\n { stroke: {value: axis.axisColor} } :\n {},\n axis.axisWidth !== undefined ?\n { strokeWidth: {value: axis.axisWidth} } :\n {},\n axisPropsSpec || {}\n );\n }\n\n export function grid(model: Model, channel: Channel, gridPropsSpec) {\n const axis = model.axis(channel);\n\n return extend(\n axis.gridColor !== undefined ? { stroke: {value: axis.gridColor}} : {},\n axis.gridOpacity !== undefined ? {strokeOpacity: {value: axis.gridOpacity} } : {},\n axis.gridWidth !== undefined ? {strokeWidth : {value: axis.gridWidth} } : {},\n axis.gridDash !== undefined ? {strokeDashOffset : {value: axis.gridDash} } : {},\n gridPropsSpec || {}\n );\n }\n\n export function labels(model: Model, channel: Channel, labelsSpec, def) {\n const fieldDef = model.fieldDef(channel);\n const axis = model.axis(channel);\n const config = model.config();\n\n if (!axis.labels) {\n return extend({\n text: ''\n }, labelsSpec);\n }\n\n // Text\n if (contains([NOMINAL, ORDINAL], fieldDef.type) && axis.labelMaxLength) {\n // TODO replace this with Vega's labelMaxLength once it is introduced\n labelsSpec = extend({\n text: {\n template: '{{ datum[\"data\"] | truncate:' + axis.labelMaxLength + ' }}'\n }\n }, labelsSpec || {});\n } else if (fieldDef.type === TEMPORAL) {\n labelsSpec = extend({\n text: {\n template: timeTemplate('datum[\"data\"]', fieldDef.timeUnit, axis.format, axis.shortTimeLabels, config)\n }\n }, labelsSpec);\n }\n\n // Label Angle\n if (axis.labelAngle !== undefined) {\n labelsSpec.angle = {value: axis.labelAngle};\n } else {\n // auto rotate for X and Row\n if (channel === X && (contains([NOMINAL, ORDINAL], fieldDef.type) || !!fieldDef.bin || fieldDef.type === TEMPORAL)) {\n labelsSpec.angle = {value: 270};\n }\n }\n\n if (axis.labelAlign !== undefined) {\n labelsSpec.align = {value: axis.labelAlign};\n } else {\n // Auto set align if rotated\n // TODO: consider other value besides 270, 90\n if (labelsSpec.angle) {\n if (labelsSpec.angle.value === 270) {\n labelsSpec.align = {\n value: def.orient === 'top' ? 'left':\n def.type === 'x' ? 'right' :\n 'center'\n };\n } else if (labelsSpec.angle.value === 90) {\n labelsSpec.align = {value: 'center'};\n }\n }\n }\n\n if (axis.labelBaseline !== undefined) {\n labelsSpec.baseline = {value: axis.labelBaseline};\n } else {\n if (labelsSpec.angle) {\n // Auto set baseline if rotated\n // TODO: consider other value besides 270, 90\n if (labelsSpec.angle.value === 270) {\n labelsSpec.baseline = {value: def.type === 'x' ? 'middle' : 'bottom'};\n } else if (labelsSpec.angle.value === 90) {\n labelsSpec.baseline = {value: 'bottom'};\n }\n }\n }\n\n if (axis.tickLabelColor !== undefined) {\n labelsSpec.fill = {value: axis.tickLabelColor};\n }\n\n if (axis.tickLabelFont !== undefined) {\n labelsSpec.font = {value: axis.tickLabelFont};\n }\n\n if (axis.tickLabelFontSize !== undefined) {\n labelsSpec.fontSize = {value: axis.tickLabelFontSize};\n }\n\n return keys(labelsSpec).length === 0 ? undefined : labelsSpec;\n }\n\n export function ticks(model: Model, channel: Channel, ticksPropsSpec) {\n const axis = model.axis(channel);\n\n return extend(\n axis.tickColor !== undefined ? {stroke : {value: axis.tickColor} } : {},\n axis.tickWidth !== undefined ? {strokeWidth: {value: axis.tickWidth} } : {},\n ticksPropsSpec || {}\n );\n }\n\n export function title(model: Model, channel: Channel, titlePropsSpec) {\n const axis = model.axis(channel);\n\n return extend(\n axis.titleColor !== undefined ? {fill : {value: axis.titleColor} } : {},\n axis.titleFont !== undefined ? {font: {value: axis.titleFont}} : {},\n axis.titleFontSize !== undefined ? {fontSize: {value: axis.titleFontSize}} : {},\n axis.titleFontWeight !== undefined ? {fontWeight: {value: axis.titleFontWeight}} : {},\n\n titlePropsSpec || {}\n );\n }\n}\n",
"import {BAR, POINT, CIRCLE, SQUARE} from '../mark';\nimport {AggregateOp} from '../aggregate';\nimport {COLOR, OPACITY, TEXT, Channel} from '../channel';\nimport {Config} from '../config';\nimport {FieldDef, field, OrderChannelDef} from '../fielddef';\nimport {SortOrder} from '../sort';\nimport {TimeUnit} from '../timeunit';\nimport {QUANTITATIVE, ORDINAL} from '../type';\nimport {contains, union} from '../util';\n\nimport {FacetModel} from './facet';\nimport {LayerModel} from './layer';\nimport {Model} from './model';\nimport {template as timeUnitTemplate} from '../timeunit';\nimport {UnitModel} from './unit';\nimport {Spec, isUnitSpec, isSomeFacetSpec, isLayerSpec} from '../spec';\n\n\nexport function buildModel(spec: Spec, parent: Model, parentGivenName: string): Model {\n if (isSomeFacetSpec(spec)) {\n return new FacetModel(spec, parent, parentGivenName);\n }\n\n if (isLayerSpec(spec)) {\n return new LayerModel(spec, parent, parentGivenName);\n }\n\n if (isUnitSpec(spec)) {\n return new UnitModel(spec, parent, parentGivenName);\n }\n\n console.error('Invalid spec.');\n return null;\n}\n\n// TODO: figure if we really need opacity in both\nexport const STROKE_CONFIG = ['stroke', 'strokeWidth',\n 'strokeDash', 'strokeDashOffset', 'strokeOpacity', 'opacity'];\n\nexport const FILL_CONFIG = ['fill', 'fillOpacity',\n 'opacity'];\n\nexport const FILL_STROKE_CONFIG = union(STROKE_CONFIG, FILL_CONFIG);\n\nexport function applyColorAndOpacity(p, model: UnitModel) {\n const filled = model.config().mark.filled;\n const colorFieldDef = model.encoding().color;\n const opacityFieldDef = model.encoding().opacity;\n\n // Apply fill stroke config first so that color field / value can override\n // fill / stroke\n if (filled) {\n applyMarkConfig(p, model, FILL_CONFIG);\n } else {\n applyMarkConfig(p, model, STROKE_CONFIG);\n }\n\n let colorValue;\n let opacityValue;\n if (model.has(COLOR)) {\n colorValue = {\n scale: model.scaleName(COLOR),\n field: model.field(COLOR, colorFieldDef.type === ORDINAL ? {prefix: 'rank'} : {})\n };\n } else if (colorFieldDef && colorFieldDef.value) {\n colorValue = { value: colorFieldDef.value };\n }\n\n if (model.has(OPACITY)) {\n opacityValue = {\n scale: model.scaleName(OPACITY),\n field: model.field(OPACITY, opacityFieldDef.type === ORDINAL ? {prefix: 'rank'} : {})\n };\n } else if (opacityFieldDef && opacityFieldDef.value) {\n opacityValue = { value: opacityFieldDef.value };\n }\n\n if (colorValue !== undefined) {\n if (filled) {\n p.fill = colorValue;\n } else {\n p.stroke = colorValue;\n }\n } else {\n // apply color config if there is no fill / stroke config\n p[filled ? 'fill' : 'stroke'] = p[filled ? 'fill' : 'stroke'] ||\n {value: model.config().mark.color};\n }\n\n // If there is no fill, always fill symbols\n // with transparent fills https://github.com/vega/vega-lite/issues/1316\n if (!p.fill && contains([BAR, POINT, CIRCLE, SQUARE], model.mark())) {\n p.fill = {value: 'transparent'};\n }\n\n if (opacityValue !== undefined) {\n p.opacity = opacityValue;\n }\n}\n\nexport function applyConfig(properties, config, propsList: string[]) {\n propsList.forEach(function(property) {\n const value = config[property];\n if (value !== undefined) {\n properties[property] = { value: value };\n }\n });\n return properties;\n}\n\nexport function applyMarkConfig(marksProperties, model: UnitModel, propsList: string[]) {\n return applyConfig(marksProperties, model.config().mark, propsList);\n}\n\n/**\n * Returns number format for a fieldDef\n *\n * @param format explicitly specified format\n */\nexport function numberFormat(fieldDef: FieldDef, format: string, config: Config, channel: Channel) {\n if (fieldDef.type === QUANTITATIVE && !fieldDef.bin) {\n // add number format for quantitative type only\n\n if (format) {\n return format;\n } else if (fieldDef.aggregate === AggregateOp.COUNT && channel === TEXT) {\n // FIXME: need a more holistic way to deal with this.\n return 'd';\n }\n // TODO: need to make this work correctly for numeric ordinal / nominal type\n return config.numberFormat;\n }\n return undefined;\n}\n\n/** Return field reference with potential \"-\" prefix for descending sort */\nexport function sortField(orderChannelDef: OrderChannelDef) {\n return (orderChannelDef.sort === SortOrder.DESCENDING ? '-' : '') +\n field(orderChannelDef, {binSuffix: 'mid'});\n}\n\n/**\n * Returns the time template used for axis/legend labels or text mark for a temporal field\n */\nexport function timeTemplate(templateField: string, timeUnit: TimeUnit, format: string, shortTimeLabels: boolean, config: Config): string {\n if (!timeUnit || format) {\n // If there is not time unit, or if user explicitly specify format for axis/legend/text.\n const _format = format || config.timeFormat; // only use config.timeFormat if there is no timeUnit.\n return '{{' + templateField + ' | time:\\'' + _format + '\\'}}';\n } else {\n return timeUnitTemplate(timeUnit, templateField, shortTimeLabels);\n }\n}\n",
"/**\n * Module for compiling Vega-lite spec into Vega spec.\n */\n\nimport {LAYOUT} from '../data';\nimport {Model} from './model';\nimport {normalize, ExtendedSpec} from '../spec';\nimport {extend} from '../util';\n\nimport {buildModel} from './common';\n\nexport function compile(inputSpec: ExtendedSpec) {\n // 1. Convert input spec into a normal form\n // (Decompose all extended unit specs into composition of unit spec.)\n const spec = normalize(inputSpec);\n\n // 2. Instantiate the model with default properties\n const model = buildModel(spec, null, '');\n\n // 3. Parse each part of the model to produce components that will be assembled later\n // We traverse the whole tree to parse once for each type of components\n // (e.g., data, layout, mark, scale).\n // Please see inside model.parse() for order for compilation.\n model.parse();\n\n // 4. Assemble a Vega Spec from the parsed components in 3.\n return assemble(model);\n}\n\nfunction assemble(model: Model) {\n const config = model.config();\n\n // TODO: change type to become VgSpec\n const output = extend(\n {\n // Set size to 1 because we rely on padding anyway\n width: 1,\n height: 1,\n padding: 'auto'\n },\n config.viewport ? { viewport: config.viewport } : {},\n config.background ? { background: config.background } : {},\n {\n // TODO: signal: model.assembleSelectionSignal\n data: [].concat(\n model.assembleData([]),\n model.assembleLayout([])\n // TODO: model.assembleSelectionData\n ),\n marks: [assembleRootGroup(model)]\n });\n\n return {\n spec: output\n // TODO: add warning / errors here\n };\n}\n\nexport function assembleRootGroup(model: Model) {\n let rootGroup:any = extend(\n {\n name: model.name('root'),\n type: 'group',\n },\n model.description() ? {description: model.description()} : {},\n {\n from: {data: model.name(LAYOUT +'')},\n properties: {\n update: extend(\n {\n width: {field: model.name('width')},\n height: {field: model.name('height')}\n },\n model.assembleParentGroupProperties(model.config().cell)\n )\n }\n });\n\n return extend(rootGroup, model.assembleGroup());\n}\n",
"import {X, Y, COLOR, SIZE, DETAIL} from '../channel';\nimport {Config, Orient, MarkConfig} from '../config';\nimport {Encoding, isAggregate, has} from '../encoding';\nimport {isMeasure} from '../fielddef';\nimport {BAR, AREA, POINT, LINE, TICK, CIRCLE, SQUARE, RULE, TEXT, Mark} from '../mark';\nimport {ScaleType} from '../scale';\nimport {StackProperties} from '../stack';\nimport {TEMPORAL} from '../type';\nimport {contains, extend} from '../util';\nimport {scaleType} from '../compile/scale';\n/**\n * Augment config.mark with rule-based default values.\n */\nexport function initMarkConfig(mark: Mark, encoding: Encoding, stacked: StackProperties, config: Config) {\n return extend(\n ['filled', 'opacity', 'orient', 'align'].reduce(function(cfg, property: string) {\n const value = config.mark[property];\n switch (property) {\n case 'filled':\n if (value === undefined) {\n // Point, line, and rule are not filled by default\n cfg[property] = mark !== POINT && mark !== LINE && mark !== RULE;\n }\n break;\n case 'opacity':\n if (value === undefined) {\n if (contains([POINT, TICK, CIRCLE, SQUARE], mark)) {\n // point-based marks\n if (!isAggregate(encoding) || has(encoding, DETAIL)) {\n cfg[property] = 0.7;\n }\n }\n if (mark === BAR && !stacked) {\n if (has(encoding, COLOR) || has(encoding, DETAIL) || has(encoding, SIZE)) {\n cfg[property] = 0.7;\n }\n }\n if (mark === AREA) {\n cfg[property] = 0.7; // inspired by Tableau\n }\n }\n break;\n case 'orient':\n cfg[property] = orient(mark, encoding, config.mark);\n break;\n // text-only\n case 'align':\n if (value === undefined) {\n cfg[property] = has(encoding, X) ? 'center' : 'right';\n }\n }\n return cfg;\n }, {}),\n config.mark\n );\n}\n\nexport function orient(mark: Mark, encoding: Encoding, markConfig: MarkConfig = {}): Orient {\n switch (mark) {\n case POINT:\n case CIRCLE:\n case SQUARE:\n case TEXT:\n // orient is meaningless for these marks.\n return undefined;\n }\n\n const yIsRange = encoding.y && encoding.y2;\n const xIsRange = encoding.x && encoding.x2;\n\n switch (mark) {\n case TICK:\n const xScaleType = encoding.x ? scaleType(encoding.x.scale || {}, encoding.x, X, mark) : null;\n const yScaleType = encoding.y ? scaleType(encoding.y.scale || {}, encoding.y, Y, mark) : null;\n\n // Tick is opposite to bar, line, area and never have ranged mark.\n if (xScaleType !== ScaleType.ORDINAL && (\n !encoding.y ||\n yScaleType === ScaleType.ORDINAL) ||\n encoding.y.bin\n ) {\n return Orient.VERTICAL;\n }\n // y:Q or Ambiguous case, return horizontal\n return Orient.HORIZONTAL;\n case RULE:\n if (xIsRange) {\n return Orient.HORIZONTAL;\n }\n if (yIsRange) {\n return Orient.VERTICAL;\n }\n if (encoding.y) {\n return Orient.HORIZONTAL;\n }\n if (encoding.x) {\n return Orient.VERTICAL;\n }\n // no x/y -- so it's undefined\n return undefined;\n case BAR:\n case AREA:\n // If there are range for both x and y, y (vertical) has higher precedence.\n\n if (yIsRange) {\n return Orient.VERTICAL;\n }\n\n if (xIsRange) {\n return Orient.HORIZONTAL;\n }\n /* tslint:disable */\n case LINE: // intentional fall through\n /* tslint:enable */\n const xIsMeasure = isMeasure(encoding.x) || isMeasure(encoding.x2);\n const yIsMeasure = isMeasure(encoding.y) || isMeasure(encoding.y2);\n if (xIsMeasure && !yIsMeasure) {\n return Orient.HORIZONTAL;\n } else if (!xIsMeasure && yIsMeasure) {\n return Orient.VERTICAL;\n } else if (xIsMeasure && yIsMeasure) {\n // temporal without timeUnit is considered continuous, but better serves as dimension\n if (encoding.x.type === TEMPORAL) {\n return Orient.VERTICAL;\n } else if (encoding.y.type === TEMPORAL) {\n return Orient.HORIZONTAL;\n }\n }\n // Ambiguous case, return vertical\n return Orient.VERTICAL;\n }\n /* istanbul ignore:next */\n console.warn('orient unimplemented for mark', mark);\n return Orient.VERTICAL;\n}\n",
"import {autoMaxBins} from '../../bin';\nimport {Channel, COLOR} from '../../channel';\nimport {field, FieldDef} from '../../fielddef';\nimport {extend, vals, flatten, hash, Dict} from '../../util';\nimport {VgTransform} from '../../vega.schema';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nimport {DataComponent} from './data';\n\nexport namespace bin {\n function numberFormatExpr(format, expr) {\n return `format('${format}', ${expr})`;\n }\n\n function parse(model: Model): Dict<VgTransform[]> {\n return model.reduce(function(binComponent, fieldDef: FieldDef, channel: Channel) {\n const bin = model.fieldDef(channel).bin;\n if (bin) {\n let binTrans = extend({\n type: 'bin',\n field: fieldDef.field,\n output: {\n start: field(fieldDef, { binSuffix: 'start' }),\n mid: field(fieldDef, { binSuffix: 'mid' }),\n end: field(fieldDef, { binSuffix: 'end' })\n }\n },\n // if bin is an object, load parameter here!\n typeof bin === 'boolean' ? {} : bin\n );\n\n if (!binTrans.maxbins && !binTrans.step) {\n // if both maxbins and step are not specified, need to automatically determine bin\n binTrans.maxbins = autoMaxBins(channel);\n }\n\n const transform = [binTrans];\n const isOrdinalColor = model.isOrdinalScale(channel) || channel === COLOR;\n // color ramp has type linear or time, we have to create new bin_range field\n // with correct number format\n if (isOrdinalColor) {\n // read format from axis or legend, if there is not format there then use config.numberFormat\n const format = (model.axis(channel) || model.legend(channel) || {}).format ||\n model.config().numberFormat;\n\n const startField = field(fieldDef, { datum: true, binSuffix: 'start' });\n const endField = field(fieldDef, { datum: true, binSuffix: 'end' });\n\n transform.push({\n type: 'formula',\n field: field(fieldDef, { binSuffix: 'range' }),\n expr: numberFormatExpr(format, startField) +\n ' + \\'-\\' + ' +\n numberFormatExpr(format, endField)\n });\n }\n // FIXME: current merging logic can produce redundant transforms when a field is binned for color and for non-color\n const key = hash(bin) + '_' + fieldDef.field + 'oc:' + isOrdinalColor;\n binComponent[key] = transform;\n }\n return binComponent;\n }, {});\n }\n\n export const parseUnit: (model: Model) => Dict<VgTransform[]> = parse;\n\n export function parseFacet(model: FacetModel) {\n let binComponent = parse(model);\n\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source, then merge\n if (!childDataComponent.source) {\n // FIXME: current merging logic can produce redundant transforms when a field is binned for color and for non-color\n extend(binComponent, childDataComponent.bin);\n delete childDataComponent.bin;\n }\n return binComponent;\n }\n\n export function parseLayer(model: LayerModel) {\n let binComponent = parse(model);\n\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n\n // If child doesn't have its own data source, then merge\n if (!childDataComponent.source) {\n extend(binComponent, childDataComponent.bin);\n delete childDataComponent.bin;\n }\n });\n\n return binComponent;\n }\n\n export function assemble(component: DataComponent) {\n return flatten(vals(component.bin));\n }\n}\n",
"import {COLOR} from '../../channel';\nimport {ORDINAL} from '../../type';\nimport {extend, vals, flatten, Dict} from '../../util';\nimport {VgTransform} from '../../vega.schema';\n\nimport {FacetModel} from '../facet';\nimport {LayerModel} from '../layer';\nimport {UnitModel} from '../unit';\n\nimport {DataComponent} from './data';\n\n\n/**\n * We need to add a rank transform so that we can use the rank value as\n * input for color ramp's linear scale.\n */\nexport namespace colorRank {\n /**\n * Return hash dict from a color field's name to the sort and rank transforms\n */\n export function parseUnit(model: UnitModel) {\n let colorRankComponent: Dict<VgTransform[]> = {};\n if (model.has(COLOR) && model.encoding().color.type === ORDINAL) {\n colorRankComponent[model.field(COLOR)] = [{\n type: 'sort',\n by: model.field(COLOR)\n }, {\n type: 'rank',\n field: model.field(COLOR),\n output: {\n rank: model.field(COLOR, { prefix: 'rank' })\n }\n }];\n }\n return colorRankComponent;\n }\n\n export function parseFacet(model: FacetModel) {\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source, then consider merging\n if (!childDataComponent.source) {\n // TODO: we have to see if color has union scale here\n\n // For now, let's assume it always has union scale\n const colorRankComponent = childDataComponent.colorRank;\n delete childDataComponent.colorRank;\n return colorRankComponent;\n }\n return {} as Dict<VgTransform[]>;\n }\n\n export function parseLayer(model: LayerModel) {\n let colorRankComponent = {} as Dict<VgTransform[]>;\n\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n\n // If child doesn't have its own data source, then merge\n if (!childDataComponent.source) {\n extend(colorRankComponent, childDataComponent.colorRank);\n delete childDataComponent.colorRank;\n }\n });\n\n return colorRankComponent;\n }\n\n export function assemble(component: DataComponent) {\n return flatten(vals(component.colorRank));\n }\n}\n",
"import {FieldDef} from '../../fielddef';\nimport {Formula} from '../../transform';\nimport {keys, Dict, StringSet} from '../../util';\nimport {VgData, VgTransform} from '../../vega.schema';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\nimport {UnitModel} from './../unit';\n\nimport {source} from './source';\nimport {formatParse} from './formatparse';\nimport {nullFilter} from './nullfilter';\nimport {filter} from './filter';\nimport {bin} from './bin';\nimport {formula} from './formula';\nimport {nonPositiveFilter} from './nonpositivenullfilter';\nimport {summary} from './summary';\nimport {stackScale} from './stackscale';\nimport {timeUnit} from './timeunit';\nimport {timeUnitDomain} from './timeunitdomain';\nimport {colorRank} from './colorrank';\n\n\n/**\n * Composable component instance of a model's data.\n */\nexport interface DataComponent {\n source: VgData;\n\n /** Mapping from field name to primitive data type. */\n formatParse: Dict<string>;\n\n /** String set of fields for null filtering */\n nullFilter: Dict<FieldDef>;\n\n /** Hashset of a formula object */\n calculate: Dict<Formula>;\n\n /** Filter test expression */\n filter: string;\n\n /** Dictionary mapping a bin parameter hash to transforms of the binned field */\n bin: Dict<VgTransform[]>;\n\n /** Dictionary mapping an output field name (hash) to the time unit transform */\n timeUnit: Dict<VgTransform>;\n\n /** String set of fields to be filtered */\n nonPositiveFilter: Dict<boolean>;\n\n /** Data source for feeding stacked scale. */\n // TODO: need to revise if single VgData is sufficient with layer / concat\n stackScale: VgData;\n\n /** Dictionary mapping an output field name (hash) to the sort and rank transforms */\n colorRank: Dict<VgTransform[]>;\n\n /** String set of time units that need their own data sources for scale domain */\n timeUnitDomain: StringSet;\n\n /** Array of summary component object for producing summary (aggregate) data source */\n summary: SummaryComponent[];\n}\n\n/**\n * Composable component for a model's summary data\n */\nexport interface SummaryComponent {\n /** Name of the summary data source */\n name: string;\n\n /** String set for all dimension fields */\n dimensions: StringSet;\n\n /** dictionary mapping field name to string set of aggregate ops */\n measures: Dict<StringSet>;\n}\n\n// TODO: split this file into multiple files and remove this linter flag\n/* tslint:disable:no-use-before-declare */\n\nexport function parseUnitData(model: UnitModel): DataComponent {\n return {\n formatParse: formatParse.parseUnit(model),\n nullFilter: nullFilter.parseUnit(model),\n filter: filter.parseUnit(model),\n nonPositiveFilter: nonPositiveFilter.parseUnit(model),\n\n source: source.parseUnit(model),\n bin: bin.parseUnit(model),\n calculate: formula.parseUnit(model),\n timeUnit: timeUnit.parseUnit(model),\n timeUnitDomain: timeUnitDomain.parseUnit(model),\n summary: summary.parseUnit(model),\n stackScale: stackScale.parseUnit(model),\n colorRank: colorRank.parseUnit(model)\n };\n}\n\nexport function parseFacetData(model: FacetModel): DataComponent {\n return {\n formatParse: formatParse.parseFacet(model),\n nullFilter: nullFilter.parseFacet(model),\n filter: filter.parseFacet(model),\n nonPositiveFilter: nonPositiveFilter.parseFacet(model),\n\n source: source.parseFacet(model),\n bin: bin.parseFacet(model),\n calculate: formula.parseFacet(model),\n timeUnit: timeUnit.parseFacet(model),\n timeUnitDomain: timeUnitDomain.parseFacet(model),\n summary: summary.parseFacet(model),\n stackScale: stackScale.parseFacet(model),\n colorRank: colorRank.parseFacet(model)\n };\n}\n\nexport function parseLayerData(model: LayerModel): DataComponent {\n return {\n // filter and formatParse could cause us to not be able to merge into parent\n // so let's parse them first\n filter: filter.parseLayer(model),\n formatParse: formatParse.parseLayer(model),\n nullFilter: nullFilter.parseLayer(model),\n nonPositiveFilter: nonPositiveFilter.parseLayer(model),\n\n // everything after here does not affect whether we can merge child data into parent or not\n source: source.parseLayer(model),\n bin: bin.parseLayer(model),\n calculate: formula.parseLayer(model),\n timeUnit: timeUnit.parseLayer(model),\n timeUnitDomain: timeUnitDomain.parseLayer(model),\n summary: summary.parseLayer(model),\n stackScale: stackScale.parseLayer(model),\n colorRank: colorRank.parseLayer(model)\n };\n}\n\n\n/* tslint:enable:no-use-before-declare */\n\n/**\n * Creates Vega Data array from a given compiled model and append all of them to the given array\n *\n * @param model\n * @param data array\n * @return modified data array\n */\nexport function assembleData(model: Model, data: VgData[]) {\n const component = model.component.data;\n\n const sourceData = source.assemble(model, component);\n if (sourceData) {\n data.push(sourceData);\n }\n\n summary.assemble(component, model).forEach(function(summaryData) {\n data.push(summaryData);\n });\n\n if (data.length > 0) {\n const dataTable = data[data.length - 1];\n\n // color rank\n const colorRankTransform = colorRank.assemble(component);\n if (colorRankTransform.length > 0) {\n dataTable.transform = (dataTable.transform || []).concat(colorRankTransform);\n }\n\n // nonPositiveFilter\n const nonPositiveFilterTransform = nonPositiveFilter.assemble(component);\n if (nonPositiveFilterTransform.length > 0) {\n dataTable.transform = (dataTable.transform || []).concat(nonPositiveFilterTransform);\n }\n } else {\n if (keys(component.colorRank).length > 0) {\n throw new Error('Invalid colorRank not merged');\n } else if (keys(component.nonPositiveFilter).length > 0) {\n throw new Error('Invalid nonPositiveFilter not merged');\n }\n }\n\n // stack\n // TODO: revise if this actually should be an array\n const stackData = stackScale.assemble(component);\n if (stackData) {\n data.push(stackData);\n }\n\n timeUnitDomain.assemble(component).forEach(function(timeUnitDomainData) {\n data.push(timeUnitDomainData);\n });\n return data;\n}\n",
"import {expression} from '../../filter';\nimport {isArray} from '../../util';\n\nimport {FacetModel} from '../facet';\nimport {LayerModel} from '../layer';\nimport {Model} from '../model';\n\nimport {DataComponent} from './data';\n\nexport namespace filter {\n /**\n * @param v value to be converted into Vega Expression\n * @param timeUnit\n * @return Vega Expression of the value v. This could be one of:\n * - a timestamp value of datetime object\n * - a timestamp value of casted single time unit value\n * - stringified value\n */\n\n export function parse(model: Model): string {\n const filter = model.filter();\n if (isArray(filter)) {\n return '(' +\n filter.map((f) => expression(f))\n .filter((f) => f !==undefined)\n .join(') && (') +\n ')';\n } else if (filter) {\n return expression(filter);\n }\n return undefined;\n }\n\n export const parseUnit = parse;\n\n export function parseFacet(model: FacetModel) {\n let filterComponent = parse(model);\n\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source but has filter, then merge\n if (!childDataComponent.source && childDataComponent.filter) {\n // merge by adding &&\n filterComponent =\n (filterComponent ? filterComponent + ' && ' : '') +\n childDataComponent.filter;\n delete childDataComponent.filter;\n }\n return filterComponent;\n }\n\n export function parseLayer(model: LayerModel) {\n // Note that this `filter.parseLayer` method is called before `source.parseLayer`\n let filterComponent = parse(model);\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (model.compatibleSource(child) && childDataComponent.filter && childDataComponent.filter === filterComponent) {\n // same filter in child so we can just delete it\n delete childDataComponent.filter;\n }\n });\n return filterComponent;\n }\n\n export function assemble(component: DataComponent) {\n const filter = component.filter;\n return filter ? [{\n type: 'filter',\n test: filter\n }] : [];\n }\n}\n",
"import {isDateTime} from '../../datetime';\nimport {FieldDef, isCount} from '../../fielddef';\nimport {isOneOfFilter, isEqualFilter, isRangeFilter} from '../../filter';\nimport {QUANTITATIVE, TEMPORAL} from '../../type';\nimport {extend, differ, keys, isArray, isNumber, isString, Dict} from '../../util';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nexport namespace formatParse {\n // TODO: need to take calculate into account across levels when merging\n function parse(model: Model): Dict<string> {\n const calcFieldMap = (model.calculate() || []).reduce(function(fieldMap, formula) {\n fieldMap[formula.field] = true;\n return fieldMap;\n }, {});\n\n let parseComponent: Dict<string> = {};\n\n // Parse filter fields\n let filter = model.filter();\n if (!isArray(filter)) {\n filter = [filter];\n }\n filter.forEach((f) => {\n let val = null;\n // For EqualFilter, just use the equal property.\n // For RangeFilter and OneOfFilter, all array members should have\n // the same type, so we only use the first one.\n if (isEqualFilter(f)) {\n val = f.equal;\n } else if (isRangeFilter(f)) {\n val = f.range[0];\n } else if (isOneOfFilter(f)) {\n // in = old name (this is for backward compatability)\n val = (f.oneOf || f['in'])[0];\n } // else -- for filter expression, we can't infer anything\n\n if (!!val) {\n if (isDateTime(val)) {\n parseComponent[f['field']] = 'date';\n } else if (isNumber(val)) {\n parseComponent[f['field']] = 'number';\n } else if (isString(val)) {\n parseComponent[f['field']] = 'string';\n }\n }\n });\n\n // Parse encoded fields\n model.forEach(function(fieldDef: FieldDef) {\n if (fieldDef.type === TEMPORAL) {\n parseComponent[fieldDef.field] = 'date';\n } else if (fieldDef.type === QUANTITATIVE) {\n if (isCount(fieldDef) || calcFieldMap[fieldDef.field]) {\n return;\n }\n parseComponent[fieldDef.field] = 'number';\n }\n });\n\n // Custom parse should override inferred parse\n const data = model.data();\n if (data && data.format && data.format.parse) {\n const parse = data.format.parse;\n keys(parse).forEach((field) => {\n parseComponent[field] = parse[field];\n });\n }\n\n return parseComponent;\n }\n\n export const parseUnit: (model: Model) => Dict<string> = parse;\n\n export function parseFacet(model: FacetModel) {\n let parseComponent = parse(model);\n\n // If child doesn't have its own data source, but has its own parse, then merge\n const childDataComponent = model.child().component.data;\n if (!childDataComponent.source && childDataComponent.formatParse) {\n extend(parseComponent, childDataComponent.formatParse);\n delete childDataComponent.formatParse;\n }\n return parseComponent;\n }\n\n export function parseLayer(model: LayerModel) {\n // note that we run this before source.parseLayer\n let parseComponent = parse(model);\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (model.compatibleSource(child) && !differ(childDataComponent.formatParse, parseComponent)) {\n // merge parse up if the child does not have an incompatible parse\n extend(parseComponent, childDataComponent.formatParse);\n delete childDataComponent.formatParse;\n }\n });\n return parseComponent;\n }\n\n // Assemble for formatParse is an identity function, no need to declare\n}\n",
"import {Formula} from '../../transform';\nimport {extend, vals, hash, Dict} from '../../util';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nimport {DataComponent} from './data';\n\n\nexport namespace formula {\n function parse(model: Model): Dict<Formula> {\n return (model.calculate() || []).reduce(function(formulaComponent, formula) {\n formulaComponent[hash(formula)] = formula;\n return formulaComponent;\n }, {} as Dict<Formula>);\n }\n\n export const parseUnit: (model: Model) => Dict<Formula> = parse;\n\n export function parseFacet(model: FacetModel) {\n let formulaComponent = parse(model);\n\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source, then merge\n if (!childDataComponent.source) {\n extend(formulaComponent, childDataComponent.calculate);\n delete childDataComponent.calculate;\n }\n return formulaComponent;\n }\n\n export function parseLayer(model: LayerModel) {\n let formulaComponent = parse(model);\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (!childDataComponent.source && childDataComponent.calculate) {\n extend(formulaComponent || {}, childDataComponent.calculate);\n delete childDataComponent.calculate;\n }\n });\n return formulaComponent;\n }\n\n export function assemble(component: DataComponent) {\n return vals(component.calculate).reduce(function(transform, formula) {\n transform.push(extend({ type: 'formula' }, formula));\n return transform;\n }, []);\n }\n}\n",
"import {ScaleType} from '../../scale';\nimport {extend, keys, differ, Dict} from '../../util';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nimport {DataComponent} from './data';\n\n/**\n * Filter non-positive value for log scale\n */\nexport namespace nonPositiveFilter {\n export function parseUnit(model: Model): Dict<boolean> {\n return model.channels().reduce(function(nonPositiveComponent, channel) {\n const scale = model.scale(channel);\n if (!model.field(channel) || !scale) {\n // don't set anything\n return nonPositiveComponent;\n }\n nonPositiveComponent[model.field(channel)] = scale.type === ScaleType.LOG;\n return nonPositiveComponent;\n }, {} as Dict<boolean>);\n }\n\n export function parseFacet(model: FacetModel) {\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source, then consider merging\n if (!childDataComponent.source) {\n // For now, let's assume it always has union scale\n const nonPositiveFilterComponent = childDataComponent.nonPositiveFilter;\n delete childDataComponent.nonPositiveFilter;\n return nonPositiveFilterComponent;\n }\n return {} as Dict<boolean>;\n }\n\n export function parseLayer(model: LayerModel) {\n // note that we run this before source.parseLayer\n let nonPositiveFilter = {} as Dict<boolean>;\n\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (model.compatibleSource(child) && !differ(childDataComponent.nonPositiveFilter, nonPositiveFilter)) {\n extend(nonPositiveFilter, childDataComponent.nonPositiveFilter);\n delete childDataComponent.nonPositiveFilter;\n }\n });\n\n return nonPositiveFilter;\n }\n\n export function assemble(component: DataComponent) {\n return keys(component.nonPositiveFilter).filter((field) => {\n // Only filter fields (keys) with value = true\n return component.nonPositiveFilter[field];\n }).map(function(field) {\n return {\n type: 'filter',\n test: 'datum[\"' + field + '\"] > 0'\n };\n });\n }\n}\n",
"import {FieldDef} from '../../fielddef';\nimport {QUANTITATIVE, TEMPORAL} from '../../type';\nimport {contains, extend, keys, differ, Dict} from '../../util';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nimport {DataComponent} from './data';\n\nconst DEFAULT_NULL_FILTERS = {\n nominal: false,\n ordinal: false,\n quantitative: true,\n temporal: true\n};\n\n// TODO: rename to invalidFilter\nexport namespace nullFilter {\n /** Return Hashset of fields for null filtering (key=field, value = true). */\n function parse(model: Model): Dict<boolean> {\n const filterInvalid = model.filterInvalid();\n\n return model.reduce(function(aggregator, fieldDef: FieldDef) {\n if (fieldDef.field !== '*') { // Ignore * for count(*) fields.\n if (filterInvalid ||\n (filterInvalid === undefined && fieldDef.field && DEFAULT_NULL_FILTERS[fieldDef.type])) {\n aggregator[fieldDef.field] = fieldDef;\n } else {\n // define this so we know that we don't filter nulls for this field\n // this makes it easier to merge into parents\n aggregator[fieldDef.field] = null;\n }\n }\n return aggregator;\n }, {});\n }\n\n export const parseUnit: (model: Model) => Dict<boolean> = parse;\n\n export function parseFacet(model: FacetModel) {\n let nullFilterComponent = parse(model);\n\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source, then merge\n if (!childDataComponent.source) {\n extend(nullFilterComponent, childDataComponent.nullFilter);\n delete childDataComponent.nullFilter;\n }\n return nullFilterComponent;\n }\n\n export function parseLayer(model: LayerModel) {\n // note that we run this before source.parseLayer\n\n // FIXME: null filters are not properly propagated right now\n let nullFilterComponent = parse(model);\n\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (model.compatibleSource(child) && !differ<FieldDef>(childDataComponent.nullFilter, nullFilterComponent)) {\n extend(nullFilterComponent, childDataComponent.nullFilter);\n delete childDataComponent.nullFilter;\n }\n });\n\n return nullFilterComponent;\n }\n\n /** Convert the hashset of fields to a filter transform. */\n export function assemble(component: DataComponent) {\n const filters = keys(component.nullFilter).reduce((_filters, field) => {\n const fieldDef = component.nullFilter[field];\n if (fieldDef !== null) {\n _filters.push('datum[\"' + fieldDef.field + '\"] !== null');\n if (contains([QUANTITATIVE, TEMPORAL], fieldDef.type)) {\n // TODO(https://github.com/vega/vega-lite/issues/1436):\n // We can be even smarter and add NaN filter for N,O that are numbers\n // based on the `parse` property once we have it.\n _filters.push('!isNaN(datum[\"'+ fieldDef.field + '\"])');\n }\n }\n return _filters;\n }, []);\n\n return filters.length > 0 ?\n [{\n type: 'filter',\n test: filters.join(' && ')\n }] : [];\n }\n}\n",
"import {DataFormat, SOURCE} from '../../data';\nimport {contains, extend} from '../../util';\nimport {VgData} from '../../vega.schema';\n\nimport {FacetModel} from '../facet';\nimport {LayerModel} from '../layer';\nimport {Model} from './../model';\n\nimport {DataComponent} from './data';\nimport {nullFilter} from './nullfilter';\nimport {filter} from './filter';\nimport {bin} from './bin';\nimport {formula} from './formula';\nimport {timeUnit} from './timeunit';\n\nexport namespace source {\n function parse(model: Model): VgData {\n let data = model.data();\n\n if (data) {\n // If data is explicitly provided\n\n let sourceData: VgData = { name: model.dataName(SOURCE) };\n if (data.values && data.values.length > 0) {\n sourceData.values = data.values;\n sourceData.format = { type: 'json' };\n } else if (data.url) {\n sourceData.url = data.url;\n\n // Extract extension from URL using snippet from\n // http://stackoverflow.com/questions/680929/how-to-extract-extension-from-filename-string-in-javascript\n let defaultExtension = /(?:\\.([^.]+))?$/.exec(sourceData.url)[1];\n if (!contains(['json', 'csv', 'tsv', 'topojson'], defaultExtension)) {\n defaultExtension = 'json';\n }\n const dataFormat: DataFormat = data.format || {};\n\n // For backward compatibility for former `data.formatType` property\n const formatType: DataFormat = dataFormat.type || data['formatType'];\n sourceData.format =\n extend(\n { type: formatType ? formatType : defaultExtension },\n dataFormat.property ? { property: dataFormat.property } : {},\n // Feature and mesh are two mutually exclusive properties\n dataFormat.feature ?\n { feature : dataFormat.feature } :\n dataFormat.mesh ?\n { mesh : dataFormat.mesh } :\n {}\n );\n }\n return sourceData;\n } else if (!model.parent()) {\n // If data is not explicitly provided but the model is a root,\n // need to produce a source as well\n return { name: model.dataName(SOURCE) };\n }\n return undefined;\n }\n\n export const parseUnit: (model: Model) => VgData = parse;\n\n export function parseFacet(model: FacetModel) {\n let sourceData = parse(model);\n if (!model.child().component.data.source) {\n // If the child does not have its own source, have to rename its source.\n model.child().renameData(model.child().dataName(SOURCE), model.dataName(SOURCE));\n }\n\n return sourceData;\n }\n\n export function parseLayer(model: LayerModel) {\n let sourceData = parse(model);\n model.children().forEach((child) => {\n const childData = child.component.data;\n\n if (model.compatibleSource(child)) {\n // we cannot merge if the child has filters defined even after we tried to move them up\n const canMerge = !childData.filter && !childData.formatParse && !childData.nullFilter;\n if (canMerge) {\n // rename source because we can just remove it\n child.renameData(child.dataName(SOURCE), model.dataName(SOURCE));\n delete childData.source;\n } else {\n // child does not have data defined or the same source so just use the parents source\n childData.source = {\n name: child.dataName(SOURCE),\n source: model.dataName(SOURCE)\n };\n }\n }\n });\n return sourceData;\n }\n\n export function assemble(model: Model, component: DataComponent) {\n if (component.source) {\n let sourceData: VgData = component.source;\n\n if (component.formatParse) {\n component.source.format = component.source.format || {};\n component.source.format.parse = component.formatParse;\n }\n\n sourceData.transform = [].concat(\n formula.assemble(component),\n nullFilter.assemble(component),\n filter.assemble(component),\n bin.assemble(component),\n timeUnit.assemble(component)\n );\n\n return sourceData;\n }\n return null;\n }\n}\n",
"import {STACKED_SCALE, SUMMARY} from '../../data';\nimport {field} from '../../fielddef';\nimport {VgData} from '../../vega.schema';\nimport {extend} from '../../util';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {UnitModel} from './../unit';\n\nimport {DataComponent} from './data';\n\n\n/**\n * Stacked scale data source, for feeding the shared scale.\n */\nexport namespace stackScale {\n export function parseUnit(model: UnitModel): VgData {\n const stackProps = model.stack();\n\n if (stackProps) {\n // produce stacked scale\n const groupbyChannel = stackProps.groupbyChannel;\n const fieldChannel = stackProps.fieldChannel;\n\n let fields = [];\n const field = model.field(groupbyChannel);\n if (field) {\n fields.push(field);\n }\n\n return {\n name: model.dataName(STACKED_SCALE),\n source: model.dataName(SUMMARY), // always summary because stacked only works with aggregation\n transform: [extend({\n type: 'aggregate',\n // produce sum of the field's value e.g., sum of sum, sum of distinct\n summarize: [{ ops: ['sum'], field: model.field(fieldChannel) }]\n }, fields.length > 0 ? {\n // group by channel and other facets\n groupby: fields\n } : {})]\n };\n }\n return null;\n };\n\n export function parseFacet(model: FacetModel) {\n const child = model.child();\n const childDataComponent = child.component.data;\n\n // If child doesn't have its own data source, but has stack scale source, then merge\n if (!childDataComponent.source && childDataComponent.stackScale) {\n let stackComponent = childDataComponent.stackScale;\n\n const newName = model.dataName(STACKED_SCALE);\n child.renameData(stackComponent.name, newName);\n stackComponent.name = newName;\n\n // Refer to facet's summary instead (always summary because stacked only works with aggregation)\n stackComponent.source = model.dataName(SUMMARY);\n\n // Add more dimensions for row/column\n stackComponent.transform[0].groupby = model.reduce(function(groupby, fieldDef) {\n groupby.push(field(fieldDef));\n return groupby;\n }, stackComponent.transform[0].groupby);\n\n delete childDataComponent.stackScale;\n return stackComponent;\n }\n return null;\n }\n\n export function parseLayer(model: LayerModel) {\n // TODO\n return null;\n }\n\n export function assemble(component: DataComponent) {\n return component.stackScale;\n }\n}\n",
"import {AggregateOp} from '../../aggregate';\nimport {Channel} from '../../channel';\nimport {SOURCE, SUMMARY} from '../../data';\nimport {field, FieldDef} from '../../fielddef';\nimport {keys, vals, reduce, hash, Dict, StringSet} from '../../util';\nimport {VgData} from '../../vega.schema';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nimport {DataComponent, SummaryComponent} from './data';\n\n\nexport namespace summary {\n function addDimension(dims: { [field: string]: boolean }, fieldDef: FieldDef) {\n if (fieldDef.bin) {\n dims[field(fieldDef, { binSuffix: 'start' })] = true;\n dims[field(fieldDef, { binSuffix: 'mid' })] = true;\n dims[field(fieldDef, { binSuffix: 'end' })] = true;\n\n // const scale = model.scale(channel);\n // if (scaleType(scale, fieldDef, channel, model.mark()) === ScaleType.ORDINAL) {\n // also produce bin_range if the binned field use ordinal scale\n dims[field(fieldDef, { binSuffix: 'range' })] = true;\n // }\n } else {\n dims[field(fieldDef)] = true;\n }\n return dims;\n }\n\n export function parseUnit(model: Model): SummaryComponent[] {\n /* string set for dimensions */\n let dims: StringSet = {};\n\n /* dictionary mapping field name => dict set of aggregation functions */\n let meas: Dict<StringSet> = {};\n\n model.forEach(function(fieldDef: FieldDef, channel: Channel) {\n if (fieldDef.aggregate) {\n if (fieldDef.aggregate === AggregateOp.COUNT) {\n meas['*'] = meas['*'] || {};\n /* tslint:disable:no-string-literal */\n meas['*']['count'] = true;\n /* tslint:enable:no-string-literal */\n } else {\n meas[fieldDef.field] = meas[fieldDef.field] || {};\n meas[fieldDef.field][fieldDef.aggregate] = true;\n }\n } else {\n addDimension(dims, fieldDef);\n }\n });\n\n return [{\n name: model.dataName(SUMMARY),\n dimensions: dims,\n measures: meas\n }];\n }\n\n export function parseFacet(model: FacetModel): SummaryComponent[] {\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source but has a summary data source, merge\n if (!childDataComponent.source && childDataComponent.summary) {\n let summaryComponents = childDataComponent.summary.map(function(summaryComponent) {\n // add facet fields as dimensions\n summaryComponent.dimensions = model.reduce(addDimension, summaryComponent.dimensions);\n\n const summaryNameWithoutPrefix = summaryComponent.name.substr(model.child().name('').length);\n model.child().renameData(summaryComponent.name, summaryNameWithoutPrefix);\n summaryComponent.name = summaryNameWithoutPrefix;\n return summaryComponent;\n });\n\n delete childDataComponent.summary;\n return summaryComponents;\n }\n return [];\n }\n\n function mergeMeasures(parentMeasures: Dict<Dict<boolean>>, childMeasures: Dict<Dict<boolean>>) {\n for (const field in childMeasures) {\n if (childMeasures.hasOwnProperty(field)) {\n // when we merge a measure, we either have to add an aggregation operator or even a new field\n const ops = childMeasures[field];\n for (const op in ops) {\n if (ops.hasOwnProperty(op)) {\n if (field in parentMeasures) {\n // add operator to existing measure field\n parentMeasures[field][op] = true;\n } else {\n parentMeasures[field] = { op: true };\n }\n }\n }\n }\n }\n }\n\n export function parseLayer(model: LayerModel): SummaryComponent[] {\n // Index by the fields we are grouping by\n let summaries = {} as Dict<SummaryComponent>;\n\n // Combine summaries for children that don't have a distinct source\n // (either having its own data source, or its own tranformation of the same data source).\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (!childDataComponent.source && childDataComponent.summary) {\n // Merge the summaries if we can\n childDataComponent.summary.forEach((childSummary) => {\n // The key is a hash based on the dimensions;\n // we use it to find out whether we have a summary that uses the same group by fields.\n const key = hash(childSummary.dimensions);\n if (key in summaries) {\n // yes, there is a summary hat we need to merge into\n // we know that the dimensions are the same so we only need to merge the measures\n mergeMeasures(summaries[key].measures, childSummary.measures);\n } else {\n // give the summary a new name\n childSummary.name = model.dataName(SUMMARY) + '_' + keys(summaries).length;\n summaries[key] = childSummary;\n }\n\n // remove summary from child\n child.renameData(child.dataName(SUMMARY), summaries[key].name);\n delete childDataComponent.summary;\n });\n }\n });\n\n return vals(summaries);\n }\n\n /**\n * Assemble the summary. Needs a rename function because we cannot guarantee that the\n * parent data before the children data.\n */\n export function assemble(component: DataComponent, model: Model): VgData[] {\n if (!component.summary) {\n return [];\n }\n return component.summary.reduce(function(summaryData, summaryComponent) {\n const dims = summaryComponent.dimensions;\n const meas = summaryComponent.measures;\n\n const groupby = keys(dims);\n\n // short-format summarize object for Vega's aggregate transform\n // https://github.com/vega/vega/wiki/Data-Transforms#-aggregate\n const summarize = reduce(meas, function(aggregator, fnDictSet, field) {\n aggregator[field] = keys(fnDictSet);\n return aggregator;\n }, {});\n\n if (keys(meas).length > 0) { // has aggregate\n summaryData.push({\n name: summaryComponent.name,\n source: model.dataName(SOURCE),\n transform: [{\n type: 'aggregate',\n groupby: groupby,\n summarize: summarize\n }]\n });\n }\n return summaryData;\n }, []);\n }\n}\n",
"import {Channel} from '../../channel';\nimport {field, FieldDef} from '../../fielddef';\nimport {fieldExpr} from '../../timeunit';\nimport {TEMPORAL} from '../../type';\nimport {extend, vals, Dict} from '../../util';\nimport {VgTransform} from '../../vega.schema';\n\nimport {FacetModel} from '../facet';\nimport {LayerModel} from '../layer';\nimport {Model} from '../model';\n\nimport {DataComponent} from './data';\n\nexport namespace timeUnit {\n function parse(model: Model): Dict<VgTransform> {\n return model.reduce(function(timeUnitComponent, fieldDef: FieldDef, channel: Channel) {\n if (fieldDef.type === TEMPORAL && fieldDef.timeUnit) {\n\n const hash = field(fieldDef);\n\n timeUnitComponent[hash] = {\n type: 'formula',\n field: field(fieldDef),\n expr: fieldExpr(fieldDef.timeUnit, fieldDef.field)\n };\n }\n return timeUnitComponent;\n }, {});\n }\n\n export const parseUnit: (model: Model) => Dict<VgTransform> = parse;\n\n export function parseFacet(model: FacetModel) {\n let timeUnitComponent = parse(model);\n\n const childDataComponent = model.child().component.data;\n\n // If child doesn't have its own data source, then merge\n if (!childDataComponent.source) {\n extend(timeUnitComponent, childDataComponent.timeUnit);\n delete childDataComponent.timeUnit;\n }\n return timeUnitComponent;\n }\n\n export function parseLayer(model: LayerModel) {\n let timeUnitComponent = parse(model);\n model.children().forEach((child) => {\n const childDataComponent = child.component.data;\n if (!childDataComponent.source) {\n extend(timeUnitComponent, childDataComponent.timeUnit);\n delete childDataComponent.timeUnit;\n }\n });\n return timeUnitComponent;\n }\n\n export function assemble(component: DataComponent) {\n // just join the values, which are already transforms\n return vals(component.timeUnit);\n }\n}\n",
"import {Channel} from '../../channel';\nimport {dateTimeExpr, DateTimeExpr} from '../../datetime';\nimport {FieldDef} from '../../fielddef';\nimport {TimeUnit, imputedDomain} from '../../timeunit';\nimport {extend, keys, StringSet} from '../../util';\nimport {VgData} from '../../vega.schema';\n\nimport {FacetModel} from './../facet';\nimport {LayerModel} from './../layer';\nimport {Model} from './../model';\n\nimport {DataComponent} from './data';\n\n\nexport namespace timeUnitDomain {\n function parse(model: Model): StringSet {\n return model.reduce(function(timeUnitDomainMap, fieldDef: FieldDef, channel: Channel) {\n if (fieldDef.timeUnit) {\n const domain = imputedDomain(fieldDef.timeUnit, channel);\n if (domain) {\n timeUnitDomainMap[fieldDef.timeUnit] = true;\n }\n }\n return timeUnitDomainMap;\n }, {});\n }\n\n export const parseUnit: (model: Model) => StringSet = parse;\n\n export function parseFacet(model: FacetModel) {\n // always merge with child\n return extend(parse(model), model.child().component.data.timeUnitDomain);\n }\n\n export function parseLayer(model: LayerModel) {\n // always merge with children\n return extend(parse(model), model.children().forEach((child) => {\n return child.component.data.timeUnitDomain;\n }));\n }\n\n export function assemble(component: DataComponent): VgData[] {\n return keys(component.timeUnitDomain).reduce(function(timeUnitData, tu: any) {\n const timeUnit: TimeUnit = tu; // cast string back to enum\n const domain = imputedDomain(timeUnit, null); // FIXME fix rawDomain signature\n if (domain) {\n let datetime: DateTimeExpr = {};\n datetime[timeUnit] = 'datum[\"data\"]';\n\n timeUnitData.push({\n name: timeUnit,\n values: domain,\n transform: [{\n type: 'formula',\n field: 'date',\n expr: dateTimeExpr(datetime)\n }]\n });\n }\n return timeUnitData;\n }, []);\n }\n}\n",
"import {AxisOrient, Axis} from '../axis';\nimport {COLUMN, ROW, X, Y, Channel} from '../channel';\nimport {defaultConfig, Config} from '../config';\nimport {SOURCE, SUMMARY} from '../data';\nimport {Facet} from '../facet';\nimport {channelMappingForEach} from '../encoding';\nimport {FieldDef, isDimension} from '../fielddef';\nimport {Scale, ScaleType} from '../scale';\nimport {FacetSpec} from '../spec';\nimport {getFullName} from '../type';\nimport {extend, keys, vals, flatten, duplicate, mergeDeep, Dict} from '../util';\nimport {VgData, VgMarkGroup} from '../vega.schema';\n\nimport {parseAxis, parseInnerAxis, gridShow, parseAxisComponent} from './axis';\nimport {buildModel} from './common';\nimport {assembleData, parseFacetData} from './data/data';\nimport {assembleLayout, parseFacetLayout} from './layout';\nimport {Model} from './model';\nimport {parseScaleComponent} from './scale';\n\nexport class FacetModel extends Model {\n private _facet: Facet;\n\n private _child: Model;\n\n constructor(spec: FacetSpec, parent: Model, parentGivenName: string) {\n super(spec, parent, parentGivenName);\n\n // Config must be initialized before child as it gets cascaded to the child\n const config = this._config = this._initConfig(spec.config, parent);\n\n const child = this._child = buildModel(spec.spec, this, this.name('child'));\n\n const facet = this._facet = this._initFacet(spec.facet);\n this._scale = this._initScale(facet, config, child);\n this._axis = this._initAxis(facet, config, child);\n }\n\n private _initConfig(specConfig: Config, parent: Model) {\n return mergeDeep(duplicate(defaultConfig), parent ? parent.config() : {}, specConfig);\n }\n\n private _initFacet(facet: Facet) {\n // clone to prevent side effect to the original spec\n facet = duplicate(facet);\n\n const model = this;\n\n channelMappingForEach(this.channels(), facet, function(fieldDef: FieldDef, channel: Channel) {\n // TODO: if has no field / datum, then drop the field\n if (fieldDef.type) {\n // convert short type to full type\n fieldDef.type = getFullName(fieldDef.type);\n }\n\n if (!isDimension(fieldDef)) {\n model.addWarning(channel + ' encoding should be ordinal.');\n }\n });\n return facet;\n }\n\n private _initScale(facet: Facet, config: Config, child: Model): Dict<Scale> {\n return [ROW, COLUMN].reduce(function(_scale, channel) {\n if (facet[channel]) {\n\n const scaleSpec = facet[channel].scale || {};\n _scale[channel] = extend({\n type: ScaleType.ORDINAL,\n round: config.facet.scale.round,\n\n // TODO: revise this rule for multiple level of nesting\n padding: (channel === ROW && child.has(Y)) || (channel === COLUMN && child.has(X)) ?\n config.facet.scale.padding : 0\n }, scaleSpec);\n }\n return _scale;\n }, {} as Dict<Scale>);\n }\n\n private _initAxis(facet: Facet, config: Config, child: Model): Dict<Axis> {\n return [ROW, COLUMN].reduce(function(_axis, channel) {\n if (facet[channel]) {\n const axisSpec = facet[channel].axis;\n if (axisSpec !== false) {\n const modelAxis = _axis[channel] = extend({},\n config.facet.axis,\n axisSpec === true ? {} : axisSpec || {}\n );\n\n if (channel === ROW) {\n const yAxis: any = child.axis(Y);\n if (yAxis && yAxis.orient !== AxisOrient.RIGHT && !modelAxis.orient) {\n modelAxis.orient = AxisOrient.RIGHT;\n }\n if( child.has(X) && !modelAxis.labelAngle) {\n modelAxis.labelAngle = modelAxis.orient === AxisOrient.RIGHT ? 90 : 270;\n }\n }\n }\n }\n return _axis;\n }, {} as Dict<Axis>);\n }\n\n public facet() {\n return this._facet;\n }\n\n public has(channel: Channel): boolean {\n return !!this._facet[channel];\n }\n\n public child() {\n return this._child;\n }\n\n private hasSummary() {\n const summary = this.component.data.summary;\n for (let i = 0 ; i < summary.length ; i++) {\n if (keys(summary[i].measures).length > 0) {\n return true;\n }\n }\n return false;\n }\n\n public dataTable(): string {\n return (this.hasSummary() ? SUMMARY : SOURCE) + '';\n }\n\n public fieldDef(channel: Channel): FieldDef {\n return this.facet()[channel];\n }\n\n public stack() {\n return null; // this is only a property for UnitModel\n }\n\n public parseData() {\n this.child().parseData();\n this.component.data = parseFacetData(this);\n }\n\n public parseSelectionData() {\n // TODO: @arvind can write this\n // We might need to split this into compileSelectionData and compileSelectionSignals?\n }\n\n public parseLayoutData() {\n this.child().parseLayoutData();\n this.component.layout = parseFacetLayout(this);\n }\n\n public parseScale() {\n const child = this.child();\n const model = this;\n\n child.parseScale();\n\n // TODO: support scales for field reference of parent data (e.g., for SPLOM)\n\n // First, add scale for row and column.\n let scaleComponent = this.component.scale = parseScaleComponent(this);\n\n // Then, move shared/union from its child spec.\n keys(child.component.scale).forEach(function(channel) {\n // TODO: correctly implement independent scale\n if (true) { // if shared/union scale\n scaleComponent[channel] = child.component.scale[channel];\n\n // for each scale, need to rename\n vals(scaleComponent[channel]).forEach(function(scale) {\n const scaleNameWithoutPrefix = scale.name.substr(child.name('').length);\n const newName = model.scaleName(scaleNameWithoutPrefix, true);\n child.renameScale(scale.name, newName);\n scale.name = newName;\n });\n\n // Once put in parent, just remove the child's scale.\n delete child.component.scale[channel];\n }\n });\n }\n\n public parseMark() {\n this.child().parseMark();\n\n this.component.mark = extend(\n {\n name: this.name('cell'),\n type: 'group',\n from: extend(\n this.dataTable() ? {data: this.dataTable()} : {},\n {\n transform: [{\n type: 'facet',\n groupby: [].concat(\n this.has(ROW) ? [this.field(ROW)] : [],\n this.has(COLUMN) ? [this.field(COLUMN)] : []\n )\n }]\n }\n ),\n properties: {\n update: getFacetGroupProperties(this)\n }\n },\n // Call child's assembleGroup to add marks, scales, axes, and legends.\n // Note that we can call child's assembleGroup() here because parseMark()\n // is the last method in compile() and thus the child is completely compiled\n // at this point.\n this.child().assembleGroup()\n );\n }\n\n public parseAxis() {\n this.child().parseAxis();\n this.component.axis = parseAxisComponent(this, [ROW, COLUMN]);\n }\n\n public parseAxisGroup() {\n // TODO: with nesting, we might need to consider calling child\n // this.child().parseAxisGroup();\n\n const xAxisGroup = parseAxisGroup(this, X);\n const yAxisGroup = parseAxisGroup(this, Y);\n\n this.component.axisGroup = extend(\n xAxisGroup ? {x: xAxisGroup} : {},\n yAxisGroup ? {y: yAxisGroup} : {}\n );\n }\n\n public parseGridGroup() {\n // TODO: with nesting, we might need to consider calling child\n // this.child().parseGridGroup();\n\n const child = this.child();\n\n this.component.gridGroup = extend(\n !child.has(X) && this.has(COLUMN) ? { column: getColumnGridGroups(this) } : {},\n !child.has(Y) && this.has(ROW) ? { row: getRowGridGroups(this) } : {}\n );\n }\n\n public parseLegend() {\n this.child().parseLegend();\n\n // TODO: support legend for independent non-position scale across facets\n // TODO: support legend for field reference of parent data (e.g., for SPLOM)\n\n // For now, assuming that non-positional scales are always shared across facets\n // Thus, just move all legends from its child\n this.component.legend = this._child.component.legend;\n this._child.component.legend = {};\n }\n\n public assembleParentGroupProperties() {\n return null;\n }\n\n public assembleData(data: VgData[]): VgData[] {\n // Prefix traversal – parent data might be referred by children data\n assembleData(this, data);\n return this._child.assembleData(data);\n }\n\n public assembleLayout(layoutData: VgData[]): VgData[] {\n // Postfix traversal – layout is assembled bottom-up\n this._child.assembleLayout(layoutData);\n return assembleLayout(this, layoutData);\n }\n\n public assembleMarks(): any[] {\n return [].concat(\n // axisGroup is a mapping to VgMarkGroup\n vals(this.component.axisGroup),\n flatten(vals(this.component.gridGroup)),\n this.component.mark\n );\n }\n\n public channels() {\n return [ROW, COLUMN];\n }\n\n protected mapping() {\n return this.facet();\n }\n\n public isFacet() {\n return true;\n }\n}\n\n// TODO: move the rest of the file into FacetModel if possible\n\nfunction getFacetGroupProperties(model: FacetModel) {\n const child = model.child();\n const mergedCellConfig = extend({}, child.config().cell, child.config().facet.cell);\n\n return extend({\n x: model.has(COLUMN) ? {\n scale: model.scaleName(COLUMN),\n field: model.field(COLUMN),\n // offset by the padding\n offset: model.scale(COLUMN).padding / 2\n } : {value: model.config().facet.scale.padding / 2},\n\n y: model.has(ROW) ? {\n scale: model.scaleName(ROW),\n field: model.field(ROW),\n // offset by the padding\n offset: model.scale(ROW).padding / 2\n } : {value: model.config().facet.scale.padding / 2},\n\n width: {field: {parent: model.child().sizeName('width')}},\n height: {field: {parent: model.child().sizeName('height')}}\n },\n child.assembleParentGroupProperties(mergedCellConfig)\n );\n}\n\nfunction parseAxisGroup(model: FacetModel, channel: Channel) {\n // TODO: add a case where inner spec is not a unit (facet/layer/concat)\n let axisGroup = null;\n\n const child = model.child();\n if (child.has(channel)) {\n if (child.axis(channel)) {\n if (true) { // the channel has shared axes\n\n // add a group for the shared axes\n axisGroup = channel === X ? getXAxesGroup(model) : getYAxesGroup(model);\n\n if (child.axis(channel) && gridShow(child, channel)) { // show inner grid\n // add inner axis (aka axis that shows only grid to )\n child.component.axis[channel] = parseInnerAxis(channel, child);\n } else {\n delete child.component.axis[channel];\n }\n } else {\n // TODO: implement independent axes support\n }\n }\n }\n return axisGroup;\n}\n\n\nfunction getXAxesGroup(model: FacetModel): VgMarkGroup {\n const hasCol = model.has(COLUMN);\n return extend(\n {\n name: model.name('x-axes'),\n type: 'group'\n },\n hasCol ? {\n from: { // TODO: if we do facet transform at the parent level we can same some transform here\n data: model.dataTable(),\n transform: [{\n type: 'aggregate',\n groupby: [model.field(COLUMN)],\n summarize: {'*': ['count']} // just a placeholder aggregation\n }]\n }\n } : {},\n {\n properties: {\n update: {\n width: {field: {parent: model.child().sizeName('width')}},\n height: {\n field: {group: 'height'}\n },\n x: hasCol ? {\n scale: model.scaleName(COLUMN),\n field: model.field(COLUMN),\n // offset by the padding\n offset: model.scale(COLUMN).padding / 2\n } : {\n // offset by the padding\n value: model.config().facet.scale.padding / 2\n }\n }\n },\n axes: [parseAxis(X, model.child())]\n }\n );\n}\n\nfunction getYAxesGroup(model: FacetModel): VgMarkGroup {\n const hasRow = model.has(ROW);\n return extend(\n {\n name: model.name('y-axes'),\n type: 'group'\n },\n hasRow ? {\n from: {\n data: model.dataTable(),\n transform: [{\n type: 'aggregate',\n groupby: [model.field(ROW)],\n summarize: {'*': ['count']} // just a placeholder aggregation\n }]\n }\n } : {},\n {\n properties: {\n update: {\n width: {\n field: {group: 'width'}\n },\n height: {field: {parent: model.child().sizeName('height')}},\n y: hasRow ? {\n scale: model.scaleName(ROW),\n field: model.field(ROW),\n // offset by the padding\n offset: model.scale(ROW).padding / 2\n } : {\n // offset by the padding\n value: model.config().facet.scale.padding / 2\n }\n }\n },\n axes: [parseAxis(Y, model.child())]\n }\n );\n}\n\nfunction getRowGridGroups(model: Model): any[] { // TODO: VgMarks\n const facetGridConfig = model.config().facet.grid;\n\n const rowGrid = {\n name: model.name('row-grid'),\n type: 'rule',\n from: {\n data: model.dataTable(),\n transform: [{type: 'facet', groupby: [model.field(ROW)]}]\n },\n properties: {\n update: {\n y: {\n scale: model.scaleName(ROW),\n field: model.field(ROW)\n },\n x: {value: 0, offset: -facetGridConfig.offset },\n x2: {field: {group: 'width'}, offset: facetGridConfig.offset },\n stroke: { value: facetGridConfig.color },\n strokeOpacity: { value: facetGridConfig.opacity },\n strokeWidth: {value: 0.5}\n }\n }\n };\n\n return [rowGrid, {\n name: model.name('row-grid-end'),\n type: 'rule',\n properties: {\n update: {\n y: { field: {group: 'height'}},\n x: {value: 0, offset: -facetGridConfig.offset },\n x2: {field: {group: 'width'}, offset: facetGridConfig.offset },\n stroke: { value: facetGridConfig.color },\n strokeOpacity: { value: facetGridConfig.opacity },\n strokeWidth: {value: 0.5}\n }\n }\n }];\n}\n\nfunction getColumnGridGroups(model: Model): any { // TODO: VgMarks\n const facetGridConfig = model.config().facet.grid;\n\n const columnGrid = {\n name: model.name('column-grid'),\n type: 'rule',\n from: {\n data: model.dataTable(),\n transform: [{type: 'facet', groupby: [model.field(COLUMN)]}]\n },\n properties: {\n update: {\n x: {\n scale: model.scaleName(COLUMN),\n field: model.field(COLUMN)\n },\n y: {value: 0, offset: -facetGridConfig.offset},\n y2: {field: {group: 'height'}, offset: facetGridConfig.offset },\n stroke: { value: facetGridConfig.color },\n strokeOpacity: { value: facetGridConfig.opacity },\n strokeWidth: {value: 0.5}\n }\n }\n };\n\n return [columnGrid, {\n name: model.name('column-grid-end'),\n type: 'rule',\n properties: {\n update: {\n x: { field: {group: 'width'}},\n y: {value: 0, offset: -facetGridConfig.offset},\n y2: {field: {group: 'height'}, offset: facetGridConfig.offset },\n stroke: { value: facetGridConfig.color },\n strokeOpacity: { value: facetGridConfig.opacity },\n strokeWidth: {value: 0.5}\n }\n }\n }];\n}\n",
"import {Channel} from '../channel';\nimport {keys, duplicate, mergeDeep, flatten, unique, isArray, vals, hash, Dict} from '../util';\nimport {defaultConfig, Config} from '../config';\nimport {LayerSpec} from '../spec';\nimport {assembleData, parseLayerData} from './data/data';\nimport {assembleLayout, parseLayerLayout} from './layout';\nimport {Model} from './model';\nimport {UnitModel} from './unit';\nimport {buildModel} from './common';\nimport {FieldDef} from '../fielddef';\nimport {ScaleComponents} from './scale';\nimport {VgData, VgAxis, VgLegend, isUnionedDomain, isDataRefDomain, VgDataRef} from '../vega.schema';\n\n\nexport class LayerModel extends Model {\n private _children: UnitModel[];\n\n /**\n * Fixed width for the unit visualization.\n * If undefined (e.g., for ordinal scale), the width of the\n * visualization will be calculated dynamically.\n */\n private _width: number;\n\n /**\n * Fixed height for the unit visualization.\n * If undefined (e.g., for ordinal scale), the height of the\n * visualization will be calculated dynamically.\n */\n private _height: number;\n\n\n constructor(spec: LayerSpec, parent: Model, parentGivenName: string) {\n super(spec, parent, parentGivenName);\n\n this._width = spec.width;\n this._height = spec.height;\n\n this._config = this._initConfig(spec.config, parent);\n this._children = spec.layers.map((layer, i) => {\n // we know that the model has to be a unit model because we pass in a unit spec\n return buildModel(layer, this, this.name('layer_' + i)) as UnitModel;\n });\n }\n\n private _initConfig(specConfig: Config, parent: Model) {\n return mergeDeep(duplicate(defaultConfig), specConfig, parent ? parent.config() : {});\n }\n\n public get width(): number {\n return this._width;\n }\n\n public get height(): number {\n return this._height;\n }\n\n public has(channel: Channel): boolean {\n // layer does not have any channels\n return false;\n }\n\n public children() {\n return this._children;\n }\n\n public isOrdinalScale(channel: Channel) {\n // since we assume shared scales we can just ask the first child\n return this._children[0].isOrdinalScale(channel);\n }\n\n public dataTable(): string {\n // FIXME: don't just use the first child\n return this._children[0].dataTable();\n }\n\n public fieldDef(channel: Channel): FieldDef {\n return null; // layer does not have field defs\n }\n\n public stack() {\n return null; // this is only a property for UnitModel\n }\n\n public parseData() {\n this._children.forEach((child) => {\n child.parseData();\n });\n this.component.data = parseLayerData(this);\n }\n\n public parseSelectionData() {\n // TODO: @arvind can write this\n // We might need to split this into compileSelectionData and compileSelectionSignals?\n }\n\n public parseLayoutData() {\n // TODO: correctly union ordinal scales rather than just using the layout of the first child\n this._children.forEach((child, i) => {\n child.parseLayoutData();\n });\n this.component.layout = parseLayerLayout(this);\n }\n\n public parseScale() {\n const model = this;\n\n let scaleComponent = this.component.scale = {} as Dict<ScaleComponents>;\n\n this._children.forEach(function(child) {\n child.parseScale();\n\n // FIXME: correctly implement independent scale\n if (true) { // if shared/union scale\n keys(child.component.scale).forEach(function(channel) {\n let childScales: ScaleComponents = child.component.scale[channel];\n if (!childScales) {\n // the child does not have any scales so we have nothing to merge\n return;\n }\n\n const modelScales: ScaleComponents = scaleComponent[channel];\n if (modelScales && modelScales.main) {\n // Scales are unioned by combining the domain of the main scale.\n // Other scales that are used for ordinal legends are appended.\n const modelDomain = modelScales.main.domain;\n const childDomain = childScales.main.domain;\n\n if (isArray(modelDomain)) {\n if (isArray(childScales.main.domain)) {\n modelScales.main.domain = modelDomain.concat(childDomain);\n } else {\n model.addWarning('custom domain scale cannot be unioned with default field-based domain');\n }\n } else {\n const unionedFields = isUnionedDomain(modelDomain) ? modelDomain.fields : [modelDomain] as VgDataRef[];\n\n if (isArray(childDomain)) {\n model.addWarning('custom domain scale cannot be unioned with default field-based domain');\n }\n\n let fields = isDataRefDomain(childDomain) ? unionedFields.concat([childDomain]) :\n // if the domain is itself a union domain, concat\n isUnionedDomain(childDomain) ? unionedFields.concat(childDomain.fields) :\n // we have to ignore explicit data domains for now because vega does not support unioning them\n unionedFields;\n fields = unique(fields, hash);\n // TODO: if all domains use the same data, we can merge them\n if (fields.length > 1) {\n modelScales.main.domain = { fields: fields };\n } else {\n modelScales.main.domain = fields[0];\n }\n }\n\n // create color legend and color legend bin scales if we don't have them yet\n modelScales.colorLegend = modelScales.colorLegend ? modelScales.colorLegend : childScales.colorLegend;\n modelScales.binColorLegend = modelScales.binColorLegend ? modelScales.binColorLegend : childScales.binColorLegend;\n } else {\n scaleComponent[channel] = childScales;\n }\n\n // rename child scales to parent scales\n vals(childScales).forEach(function(scale) {\n const scaleNameWithoutPrefix = scale.name.substr(child.name('').length);\n const newName = model.scaleName(scaleNameWithoutPrefix, true);\n child.renameScale(scale.name, newName);\n scale.name = newName;\n });\n\n delete childScales[channel];\n });\n }\n });\n }\n\n public parseMark() {\n this._children.forEach(function(child) {\n child.parseMark();\n });\n }\n\n public parseAxis() {\n let axisComponent = this.component.axis = {} as Dict<VgAxis[]>;\n\n this._children.forEach(function(child) {\n child.parseAxis();\n\n // TODO: correctly implement independent axes\n if (true) { // if shared/union scale\n keys(child.component.axis).forEach(function(channel) {\n // TODO: support multiple axes for shared scale\n\n // just use the first axis definition for each channel\n if (!axisComponent[channel]) {\n axisComponent[channel] = child.component.axis[channel];\n }\n });\n }\n });\n }\n\n public parseAxisGroup() {\n return null;\n }\n\n public parseGridGroup() {\n return null;\n }\n\n public parseLegend() {\n let legendComponent = this.component.legend = {} as Dict<VgLegend>;\n\n this._children.forEach(function(child) {\n child.parseLegend();\n\n // TODO: correctly implement independent axes\n if (true) { // if shared/union scale\n keys(child.component.legend).forEach(function(channel) {\n // just use the first legend definition for each channel\n if (!legendComponent[channel]) {\n legendComponent[channel] = child.component.legend[channel];\n }\n });\n }\n });\n }\n\n public assembleParentGroupProperties() {\n return null;\n }\n\n public assembleData(data: VgData[]): VgData[] {\n // Prefix traversal – parent data might be referred to by children data\n assembleData(this, data);\n this._children.forEach((child) => {\n child.assembleData(data);\n });\n return data;\n }\n\n public assembleLayout(layoutData: VgData[]): VgData[] {\n // Postfix traversal – layout is assembled bottom-up\n this._children.forEach((child) => {\n child.assembleLayout(layoutData);\n });\n return assembleLayout(this, layoutData);\n }\n\n public assembleMarks(): any[] {\n // only children have marks\n return flatten(this._children.map((child) => {\n return child.assembleMarks();\n }));\n }\n\n public channels() {\n return [];\n }\n\n protected mapping() {\n return null;\n }\n\n public isLayer() {\n return true;\n }\n\n /**\n * Returns true if the child either has no source defined or uses the same url.\n * This is useful if you want to know whether it is possible to move a filter up.\n *\n * This function can only be called once th child has been parsed.\n */\n public compatibleSource(child: UnitModel) {\n const data = this.data();\n const childData = child.component.data;\n const compatible = !childData.source || (data && data.url === childData.source.url);\n return compatible;\n }\n}\n",
"\nimport {Channel, X, Y, ROW, COLUMN} from '../channel';\nimport {LAYOUT} from '../data';\nimport {ScaleType, BANDSIZE_FIT} from '../scale';\nimport {Formula} from '../transform';\nimport {extend, keys, StringSet} from '../util';\nimport {VgData} from '../vega.schema';\n\nimport {FacetModel} from './facet';\nimport {LayerModel} from './layer';\nimport {Model} from './model';\nimport {imputedDomain} from '../timeunit';\nimport {UnitModel} from './unit';\n\n// FIXME: for nesting x and y, we need to declare x,y layout separately before joining later\n// For now, let's always assume shared scale\nexport interface LayoutComponent {\n width: SizeComponent;\n height: SizeComponent;\n}\n\nexport interface SizeComponent {\n /** Field that we need to calculate distinct */\n distinct: StringSet;\n\n /** Array of formulas */\n formula: Formula[];\n}\n\nexport function assembleLayout(model: Model, layoutData: VgData[]): VgData[] {\n const layoutComponent = model.component.layout;\n if (!layoutComponent.width && !layoutComponent.height) {\n return layoutData; // Do nothing\n }\n\n if (true) { // if both are shared scale, we can simply merge data source for width and for height\n const distinctFields = keys(extend(layoutComponent.width.distinct, layoutComponent.height.distinct));\n const formula = layoutComponent.width.formula.concat(layoutComponent.height.formula)\n .map(function(formula) {\n return extend({type: 'formula'}, formula);\n });\n\n return [\n distinctFields.length > 0 ? {\n name: model.dataName(LAYOUT),\n source: model.dataTable(),\n transform: [{\n type: 'aggregate',\n summarize: distinctFields.map(function(field) {\n return { field: field, ops: ['distinct'] };\n })\n }].concat(formula)\n } : {\n name: model.dataName(LAYOUT),\n values: [{}],\n transform: formula\n }\n ];\n }\n // FIXME: implement\n // otherwise, we need to join width and height (cross)\n}\n\n// FIXME: for nesting x and y, we need to declare x,y layout separately before joining later\n// For now, let's always assume shared scale\nexport function parseUnitLayout(model: UnitModel): LayoutComponent {\n return {\n width: parseUnitSizeLayout(model, X),\n height: parseUnitSizeLayout(model, Y)\n };\n}\n\nfunction parseUnitSizeLayout(model: UnitModel, channel: Channel): SizeComponent {\n return {\n distinct: getDistinct(model, channel),\n formula: [{\n field: model.channelSizeName(channel),\n expr: unitSizeExpr(model, channel)\n }]\n };\n}\n\nexport function unitSizeExpr(model: UnitModel, channel: Channel): string {\n const scale = model.scale(channel);\n if (scale) {\n if (scale.type === ScaleType.ORDINAL && scale.bandSize !== BANDSIZE_FIT) {\n return '(' + cardinalityExpr(model, channel) +\n ' + ' + 1 +\n ') * ' + scale.bandSize;\n }\n }\n return (channel === X ? model.width : model.height) + '';\n}\n\nexport function parseFacetLayout(model: FacetModel): LayoutComponent {\n return {\n width: parseFacetSizeLayout(model, COLUMN),\n height: parseFacetSizeLayout(model, ROW)\n };\n}\n\nfunction parseFacetSizeLayout(model: FacetModel, channel: Channel): SizeComponent {\n const childLayoutComponent = model.child().component.layout;\n const sizeType = channel === ROW ? 'height' : 'width';\n const childSizeComponent: SizeComponent = childLayoutComponent[sizeType];\n\n if (true) { // assume shared scale\n // For shared scale, we can simply merge the layout into one data source\n\n const distinct = extend(getDistinct(model, channel), childSizeComponent.distinct);\n const formula = childSizeComponent.formula.concat([{\n field: model.channelSizeName(channel),\n expr: facetSizeFormula(model, channel, model.child().channelSizeName(channel))\n }]);\n\n delete childLayoutComponent[sizeType];\n return {\n distinct: distinct,\n formula: formula\n };\n }\n // FIXME implement independent scale as well\n // TODO: - also consider when children have different data source\n}\n\nfunction facetSizeFormula(model: Model, channel: Channel, innerSize: string) {\n const scale = model.scale(channel);\n if (model.has(channel)) {\n return '(datum[\"' + innerSize + '\"] + ' + scale.padding + ')' + ' * ' + cardinalityExpr(model, channel);\n } else {\n return 'datum[\"' + innerSize + '\"] + ' + model.config().facet.scale.padding; // need to add outer padding for facet\n }\n}\n\nexport function parseLayerLayout(model: LayerModel): LayoutComponent {\n return {\n width: parseLayerSizeLayout(model, X),\n height: parseLayerSizeLayout(model, Y)\n };\n}\n\nfunction parseLayerSizeLayout(model: LayerModel, channel: Channel): SizeComponent {\n if (true) {\n // For shared scale, we can simply merge the layout into one data source\n // TODO: don't just take the layout from the first child\n\n const childLayoutComponent = model.children()[0].component.layout;\n const sizeType = channel === Y ? 'height' : 'width';\n const childSizeComponent: SizeComponent = childLayoutComponent[sizeType];\n\n const distinct = childSizeComponent.distinct;\n const formula = [{\n field: model.channelSizeName(channel),\n expr: childSizeComponent.formula[0].expr\n }];\n\n model.children().forEach((child) => {\n delete child.component.layout[sizeType];\n });\n\n return {\n distinct: distinct,\n formula: formula\n };\n }\n}\n\nfunction getDistinct(model: Model, channel: Channel): StringSet {\n if (model.has(channel) && model.isOrdinalScale(channel)) {\n const scale = model.scale(channel);\n if (scale.type === ScaleType.ORDINAL && !(scale.domain instanceof Array)) {\n // if explicit domain is declared, use array length\n const distinctField = model.field(channel);\n let distinct: StringSet = {};\n distinct[distinctField] = true;\n return distinct;\n }\n }\n return {};\n}\n\nexport function cardinalityExpr(model: Model, channel: Channel) {\n const scale = model.scale(channel);\n if (scale.domain instanceof Array) {\n return scale.domain.length;\n }\n\n const timeUnit = model.fieldDef(channel).timeUnit;\n const timeUnitDomain = timeUnit ? imputedDomain(timeUnit, channel) : null;\n\n // FIXME: production rule will break here!\n return timeUnitDomain !== null ? timeUnitDomain.length :\n model.field(channel, {datum: true, prefix: 'distinct'});\n}\n",
"import {COLOR, SIZE, SHAPE, OPACITY, Channel} from '../channel';\nimport {Config} from '../config';\nimport {DateTime, isDateTime, timestamp} from '../datetime';\nimport {FieldDef} from '../fielddef';\nimport {Legend} from '../legend';\nimport {title as fieldTitle} from '../fielddef';\nimport {AREA, BAR, TICK, TEXT, LINE, POINT, CIRCLE, SQUARE} from '../mark';\nimport {ORDINAL, TEMPORAL} from '../type';\nimport {extend, keys, without, Dict} from '../util';\n\nimport {applyMarkConfig, FILL_STROKE_CONFIG, numberFormat, timeTemplate} from './common';\nimport {COLOR_LEGEND, COLOR_LEGEND_LABEL} from './scale';\nimport {UnitModel} from './unit';\nimport {VgLegend} from '../vega.schema';\n\n/* tslint:disable:no-unused-variable */\n// These imports exist so the TS compiler can name publicly exported members in\n// The automatically created .d.ts correctly\nimport {Bin} from '../bin';\n/* tslint:enable:no-unused-variable */\n\nexport function parseLegendComponent(model: UnitModel): Dict<VgLegend> {\n return [COLOR, SIZE, SHAPE, OPACITY].reduce(function(legendComponent, channel) {\n if (model.legend(channel)) {\n legendComponent[channel] = parseLegend(model, channel);\n }\n return legendComponent;\n }, {} as Dict<VgLegend>);\n}\n\nfunction getLegendDefWithScale(model: UnitModel, channel: Channel): VgLegend {\n switch (channel) {\n case COLOR:\n const fieldDef = model.encoding().color;\n const scale = model.scaleName(useColorLegendScale(fieldDef) ?\n // To produce ordinal legend (list, rather than linear range) with correct labels:\n // - For an ordinal field, provide an ordinal scale that maps rank values to field values\n // - For a field with bin or timeUnit, provide an identity ordinal scale\n // (mapping the field values to themselves)\n COLOR_LEGEND :\n COLOR\n );\n\n return model.config().mark.filled ? { fill: scale } : { stroke: scale };\n case SIZE:\n return { size: model.scaleName(SIZE) };\n case SHAPE:\n return { shape: model.scaleName(SHAPE) };\n case OPACITY:\n return { opacity: model.scaleName(OPACITY) };\n }\n return null;\n}\n\nexport function parseLegend(model: UnitModel, channel: Channel): VgLegend {\n const fieldDef = model.fieldDef(channel);\n const legend = model.legend(channel);\n const config = model.config();\n\n let def: VgLegend = getLegendDefWithScale(model, channel);\n\n // 1.1 Add properties with special rules\n def.title = title(legend, fieldDef, config);\n const format = numberFormat(fieldDef, legend.format, config, channel);\n if (format) {\n def.format = format;\n }\n const vals = values(legend);\n if (vals) {\n def.values = vals;\n }\n\n // 1.2 Add properties without rules\n ['offset', 'orient'].forEach(function(property) {\n const value = legend[property];\n if (value !== undefined) {\n def[property] = value;\n }\n });\n\n // 2) Add mark property definition groups\n const props = (typeof legend !== 'boolean' && legend.properties) || {};\n ['title', 'symbols', 'legend', 'labels'].forEach(function(group) {\n let value = properties[group] ?\n properties[group](fieldDef, props[group], model, channel) : // apply rule\n props[group]; // no rule -- just default values\n if (value !== undefined && keys(value).length > 0) {\n def.properties = def.properties || {};\n def.properties[group] = value;\n }\n });\n\n return def;\n}\n\nexport function title(legend: Legend, fieldDef: FieldDef, config: Config) {\n if (legend.title !== undefined) {\n return legend.title;\n }\n\n return fieldTitle(fieldDef, config);\n}\n\nexport function values(legend: Legend) {\n const vals = legend.values;\n if (vals && isDateTime(vals[0])) {\n return (vals as DateTime[]).map((dt) => {\n // normalize = true as end user won't put 0 = January\n return timestamp(dt, true);\n });\n }\n return vals;\n}\n\n// we have to use special scales for ordinal or binned fields for the color channel\nexport function useColorLegendScale(fieldDef: FieldDef) {\n return fieldDef.type === ORDINAL || fieldDef.bin || fieldDef.timeUnit;\n}\n\nexport namespace properties {\n export function symbols(fieldDef: FieldDef, symbolsSpec, model: UnitModel, channel: Channel) {\n let symbols:any = {};\n const mark = model.mark();\n const legend = model.legend(channel);\n\n switch (mark) {\n case BAR:\n case TICK:\n case TEXT:\n symbols.shape = {value: 'square'};\n break;\n case CIRCLE:\n case SQUARE:\n symbols.shape = { value: mark };\n break;\n case POINT:\n case LINE:\n case AREA:\n // use default circle\n break;\n }\n\n const cfg = model.config();\n const filled = cfg.mark.filled;\n\n let config = channel === COLOR ?\n /* For color's legend, do not set fill (when filled) or stroke (when unfilled) property from config because the legend's `fill` or `stroke` scale should have precedence */\n without(FILL_STROKE_CONFIG, [ filled ? 'fill' : 'stroke', 'strokeDash', 'strokeDashOffset']) :\n /* For other legend, no need to omit. */\n without(FILL_STROKE_CONFIG, ['strokeDash', 'strokeDashOffset']);\n\n config = without(config, ['strokeDash', 'strokeDashOffset']);\n\n applyMarkConfig(symbols, model, config);\n\n if (filled) {\n symbols.strokeWidth = { value: 0 };\n }\n\n // Avoid override default mapping for opacity channel\n if (channel === OPACITY) {\n delete symbols.opacity;\n }\n\n let value;\n if (model.has(COLOR) && channel === COLOR) {\n if (useColorLegendScale(fieldDef)) {\n // for color legend scale, we need to override\n value = { scale: model.scaleName(COLOR), field: 'data' };\n }\n } else if (model.encoding().color && model.encoding().color.value) {\n value = { value: model.encoding().color.value };\n }\n\n if (value !== undefined) {\n // apply the value\n if (filled) {\n symbols.fill = value;\n } else {\n symbols.stroke = value;\n }\n } else if (channel !== COLOR) {\n // For non-color legend, apply color config if there is no fill / stroke config.\n // (For color, do not override scale specified!)\n symbols[filled ? 'fill' : 'stroke'] = symbols[filled ? 'fill' : 'stroke'] ||\n {value: cfg.mark.color};\n }\n\n if (legend.symbolColor !== undefined) {\n symbols.fill = {value: legend.symbolColor};\n } else if (symbols.fill === undefined) {\n // fall back to mark config colors for legend fill\n if (cfg.mark.fill !== undefined) {\n symbols.fill = {value: cfg.mark.fill};\n } else if (cfg.mark.stroke !== undefined) {\n symbols.stroke = {value: cfg.mark.stroke};\n }\n }\n\n if (channel !== SHAPE) {\n if (legend.symbolShape !== undefined) {\n symbols.shape = {value: legend.symbolShape};\n } else if (cfg.mark.shape !== undefined) {\n symbols.shape = {value: cfg.mark.shape};\n }\n }\n\n if (channel !== SIZE) {\n if (legend.symbolSize !== undefined) {\n symbols.size = {value: legend.symbolSize};\n }\n }\n\n if (legend.symbolStrokeWidth !== undefined) {\n symbols.strokeWidth = {value: legend.symbolStrokeWidth};\n }\n\n symbols = extend(symbols, symbolsSpec || {});\n\n return keys(symbols).length > 0 ? symbols : undefined;\n }\n\n export function labels(fieldDef: FieldDef, labelsSpec, model: UnitModel, channel: Channel) {\n const legend = model.legend(channel);\n const config = model.config();\n\n let labels:any = {};\n\n if (channel === COLOR) {\n if (fieldDef.type === ORDINAL) {\n labelsSpec = extend({\n text: {\n scale: model.scaleName(COLOR_LEGEND),\n field: 'data'\n }\n }, labelsSpec || {});\n } else if (fieldDef.bin) {\n labelsSpec = extend({\n text: {\n scale: model.scaleName(COLOR_LEGEND_LABEL),\n field: 'data'\n }\n }, labelsSpec || {});\n } else if (fieldDef.type === TEMPORAL) {\n labelsSpec = extend({\n text: {\n template: timeTemplate('datum[\"data\"]', fieldDef.timeUnit, legend.format, legend.shortTimeLabels, config)\n }\n }, labelsSpec || {});\n }\n }\n\n if (legend.labelAlign !== undefined) {\n labels.align = {value: legend.labelAlign};\n }\n\n if (legend.labelColor !== undefined) {\n labels.fill = {value: legend.labelColor};\n }\n\n if (legend.labelFont !== undefined) {\n labels.font = {value: legend.labelFont};\n }\n\n if (legend.labelFontSize !== undefined) {\n labels.fontSize = {value: legend.labelFontSize};\n }\n\n if (legend.labelBaseline !== undefined) {\n labels.baseline = {value: legend.labelBaseline};\n }\n\n labels = extend(labels, labelsSpec || {});\n\n return keys(labels).length > 0 ? labels : undefined;\n }\n\n export function title(fieldDef: FieldDef, titleSpec, model: UnitModel, channel: Channel) {\n const legend = model.legend(channel);\n\n let titles:any = {};\n\n if (legend.titleColor !== undefined) {\n titles.fill = {value: legend.titleColor};\n }\n\n if (legend.titleFont !== undefined) {\n titles.font = {value: legend.titleFont};\n }\n\n if (legend.titleFontSize !== undefined) {\n titles.fontSize = {value: legend.titleFontSize};\n }\n\n if (legend.titleFontWeight !== undefined) {\n titles.fontWeight = {value: legend.titleFontWeight};\n }\n\n titles = extend(titles, titleSpec || {});\n\n return keys(titles).length > 0 ? titles : undefined;\n }\n}\n",
"import {VgValueRef} from '../../vega.schema';\n\nimport {X, Y} from '../../channel';\nimport {Orient} from '../../config';\nimport {FieldDef, field} from '../../fielddef';\nimport {Scale, ScaleType} from '../../scale';\nimport {StackProperties} from '../../stack';\nimport {contains} from '../../util';\n\nimport {applyColorAndOpacity, applyMarkConfig} from '../common';\nimport {UnitModel} from '../unit';\n\nexport namespace area {\n export function markType() {\n return 'area';\n }\n\n export function properties(model: UnitModel) {\n // TODO Use Vega's marks properties interface\n let p: any = {};\n const config = model.config();\n\n // We should always have orient as we augment it in config.ts\n const orient = config.mark.orient;\n p.orient = { value: orient} ;\n\n const stack = model.stack();\n\n p.x = x(model.encoding().x, model.scaleName(X), model.scale(X), orient, stack);\n p.y = y(model.encoding().y, model.scaleName(Y), model.scale(Y), orient, stack);\n\n // Have only x2 or y2\n const _x2 = x2(model.encoding().x, model.encoding().x2, model.scaleName(X), model.scale(X), orient, stack);\n if (_x2) {\n p.x2 = _x2;\n }\n\n const _y2 = y2(model.encoding().y, model.encoding().y2, model.scaleName(Y), model.scale(Y), orient, stack);\n if (_y2) {\n p.y2 = _y2;\n }\n\n applyColorAndOpacity(p, model);\n applyMarkConfig(p, model, ['interpolate', 'tension']);\n return p;\n }\n\n export function x(fieldDef: FieldDef, scaleName: string, scale: Scale, orient: Orient, stack: StackProperties): VgValueRef {\n if (stack && X === stack.fieldChannel) { // Stacked Measure\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'start' })\n };\n } else if (fieldDef) {\n if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n } else if (fieldDef.value) {\n return {\n scale: scaleName,\n value: fieldDef.value\n };\n }\n }\n\n return { value: 0 };\n }\n\n export function x2(xFieldDef: FieldDef, x2FieldDef: FieldDef, scaleName: string, scale: Scale, orient: Orient, stack: StackProperties): VgValueRef {\n // x\n if (orient === Orient.HORIZONTAL) {\n if (stack && X === stack.fieldChannel) { // Stacked Measure\n return {\n scale: scaleName,\n field: field(xFieldDef, { suffix: 'end' })\n };\n } else if (x2FieldDef) {\n if (x2FieldDef.field) {\n return {\n scale: scaleName,\n field: field(x2FieldDef)\n };\n } else if (x2FieldDef.value) {\n return {\n scale: scaleName,\n value: x2FieldDef.value\n };\n }\n }\n\n // Log / Time / UTC scale do not support zero\n if (contains([ScaleType.LOG, ScaleType.TIME, ScaleType.UTC], scale.type) || scale.zero === false) {\n return {\n value: 0\n };\n }\n\n return {\n scale: scaleName,\n value: 0\n };\n }\n return undefined;\n }\n\n export function y(fieldDef: FieldDef, scaleName: string, scale: Scale, orient: Orient, stack: StackProperties): VgValueRef {\n if (stack && Y === stack.fieldChannel) { // Stacked Measure\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'start' })\n };\n } else if (fieldDef) {\n if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n } else if (fieldDef.value) {\n return {\n scale: scaleName,\n value: fieldDef.value\n };\n }\n }\n return { value: 0 };\n }\n\n export function y2(yFieldDef: FieldDef, y2FieldDef: FieldDef,\n scaleName: string, scale: Scale, orient: Orient, stack: StackProperties): VgValueRef {\n\n if (orient !== Orient.HORIZONTAL) {\n if (stack && Y === stack.fieldChannel) { // Stacked Measure\n return {\n scale: scaleName,\n field: field(yFieldDef, { suffix: 'end' })\n };\n } else if (y2FieldDef) {\n // y2\n if (y2FieldDef.field) {\n return {\n scale: scaleName,\n field: field(y2FieldDef)\n };\n } else if (y2FieldDef.value) {\n return {\n scale: scaleName,\n value: y2FieldDef.value\n };\n }\n }\n\n // Log / Time / UTC scale do not support zero\n if (contains([ScaleType.LOG, ScaleType.TIME, ScaleType.UTC], scale.type) || scale.zero === false) {\n return {\n field: {group: 'height'}\n };\n }\n\n return {\n scale: scaleName,\n value: 0\n };\n }\n return undefined;\n }\n}\n",
"import {X, Y, X2, Y2, SIZE, Channel} from '../../channel';\nimport {Orient} from '../../config';\nimport {isMeasure} from '../../fielddef';\nimport {BANDSIZE_FIT, ScaleType} from '../../scale';\nimport {contains} from '../../util';\n\nimport {applyColorAndOpacity} from '../common';\nimport {UnitModel} from '../unit';\n\nexport namespace bar {\n export function markType() {\n return 'rect';\n }\n\n export function properties(model: UnitModel) {\n // TODO Use Vega's marks properties interface\n let p: any = {};\n\n const orient = model.config().mark.orient;\n\n const stack = model.stack();\n const xFieldDef = model.encoding().x;\n const x2FieldDef = model.encoding().x2;\n\n const xIsMeasure = isMeasure(xFieldDef) || isMeasure(x2FieldDef);\n\n // x, x2, and width -- we must specify two of these in all conditions\n if (stack && X === stack.fieldChannel) {\n // 'x' is a stacked measure, thus use <field>_start and <field>_end for x, x2.\n p.x = {\n scale: model.scaleName(X),\n field: model.field(X, { suffix: 'start' })\n };\n p.x2 = {\n scale: model.scaleName(X),\n field: model.field(X, { suffix: 'end' })\n };\n } else if (xIsMeasure) {\n if (orient === Orient.HORIZONTAL) {\n if (model.has(X)) {\n p.x = {\n scale: model.scaleName(X),\n field: model.field(X)\n };\n } else {\n p.x = {\n scale: model.scaleName(X),\n value: 0\n };\n }\n\n if (model.has(X2)) {\n p.x2 = {\n scale: model.scaleName(X),\n field: model.field(X2)\n };\n } else {\n // Log / Time / UTC scale do not support zero\n if (contains([ScaleType.LOG, ScaleType.TIME, ScaleType.UTC], model.scale(X).type) ||\n model.scale(X).zero === false) {\n p.x2 = { value: 0 };\n } else {\n p.x2 = {\n scale: model.scaleName(X),\n value: 0\n };\n }\n\n }\n } else { // vertical\n p.xc = {\n scale: model.scaleName(X),\n field: model.field(X)\n };\n p.width = {value: sizeValue(model, X)};\n }\n } else { // x is dimension or unspecified\n if (model.has(X)) { // is ordinal\n if (model.encoding().x.bin) {\n if (model.has(SIZE) && orient !== Orient.HORIZONTAL) {\n // For vertical chart that has binned X and size,\n // center bar and apply size to width.\n p.xc = {\n scale: model.scaleName(X),\n field: model.field(X, { binSuffix: 'mid' })\n };\n p.width = {\n scale: model.scaleName(SIZE),\n field: model.field(SIZE)\n };\n } else {\n p.x = {\n scale: model.scaleName(X),\n field: model.field(X, { binSuffix: 'start' }),\n offset: 1\n };\n p.x2 = {\n scale: model.scaleName(X),\n field: model.field(X, { binSuffix: 'end' })\n };\n }\n } else if (model.scale(X).bandSize === BANDSIZE_FIT) {\n p.x = {\n scale: model.scaleName(X),\n field: model.field(X),\n offset: 0.5 // TODO offset or padding\n };\n } else {\n p.xc = {\n scale: model.scaleName(X),\n field: model.field(X)\n };\n }\n } else { // no x\n p.x = { value: 0, offset: 2 };\n }\n\n p.width = model.has(X) && model.scale(X).bandSize === BANDSIZE_FIT ? {\n scale: model.scaleName(X),\n band: true,\n offset: -0.5 // TODO offset or padding\n } : model.has(SIZE) && orient !== Orient.HORIZONTAL ? {\n // apply size scale if has size and is vertical (explicit \"vertical\" or undefined)\n scale: model.scaleName(SIZE),\n field: model.field(SIZE)\n } : {\n // otherwise, use fixed size\n value: sizeValue(model, (X))\n };\n }\n\n const yFieldDef = model.encoding().y;\n const y2FieldDef = model.encoding().y2;\n\n const yIsMeasure = isMeasure(yFieldDef) || isMeasure(y2FieldDef);\n // y, y2 & height -- we must specify two of these in all conditions\n if (stack && Y === stack.fieldChannel) { // y is stacked measure\n p.y = {\n scale: model.scaleName(Y),\n field: model.field(Y, { suffix: 'start' })\n };\n p.y2 = {\n scale: model.scaleName(Y),\n field: model.field(Y, { suffix: 'end' })\n };\n } else if (yIsMeasure) {\n if (orient !== Orient.HORIZONTAL) { // vertical (explicit 'vertical' or undefined)\n if (model.has(Y)) {\n p.y = {\n scale: model.scaleName(Y),\n field: model.field(Y)\n };\n } else {\n p.y = {\n scale: model.scaleName(Y),\n value: 0\n };\n }\n\n if (model.has(Y2)) {\n p.y2 = {\n scale: model.scaleName(Y),\n field: model.field(Y2)\n };\n } else {\n // Log / Time / UTC scale do not support zero\n if (contains([ScaleType.LOG, ScaleType.TIME, ScaleType.UTC], model.scale(Y).type) ||\n model.scale(Y).zero === false) {\n // end on axis\n p.y2 = {\n field: {group: 'height'}\n };\n } else {\n p.y2 = {\n scale: model.scaleName(Y),\n value: 0\n };\n }\n }\n } else {\n p.yc = {\n scale: model.scaleName(Y),\n field: model.field(Y)\n };\n p.height = { value: sizeValue(model, Y) };\n }\n } else { // y is ordinal or unspecified\n\n if (model.has(Y)) { // is ordinal\n if (model.encoding().y.bin) {\n if (model.has(SIZE) && orient === Orient.HORIZONTAL) {\n // For horizontal chart that has binned Y and size,\n // center bar and apply size to height.\n p.yc = {\n scale: model.scaleName(Y),\n field: model.field(Y, { binSuffix: 'mid' })\n };\n p.height = {\n scale: model.scaleName(SIZE),\n field: model.field(SIZE)\n };\n } else {\n // Otherwise, simply use <field>_start, <field>_end\n p.y = {\n scale: model.scaleName(Y),\n field: model.field(Y, { binSuffix: 'start' })\n };\n p.y2 = {\n scale: model.scaleName(Y),\n field: model.field(Y, { binSuffix: 'end' }),\n offset: 1\n };\n }\n } else if (model.scale(Y).bandSize === BANDSIZE_FIT) {\n p.y = {\n scale: model.scaleName(Y),\n field: model.field(Y),\n offset: 0.5 // TODO offset or padding\n };\n } else {\n p.yc = {\n scale: model.scaleName(Y),\n field: model.field(Y)\n };\n }\n } else { // No Y\n p.y2 = {\n field: { group: 'height' },\n offset: -1\n };\n }\n\n p.height = model.has(Y) && model.scale(Y).bandSize === BANDSIZE_FIT ? {\n scale: model.scaleName(Y),\n band: true,\n offset: -0.5 // TODO offset or padding\n } : model.has(SIZE) && orient === Orient.HORIZONTAL ? {\n // apply size scale if has size and is horizontal\n scale: model.scaleName(SIZE),\n field: model.field(SIZE)\n } : {\n value: sizeValue(model, Y)\n };\n }\n\n applyColorAndOpacity(p, model);\n return p;\n }\n\n // TODO: make this a mixins\n function sizeValue(model: UnitModel, channel: Channel) {\n const fieldDef = model.encoding().size;\n if (fieldDef && fieldDef.value !== undefined) {\n return fieldDef.value;\n }\n\n const markConfig = model.config().mark;\n if (markConfig.barSize) {\n return markConfig.barSize;\n }\n // BAR's size is applied on either X or Y\n return model.isOrdinalScale(channel) ?\n // For ordinal scale or single bar, we can use bandSize - 1\n // (-1 so that the border of the bar falls on exact pixel)\n model.scale(channel).bandSize - 1 :\n // TODO: {band: true}\n !model.has(channel) ?\n model.config().scale.bandSize - 1 :\n // otherwise, set to thinBarWidth by default\n markConfig.barThinSize;\n }\n}\n",
"import {X, Y} from '../../channel';\nimport {Config} from '../../config';\nimport {FieldDef, field} from '../../fielddef';\nimport {StackProperties} from '../../stack';\nimport {VgValueRef} from '../../vega.schema';\n\nimport {applyColorAndOpacity, applyMarkConfig} from '../common';\nimport {UnitModel} from '../unit';\n\nexport namespace line {\n export function markType() {\n return 'line';\n }\n\n export function properties(model: UnitModel) {\n // TODO Use Vega's marks properties interface\n let p: any = {};\n const config = model.config();\n const stack = model.stack();\n\n p.x = x(model.encoding().x, model.scaleName(X), stack, config);\n\n p.y = y(model.encoding().y, model.scaleName(Y), stack, config);\n\n const _size = size(model.encoding().size, config);\n if (_size) { p.strokeWidth = _size; }\n\n applyColorAndOpacity(p, model);\n applyMarkConfig(p, model, ['interpolate', 'tension']);\n return p;\n }\n\n function x(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // x\n if (fieldDef) {\n if (stack && X === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n }\n // TODO: fieldDef.value (for layering)\n }\n return { value: 0 };\n }\n\n function y(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // y\n if (fieldDef) {\n if (stack && Y === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n }\n // TODO: fieldDef.value (for layering)\n }\n return { field: { group: 'height' } };\n }\n\n function size(fieldDef: FieldDef, config: Config) {\n if (fieldDef && fieldDef.value !== undefined) {\n return { value: fieldDef.value};\n }\n return { value: config.mark.lineSize };\n }\n}\n",
"import {X, Y, COLOR, TEXT, SHAPE, PATH, ORDER, OPACITY, DETAIL, STACK_GROUP_CHANNELS} from '../../channel';\nimport {Orient} from '../../config';\nimport {has, isAggregate} from '../../encoding';\nimport {OrderChannelDef, FieldDef, field} from '../../fielddef';\nimport {AREA, LINE, TEXT as TEXTMARK} from '../../mark';\nimport {ScaleType} from '../../scale';\nimport {isSortField} from '../../sort';\nimport {contains, extend, isArray} from '../../util';\nimport {VgStackTransform} from '../../vega.schema';\n\nimport {area} from './area';\nimport {bar} from './bar';\nimport {sortField} from '../common';\nimport {line} from './line';\nimport {point, circle, square} from './point';\nimport {rule} from './rule';\nimport {text} from './text';\nimport {tick} from './tick';\nimport {UnitModel} from '../unit';\n\nconst markCompiler = {\n area: area,\n bar: bar,\n line: line,\n point: point,\n text: text,\n tick: tick,\n rule: rule,\n circle: circle,\n square: square\n};\n\nexport function parseMark(model: UnitModel): any[] {\n if (contains([LINE, AREA], model.mark())) {\n return parsePathMark(model);\n } else {\n return parseNonPathMark(model);\n }\n}\n\nfunction parsePathMark(model: UnitModel) { // TODO: extract this into compilePathMark\n const mark = model.mark();\n // TODO: replace this with more general case for composition\n const isFaceted = model.parent() && model.parent().isFacet();\n const dataFrom = {data: model.dataTable()};\n const details = detailFields(model);\n\n let pathMarks: any = [\n {\n name: model.name('marks'),\n type: markCompiler[mark].markType(),\n from: extend(\n // If has facet, `from.data` will be added in the cell group.\n // If has subfacet for line/area group, `from.data` will be added in the outer subfacet group below.\n // If has no subfacet, add from.data.\n isFaceted || details.length > 0 ? {} : dataFrom,\n\n // sort transform\n {transform: [{ type: 'sort', by: sortPathBy(model)}]}\n ),\n properties: { update: markCompiler[mark].properties(model) }\n }\n ];\n\n if (details.length > 0) { // have level of details - need to facet line into subgroups\n const facetTransform = { type: 'facet', groupby: details };\n const transform: any[] = model.stack() ?\n // For stacked area / line, we need to impute missing tuples and stack values\n // (Mark layer order does not matter for stacked charts)\n stackTransforms(model, true).concat(facetTransform) :\n // For non-stacked path (line/area), we need to facet and possibly sort\n [].concat(\n facetTransform,\n // if model has `order`, then sort mark's layer order by `order` field(s)\n model.has(ORDER) ? [{type:'sort', by: sortBy(model)}] : []\n );\n\n return [{\n name: model.name('pathgroup'),\n type: 'group',\n from: extend(\n // If has facet, `from.data` will be added in the cell group.\n // Otherwise, add it here.\n isFaceted ? {} : dataFrom,\n {transform: transform}\n ),\n properties: {\n update: {\n width: { field: { group: 'width' } },\n height: { field: { group: 'height' } }\n }\n },\n marks: pathMarks\n }];\n } else {\n return pathMarks;\n }\n}\n\nfunction parseNonPathMark(model: UnitModel) {\n const mark = model.mark();\n const isFaceted = model.parent() && model.parent().isFacet();\n const dataFrom = {data: model.dataTable()};\n\n let marks = []; // TODO: vgMarks\n if (mark === TEXTMARK &&\n model.has(COLOR) &&\n model.config().mark.applyColorToBackground && !model.has(X) && !model.has(Y)\n ) {\n // add background to 'text' marks if has color\n marks.push(extend(\n {\n name: model.name('background'),\n type: 'rect'\n },\n // If has facet, `from.data` will be added in the cell group.\n // Otherwise, add it here.\n isFaceted ? {} : {from: dataFrom},\n // Properties\n { properties: { update: text.background(model) } }\n ));\n }\n\n marks.push(extend(\n {\n name: model.name('marks'),\n type: markCompiler[mark].markType()\n },\n // Add `from` if needed\n (!isFaceted || model.stack() || model.has(ORDER)) ? {\n from: extend(\n // If faceted, `from.data` will be added in the cell group.\n // Otherwise, add it here\n isFaceted ? {} : dataFrom,\n // `from.transform`\n model.stack() ? // Stacked Chart need stack transform\n { transform: stackTransforms(model, false) } :\n model.has(ORDER) ?\n // if non-stacked, detail field determines the layer order of each mark\n { transform: [{type:'sort', by: sortBy(model)}] } :\n {}\n )\n } : {},\n // properties groups\n { properties: { update: markCompiler[mark].properties(model) } }\n ));\n\n return marks;\n}\n\nfunction sortBy(model: UnitModel): string | string[] {\n if (model.has(ORDER)) {\n let channelDef = model.encoding().order;\n if (channelDef instanceof Array) {\n // sort by multiple fields\n return channelDef.map(sortField);\n } else {\n // sort by one field\n return sortField(channelDef as OrderChannelDef); // have to add OrderChannelDef to make tsify not complaining\n }\n }\n return null; // use default order\n}\n\n/**\n * Return path order for sort transform's by property\n */\nfunction sortPathBy(model: UnitModel): string | string[] {\n if (model.mark() === LINE && model.has(PATH)) {\n // For only line, sort by the path field if it is specified.\n const channelDef = model.encoding().path;\n if (channelDef instanceof Array) {\n // sort by multiple fields\n return channelDef.map(sortField);\n } else {\n // sort by one field\n return sortField(channelDef as OrderChannelDef); // have to add OrderChannelDef to make tsify not complaining\n }\n } else {\n // For both line and area, we sort values based on dimension by default\n const dimensionChannel = model.config().mark.orient === Orient.HORIZONTAL ? Y : X;\n const sort = model.sort(dimensionChannel);\n if (isSortField(sort)) {\n return '-' + field({\n aggregate: isAggregate(model.encoding()) ? sort.op : undefined,\n field: sort.field\n });\n } else {\n return '-' + model.field(dimensionChannel, {binSuffix: 'mid'});\n }\n }\n}\n\n/**\n * Returns list of detail fields (for 'color', 'shape', or 'detail' channels)\n * that the model's spec contains.\n */\nfunction detailFields(model: UnitModel): string[] {\n return [COLOR, DETAIL, OPACITY, SHAPE].reduce(function(details, channel) {\n if (model.has(channel) && !model.fieldDef(channel).aggregate) {\n details.push(model.field(channel));\n }\n return details;\n }, []);\n}\n\n\nfunction stackTransforms(model: UnitModel, impute: boolean): any[] {\n const stackByFields = getStackByFields(model);\n if (impute) {\n return [imputeTransform(model, stackByFields), stackTransform(model, stackByFields)];\n }\n return [stackTransform(model, stackByFields)];\n}\n\n\n/** Compile stack-by field names from (from 'color' and 'detail') */\nfunction getStackByFields(model: UnitModel) {\n const encoding = model.encoding();\n\n return STACK_GROUP_CHANNELS.reduce(function(fields, channel) {\n const channelEncoding = encoding[channel];\n if (has(encoding, channel)) {\n if (isArray(channelEncoding)) {\n channelEncoding.forEach(function(fieldDef) {\n fields.push(field(fieldDef));\n });\n } else {\n const fieldDef: FieldDef = channelEncoding;\n const scale = model.scale(channel);\n const _field = field(fieldDef, {\n binSuffix: scale && scale.type === ScaleType.ORDINAL ? 'range' : 'start'\n });\n if (!!_field) {\n fields.push(_field);\n }\n }\n }\n return fields;\n }, []);\n}\n\n// impute data for stacked area\nfunction imputeTransform(model: UnitModel, stackFields: string[]) {\n const stack = model.stack();\n return {\n type: 'impute',\n field: model.field(stack.fieldChannel),\n groupby: stackFields,\n orderby: [model.field(stack.groupbyChannel, {binSuffix: 'mid'})],\n method: 'value',\n value: 0\n };\n}\n\nfunction stackTransform(model: UnitModel, stackFields: string[]) {\n const stack = model.stack();\n const encoding = model.encoding();\n const sortby = model.has(ORDER) ?\n (isArray(encoding[ORDER]) ? encoding[ORDER] : [encoding[ORDER]]).map(sortField) :\n // default = descending by stackFields\n stackFields.map(function(field) {\n return '-' + field;\n });\n\n const valName = model.field(stack.fieldChannel);\n\n // add stack transform to mark\n let transform: VgStackTransform = {\n type: 'stack',\n groupby: [model.field(stack.groupbyChannel, {binSuffix: 'mid'}) || 'undefined'],\n field: model.field(stack.fieldChannel),\n sortby: sortby,\n output: {\n start: valName + '_start',\n end: valName + '_end'\n }\n };\n\n if (stack.offset) {\n transform.offset = stack.offset;\n }\n return transform;\n}\n",
"import {X, Y, SHAPE, SIZE} from '../../channel';\nimport {Config} from '../../config';\nimport {ChannelDefWithLegend, FieldDef, field} from '../../fielddef';\nimport {Scale} from '../../scale';\nimport {StackProperties} from '../../stack';\nimport {VgValueRef} from '../../vega.schema';\n\nimport {applyColorAndOpacity} from '../common';\nimport {UnitModel} from '../unit';\n\nexport namespace point {\n export function markType() {\n return 'symbol';\n }\n\n export function properties(model: UnitModel, fixedShape?: string) {\n // TODO Use Vega's marks properties interface\n let p: any = {};\n const config = model.config();\n const stack = model.stack();\n\n p.x = x(model.encoding().x, model.scaleName(X), stack, config);\n\n p.y = y(model.encoding().y, model.scaleName(Y), stack, config);\n\n p.size = size(model.encoding().size, model.scaleName(SIZE), model.scale(SIZE), config);\n\n p.shape = shape(model.encoding().shape, model.scaleName(SHAPE), model.scale(SHAPE), config, fixedShape);\n\n applyColorAndOpacity(p, model);\n return p;\n }\n\n function x(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // x\n if (fieldDef) {\n if (stack && X === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n }\n // TODO: fieldDef.value (for layering)\n }\n // TODO: allow this to fit\n return { value: config.scale.bandSize / 2 };\n }\n\n function y(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // y\n if (fieldDef) {\n if (stack && Y === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n }\n // TODO: fieldDef.value (for layering)\n }\n // TODO: allow this to fit\n return { value: config.scale.bandSize / 2 };\n }\n\n function size(fieldDef: ChannelDefWithLegend, scaleName: string, scale: Scale, config: Config): VgValueRef {\n if (fieldDef) {\n if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, {scaleType: scale.type})\n };\n } else if (fieldDef.value !== undefined) {\n return { value: fieldDef.value };\n }\n }\n return { value: config.mark.size };\n }\n\n function shape(fieldDef: ChannelDefWithLegend, scaleName: string, scale: Scale, config: Config, fixedShape?: string): VgValueRef {\n // shape\n if (fixedShape) { // square and circle marks\n return { value: fixedShape };\n } else if (fieldDef) {\n if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, {scaleType: scale.type})\n };\n } else if (fieldDef.value) {\n return { value: fieldDef.value };\n }\n }\n return { value: config.mark.shape };\n }\n}\n\nexport namespace circle {\n export function markType() {\n return 'symbol';\n }\n\n export function properties(model: UnitModel) {\n return point.properties(model, 'circle');\n }\n}\n\nexport namespace square {\n export function markType() {\n return 'symbol';\n }\n\n export function properties(model: UnitModel) {\n return point.properties(model, 'square');\n }\n}\n",
"import {X, Y, X2, Y2, SIZE} from '../../channel';\nimport {Orient} from '../../config';\n\nimport {UnitModel} from '../unit';\nimport {applyColorAndOpacity} from '../common';\n\nexport namespace rule {\n export function markType() {\n return 'rule';\n }\n\n export function properties(model: UnitModel) {\n let p: any = {};\n\n // TODO: support explicit value\n if(model.config().mark.orient === Orient.VERTICAL) {\n if (model.has(X)) {\n p.x = {\n scale: model.scaleName(X),\n field: model.field(X, { binSuffix: 'mid' })\n };\n } else {\n p.x = { value : 0 };\n }\n\n if (model.has(Y)) {\n p.y = {\n scale: model.scaleName(Y),\n field: model.field(Y, { binSuffix: 'mid' })\n };\n } else {\n p.y = { field: { group: 'height' } };\n }\n\n if (model.has(Y2)) {\n p.y2 = {\n scale: model.scaleName(Y),\n field: model.field(Y2, { binSuffix: 'mid' })\n };\n } else {\n p.y2 = { value: 0 };\n }\n } else {\n if (model.has(Y)) {\n p.y = {\n scale: model.scaleName(Y),\n field: model.field(Y, { binSuffix: 'mid' })\n };\n } else {\n p.y = { value: 0 };\n }\n\n if (model.has(X)) {\n p.x = {\n scale: model.scaleName(X),\n field: model.field(X, { binSuffix: 'mid' })\n };\n } else {\n p.x = { value: 0 };\n }\n\n if (model.has(X2)) {\n p.x2 = {\n scale: model.scaleName(X),\n field: model.field(X2, { binSuffix: 'mid' })\n };\n } else {\n p.x2 = { field: { group: 'width' } };\n }\n }\n\n // FIXME: this function would overwrite strokeWidth but shouldn't\n applyColorAndOpacity(p, model);\n\n // size\n if (model.has(SIZE)) {\n p.strokeWidth = {\n scale: model.scaleName(SIZE),\n field: model.field(SIZE)\n };\n } else {\n p.strokeWidth = { value: sizeValue(model) };\n }\n return p;\n }\n\n function sizeValue(model: UnitModel) {\n const fieldDef = model.encoding().size;\n if (fieldDef && fieldDef.value !== undefined) {\n return fieldDef.value;\n }\n\n return model.config().mark.ruleSize;\n }\n}\n",
"import {X, Y, COLOR, TEXT, SIZE} from '../../channel';\nimport {applyMarkConfig, applyColorAndOpacity, numberFormat, timeTemplate} from '../common';\nimport {Config} from '../../config';\nimport {FieldDef, field} from '../../fielddef';\nimport {StackProperties} from '../../stack';\nimport {QUANTITATIVE, ORDINAL, TEMPORAL} from '../../type';\nimport {VgValueRef} from '../../vega.schema';\n\n\nimport {UnitModel} from '../unit';\n\nexport namespace text {\n export function markType() {\n return 'text';\n }\n\n export function background(model: UnitModel) {\n return {\n x: { value: 0 },\n y: { value: 0 },\n width: { field: { group: 'width' } },\n height: { field: { group: 'height' } },\n fill: {\n scale: model.scaleName(COLOR),\n field: model.field(COLOR, model.encoding().color.type === ORDINAL ? {prefix: 'rank'} : {})\n }\n };\n }\n\n export function properties(model: UnitModel) {\n // TODO Use Vega's marks properties interface\n let p: any = {};\n\n applyMarkConfig(p, model,\n ['angle', 'align', 'baseline', 'dx', 'dy', 'font', 'fontWeight',\n 'fontStyle', 'radius', 'theta', 'text']);\n\n const config = model.config();\n const stack = model.stack();\n const textFieldDef = model.encoding().text;\n\n p.x = x(model.encoding().x, model.scaleName(X), stack, config, textFieldDef);\n\n p.y = y(model.encoding().y, model.scaleName(Y), stack, config);\n\n p.fontSize = size(model.encoding().size, model.scaleName(SIZE), config);\n\n p.text = text(textFieldDef, model.scaleName(TEXT), config);\n\n if (model.config().mark.applyColorToBackground && !model.has(X) && !model.has(Y)) {\n p.fill = {value: 'black'}; // TODO: add rules for swapping between black and white\n // opacity\n const opacity = model.config().mark.opacity;\n if (opacity) { p.opacity = { value: opacity }; };\n } else {\n applyColorAndOpacity(p, model);\n }\n\n return p;\n }\n\n function x(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config, textFieldDef:FieldDef): VgValueRef {\n // x\n if (fieldDef) {\n if (stack && X === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n }\n }\n // TODO: support x.value, x.datum\n if (textFieldDef && textFieldDef.type === QUANTITATIVE) {\n return { field: { group: 'width' }, offset: -5 };\n } else {\n // TODO: allow this to fit\n return { value: config.scale.textBandWidth / 2 };\n }\n }\n\n function y(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // y\n if (fieldDef) {\n if (stack && Y === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n }\n }\n // TODO: allow this to fit\n // TODO consider if this should support group: height case too.\n return { value: config.scale.bandSize / 2 };\n }\n\n function size(sizeFieldDef: FieldDef, scaleName: string, config: Config): VgValueRef {\n // size\n if (sizeFieldDef) {\n if (sizeFieldDef.field) {\n return {\n scale: scaleName,\n field: field(sizeFieldDef)\n };\n }\n if (sizeFieldDef.value) {\n return {value: sizeFieldDef.value};\n }\n }\n return { value: config.mark.fontSize };\n }\n\n function text(textFieldDef: FieldDef, scaleName: string, config: Config): VgValueRef {\n // text\n if (textFieldDef) {\n if (textFieldDef.field) {\n if (QUANTITATIVE === textFieldDef.type) {\n const format = numberFormat(textFieldDef, config.mark.format, config, TEXT);\n\n const filter = 'number' + ( format ? ':\\'' + format + '\\'' : '');\n return {\n template: '{{' + field(textFieldDef, { datum: true }) + ' | ' + filter + '}}'\n };\n } else if (TEMPORAL === textFieldDef.type) {\n return {\n template: timeTemplate(field(textFieldDef, {datum: true}), textFieldDef.timeUnit, config.mark.format, config.mark.shortTimeLabels, config)\n };\n } else {\n return { field: textFieldDef.field };\n }\n } else if (textFieldDef.value) {\n return { value: textFieldDef.value };\n }\n }\n return {value: config.mark.text};\n }\n}\n",
"import {X, Y, SIZE} from '../../channel';\nimport {Orient} from '../../config';\nimport {FieldDef, field} from '../../fielddef';\nimport {StackProperties} from '../../stack';\nimport {Config} from '../../config';\nimport {VgValueRef} from '../../vega.schema';\n\nimport {UnitModel} from '../unit';\nimport {applyColorAndOpacity} from '../common';\n\nexport namespace tick {\n export function markType() {\n return 'rect';\n }\n\n export function properties(model: UnitModel) {\n let p: any = {};\n const config = model.config();\n const stack = model.stack();\n\n // TODO: support explicit value\n\n p.xc = x(model.encoding().x, model.scaleName(X), stack, config);\n\n p.yc = y(model.encoding().y, model.scaleName(Y), stack, config);\n\n if (config.mark.orient === Orient.HORIZONTAL) {\n p.width = size(model.encoding().size, model.scaleName(SIZE), config, (model.scale(X) || {}).bandSize);\n p.height = { value: config.mark.tickThickness };\n } else {\n p.width = { value: config.mark.tickThickness };\n p.height = size(model.encoding().size, model.scaleName(SIZE), config, (model.scale(Y) || {}).bandSize);\n }\n\n applyColorAndOpacity(p, model);\n return p;\n }\n\n function x(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // x\n if (fieldDef) {\n if (stack && X === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n } else if (fieldDef.value) {\n return {value: fieldDef.value};\n }\n }\n return { value: config.scale.bandSize / 2 };\n }\n\n function y(fieldDef: FieldDef, scaleName: string, stack: StackProperties, config: Config): VgValueRef {\n // y\n if (fieldDef) {\n if (stack && Y === stack.fieldChannel) {\n return {\n scale: scaleName,\n field: field(fieldDef, { suffix: 'end' })\n };\n } else if (fieldDef.field) {\n return {\n scale: scaleName,\n field: field(fieldDef, { binSuffix: 'mid' })\n };\n } else if (fieldDef.value) {\n return {value: fieldDef.value};\n }\n }\n return { value: config.scale.bandSize / 2 };\n }\n\n function size(fieldDef: FieldDef, scaleName: string, config: Config, scaleBandSize: number): VgValueRef {\n if (fieldDef) {\n if (fieldDef.field) {\n return {\n scale: scaleName,\n field: fieldDef.field\n };\n } else if (fieldDef.value !== undefined) {\n return { value: fieldDef.value };\n }\n }\n if (config.mark.tickSize) {\n return { value: config.mark.tickSize };\n }\n const bandSize = scaleBandSize !== undefined ?\n scaleBandSize :\n config.scale.bandSize;\n return { value: bandSize / 1.5 };\n }\n}\n",
"import {Axis} from '../axis';\nimport {Channel, X, COLUMN} from '../channel';\nimport {Config, CellConfig} from '../config';\nimport {Data, DataTable} from '../data';\nimport {channelMappingReduce, channelMappingForEach} from '../encoding';\nimport {FieldDef, FieldRefOption, field} from '../fielddef';\nimport {Legend} from '../legend';\nimport {Scale, ScaleType} from '../scale';\nimport {SortField, SortOrder} from '../sort';\nimport {BaseSpec} from '../spec';\nimport {Transform} from '../transform';\nimport {contains, extend, flatten, vals, warning, Dict} from '../util';\nimport {VgData, VgMarkGroup, VgScale, VgAxis, VgLegend} from '../vega.schema';\n\nimport {DataComponent} from './data/data';\nimport {LayoutComponent} from './layout';\nimport {ScaleComponents, COLOR_LEGEND, COLOR_LEGEND_LABEL} from './scale';\n\n/* tslint:disable:no-unused-variable */\n// These imports exist so the TS compiler can name publicly exported members in\n// The automatically created .d.ts correctly\nimport {Formula} from '../transform';\nimport {OneOfFilter, EqualFilter, RangeFilter} from '../filter';\n/* tslint:enable:no-unused-variable */\n\n/**\n * Composable Components that are intermediate results of the parsing phase of the\n * compilations. These composable components will be assembled in the last\n * compilation step.\n */\nexport interface Component {\n data: DataComponent;\n layout: LayoutComponent;\n scale: Dict<ScaleComponents>;\n\n /** Dictionary mapping channel to VgAxis definition */\n // TODO: if we allow multiple axes (e.g., dual axis), this will become VgAxis[]\n axis: Dict<VgAxis>;\n\n /** Dictionary mapping channel to VgLegend definition */\n legend: Dict<VgLegend>;\n\n /** Dictionary mapping channel to axis mark group for facet and concat */\n axisGroup: Dict<VgMarkGroup>;\n\n /** Dictionary mapping channel to grid mark group for facet (and concat?) */\n gridGroup: Dict<VgMarkGroup[]>;\n\n mark: VgMarkGroup[];\n}\n\nclass NameMap implements NameMapInterface {\n private _nameMap: Dict<string>;\n\n constructor() {\n this._nameMap = {} as Dict<string>;\n }\n\n public rename(oldName: string, newName: string) {\n this._nameMap[oldName] = newName;\n }\n\n\n public has(name: string): boolean {\n return this._nameMap[name] !== undefined;\n }\n\n public get(name: string): string {\n // If the name appears in the _nameMap, we need to read its new name.\n // We have to loop over the dict just in case the new name also gets renamed.\n while (this._nameMap[name]) {\n name = this._nameMap[name];\n }\n\n return name;\n }\n}\n\nexport interface NameMapInterface {\n rename(oldname: string, newName: string): void;\n has(name: string): boolean;\n get(name: string): string;\n}\n\nexport abstract class Model {\n protected _parent: Model;\n protected _name: string;\n protected _description: string;\n\n protected _data: Data;\n\n /** Name map for data sources, which can be renamed by a model's parent. */\n protected _dataNameMap: NameMapInterface;\n\n /** Name map for scales, which can be renamed by a model's parent. */\n protected _scaleNameMap: NameMapInterface;\n\n /** Name map for size, which can be renamed by a model's parent. */\n protected _sizeNameMap: NameMapInterface;\n\n protected _transform: Transform;\n protected _scale: Dict<Scale>;\n\n protected _axis: Dict<Axis>;\n\n protected _legend: Dict<Legend>;\n\n protected _config: Config;\n\n protected _warnings: string[] = [];\n\n public component: Component;\n\n constructor(spec: BaseSpec, parent: Model, parentGivenName: string) {\n this._parent = parent;\n\n // If name is not provided, always use parent's givenName to avoid name conflicts.\n this._name = spec.name || parentGivenName;\n\n // Shared name maps\n this._dataNameMap = parent ? parent._dataNameMap : new NameMap();\n this._scaleNameMap = parent ? parent._scaleNameMap : new NameMap();\n this._sizeNameMap = parent ? parent._sizeNameMap : new NameMap();\n\n this._data = spec.data;\n\n this._description = spec.description;\n this._transform = spec.transform;\n\n if (spec.transform) {\n if (spec.transform.filterInvalid === undefined &&\n spec.transform['filterNull'] !== undefined) {\n spec.transform.filterInvalid = spec.transform['filterNull'];\n console.warn('filterNull is deprecated. Please use filterInvalid instead.');\n }\n }\n\n this.component = {data: null, layout: null, mark: null, scale: null, axis: null, axisGroup: null, gridGroup: null, legend: null};\n }\n\n\n public parse() {\n this.parseData();\n this.parseSelectionData();\n this.parseLayoutData();\n this.parseScale(); // depends on data name\n this.parseAxis(); // depends on scale name\n this.parseLegend(); // depends on scale name\n this.parseAxisGroup(); // depends on child axis\n this.parseGridGroup();\n this.parseMark(); // depends on data name and scale name, axisGroup, gridGroup and children's scale, axis, legend and mark.\n }\n\n public abstract parseData();\n\n public abstract parseSelectionData();\n\n public abstract parseLayoutData();\n\n public abstract parseScale();\n\n public abstract parseMark();\n\n public abstract parseAxis();\n\n public abstract parseLegend();\n\n // TODO: revise if these two methods make sense for shared scale concat\n public abstract parseAxisGroup();\n public abstract parseGridGroup();\n\n\n public abstract assembleData(data: VgData[]): VgData[];\n\n public abstract assembleLayout(layoutData: VgData[]): VgData[];\n\n // TODO: for Arvind to write\n // public abstract assembleSelectionSignal(layoutData: VgData[]): VgData[];\n // public abstract assembleSelectionData(layoutData: VgData[]): VgData[];\n\n public assembleScales(): VgScale[] {\n // FIXME: write assembleScales() in scale.ts that\n // help assemble scale domains with scale signature as well\n return flatten(vals(this.component.scale).map((scales: ScaleComponents) => {\n let arr = [scales.main];\n if (scales.colorLegend) {\n arr.push(scales.colorLegend);\n }\n if (scales.binColorLegend) {\n arr.push(scales.binColorLegend);\n }\n return arr;\n }));\n }\n\n public abstract assembleMarks(): any[]; // TODO: VgMarkGroup[]\n\n public assembleAxes(): VgAxis[] {\n return vals(this.component.axis);\n }\n\n public assembleLegends(): any[] { // TODO: VgLegend[]\n return vals(this.component.legend);\n }\n\n public assembleGroup() {\n let group: VgMarkGroup = {};\n\n // TODO: consider if we want scales to come before marks in the output spec.\n\n group.marks = this.assembleMarks();\n const scales = this.assembleScales();\n if (scales.length > 0) {\n group.scales = scales;\n }\n\n const axes = this.assembleAxes();\n if (axes.length > 0) {\n group.axes = axes;\n }\n\n const legends = this.assembleLegends();\n if (legends.length > 0) {\n group.legends = legends;\n }\n\n return group;\n }\n\n public abstract assembleParentGroupProperties(cellConfig: CellConfig);\n\n public abstract channels(): Channel[];\n\n protected abstract mapping();\n\n public reduce(f: (acc: any, fd: FieldDef, c: Channel) => any, init, t?: any) {\n return channelMappingReduce(this.channels(), this.mapping(), f, init, t);\n }\n\n public forEach(f: (fd: FieldDef, c: Channel, i:number) => void, t?: any) {\n channelMappingForEach(this.channels(), this.mapping(), f, t);\n }\n\n public abstract has(channel: Channel): boolean;\n\n public parent(): Model {\n return this._parent;\n }\n\n public name(text: string, delimiter: string = '_') {\n return (this._name ? this._name + delimiter : '') + text;\n }\n\n public description() {\n return this._description;\n }\n\n public data() {\n return this._data;\n }\n\n public renameData(oldName: string, newName: string) {\n this._dataNameMap.rename(oldName, newName);\n }\n\n /**\n * Return the data source name for the given data source type.\n *\n * For unit spec, this is always simply the spec.name + '-' + dataSourceType.\n * We already use the name map so that marks and scales use the correct data.\n */\n public dataName(dataSourceType: DataTable): string {\n return this._dataNameMap.get(this.name(String(dataSourceType)));\n }\n\n public renameSize(oldName: string, newName: string) {\n this._sizeNameMap.rename(oldName, newName);\n }\n\n public channelSizeName(channel: Channel): string {\n return this.sizeName(channel === X || channel === COLUMN ? 'width' : 'height');\n }\n\n public sizeName(size: string): string {\n return this._sizeNameMap.get(this.name(size, '_'));\n }\n\n public abstract dataTable(): string;\n\n // TRANSFORMS\n public calculate() {\n return this._transform ? this._transform.calculate : undefined;\n }\n\n public filterInvalid() {\n const transform = this._transform || {};\n if (transform.filterInvalid === undefined) {\n return this.parent() ? this.parent().filterInvalid() : undefined;\n }\n return transform.filterInvalid;\n }\n\n public filter() {\n return this._transform ? this._transform.filter : undefined;\n }\n\n /** Get \"field\" reference for vega */\n public field(channel: Channel, opt: FieldRefOption = {}) {\n const fieldDef = this.fieldDef(channel);\n\n if (fieldDef.bin) { // bin has default suffix that depends on scaleType\n opt = extend({\n binSuffix: this.scale(channel).type === ScaleType.ORDINAL ? 'range' : 'start'\n }, opt);\n }\n\n return field(fieldDef, opt);\n }\n\n public abstract fieldDef(channel: Channel): FieldDef;\n\n public scale(channel: Channel): Scale {\n return this._scale[channel];\n }\n\n // TODO: rename to hasOrdinalScale\n public isOrdinalScale(channel: Channel) {\n const scale = this.scale(channel);\n return scale && scale.type === ScaleType.ORDINAL;\n }\n\n public renameScale(oldName: string, newName: string) {\n this._scaleNameMap.rename(oldName, newName);\n }\n\n\n /**\n * @return scale name for a given channel after the scale has been parsed and named.\n * (DO NOT USE THIS METHOD DURING SCALE PARSING, use model.name() instead)\n */\n public scaleName(originalScaleName: Channel|string, parse?: boolean): string {\n const channel = contains([COLOR_LEGEND, COLOR_LEGEND_LABEL], originalScaleName) ? 'color' : originalScaleName;\n\n if (parse) {\n // During the parse phase always return a value\n // No need to refer to rename map because a scale can't be renamed\n // before it has the original name.\n return this.name(originalScaleName + '');\n }\n\n // If there is a scale for the channel, it should either\n // be in the _scale mapping or exist in the name map\n if (\n // in the scale map (the scale is not merged by its parent)\n (this._scale && this._scale[channel]) ||\n // in the scale name map (the the scale get merged by its parent)\n this._scaleNameMap.has(this.name(originalScaleName + ''))\n ) {\n return this._scaleNameMap.get(this.name(originalScaleName + ''));\n }\n return undefined;\n }\n\n public sort(channel: Channel): SortField | SortOrder {\n return (this.mapping()[channel] || {}).sort;\n }\n\n public abstract stack();\n\n public axis(channel: Channel): Axis {\n return this._axis[channel];\n }\n\n public legend(channel: Channel): Legend {\n return this._legend[channel];\n }\n\n /**\n * Get the spec configuration.\n */\n public config(): Config {\n return this._config;\n }\n\n public addWarning(message: string) {\n warning(message);\n this._warnings.push(message);\n }\n\n public warnings(): string[] {\n return this._warnings;\n }\n\n /**\n * Type checks\n */\n public isUnit() {\n return false;\n }\n public isFacet() {\n return false;\n }\n public isLayer() {\n return false;\n }\n}\n",
"// https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#11-ambient-declarations\ndeclare var exports;\n\nimport {SHARED_DOMAIN_OPS} from '../aggregate';\nimport {COLUMN, ROW, X, Y, X2, Y2, SHAPE, SIZE, COLOR, OPACITY, TEXT, hasScale, Channel} from '../channel';\nimport {Orient} from '../config';\nimport {SOURCE, STACKED_SCALE} from '../data';\nimport {DateTime, isDateTime, timestamp} from '../datetime';\nimport {FieldDef, field, isMeasure} from '../fielddef';\nimport {Mark, BAR, TEXT as TEXTMARK, RULE, TICK} from '../mark';\nimport {Scale, ScaleConfig, ScaleType, NiceTime, BANDSIZE_FIT, BandSize} from '../scale';\nimport {isSortField, SortOrder} from '../sort';\nimport {StackOffset} from '../stack';\nimport {NOMINAL, ORDINAL, QUANTITATIVE, TEMPORAL} from '../type';\nimport {contains, extend, Dict} from '../util';\nimport {VgScale} from '../vega.schema';\n\nimport {Model} from './model';\nimport {defaultScaleType, imputedDomain, smallestUnit} from '../timeunit';\nimport {UnitModel} from './unit';\n\n/**\n * Color Ramp's scale for legends. This scale has to be ordinal so that its\n * legends show a list of numbers.\n */\nexport const COLOR_LEGEND = 'color_legend';\n\n// scale used to get labels for binned color scales\nexport const COLOR_LEGEND_LABEL = 'color_legend_label';\n\n\n// FIXME: With layer and concat, scaleComponent should decompose between\n// ScaleSignature and ScaleDomain[].\n// Basically, if two unit specs has the same scale, signature for a particular channel,\n// the scale can be unioned by combining the domain.\nexport type ScaleComponent = VgScale;\n\nexport type ScaleComponents = {\n main: ScaleComponent;\n colorLegend?: ScaleComponent,\n binColorLegend?: ScaleComponent\n}\n\nexport function parseScaleComponent(model: Model): Dict<ScaleComponents> {\n // TODO: should model.channels() inlcude X2/Y2?\n return model.channels().reduce(function(scale: Dict<ScaleComponents>, channel: Channel) {\n if (model.scale(channel)) {\n const fieldDef = model.fieldDef(channel);\n const scales: ScaleComponents = {\n main: parseMainScale(model, fieldDef, channel)\n };\n\n // Add additional scales needed to support ordinal legends (list of values)\n // for color ramp.\n if (channel === COLOR && model.legend(COLOR) && (fieldDef.type === ORDINAL || fieldDef.bin || fieldDef.timeUnit)) {\n scales.colorLegend = parseColorLegendScale(model, fieldDef);\n if (fieldDef.bin) {\n scales.binColorLegend = parseBinColorLegendLabel(model, fieldDef);\n }\n }\n\n scale[channel] = scales;\n }\n return scale;\n }, {} as Dict<ScaleComponents>);\n}\n\n/**\n * Return the main scale for each channel. (Only color can have multiple scales.)\n */\nfunction parseMainScale(model: Model, fieldDef: FieldDef, channel: Channel) {\n const scale = model.scale(channel);\n const sort = model.sort(channel);\n let scaleDef: any = {\n name: model.scaleName(channel + '', true),\n type: scale.type,\n };\n\n // If channel is either X or Y then union them with X2 & Y2 if they exist\n if (channel === X && model.has(X2)) {\n if (model.has(X)) {\n scaleDef.domain = { fields: [domain(scale, model, X), domain(scale, model, X2)] };\n } else {\n scaleDef.domain = domain(scale, model, X2);\n }\n } else if (channel === Y && model.has(Y2)) {\n if (model.has(Y)) {\n scaleDef.domain = { fields: [domain(scale, model, Y), domain(scale, model, Y2)] };\n } else {\n scaleDef.domain = domain(scale, model, Y2);\n }\n } else {\n scaleDef.domain = domain(scale, model, channel);\n }\n\n extend(scaleDef, rangeMixins(scale, model, channel));\n if (sort && (isSortField(sort) ? sort.order : sort) === SortOrder.DESCENDING) {\n scaleDef.reverse = true;\n }\n\n // Add optional properties\n [\n // general properties\n 'round',\n // quantitative / time\n 'clamp', 'nice',\n // quantitative\n 'exponent', 'zero',\n // ordinal\n 'points',\n 'padding' // padding depends on points\n ].forEach(function(property) {\n const value = exports[property](scale, channel, fieldDef, model, scaleDef);\n if (value !== undefined) {\n scaleDef[property] = value;\n }\n });\n\n return scaleDef;\n}\n\n/**\n * Return a scale for producing ordinal scale for legends.\n * - For an ordinal field, provide an ordinal scale that maps rank values to field value\n * - For a field with bin or timeUnit, provide an identity ordinal scale\n * (mapping the field values to themselves)\n */\nfunction parseColorLegendScale(model: Model, fieldDef: FieldDef): ScaleComponent {\n return {\n name: model.scaleName(COLOR_LEGEND, true),\n type: ScaleType.ORDINAL,\n domain: {\n data: model.dataTable(),\n // use rank_<field> for ordinal type, for bin and timeUnit use default field\n field: model.field(COLOR, (fieldDef.bin || fieldDef.timeUnit) ? {} : {prefix: 'rank'}),\n sort: true\n },\n range: {data: model.dataTable(), field: model.field(COLOR), sort: true}\n };\n}\n\n/**\n * Return an additional scale for bin labels because we need to map bin_start to bin_range in legends\n */\nfunction parseBinColorLegendLabel(model: Model, fieldDef: FieldDef): ScaleComponent {\n return {\n name: model.scaleName(COLOR_LEGEND_LABEL, true),\n type: ScaleType.ORDINAL,\n domain: {\n data: model.dataTable(),\n field: model.field(COLOR),\n sort: true\n },\n range: {\n data: model.dataTable(),\n field: field(fieldDef, {binSuffix: 'range'}),\n sort: {\n field: model.field(COLOR, { binSuffix: 'start' }),\n op: 'min' // min or max doesn't matter since same _range would have the same _start\n }\n }\n };\n}\n\nexport function scaleType(scale: Scale, fieldDef: FieldDef, channel: Channel, mark: Mark): ScaleType {\n if (!hasScale(channel)) {\n // There is no scale for these channels\n return null;\n }\n\n // We can't use linear/time for row, column or shape\n if (contains([ROW, COLUMN, SHAPE], channel)) {\n if (scale && scale.type !== undefined && scale.type !== ScaleType.ORDINAL) {\n // TODO: consolidate warning\n console.warn('Channel', channel, 'does not work with scale type =', scale.type);\n }\n return ScaleType.ORDINAL;\n }\n\n if (scale.type !== undefined) {\n return scale.type;\n }\n\n switch (fieldDef.type) {\n case NOMINAL:\n return ScaleType.ORDINAL;\n case ORDINAL:\n if (channel === COLOR) {\n return ScaleType.LINEAR; // time has order, so use interpolated ordinal color scale.\n }\n return ScaleType.ORDINAL;\n case TEMPORAL:\n if (channel === COLOR) {\n return ScaleType.TIME; // time has order, so use interpolated ordinal color scale.\n }\n\n if (fieldDef.timeUnit) {\n return defaultScaleType(fieldDef.timeUnit);\n }\n return ScaleType.TIME;\n\n case QUANTITATIVE:\n if (fieldDef.bin) {\n return contains([X, Y, COLOR], channel) ? ScaleType.LINEAR : ScaleType.ORDINAL;\n }\n return ScaleType.LINEAR;\n }\n\n // should never reach this\n return null;\n}\n\nexport function scaleBandSize(scaleType: ScaleType, bandSize: number | BandSize, scaleConfig: ScaleConfig, topLevelSize: number, mark: Mark, channel: Channel): number | BandSize {\n if (scaleType === ScaleType.ORDINAL) {\n if (topLevelSize === undefined) {\n\n if (bandSize) {\n // Use manually specified bandSize\n return bandSize;\n } else if (channel === X && mark === TEXTMARK) {\n return scaleConfig.textBandWidth;\n } else {\n return scaleConfig.bandSize;\n }\n } else {\n // If top-level is specified, use bandSize fit\n if (bandSize) {\n // If top-level size is specified, we override specified bandSize with \"fit\"\n console.warn('bandSize for', channel, 'overridden as top-level',\n channel === X ? 'width' : 'height', 'is provided.');\n }\n return BANDSIZE_FIT;\n }\n } else {\n // bandSize is not applicable for non-ordinal scale.\n return undefined;\n\n }\n}\n\nexport function domain(scale: Scale, model: Model, channel:Channel): any {\n const fieldDef = model.fieldDef(channel);\n\n if (scale.domain) { // explicit value\n if (isDateTime(scale.domain[0])) {\n return (scale.domain as DateTime[]).map((dt) => {\n return timestamp(dt, true);\n });\n }\n return scale.domain;\n }\n\n // special case for temporal scale\n if (fieldDef.type === TEMPORAL) {\n if (imputedDomain(fieldDef.timeUnit, channel)) {\n return {\n data: fieldDef.timeUnit,\n field: 'date'\n };\n }\n\n return {\n data: model.dataTable(),\n field: model.field(channel),\n sort: {\n field: model.field(channel),\n op: 'min'\n }\n };\n }\n\n // For stack, use STACKED data.\n const stack = model.stack();\n if (stack && channel === stack.fieldChannel) {\n if(stack.offset === StackOffset.NORMALIZE) {\n return [0, 1];\n }\n return {\n data: model.dataName(STACKED_SCALE),\n // STACKED_SCALE produces sum of the field's value e.g., sum of sum, sum of distinct\n field: model.field(channel, {prefix: 'sum'})\n };\n }\n\n const useRawDomain = _useRawDomain(scale, model, channel),\n sort = domainSort(model, channel, scale.type);\n\n if (useRawDomain) { // useRawDomain - only Q/T\n return {\n data: SOURCE,\n field: model.field(channel, {noAggregate: true})\n };\n } else if (fieldDef.bin) { // bin\n if (scale.type === ScaleType.ORDINAL) {\n // ordinal bin scale takes domain from bin_range, ordered by bin_start\n return {\n data: model.dataTable(),\n field: model.field(channel, { binSuffix: 'range' }),\n sort: {\n field: model.field(channel, { binSuffix: 'start' }),\n op: 'min' // min or max doesn't matter since same _range would have the same _start\n }\n };\n } else if (channel === COLOR) {\n // Currently, binned on color uses linear scale and thus use _start point\n return {\n data: model.dataTable(),\n field: model.field(channel, { binSuffix: 'start' })\n };\n } else {\n // other linear bin scale merges both bin_start and bin_end for non-ordinal scale\n return {\n data: model.dataTable(),\n field: [\n model.field(channel, { binSuffix: 'start' }),\n model.field(channel, { binSuffix: 'end' })\n ]\n };\n }\n } else if (sort) { // have sort -- only for ordinal\n return {\n // If sort by aggregation of a specified sort field, we need to use SOURCE table,\n // so we can aggregate values for the scale independently from the main aggregation.\n data: sort.op ? SOURCE : model.dataTable(),\n field: (fieldDef.type === ORDINAL && channel === COLOR) ? model.field(channel, {prefix: 'rank'}) : model.field(channel),\n sort: sort\n };\n } else {\n return {\n data: model.dataTable(),\n field: (fieldDef.type === ORDINAL && channel === COLOR) ? model.field(channel, {prefix: 'rank'}) : model.field(channel),\n };\n }\n}\n\nexport function domainSort(model: Model, channel: Channel, scaleType: ScaleType): any {\n if (scaleType !== ScaleType.ORDINAL) {\n return undefined;\n }\n\n const sort = model.sort(channel);\n\n // Sorted based on an aggregate calculation over a specified sort field (only for ordinal scale)\n if (isSortField(sort)) {\n return {\n op: sort.op,\n field: sort.field\n };\n }\n\n if (contains([SortOrder.ASCENDING, SortOrder.DESCENDING, undefined /* default =ascending*/], sort)) {\n return true;\n }\n\n // sort === 'none'\n return undefined;\n}\n\n\n/**\n * Determine if useRawDomain should be activated for this scale.\n * @return {Boolean} Returns true if all of the following conditons applies:\n * 1. `useRawDomain` is enabled either through scale or config\n * 2. Aggregation function is not `count` or `sum`\n * 3. The scale is quantitative or time scale.\n */\nfunction _useRawDomain (scale: Scale, model: Model, channel: Channel) {\n const fieldDef = model.fieldDef(channel);\n\n return scale.useRawDomain && // if useRawDomain is enabled\n // only applied to aggregate table\n fieldDef.aggregate &&\n // only activated if used with aggregate functions that produces values ranging in the domain of the source data\n SHARED_DOMAIN_OPS.indexOf(fieldDef.aggregate) >= 0 &&\n (\n // Q always uses quantitative scale except when it's binned.\n // Binned field has similar values in both the source table and the summary table\n // but the summary table has fewer values, therefore binned fields draw\n // domain values from the summary table.\n // Meanwhile, we rely on non-positive filter inside summary data source, thus\n // we can't use raw domain to feed into log scale\n // FIXME(https://github.com/vega/vega-lite/issues/1537):\n // consider allowing useRawDomain for log scale once we reimplement data sources\n (fieldDef.type === QUANTITATIVE && !fieldDef.bin && scale.type !== ScaleType.LOG) ||\n // T uses non-ordinal scale when there's no unit or when the unit is not ordinal.\n (fieldDef.type === TEMPORAL && contains([ScaleType.TIME, ScaleType.UTC], scale.type))\n );\n}\n\n\nexport function rangeMixins(scale: Scale, model: Model, channel: Channel): any {\n // TODO: need to add rule for quantile, quantize, threshold scale\n\n const fieldDef = model.fieldDef(channel);\n const scaleConfig = model.config().scale;\n\n if (scale.type === ScaleType.ORDINAL && scale.bandSize && scale.bandSize !== BANDSIZE_FIT && contains([X, Y], channel)) {\n return {bandSize: scale.bandSize};\n }\n\n if (scale.range && !contains([X, Y, ROW, COLUMN], channel)) {\n // explicit value (Do not allow explicit values for X, Y, ROW, COLUMN)\n return {range: scale.range};\n }\n switch (channel) {\n case ROW:\n return {range: 'height'};\n case COLUMN:\n return {range: 'width'};\n }\n\n // If not ROW / COLUMN, we can assume that this is a unit spec.\n const unitModel = model as UnitModel;\n switch (channel) {\n case X:\n // we can't use {range: \"width\"} here since we put scale in the root group\n // not inside the cell, so scale is reusable for axes group\n\n return {\n rangeMin: 0,\n // TODO: replace\n rangeMax: unitModel.width // Fixed cell width for non-ordinal\n };\n case Y:\n return {\n // TODO: replace\n rangeMin: unitModel.height, // Fixed cell height for non-ordinal\n rangeMax: 0\n };\n case SIZE:\n\n if (unitModel.mark() === BAR) {\n if (scaleConfig.barSizeRange !== undefined) {\n return {range: scaleConfig.barSizeRange};\n }\n const dimension = model.config().mark.orient === Orient.HORIZONTAL ? Y : X;\n return {range: [model.config().mark.barThinSize, model.scale(dimension).bandSize]};\n } else if (unitModel.mark() === TEXTMARK) {\n return {range: scaleConfig.fontSizeRange };\n } else if (unitModel.mark() === RULE) {\n return {range: scaleConfig.ruleSizeRange };\n } else if (unitModel.mark() === TICK) {\n return {range: scaleConfig.tickSizeRange };\n }\n // else -- point, square, circle\n if (scaleConfig.pointSizeRange !== undefined) {\n return {range: scaleConfig.pointSizeRange};\n }\n\n const bandSize = pointBandSize(unitModel);\n\n return {range: [9, (bandSize - 2) * (bandSize - 2)]};\n case SHAPE:\n return {range: scaleConfig.shapeRange};\n case COLOR:\n if (fieldDef.type === NOMINAL) {\n return {range: scaleConfig.nominalColorRange};\n }\n // else -- ordinal, time, or quantitative\n return {range: scaleConfig.sequentialColorRange};\n case OPACITY:\n return {range: scaleConfig.opacity};\n }\n return {};\n}\n\nfunction pointBandSize(model: UnitModel) {\n const scaleConfig = model.config().scale;\n\n const hasX = model.has(X);\n const hasY = model.has(Y);\n\n const xIsMeasure = isMeasure(model.encoding().x);\n const yIsMeasure = isMeasure(model.encoding().y);\n\n if (hasX && hasY) {\n return xIsMeasure !== yIsMeasure ?\n model.scale(xIsMeasure ? Y : X).bandSize :\n Math.min(\n model.scale(X).bandSize || scaleConfig.bandSize,\n model.scale(Y).bandSize || scaleConfig.bandSize\n );\n } else if (hasY) {\n return yIsMeasure ? model.config().scale.bandSize : model.scale(Y).bandSize;\n } else if (hasX) {\n return xIsMeasure ? model.config().scale.bandSize : model.scale(X).bandSize;\n }\n return model.config().scale.bandSize;\n}\n\nexport function clamp(scale: Scale) {\n // Only works for scale with both continuous domain continuous range\n // (Doesn't work for quantize, quantile, threshold, ordinal)\n if (contains([ScaleType.LINEAR, ScaleType.POW, ScaleType.SQRT,\n ScaleType.LOG, ScaleType.TIME, ScaleType.UTC], scale.type)) {\n return scale.clamp;\n }\n return undefined;\n}\n\nexport function exponent(scale: Scale) {\n if (scale.type === ScaleType.POW) {\n return scale.exponent;\n }\n return undefined;\n}\n\nexport function nice(scale: Scale, channel: Channel, fieldDef: FieldDef): boolean | NiceTime {\n if (contains([ScaleType.LINEAR, ScaleType.POW, ScaleType.SQRT, ScaleType.LOG,\n ScaleType.TIME, ScaleType.UTC, ScaleType.QUANTIZE], scale.type)) {\n\n if (scale.nice !== undefined) {\n return scale.nice;\n }\n if (contains([ScaleType.TIME, ScaleType.UTC], scale.type)) {\n return smallestUnit(fieldDef.timeUnit) as any;\n }\n return contains([X, Y], channel); // return true for quantitative X/Y\n }\n return undefined;\n}\n\n\nexport function padding(scale: Scale, channel: Channel, __, ___, scaleDef) {\n /* Padding is only allowed for X and Y.\n *\n * Basically it doesn't make sense to add padding for color and size.\n *\n * We do not use d3 scale's padding for row/column because padding there\n * is a ratio ([0, 1]) and it causes the padding to be decimals.\n * Therefore, we manually calculate padding in the layout by ourselves.\n */\n if (scale.type === ScaleType.ORDINAL && contains([X, Y], channel)) {\n // TODO: design config for this\n return scaleDef.points ? 1 : scale.padding;\n }\n return undefined;\n}\n\nexport function points(scale: Scale, channel: Channel, __, model: Model) {\n if (scale.type === ScaleType.ORDINAL && contains([X, Y], channel)) {\n // We always use ordinal point scale for x and y except when the mark is bar and the scale's bandWidth is 'fit'\n // Thus `points` isn't included in the scale's schema.\n return (model as UnitModel).mark() === BAR && scale.bandSize === BANDSIZE_FIT ? undefined : true;\n }\n return undefined;\n}\n\nexport function round(scale: Scale, channel: Channel) {\n if (contains([X, Y, ROW, COLUMN, SIZE], channel) && scale.round !== undefined) {\n return scale.round;\n }\n\n return undefined;\n}\n\nexport function zero(scale: Scale, channel: Channel, fieldDef: FieldDef) {\n // only applicable for non-ordinal scale\n if (!contains([ScaleType.TIME, ScaleType.UTC, ScaleType.ORDINAL], scale.type)) {\n if (scale.zero !== undefined) {\n return scale.zero;\n }\n // By default, return true only for non-binned, quantitative x-scale or y-scale\n // If no custom domain is provided.\n return !scale.domain && !fieldDef.bin && contains([X, Y], channel);\n }\n return undefined;\n}\n",
"import {AggregateOp} from '../aggregate';\nimport {Axis} from '../axis';\nimport {X, Y, X2, Y2, TEXT, PATH, ORDER, Channel, UNIT_CHANNELS, UNIT_SCALE_CHANNELS, NONSPATIAL_SCALE_CHANNELS, supportMark} from '../channel';\nimport {defaultConfig, Config, CellConfig} from '../config';\nimport {SOURCE, SUMMARY} from '../data';\nimport {Encoding} from '../encoding';\nimport * as vlEncoding from '../encoding'; // TODO: remove\nimport {FieldDef, FieldRefOption, field} from '../fielddef';\nimport {Legend} from '../legend';\nimport {Mark, TEXT as TEXTMARK} from '../mark';\nimport {BANDSIZE_FIT, Scale, ScaleConfig, ScaleType} from '../scale';\nimport {ExtendedUnitSpec} from '../spec';\nimport {getFullName, QUANTITATIVE} from '../type';\nimport {duplicate, extend, mergeDeep, Dict} from '../util';\nimport {VgData} from '../vega.schema';\n\nimport {parseAxisComponent} from './axis';\nimport {applyConfig, FILL_STROKE_CONFIG} from './common';\nimport {initMarkConfig} from './config';\nimport {assembleData, parseUnitData} from './data/data';\nimport {parseLegendComponent} from './legend';\nimport {assembleLayout, parseUnitLayout} from './layout';\nimport {Model} from './model';\nimport {parseMark} from './mark/mark';\nimport {parseScaleComponent, scaleBandSize, scaleType} from './scale';\nimport {stack, StackProperties} from '../stack';\n\n/**\n * Internal model of Vega-Lite specification for the compiler.\n */\nexport class UnitModel extends Model {\n /**\n * Fixed width for the unit visualization.\n * If undefined (e.g., for ordinal scale), the width of the\n * visualization will be calculated dynamically.\n */\n private _width: number;\n\n /**\n * Fixed height for the unit visualization.\n * If undefined (e.g., for ordinal scale), the height of the\n * visualization will be calculated dynamically.\n */\n private _height: number;\n\n private _mark: Mark;\n private _encoding: Encoding;\n private _stack: StackProperties;\n\n constructor(spec: ExtendedUnitSpec, parent: Model, parentGivenName: string) {\n super(spec, parent, parentGivenName);\n\n // use top-level width / height or parent's top-level width / height\n const providedWidth = spec.width !== undefined ? spec.width :\n parent ? parent['width'] : undefined; // only exists if parent is layer\n const providedHeight = spec.height !== undefined ? spec.height :\n parent ? parent['height'] : undefined; // only exists if parent is layer\n\n const mark = this._mark = spec.mark;\n const encoding = this._encoding = this._initEncoding(mark, spec.encoding || {});\n\n this._stack = stack(mark, encoding, ((spec.config || {}).mark || {}).stacked);\n const config = this._config = this._initConfig(spec.config, parent, mark, encoding, this._stack);\n\n this._scale = this._initScale(mark, encoding, config, providedWidth, providedHeight);\n this._axis = this._initAxis(encoding, config);\n this._legend = this._initLegend(encoding, config);\n\n // width / height\n this._initSize(mark, this._scale,\n providedWidth,\n providedHeight,\n config.cell, config.scale\n );\n\n // calculate stack properties\n\n }\n\n private _initEncoding(mark: Mark, encoding: Encoding) {\n // clone to prevent side effect to the original spec\n encoding = duplicate(encoding);\n\n vlEncoding.forEach(encoding, function(fieldDef: FieldDef, channel: Channel) {\n if (!supportMark(channel, mark)) {\n // Drop unsupported channel\n\n // FIXME consolidate warning method\n console.warn(channel, 'dropped as it is incompatible with', mark);\n delete fieldDef.field;\n return;\n }\n\n if (fieldDef.type) {\n // convert short type to full type\n fieldDef.type = getFullName(fieldDef.type);\n }\n\n if ((channel === PATH || channel === ORDER) && !fieldDef.aggregate && fieldDef.type === QUANTITATIVE) {\n fieldDef.aggregate = AggregateOp.MIN;\n }\n });\n return encoding;\n }\n\n private _initConfig(specConfig: Config, parent: Model, mark: Mark, encoding: Encoding, stack: StackProperties) {\n let config = mergeDeep(duplicate(defaultConfig), parent ? parent.config() : {}, specConfig);\n let hasFacetParent = false;\n while (parent !== null) {\n if (parent.isFacet()) {\n hasFacetParent = true;\n break;\n }\n parent = parent.parent();\n }\n\n if (hasFacetParent) {\n config.cell = extend({}, config.cell, config.facet.cell);\n }\n\n config.mark = initMarkConfig(mark, encoding, stack, config);\n return config;\n }\n\n private _initScale(mark: Mark, encoding: Encoding, config: Config, topLevelWidth:number, topLevelHeight: number): Dict<Scale> {\n return UNIT_SCALE_CHANNELS.reduce(function(_scale, channel) {\n if (vlEncoding.has(encoding, channel) ||\n (channel === X && vlEncoding.has(encoding, X2)) ||\n (channel === Y && vlEncoding.has(encoding, Y2))\n ) {\n\n const channelDef = encoding[channel];\n const scaleSpec = (channelDef || {}).scale || {};\n const _scaleType = scaleType(scaleSpec, channelDef, channel, mark);\n\n var scale = _scale[channel] = extend({\n type: _scaleType,\n round: config.scale.round,\n padding: config.scale.padding,\n useRawDomain: config.scale.useRawDomain\n }, scaleSpec);\n\n // bandSize depends on top-level size (width/height) and scale type\n // If top-level size is specified, we override specified bandSize with \"fit\".\n scale.bandSize = scaleBandSize(scale.type, scale.bandSize, config.scale, channel === X ? topLevelWidth : topLevelHeight, mark, channel);\n }\n return _scale;\n }, {} as Dict<Scale>);\n }\n\n private _initSize(mark: Mark, scale: Dict<Scale>, width: number, height: number, cellConfig: CellConfig, scaleConfig: ScaleConfig) {\n if (width !== undefined) {\n this._width = width;\n } else if (scale[X]) {\n if (scale[X].type !== ScaleType.ORDINAL || scale[X].bandSize === BANDSIZE_FIT) {\n this._width = cellConfig.width;\n } // else: Do nothing, use dynamic width.\n } else { // No scale X\n if (mark === TEXTMARK) {\n // for text table without x/y scale we need wider bandSize\n this._width = scaleConfig.textBandWidth;\n } else {\n this._width = scaleConfig.bandSize;\n }\n }\n\n if (height !== undefined) {\n this._height = height;\n } else if (scale[Y]) {\n if (scale[Y].type !== ScaleType.ORDINAL || scale[Y].bandSize === BANDSIZE_FIT) {\n this._height = cellConfig.height;\n } // else: Do nothing, use dynamic height .\n } else {\n this._height = scaleConfig.bandSize;\n }\n }\n\n private _initAxis(encoding: Encoding, config: Config): Dict<Axis> {\n return [X, Y].reduce(function(_axis, channel) {\n // Position Axis\n if (vlEncoding.has(encoding, channel) ||\n (channel === X && vlEncoding.has(encoding, X2)) ||\n (channel === Y && vlEncoding.has(encoding, Y2))) {\n\n const axisSpec = (encoding[channel] || {}).axis;\n\n // We no longer support false in the schema, but we keep false here for backward compatability.\n if (axisSpec !== null && axisSpec !== false) {\n _axis[channel] = extend({},\n config.axis,\n axisSpec === true ? {} : axisSpec || {}\n );\n }\n }\n return _axis;\n }, {} as Dict<Axis>);\n }\n\n private _initLegend(encoding: Encoding, config: Config): Dict<Legend> {\n return NONSPATIAL_SCALE_CHANNELS.reduce(function(_legend, channel) {\n if (vlEncoding.has(encoding, channel)) {\n const legendSpec = encoding[channel].legend;\n // We no longer support false in the schema, but we keep false here for backward compatability.\n if (legendSpec !== null && legendSpec !== false) {\n _legend[channel] = extend({}, config.legend,\n legendSpec === true ? {} : legendSpec || {}\n );\n }\n }\n return _legend;\n }, {} as Dict<Legend>);\n }\n\n public get width(): number {\n return this._width;\n }\n\n public get height(): number {\n return this._height;\n }\n\n public parseData() {\n this.component.data = parseUnitData(this);\n }\n\n public parseSelectionData() {\n // TODO: @arvind can write this\n // We might need to split this into compileSelectionData and compileSelectionSignals?\n }\n\n public parseLayoutData() {\n this.component.layout = parseUnitLayout(this);\n }\n\n public parseScale() {\n this.component.scale = parseScaleComponent(this);\n }\n\n public parseMark() {\n this.component.mark = parseMark(this);\n }\n\n public parseAxis() {\n this.component.axis = parseAxisComponent(this, [X, Y]);\n }\n\n public parseAxisGroup() {\n return null;\n }\n\n public parseGridGroup() {\n return null;\n }\n\n public parseLegend() {\n this.component.legend = parseLegendComponent(this);\n }\n\n public assembleData(data: VgData[]): VgData[] {\n return assembleData(this, data);\n }\n\n public assembleLayout(layoutData: VgData[]): VgData[] {\n return assembleLayout(this, layoutData);\n }\n\n public assembleMarks() {\n return this.component.mark;\n }\n\n public assembleParentGroupProperties(cellConfig: CellConfig) {\n return applyConfig({}, cellConfig, FILL_STROKE_CONFIG.concat(['clip']));\n }\n\n public channels() {\n return UNIT_CHANNELS;\n }\n\n protected mapping() {\n return this.encoding();\n }\n\n public stack(): StackProperties {\n return this._stack;\n }\n\n public toSpec(excludeConfig?, excludeData?) {\n const encoding = duplicate(this._encoding);\n let spec: any;\n\n spec = {\n mark: this._mark,\n encoding: encoding\n };\n\n if (!excludeConfig) {\n spec.config = duplicate(this._config);\n }\n\n if (!excludeData) {\n spec.data = duplicate(this._data);\n }\n\n // remove defaults\n return spec;\n }\n\n public mark(): Mark {\n return this._mark;\n }\n\n public has(channel: Channel) {\n return vlEncoding.has(this._encoding, channel);\n }\n\n public encoding() {\n return this._encoding;\n }\n\n public fieldDef(channel: Channel): FieldDef {\n // TODO: remove this || {}\n // Currently we have it to prevent null pointer exception.\n return this._encoding[channel] || {};\n }\n\n /** Get \"field\" reference for vega */\n public field(channel: Channel, opt: FieldRefOption = {}) {\n const fieldDef = this.fieldDef(channel);\n\n if (fieldDef.bin) { // bin has default suffix that depends on scaleType\n opt = extend({\n binSuffix: this.scale(channel).type === ScaleType.ORDINAL ? 'range' : 'start'\n }, opt);\n }\n\n return field(fieldDef, opt);\n }\n\n public dataTable() {\n return this.dataName(vlEncoding.isAggregate(this._encoding) ? SUMMARY : SOURCE);\n }\n\n public isUnit() {\n return true;\n }\n}\n",
"import {ScaleConfig, FacetScaleConfig, defaultScaleConfig, defaultFacetScaleConfig} from './scale';\nimport {AxisConfig, defaultAxisConfig, defaultFacetAxisConfig} from './axis';\nimport {LegendConfig, defaultLegendConfig} from './legend';\nimport {StackOffset} from './stack';\n\nexport interface CellConfig {\n width?: number;\n height?: number;\n\n clip?: boolean;\n\n // FILL_STROKE_CONFIG\n /**\n * The fill color.\n * @format color\n */\n fill?: string;\n\n /** The fill opacity (value between [0,1]). */\n fillOpacity?: number;\n\n /** The stroke color. */\n stroke?: string;\n\n /** The stroke opacity (value between [0,1]). */\n strokeOpacity?: number;\n\n /** The stroke width, in pixels. */\n strokeWidth?: number;\n\n /** An array of alternating stroke, space lengths for creating dashed or dotted lines. */\n strokeDash?: number[];\n\n /** The offset (in pixels) into which to begin drawing with the stroke dash array. */\n strokeDashOffset?: number;\n}\n\nexport const defaultCellConfig: CellConfig = {\n width: 200,\n height: 200\n};\n\nexport const defaultFacetCellConfig: CellConfig = {\n stroke: '#ccc',\n strokeWidth: 1\n};\n\nexport interface FacetConfig {\n /** Facet Scale Config */\n scale?: FacetScaleConfig;\n\n /** Facet Axis Config */\n axis?: AxisConfig;\n\n /** Facet Grid Config */\n grid?: FacetGridConfig;\n\n /** Facet Cell Config */\n cell?: CellConfig;\n}\n\nexport interface FacetGridConfig {\n /** @format color */\n color?: string;\n opacity?: number;\n offset?: number;\n}\n\nconst defaultFacetGridConfig: FacetGridConfig = {\n color: '#000000',\n opacity: 0.4,\n offset: 0\n};\n\nexport const defaultFacetConfig: FacetConfig = {\n scale: defaultFacetScaleConfig,\n axis: defaultFacetAxisConfig,\n grid: defaultFacetGridConfig,\n cell: defaultFacetCellConfig\n};\n\nexport enum FontWeight {\n NORMAL = 'normal' as any,\n BOLD = 'bold' as any\n}\n\nexport enum Shape {\n CIRCLE = 'circle' as any,\n SQUARE = 'square' as any,\n CROSS = 'cross' as any,\n DIAMOND = 'diamond' as any,\n TRIANGLEUP = 'triangle-up' as any,\n TRIANGLEDOWN = 'triangle-down' as any,\n}\n\nexport enum Orient {\n HORIZONTAL = 'horizontal' as any,\n VERTICAL = 'vertical' as any\n}\n\nexport enum HorizontalAlign {\n LEFT = 'left' as any,\n RIGHT = 'right' as any,\n CENTER = 'center' as any,\n}\n\nexport enum VerticalAlign {\n TOP = 'top' as any,\n MIDDLE = 'middle' as any,\n BOTTOM = 'bottom' as any,\n}\n\nexport enum FontStyle {\n NORMAL = 'normal' as any,\n ITALIC = 'italic' as any,\n}\n\nexport enum Interpolate {\n /** piecewise linear segments, as in a polyline */\n LINEAR = 'linear' as any,\n /** close the linear segments to form a polygon */\n LINEAR_CLOSED = 'linear-closed' as any,\n /** alternate between horizontal and vertical segments, as in a step function */\n STEP = 'step' as any,\n /** alternate between vertical and horizontal segments, as in a step function */\n STEP_BEFORE = 'step-before' as any,\n /** alternate between horizontal and vertical segments, as in a step function */\n STEP_AFTER = 'step-after' as any,\n /** a B-spline, with control point duplication on the ends */\n BASIS = 'basis' as any,\n /** an open B-spline; may not intersect the start or end */\n BASIS_OPEN = 'basis-open' as any,\n /** a closed B-spline, as in a loop */\n BASIS_CLOSED = 'basis-closed' as any,\n /** a Cardinal spline, with control point duplication on the ends */\n CARDINAL = 'cardinal' as any,\n /** an open Cardinal spline; may not intersect the start or end, but will intersect other control points */\n CARDINAL_OPEN = 'cardinal-open' as any,\n /** a closed Cardinal spline, as in a loop */\n CARDINAL_CLOSED = 'cardinal-closed' as any,\n /** equivalent to basis, except the tension parameter is used to straighten the spline */\n BUNDLE = 'bundle' as any,\n /** cubic interpolation that preserves monotonicity in y */\n MONOTONE = 'monotone' as any,\n}\n\nexport enum AreaOverlay {\n LINE = 'line' as any,\n LINEPOINT = 'linepoint' as any,\n NONE = 'none' as any\n}\n\nexport interface OverlayConfig {\n /**\n * Whether to overlay line with point.\n */\n line?: boolean;\n\n /**\n * Type of overlay for area mark (line or linepoint)\n */\n area?: AreaOverlay;\n\n /**\n * Default style for the overlayed point.\n */\n pointStyle?: MarkConfig;\n\n /**\n * Default style for the overlayed point.\n */\n lineStyle?: MarkConfig;\n}\n\nexport const defaultOverlayConfig: OverlayConfig = {\n line: false,\n pointStyle: {filled: true},\n lineStyle: {}\n};\n\nexport interface MarkConfig {\n\n // ---------- Color ----------\n /**\n * Whether the shape\\'s color should be used as fill color instead of stroke color.\n * This is only applicable for \"bar\", \"point\", and \"area\".\n * All marks except \"point\" marks are filled by default.\n * See Mark Documentation (http://vega.github.io/vega-lite/docs/marks.html)\n * for usage example.\n */\n filled?: boolean;\n\n /**\n * Default color.\n * @format color\n */\n color?: string;\n\n /**\n * Default Fill Color. This has higher precedence than config.color\n * @format color\n */\n fill?: string;\n\n /**\n * Default Stroke Color. This has higher precedence than config.color\n * @format color\n */\n stroke?: string;\n\n // ---------- Opacity ----------\n /**\n * @minimum 0\n * @maximum 1\n */\n opacity?: number;\n\n /**\n * @minimum 0\n * @maximum 1\n */\n fillOpacity?: number;\n\n /**\n * @minimum 0\n * @maximum 1\n */\n strokeOpacity?: number;\n\n // ---------- Stroke Style ----------\n /**\n * @minimum 0\n */\n strokeWidth?: number;\n\n /**\n * An array of alternating stroke, space lengths for creating dashed or dotted lines.\n */\n strokeDash?: number[];\n\n /**\n * The offset (in pixels) into which to begin drawing with the stroke dash array.\n */\n strokeDashOffset?: number;\n\n // ---------- Stacking: Bar & Area ----------\n stacked?: StackOffset;\n\n // ---------- Orientation: Bar, Tick, Line, Area ----------\n /**\n * The orientation of a non-stacked bar, tick, area, and line charts.\n * The value is either horizontal (default) or vertical.\n * - For bar, rule and tick, this determines whether the size of the bar and tick\n * should be applied to x or y dimension.\n * - For area, this property determines the orient property of the Vega output.\n * - For line, this property determines the sort order of the points in the line\n * if `config.sortLineBy` is not specified.\n * For stacked charts, this is always determined by the orientation of the stack;\n * therefore explicitly specified value will be ignored.\n */\n orient?: Orient;\n\n // ---------- Interpolation: Line / area ----------\n /**\n * The line interpolation method to use. One of linear, step-before, step-after, basis, basis-open, cardinal, cardinal-open, monotone.\n */\n interpolate?: Interpolate;\n /**\n * Depending on the interpolation type, sets the tension parameter.\n */\n tension?: number;\n\n // ---------- Line ---------\n /**\n * Size of line mark.\n */\n lineSize?: number;\n\n // ---------- Rule ---------\n /**\n * Size of rule mark.\n */\n ruleSize?: number;\n\n // ---------- Bar ----------\n /**\n * The size of the bars. If unspecified, the default size is `bandSize-1`,\n * which provides 1 pixel offset between bars.\n */\n barSize?: number;\n\n /**\n * The size of the bars on continuous scales.\n */\n barThinSize?: number;\n\n // ---------- Point ----------\n /**\n * The symbol shape to use. One of circle (default), square, cross, diamond, triangle-up, or triangle-down, or a custom SVG path.\n */\n shape?: Shape | string;\n\n // ---------- Point Size (Point / Square / Circle) ----------\n /**\n * The pixel area each the point. For example: in the case of circles, the radius is determined in part by the square root of the size value.\n */\n size?: number;\n\n // ---------- Tick ----------\n /** The width of the ticks. */\n tickSize?: number;\n\n /** Thickness of the tick mark. */\n tickThickness?: number;\n\n // ---------- Text ----------\n /**\n * The horizontal alignment of the text. One of left, right, center.\n */\n align?: HorizontalAlign;\n /**\n * The rotation angle of the text, in degrees.\n */\n angle?: number;\n /**\n * The vertical alignment of the text. One of top, middle, bottom.\n */\n baseline?: VerticalAlign;\n /**\n * The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.\n */\n dx?: number;\n /**\n * The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.\n */\n dy?: number;\n /**\n * Polar coordinate radial offset, in pixels, of the text label from the origin determined by the x and y properties.\n */\n radius?: number;\n /**\n * Polar coordinate angle, in radians, of the text label from the origin determined by the x and y properties. Values for theta follow the same convention of arc mark startAngle and endAngle properties: angles are measured in radians, with 0 indicating \"north\".\n */\n theta?: number;\n /**\n * The typeface to set the text in (e.g., Helvetica Neue).\n */\n font?: string;\n /**\n * The font size, in pixels.\n */\n fontSize?: number;\n /**\n * The font style (e.g., italic).\n */\n fontStyle?: FontStyle;\n /**\n * The font weight (e.g., bold).\n */\n fontWeight?: FontWeight;\n // Vega-Lite only for text only\n /**\n * The formatting pattern for text value. If not defined, this will be determined automatically.\n */\n format?: string;\n /**\n * Whether month names and weekday names should be abbreviated.\n */\n shortTimeLabels?: boolean;\n /**\n * Placeholder Text\n */\n text?: string;\n\n /**\n * Apply color field to background color instead of the text.\n */\n applyColorToBackground?: boolean;\n}\n\nexport const defaultMarkConfig: MarkConfig = {\n color: '#4682b4',\n shape: Shape.CIRCLE,\n strokeWidth: 2,\n size: 30,\n barThinSize: 2,\n // lineSize is undefined by default, and refer to value from strokeWidth\n ruleSize: 1,\n tickThickness: 1,\n\n fontSize: 10,\n baseline: VerticalAlign.MIDDLE,\n text: 'Abc',\n\n applyColorToBackground: false\n};\n\n\nexport interface Config {\n // TODO: add this back once we have top-down layout approach\n // width?: number;\n // height?: number;\n // padding?: number|string;\n /**\n * The width and height of the on-screen viewport, in pixels. If necessary, clipping and scrolling will be applied.\n */\n viewport?: number;\n /**\n * CSS color property to use as background of visualization. Default is `\"transparent\"`.\n */\n background?: string;\n\n /**\n * D3 Number format for axis labels and text tables. For example \"s\" for SI units.\n */\n numberFormat?: string;\n\n /**\n * Default datetime format for axis and legend labels. The format can be set directly on each axis and legend.\n */\n timeFormat?: string;\n\n /**\n * Default axis and legend title for count fields.\n * @type {string}\n */\n countTitle?: string;\n\n /** Cell Config */\n cell?: CellConfig;\n\n /** Mark Config */\n mark?: MarkConfig;\n\n /** Mark Overlay Config */\n overlay?: OverlayConfig;\n\n /** Scale Config */\n scale?: ScaleConfig;\n\n /** Axis Config */\n axis?: AxisConfig;\n\n /** Legend Config */\n legend?: LegendConfig;\n\n /** Facet Config */\n facet?: FacetConfig;\n}\n\nexport const defaultConfig: Config = {\n numberFormat: 's',\n timeFormat: '%b %d, %Y',\n countTitle: 'Number of Records',\n\n cell: defaultCellConfig,\n mark: defaultMarkConfig,\n overlay: defaultOverlayConfig,\n scale: defaultScaleConfig,\n axis: defaultAxisConfig,\n legend: defaultLegendConfig,\n\n facet: defaultFacetConfig,\n};\n",
"/*\n * Constants and utilities for data.\n */\nimport {Type} from './type';\n\nexport interface DataFormat {\n /**\n * Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`.\n * The default format type is determined by the extension of the file url.\n * If no extension is detected, `\"json\"` will be used by default.\n */\n type?: DataFormatType;\n\n /**\n * A collection of parsing instructions can be used to define the data types of string-valued attributes in the JSON file. Each instruction is a name-value pair, where the name is the name of the attribute, and the value is the desired data type (one of `\"number\"`, `\"boolean\"` or `\"date\"`). For example, `\"parse\": {\"modified_on\":\"date\"}` ensures that the `modified_on` value in each row of the input data is parsed as a Date value. (See Datalib's [`dl.read.types` method](https://github.com/vega/datalib/wiki/Import#dl_read_types) for more information.)\n */\n parse?: any;\n\n /**\n * JSON only) The JSON property containing the desired data.\n * This parameter can be used when the loaded JSON file may have surrounding structure or meta-data.\n * For example `\"property\": \"values.features\"` is equivalent to retrieving `json.values.features`\n * from the loaded JSON object.\n */\n property?: string;\n\n /**\n * The name of the TopoJSON object set to convert to a GeoJSON feature collection.\n * For example, in a map of the world, there may be an object set named `\"countries\"`.\n * Using the feature property, we can extract this set and generate a GeoJSON feature object for each country.\n */\n feature?: string;\n /**\n * The name of the TopoJSON object set to convert to a mesh.\n * Similar to the `feature` option, `mesh` extracts a named TopoJSON object set.\n * Unlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as individual GeoJSON features.\n * Extracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.\n */\n mesh?: string;\n}\n\nexport enum DataFormatType {\n JSON = 'json' as any,\n CSV = 'csv' as any,\n TSV = 'tsv' as any,\n TOPOJSON = 'topojson' as any\n}\n\nexport interface Data {\n /**\n * An object that specifies the format for the data file or values.\n */\n format?: DataFormat;\n\n /**\n * A URL from which to load the data set. Use the format.type property\n * to ensure the loaded data is correctly parsed.\n */\n url?: string;\n /**\n * Pass array of objects instead of a url to a file.\n */\n values?: any[];\n}\n\nexport enum DataTable {\n SOURCE = 'source' as any,\n SUMMARY = 'summary' as any,\n STACKED_SCALE = 'stacked_scale' as any,\n LAYOUT = 'layout' as any\n}\n\nexport const SUMMARY = DataTable.SUMMARY;\nexport const SOURCE = DataTable.SOURCE;\nexport const STACKED_SCALE = DataTable.STACKED_SCALE;\nexport const LAYOUT = DataTable.LAYOUT;\n\n/** Mapping from datalib's inferred type to Vega-lite's type */\n// TODO: consider if we can remove\nexport const types = {\n 'boolean': Type.NOMINAL,\n 'number': Type.QUANTITATIVE,\n 'integer': Type.QUANTITATIVE,\n 'date': Type.TEMPORAL,\n 'string': Type.NOMINAL\n};\n",
"// DateTime definition object\n\nimport {duplicate, keys, isNumber} from './util';\n\n/*\n * A designated year that starts on Sunday.\n */\nconst SUNDAY_YEAR = 2006;\n\n/**\n * @minimum 1\n * @maximum 12\n */\nexport type Month = number;\n\n/**\n * @minimum 1\n * @maximum 7\n */\nexport type Day = number;\n\n/**\n * Object for defining datetime in Vega-Lite Filter.\n * If both month and quarter are provided, month has higher precedence.\n * `day` cannot be combined with other date.\n * We accept string for month and day names.\n */\nexport interface DateTime {\n /** Integer value representing the year. */\n year?: number;\n\n /**\n * Integer value representing the quarter of the year (from 1-4).\n * @minimum 1\n * @maximum 4\n */\n quarter?: number;\n\n /** One of: (1) integer value representing the month from `1`-`12`. `1` represents January; (2) case-insensitive month name (e.g., `\"January\"`); (3) case-insensitive, 3-character short month name (e.g., `\"Jan\"`). */\n month?: Month | string;\n\n /**\n * Integer value representing the date from 1-31.\n * @minimum 1\n * @maximum 31\n */\n date?: number;\n\n /**\n * Value representing the day of week. This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `\"Monday\"`); (3) case-insensitive, 3-character short day name (e.g., `\"Mon\"`). <br/> **Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`.\n */\n day?: Day | string;\n\n /**\n * Integer value representing the hour of day from 0-23.\n * @minimum 0\n * @maximum 23\n */\n hours?: number;\n\n /**\n * Integer value representing minute segment of a time from 0-59.\n * @minimum 0\n * @maximum 59\n */\n minutes?: number;\n\n /**\n * Integer value representing second segment of a time from 0-59.\n * @minimum 0\n * @maximum 59\n */\n seconds?: number;\n\n /**\n * Integer value representing millisecond segment of a time.\n * @minimum 0\n * @maximum 999\n */\n milliseconds?: number;\n}\n\n\n/**\n * Internal Object for defining datetime expressions.\n * This is an expression version of DateTime.\n * If both month and quarter are provided, month has higher precedence.\n * `day` cannot be combined with other date.\n */\nexport interface DateTimeExpr {\n year?: string;\n quarter?: string;\n month?: string;\n date?: string;\n day?: string;\n hours?: string;\n minutes?: string;\n seconds?: string;\n milliseconds?: string;\n}\n\nexport function isDateTime(o: any): o is DateTime {\n return !!o && (!!o.year || !!o.quarter || !!o.month || !!o.date || !!o.day ||\n !!o.hours || !!o.minutes || !!o.seconds || !!o.milliseconds);\n}\n\nexport const MONTHS = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'];\nexport const SHORT_MONTHS = MONTHS.map((m) => m.substr(0, 3));\n\nexport const DAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];\nexport const SHORT_DAYS = DAYS.map((d) => d.substr(0,3));\n\nfunction normalizeQuarter(q: number | string) {\n if (isNumber(q)) {\n // We accept 1-based quarter, so need to readjust to 0-based quarter\n return (q - 1) + '';\n } else {\n // Simply an expression string, but normalize should not be called in this case.\n console.warn('Potentially invalid quarter', q);\n return q;\n }\n}\n\nfunction normalizeMonth(m: string | number) {\n if (isNumber(m)) {\n // We accept 1-based month, so need to readjust to 0-based month\n return (m - 1) + '';\n } else {\n const lowerM = m.toLowerCase();\n const monthIndex = MONTHS.indexOf(lowerM);\n if (monthIndex !== -1) {\n return monthIndex + ''; // 0 for january, ...\n }\n const shortM = lowerM.substr(0, 3);\n const shortMonthIndex = SHORT_MONTHS.indexOf(shortM);\n if (shortMonthIndex !== -1) {\n return shortMonthIndex + '';\n }\n // Simply an expression string, but normalize should not be called in this case.\n console.warn('Potentially invalid month', m);\n return m;\n }\n}\n\nfunction normalizeDay(d: string | number) {\n if (isNumber(d)) {\n // mod so that this can be both 0-based where 0 = sunday\n // and 1-based where 7=sunday\n return (d % 7) + '';\n } else {\n const lowerD = d.toLowerCase();\n const dayIndex = DAYS.indexOf(lowerD);\n if (dayIndex !== -1) {\n return dayIndex + ''; // 0 for january, ...\n }\n const shortD = lowerD.substr(0, 3);\n const shortDayIndex = SHORT_DAYS.indexOf(shortD);\n if (shortDayIndex !== -1) {\n return shortDayIndex + '';\n }\n // Simply an expression string, but normalize should not be called in this case.\n console.warn('Potentially invalid day', d);\n return d;\n }\n}\n\nexport function timestamp(d: DateTime, normalize) {\n const date = new Date(0, 0, 1, 0, 0, 0, 0); // start with uniform date\n\n // FIXME support UTC\n\n if (d.day !== undefined) {\n if (keys(d).length > 1) {\n console.warn('Dropping day from datetime', JSON.stringify(d),\n 'as day cannot be combined with other units.');\n d = duplicate(d);\n delete d.day;\n } else {\n // Use a year that has 1/1 as Sunday so we can setDate below\n date.setFullYear(SUNDAY_YEAR);\n\n const day = normalize ? normalizeDay(d.day) : d.day;\n date.setDate(+day + 1); // +1 since date start at 1 in JS\n }\n }\n\n if (d.year !== undefined) {\n date.setFullYear(d.year);\n }\n\n if (d.quarter !== undefined) {\n const quarter = normalize ? normalizeQuarter(d.quarter) : d.quarter;\n date.setMonth(+quarter * 3);\n }\n\n if (d.month !== undefined) {\n const month = normalize ? normalizeMonth(d.month) : d.month;\n date.setMonth(+month);\n }\n\n if (d.date !== undefined) {\n date.setDate(d.date);\n }\n\n if (d.hours !== undefined) {\n date.setHours(d.hours);\n }\n\n if (d.minutes !== undefined) {\n date.setMinutes(d.minutes);\n }\n\n if (d.seconds !== undefined) {\n date.setSeconds(d.seconds);\n }\n\n if (d.milliseconds !== undefined) {\n date.setMilliseconds(d.milliseconds);\n }\n\n return date.getTime();\n}\n\n/**\n * Return Vega Expression for a particular date time.\n * @param d\n * @param normalize whether to normalize quarter, month, day.\n */\nexport function dateTimeExpr(d: DateTime | DateTimeExpr, normalize = false) {\n const units = [];\n\n if (normalize && d.day !== undefined) {\n if (keys(d).length > 1) {\n console.warn('Dropping day from datetime', JSON.stringify(d),\n 'as day cannot be combined with other units.');\n d = duplicate(d);\n delete d.day;\n }\n }\n\n if (d.year !== undefined) {\n units.push(d.year);\n } else if (d.day !== undefined) {\n // Set year to 2006 for working with day since January 1 2006 is a Sunday\n units.push(SUNDAY_YEAR);\n } else {\n units.push(0);\n }\n\n if (d.month !== undefined) {\n const month = normalize ? normalizeMonth(d.month) : d.month;\n units.push(month);\n } else if (d.quarter !== undefined) {\n const quarter = normalize ? normalizeQuarter(d.quarter) : d.quarter;\n units.push(quarter + '*3');\n } else {\n units.push(0); // months start at zero in JS\n }\n\n if (d.date !== undefined) {\n units.push(d.date);\n } else if (d.day !== undefined) {\n // HACK: Day only works as a standalone unit\n // This is only correct because we always set year to 2006 for day\n const day = normalize ? normalizeDay(d.day) : d.day;\n units.push(day + '+1');\n } else {\n units.push(1); // Date starts at 1 in JS\n }\n\n // Note: can't use TimeUnit enum here as importing it will create\n // circular dependency problem!\n for (let timeUnit of ['hours', 'minutes', 'seconds', 'milliseconds']) {\n if (d[timeUnit] !== undefined) {\n units.push(d[timeUnit]);\n } else {\n units.push(0);\n }\n }\n\n return 'datetime(' + units.join(', ') + ')';\n}\n",
"// utility for encoding mapping\nimport {FieldDef, PositionChannelDef, FacetChannelDef, ChannelDefWithLegend, OrderChannelDef} from './fielddef';\nimport {Channel, CHANNELS} from './channel';\nimport {isArray, some} from './util';\n\n// TODO: once we decompose facet, rename this to Encoding\nexport interface UnitEncoding {\n /**\n * X coordinates for `point`, `circle`, `square`,\n * `line`, `rule`, `text`, and `tick`\n * (or to width and height for `bar` and `area` marks).\n */\n x?: PositionChannelDef;\n\n /**\n * Y coordinates for `point`, `circle`, `square`,\n * `line`, `rule`, `text`, and `tick`\n * (or to width and height for `bar` and `area` marks).\n */\n y?: PositionChannelDef;\n\n /**\n * X2 coordinates for ranged `bar`, `rule`, `area`\n */\n x2?: FieldDef;\n\n /**\n * Y2 coordinates for ranged `bar`, `rule`, `area`\n */\n y2?: FieldDef;\n\n /**\n * Color of the marks – either fill or stroke color based on mark type.\n * (By default, fill color for `area`, `bar`, `tick`, `text`, `circle`, and `square` /\n * stroke color for `line` and `point`.)\n */\n color?: ChannelDefWithLegend;\n /**\n * Opacity of the marks – either can be a value or in a range.\n */\n opacity?: ChannelDefWithLegend;\n\n /**\n * Size of the mark.\n * - For `point`, `square` and `circle`\n * – the symbol size, or pixel area of the mark.\n * - For `bar` and `tick` – the bar and tick's size.\n * - For `text` – the text's font size.\n * - Size is currently unsupported for `line` and `area`.\n */\n size?: ChannelDefWithLegend;\n\n /**\n * The symbol's shape (only for `point` marks). The supported values are\n * `\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\n * or `\"triangle-down\"`, or else a custom SVG path string.\n */\n shape?: ChannelDefWithLegend; // TODO: maybe distinguish ordinal-only\n\n /**\n * Additional levels of detail for grouping data in aggregate views and\n * in line and area marks without mapping data to a specific visual channel.\n */\n detail?: FieldDef | FieldDef[];\n\n /**\n * Text of the `text` mark.\n */\n text?: FieldDef;\n\n label?: FieldDef;\n\n /**\n * Order of data points in line marks.\n */\n path?: OrderChannelDef | OrderChannelDef[];\n\n /**\n * Layer order for non-stacked marks, or stack order for stacked marks.\n */\n order?: OrderChannelDef | OrderChannelDef[];\n}\n\n// TODO: once we decompose facet, rename this to ExtendedEncoding\nexport interface Encoding extends UnitEncoding {\n /**\n * Vertical facets for trellis plots.\n */\n row?: FacetChannelDef;\n\n /**\n * Horizontal facets for trellis plots.\n */\n column?: FacetChannelDef;\n}\n\nexport function countRetinal(encoding: Encoding) {\n let count = 0;\n if (encoding.color) { count++; }\n if (encoding.opacity) { count++; }\n if (encoding.size) { count++; }\n if (encoding.shape) { count++; }\n return count;\n}\n\nexport function channels(encoding: Encoding) {\n return CHANNELS.filter(function(channel) {\n return has(encoding, channel);\n });\n}\n\n// TOD: rename this to hasChannelField and only use we really want it.\nexport function has(encoding: Encoding, channel: Channel): boolean {\n const channelEncoding = encoding && encoding[channel];\n return channelEncoding && (\n channelEncoding.field !== undefined ||\n // TODO: check that we have field in the array\n (isArray(channelEncoding) && channelEncoding.length > 0)\n );\n}\n\nexport function isAggregate(encoding: Encoding) {\n return some(CHANNELS, (channel) => {\n if (has(encoding, channel) && encoding[channel].aggregate) {\n return true;\n }\n return false;\n });\n}\n\nexport function isRanged(encoding: Encoding) {\n return encoding && ((!!encoding.x && !!encoding.x2) || (!!encoding.y && !!encoding.y2));\n}\n\nexport function fieldDefs(encoding: Encoding): FieldDef[] {\n let arr = [];\n CHANNELS.forEach(function(channel) {\n if (has(encoding, channel)) {\n if (isArray(encoding[channel])) {\n encoding[channel].forEach(function(fieldDef) {\n arr.push(fieldDef);\n });\n } else {\n arr.push(encoding[channel]);\n }\n }\n });\n return arr;\n};\n\nexport function forEach(encoding: Encoding,\n f: (fd: FieldDef, c: Channel, i: number) => void,\n thisArg?: any) {\n channelMappingForEach(CHANNELS, encoding, f, thisArg);\n}\n\nexport function channelMappingForEach(channels: Channel[], mapping: any,\n f: (fd: FieldDef, c: Channel, i: number) => void,\n thisArg?: any) {\n let i = 0;\n channels.forEach(function(channel) {\n if (has(mapping, channel)) {\n if (isArray(mapping[channel])) {\n mapping[channel].forEach(function(fieldDef) {\n f.call(thisArg, fieldDef, channel, i++);\n });\n } else {\n f.call(thisArg, mapping[channel], channel, i++);\n }\n }\n });\n}\n\nexport function map(encoding: Encoding,\n f: (fd: FieldDef, c: Channel, i: number) => any,\n thisArg?: any) {\n return channelMappingMap(CHANNELS, encoding, f , thisArg);\n}\n\nexport function channelMappingMap(channels: Channel[], mapping: any,\n f: (fd: FieldDef, c: Channel, i: number) => any,\n thisArg?: any) {\n let arr = [];\n channels.forEach(function(channel) {\n if (has(mapping, channel)) {\n if (isArray(mapping[channel])) {\n mapping[channel].forEach(function(fieldDef) {\n arr.push(f.call(thisArg, fieldDef, channel));\n });\n } else {\n arr.push(f.call(thisArg, mapping[channel], channel));\n }\n }\n });\n return arr;\n}\nexport function reduce(encoding: Encoding,\n f: (acc: any, fd: FieldDef, c: Channel) => any,\n init,\n thisArg?: any) {\n return channelMappingReduce(CHANNELS, encoding, f, init, thisArg);\n}\n\nexport function channelMappingReduce(channels: Channel[], mapping: any,\n f: (acc: any, fd: FieldDef, c: Channel) => any,\n init,\n thisArg?: any) {\n let r = init;\n CHANNELS.forEach(function(channel) {\n if (has(mapping, channel)) {\n if (isArray(mapping[channel])) {\n mapping[channel].forEach(function(fieldDef) {\n r = f.call(thisArg, r, fieldDef, channel);\n });\n } else {\n r = f.call(thisArg, r, mapping[channel], channel);\n }\n }\n });\n return r;\n}\n",
"// utility for a field definition object\n\nimport {AggregateOp} from './aggregate';\nimport {Axis} from './axis';\nimport {Bin} from './bin';\nimport {Config} from './config';\nimport {Legend} from './legend';\nimport {Scale, ScaleType} from './scale';\nimport {SortField, SortOrder} from './sort';\nimport {TimeUnit} from './timeunit';\nimport {Type, NOMINAL, ORDINAL, QUANTITATIVE, TEMPORAL} from './type';\nimport {contains} from './util';\n\n/**\n * Interface for any kind of FieldDef;\n * For simplicity, we do not declare multiple interfaces of FieldDef like\n * we do for JSON schema.\n */\nexport interface FieldDef {\n /**\n * Name of the field from which to pull a data value.\n */\n field?: string;\n\n /**\n * The encoded field's type of measurement. This can be either a full type\n * name (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, and `\"nominal\"`)\n * or an initial character of the type name (`\"Q\"`, `\"T\"`, `\"O\"`, `\"N\"`).\n * This property is case insensitive.\n */\n type?: Type;\n\n /**\n * A constant value in visual domain.\n */\n value?: number | string | boolean;\n\n // function\n\n /**\n * Time unit for a `temporal` field (e.g., `year`, `yearmonth`, `month`, `hour`).\n */\n timeUnit?: TimeUnit;\n\n /**\n * Flag for binning a `quantitative` field, or a bin property object\n * for binning parameters.\n */\n bin?: boolean | Bin;\n\n /**\n * Aggregation function for the field\n * (e.g., `mean`, `sum`, `median`, `min`, `max`, `count`).\n */\n aggregate?: AggregateOp;\n\n /**\n * Title for axis or legend.\n */\n title?: string;\n}\n\nexport interface ChannelDefWithScale extends FieldDef {\n scale?: Scale;\n sort?: SortField | SortOrder;\n}\n\nexport interface PositionChannelDef extends ChannelDefWithScale {\n /**\n * @nullable\n */\n axis?: Axis;\n}\nexport interface ChannelDefWithLegend extends ChannelDefWithScale {\n /**\n * @nullable\n */\n legend?: Legend;\n}\n\n// Detail\n\n// Order Path have no scale\n\nexport interface OrderChannelDef extends FieldDef {\n sort?: SortOrder;\n}\n\n// TODO: consider if we want to distinguish ordinalOnlyScale from scale\nexport type FacetChannelDef = PositionChannelDef;\n\nexport interface FieldRefOption {\n /** exclude bin, aggregate, timeUnit */\n nofn?: boolean;\n /** exclude aggregation function */\n noAggregate?: boolean;\n /** Wrap the field inside datum[...] per Vega convention */\n datum?: boolean;\n /** replace fn with custom function prefix */\n fn?: string;\n /** prepend fn with custom function prefix */\n prefix?: string;\n /** scaleType */\n scaleType?: ScaleType;\n /** append suffix to the field ref for bin (default='start') */\n binSuffix?: string;\n /** append suffix to the field ref (general) */\n suffix?: string;\n}\n\nexport function field(fieldDef: FieldDef, opt: FieldRefOption = {}) {\n let field = fieldDef.field;\n let prefix = opt.prefix;\n let suffix = opt.suffix;\n\n if (isCount(fieldDef)) {\n field = 'count';\n } else {\n let fn = opt.fn;\n\n if (!opt.nofn) {\n if (fieldDef.bin) {\n fn = 'bin';\n\n suffix = opt.binSuffix || (\n opt.scaleType === ScaleType.ORDINAL ?\n // For ordinal scale type, use `range` as suffix.\n 'range' :\n // For non-ordinal scale or unknown, use `start` as suffix.\n 'start'\n );\n } else if (!opt.noAggregate && fieldDef.aggregate) {\n fn = String(fieldDef.aggregate);\n } else if (fieldDef.timeUnit) {\n fn = String(fieldDef.timeUnit);\n }\n }\n\n if (!!fn) {\n field = `${fn}_${field}`;\n }\n }\n\n if (!!suffix) {\n field = `${field}_${suffix}`;\n }\n\n if (!!prefix) {\n field = `${prefix}_${field}`;\n }\n\n if (opt.datum) {\n field = `datum[\"${field}\"]`;\n }\n\n return field;\n}\n\nfunction _isFieldDimension(fieldDef: FieldDef) {\n if (contains([NOMINAL, ORDINAL], fieldDef.type)) {\n return true;\n } else if(!!fieldDef.bin) {\n return true;\n } else if (fieldDef.type === TEMPORAL) {\n return !!fieldDef.timeUnit;\n }\n return false;\n}\n\nexport function isDimension(fieldDef: FieldDef) {\n return fieldDef && fieldDef.field && _isFieldDimension(fieldDef);\n}\n\nexport function isMeasure(fieldDef: FieldDef) {\n return fieldDef && fieldDef.field && !_isFieldDimension(fieldDef);\n}\n\nexport function count(): FieldDef {\n return { field: '*', aggregate: AggregateOp.COUNT, type: QUANTITATIVE};\n}\n\nexport function isCount(fieldDef: FieldDef) {\n return fieldDef.aggregate === AggregateOp.COUNT;\n}\n\nexport function title(fieldDef: FieldDef, config: Config) {\n if (fieldDef.title != null) {\n return fieldDef.title;\n }\n if (isCount(fieldDef)) {\n return config.countTitle;\n }\n const fn = fieldDef.aggregate || fieldDef.timeUnit || (fieldDef.bin && 'bin');\n if (fn) {\n return fn.toString().toUpperCase() + '(' + fieldDef.field + ')';\n } else {\n return fieldDef.field;\n }\n}\n",
"import {DateTime, dateTimeExpr, isDateTime} from './datetime';\nimport {field} from './fielddef';\nimport {TimeUnit, fieldExpr as timeUnitFieldExpr, isSingleTimeUnit} from './timeunit';\nimport {isArray, isString} from './util';\n\nexport type Filter = EqualFilter | RangeFilter | OneOfFilter ;\n\n\nexport interface EqualFilter {\n // TODO: support aggregate\n\n /**\n * Time unit for the field to be filtered.\n */\n timeUnit?: TimeUnit;\n\n /**\n * Field to be filtered.\n */\n field: string;\n\n /**\n * Value that the field should be equal to.\n */\n equal: string | number | boolean | DateTime;\n\n}\n\nexport function isEqualFilter(filter: any): filter is EqualFilter {\n return filter && !!filter.field && filter.equal!==undefined;\n}\n\nexport interface RangeFilter {\n // TODO: support aggregate\n\n /**\n * time unit for the field to be filtered.\n */\n timeUnit?: TimeUnit;\n\n /**\n * Field to be filtered\n */\n field: string;\n\n /**\n * Array of inclusive minimum and maximum values\n * for a field value of a data item to be included in the filtered data.\n * @maxItems 2\n * @minItems 2\n */\n range: Array<number|DateTime>;\n\n}\n\nexport function isRangeFilter(filter: any): filter is RangeFilter {\n if (filter && !!filter.field) {\n if (isArray(filter.range) && filter.range.length === 2) {\n return true;\n }\n }\n return false;\n}\n\nexport interface OneOfFilter {\n // TODO: support aggregate\n\n /**\n * time unit for the field to be filtered.\n */\n timeUnit?: TimeUnit;\n\n /**\n * Field to be filtered\n */\n field: string;\n\n /**\n * A set of values that the `field`'s value should be a member of,\n * for a data item included in the filtered data.\n */\n oneOf: Array<string|number|boolean|DateTime>;\n\n}\n\nexport function isOneOfFilter(filter: any): filter is OneOfFilter {\n return filter && !!filter.field && (\n isArray(filter.oneOf) ||\n isArray(filter.in) // backward compatibility\n );\n}\n\nexport function expression(filter: Filter | string) {\n if (isString(filter)) {\n return filter as string;\n } else { // Filter Object\n const fieldExpr = filter.timeUnit ?\n // For timeUnit, cast into integer with time() so we can use ===, inrange, indexOf to compare values directly.\n // TODO: We calculate timeUnit on the fly here. Consider if we would like to consolidate this with timeUnit pipeline\n // TODO: support utc\n ('time(' + timeUnitFieldExpr(filter.timeUnit, filter.field) + ')') :\n field(filter, {datum: true});\n\n if (isEqualFilter(filter)) {\n return fieldExpr + '===' + valueExpr(filter.equal, filter.timeUnit);\n } else if (isOneOfFilter(filter)) {\n // \"oneOf\" was formerly \"in\" -- so we need to add backward compatibility\n const oneOf = filter.oneOf || filter['in'];\n return 'indexof([' +\n oneOf.map((v) => valueExpr(v, filter.timeUnit)).join(',') +\n '], ' + fieldExpr + ') !== -1';\n } else if (isRangeFilter(filter)) {\n const lower = filter.range[0];\n const upper = filter.range[1];\n\n if (lower !== null && upper !== null) {\n return 'inrange(' + fieldExpr + ', ' +\n valueExpr(lower, filter.timeUnit) + ', ' +\n valueExpr(upper, filter.timeUnit) + ')';\n } else if (lower !== null) {\n return fieldExpr + ' >= ' + lower;\n } else if (upper !== null) {\n return fieldExpr + ' <= ' + upper;\n }\n }\n }\n return undefined;\n}\n\nfunction valueExpr(v: any, timeUnit: TimeUnit) {\n if (isDateTime(v)) {\n const expr = dateTimeExpr(v, true);\n return 'time(' + expr + ')';\n }\n if (isSingleTimeUnit(timeUnit)) {\n const datetime: DateTime = {};\n datetime[timeUnit] = v;\n const expr = dateTimeExpr(datetime, true);\n return 'time(' + expr + ')';\n }\n return JSON.stringify(v);\n}\n",
"import {DateTime} from './datetime';\n\nexport interface LegendConfig {\n /**\n * The orientation of the legend. One of \"left\" or \"right\". This determines how the legend is positioned within the scene. The default is \"right\".\n */\n orient?: string;\n /**\n * The offset, in pixels, by which to displace the legend from the edge of the enclosing group or data rectangle.\n */\n offset?: number;\n /**\n * The padding, in pixels, between the legend and axis.\n */\n padding?: number;\n /**\n * The margin around the legend, in pixels\n */\n margin?: number;\n /**\n * The color of the gradient stroke, can be in hex color code or regular color name.\n */\n gradientStrokeColor?: string;\n /**\n * The width of the gradient stroke, in pixels.\n * @mimimum 0\n */\n gradientStrokeWidth?: number;\n /**\n * The height of the gradient, in pixels.\n * @mimimum 0\n */\n gradientHeight?: number;\n /**\n * The width of the gradient, in pixels.\n * @mimimum 0\n */\n gradientWidth?: number;\n /**\n * The alignment of the legend label, can be left, middle or right.\n */\n labelAlign?: string;\n /**\n * The position of the baseline of legend label, can be top, middle or bottom.\n */\n labelBaseline?: string;\n /**\n * The color of the legend label, can be in hex color code or regular color name.\n */\n labelColor?: string;\n /**\n * The font of the legend label.\n */\n labelFont?: string;\n /**\n * The font size of legend label.\n * @mimimum 0\n */\n labelFontSize?: number;\n /**\n * The offset of the legend label.\n * @mimimum 0\n */\n labelOffset?: number;\n /**\n * Whether month names and weekday names should be abbreviated.\n */\n shortTimeLabels?: boolean;\n /**\n * The color of the legend symbol,\n */\n symbolColor?: string;\n /**\n * The shape of the legend symbol, can be the 'circle', 'square', 'cross', 'diamond',\n * 'triangle-up', 'triangle-down', or else a custom SVG path string.\n */\n symbolShape?: string;\n /**\n * The size of the legend symbol, in pixels.\n * @mimimum 0\n */\n symbolSize?: number;\n /**\n * The width of the symbol's stroke.\n * @minimum 0\n */\n symbolStrokeWidth?: number;\n /**\n * Optional mark property definitions for custom legend styling.\n */\n /**\n * The color of the legend title, can be in hex color code or regular color name.\n */\n titleColor?: string;\n /**\n * The font of the legend title.\n */\n titleFont?: string;\n /**\n * The font size of the legend title.\n */\n titleFontSize?: number;\n /**\n * The font weight of the legend title.\n */\n titleFontWeight?: string;\n /**\n * Optional mark property definitions for custom legend styling.\n */\n properties?: any; // TODO(#975) replace with config properties\n}\n\n/**\n * Properties of a legend or boolean flag for determining whether to show it.\n */\nexport interface Legend extends LegendConfig {\n /**\n * An optional formatting pattern for legend labels. Vega uses D3\\'s format pattern.\n */\n format?: string;\n /**\n * A title for the legend. (Shows field name and its function by default.)\n */\n title?: string;\n /**\n * Explicitly set the visible legend values.\n */\n values?: number[] | string[] | DateTime[];\n}\n\nexport const defaultLegendConfig: LegendConfig = {\n orient: undefined, // implicitly \"right\"\n};\n",
"export enum Mark {\n AREA = 'area' as any,\n BAR = 'bar' as any,\n LINE = 'line' as any,\n POINT = 'point' as any,\n TEXT = 'text' as any,\n TICK = 'tick' as any,\n RULE = 'rule' as any,\n CIRCLE = 'circle' as any,\n SQUARE = 'square' as any,\n ERRORBAR = 'errorBar' as any\n}\n\nexport const AREA = Mark.AREA;\nexport const BAR = Mark.BAR;\nexport const LINE = Mark.LINE;\nexport const POINT = Mark.POINT;\nexport const TEXT = Mark.TEXT;\nexport const TICK = Mark.TICK;\nexport const RULE = Mark.RULE;\n\nexport const CIRCLE = Mark.CIRCLE;\nexport const SQUARE = Mark.SQUARE;\n\nexport const ERRORBAR = Mark.ERRORBAR;\nexport const PRIMITIVE_MARKS = [AREA, BAR, LINE, POINT, TEXT, TICK, RULE, CIRCLE, SQUARE];\n",
"import {DateTime} from './datetime';\n\nexport enum ScaleType {\n LINEAR = 'linear' as any,\n LOG = 'log' as any,\n POW = 'pow' as any,\n SQRT = 'sqrt' as any,\n QUANTILE = 'quantile' as any,\n QUANTIZE = 'quantize' as any,\n ORDINAL = 'ordinal' as any,\n TIME = 'time' as any,\n UTC = 'utc' as any,\n}\n\nexport enum NiceTime {\n SECOND = 'second' as any,\n MINUTE = 'minute' as any,\n HOUR = 'hour' as any,\n DAY = 'day' as any,\n WEEK = 'week' as any,\n MONTH = 'month' as any,\n YEAR = 'year' as any,\n}\n\nexport enum BandSize {\n FIT = 'fit' as any\n}\n\nexport const BANDSIZE_FIT = BandSize.FIT;\n\nexport interface ScaleConfig {\n /**\n * If true, rounds numeric output values to integers.\n * This can be helpful for snapping to the pixel grid.\n * (Only available for `x`, `y`, `size`, `row`, and `column` scales.)\n */\n round?: boolean;\n /**\n * Default band width for `x` ordinal scale when is mark is `text`.\n * @minimum 0\n */\n textBandWidth?: number;\n /**\n * Default band size for (1) `y` ordinal scale,\n * and (2) `x` ordinal scale when the mark is not `text`.\n * @minimum 0\n */\n bandSize?: number | BandSize;\n /**\n * Default range for opacity.\n */\n opacity?: number[];\n /**\n * Default padding for `x` and `y` ordinal scales.\n */\n padding?: number;\n\n /**\n * Uses the source data range as scale domain instead of aggregated data for aggregate axis.\n * This property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"stdev\"`, `\"stdevp\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.\n */\n useRawDomain?: boolean;\n\n /** Default range for nominal color scale */\n nominalColorRange?: string | string[];\n /** Default range for ordinal / continuous color scale */\n sequentialColorRange?: string | string[];\n /** Default range for shape */\n shapeRange?: string | string[];\n\n /** Default range for bar size scale */\n barSizeRange?: number[];\n\n /** Default range for font size scale */\n fontSizeRange?: number[];\n\n /** Default range for rule stroke widths */\n ruleSizeRange?: number[];\n\n /** Default range for tick spans */\n tickSizeRange?: number[];\n\n /** Default range for bar size scale */\n pointSizeRange?: number[];\n\n // nice should depends on type (quantitative or temporal), so\n // let's not make a config.\n}\n\nexport const defaultScaleConfig: ScaleConfig = {\n round: true,\n textBandWidth: 90,\n bandSize: 21,\n padding: 0.1,\n useRawDomain: false,\n opacity: [0.3, 0.8],\n\n nominalColorRange: 'category10',\n sequentialColorRange: ['#AFC6A3', '#09622A'], // tableau greens\n shapeRange: 'shapes',\n fontSizeRange: [8, 40],\n ruleSizeRange: [1, 5],\n tickSizeRange: [1, 20]\n};\n\nexport interface FacetScaleConfig {\n round?: boolean;\n padding?: number;\n}\n\nexport const defaultFacetScaleConfig: FacetScaleConfig = {\n round: true,\n padding: 16\n};\n\nexport interface Scale {\n type?: ScaleType;\n /**\n * The domain of the scale, representing the set of data values. For quantitative data, this can take the form of a two-element array with minimum and maximum values. For ordinal/categorical data, this may be an array of valid input values.\n */\n domain?: number[] | string[] | DateTime[];\n /**\n * The range of the scale, representing the set of visual values. For numeric values, the range can take the form of a two-element array with minimum and maximum values. For ordinal or quantized data, the range may by an array of desired output values, which are mapped to elements in the specified domain. For ordinal scales only, the range can be defined using a DataRef: the range values are then drawn dynamically from a backing data set.\n */\n range?: string | number[] | string[]; // TODO: declare vgRangeDomain\n /**\n * If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.\n */\n round?: boolean;\n\n // ordinal\n /**\n * @minimum 0\n */\n bandSize?: number | BandSize;\n /**\n * Applies spacing among ordinal elements in the scale range. The actual effect depends on how the scale is configured. If the __points__ parameter is `true`, the padding value is interpreted as a multiple of the spacing between points. A reasonable value is 1.0, such that the first and last point will be offset from the minimum and maximum value by half the distance between points. Otherwise, padding is typically in the range [0, 1] and corresponds to the fraction of space in the range interval to allocate to padding. A value of 0.5 means that the range band width will be equal to the padding width. For more, see the [D3 ordinal scale documentation](https://github.com/mbostock/d3/wiki/Ordinal-Scales).\n */\n padding?: number;\n\n // typical\n /**\n * If true, values that exceed the data domain are clamped to either the minimum or maximum range value\n */\n clamp?: boolean;\n /**\n * If specified, modifies the scale domain to use a more human-friendly value range. If specified as a true boolean, modifies the scale domain to use a more human-friendly number range (e.g., 7 instead of 6.96). If specified as a string, modifies the scale domain to use a more human-friendly value range. For time and utc scale types only, the nice value should be a string indicating the desired time interval.\n */\n nice?: boolean | NiceTime;\n /**\n * Sets the exponent of the scale transformation. For pow scale types only, otherwise ignored.\n */\n exponent?: number;\n /**\n * If `true`, ensures that a zero baseline value is included in the scale domain.\n * Default value: `true` for `x` and `y` channel if the quantitative field is not binned\n * and no custom `domain` is provided; `false` otherwise.\n */\n zero?: boolean;\n\n // Vega-Lite only\n /**\n * Uses the source data range as scale domain instead of aggregated data for aggregate axis.\n * This property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"stdev\"`, `\"stdevp\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.\n */\n useRawDomain?: boolean;\n}\n",
"/** module for shorthand */\n\nimport {Encoding} from './encoding';\nimport {FieldDef} from './fielddef';\nimport {ExtendedUnitSpec} from './spec';\n\nimport {AggregateOp, AGGREGATE_OPS} from './aggregate';\nimport {TIMEUNITS} from './timeunit';\nimport {SHORT_TYPE, TYPE_FROM_SHORT_TYPE} from './type';\nimport * as vlEncoding from './encoding';\nimport {Mark} from './mark';\n\nexport const DELIM = '|';\nexport const ASSIGN = '=';\nexport const TYPE = ',';\nexport const FUNC = '_';\n\n\nexport function shorten(spec: ExtendedUnitSpec): string {\n return 'mark' + ASSIGN + spec.mark +\n DELIM + shortenEncoding(spec.encoding);\n}\n\nexport function parse(shorthand: string, data?, config?) {\n let split = shorthand.split(DELIM),\n mark = split.shift().split(ASSIGN)[1].trim(),\n encoding = parseEncoding(split.join(DELIM));\n\n let spec:ExtendedUnitSpec = {\n mark: Mark[mark],\n encoding: encoding\n };\n\n if (data !== undefined) {\n spec.data = data;\n }\n if (config !== undefined) {\n spec.config = config;\n }\n return spec;\n}\n\nexport function shortenEncoding(encoding: Encoding): string {\n return vlEncoding.map(encoding, function(fieldDef, channel) {\n return channel + ASSIGN + shortenFieldDef(fieldDef);\n }).join(DELIM);\n}\n\nexport function parseEncoding(encodingShorthand: string): Encoding {\n return encodingShorthand.split(DELIM).reduce(function(m, e) {\n const split = e.split(ASSIGN),\n enctype = split[0].trim(),\n fieldDefShorthand = split[1];\n\n m[enctype] = parseFieldDef(fieldDefShorthand);\n return m;\n }, {});\n}\n\nexport function shortenFieldDef(fieldDef: FieldDef): string {\n return (fieldDef.aggregate ? fieldDef.aggregate + FUNC : '') +\n (fieldDef.timeUnit ? fieldDef.timeUnit + FUNC : '') +\n (fieldDef.bin ? 'bin' + FUNC : '') +\n (fieldDef.field || '') + TYPE + SHORT_TYPE[fieldDef.type];\n}\n\nexport function shortenFieldDefs(fieldDefs: FieldDef[], delim = DELIM): string {\n return fieldDefs.map(shortenFieldDef).join(delim);\n}\n\nexport function parseFieldDef(fieldDefShorthand: string): FieldDef {\n const split = fieldDefShorthand.split(TYPE);\n\n let fieldDef: FieldDef = {\n field: split[0].trim(),\n type: TYPE_FROM_SHORT_TYPE[split[1].trim()]\n };\n\n // check aggregate type\n for (let i = 0; i < AGGREGATE_OPS.length; i++) {\n let a = AGGREGATE_OPS[i];\n if (fieldDef.field.indexOf(a + '_') === 0) {\n fieldDef.field = fieldDef.field.substr(a.toString().length + 1);\n if (a === AggregateOp.COUNT && fieldDef.field.length === 0) {\n fieldDef.field = '*';\n }\n fieldDef.aggregate = a;\n break;\n }\n }\n\n for (let i = 0; i < TIMEUNITS.length; i++) {\n let tu = TIMEUNITS[i];\n if (fieldDef.field && fieldDef.field.indexOf(tu + '_') === 0) {\n fieldDef.field = fieldDef.field.substr(fieldDef.field.length + 1);\n fieldDef.timeUnit = tu;\n break;\n }\n }\n\n // check bin\n if (fieldDef.field && fieldDef.field.indexOf('bin_') === 0) {\n fieldDef.field = fieldDef.field.substr(4);\n fieldDef.bin = true;\n }\n\n return fieldDef;\n}\n",
"import {AggregateOp} from './aggregate';\n\nexport enum SortOrder {\n ASCENDING = 'ascending' as any,\n DESCENDING = 'descending' as any,\n NONE = 'none' as any,\n}\n\nexport interface SortField {\n /**\n * The field name to aggregate over.\n */\n field: string;\n /**\n * The sort aggregation operator\n */\n op: AggregateOp;\n\n order?: SortOrder;\n}\n\nexport function isSortField(sort: SortOrder | SortField): sort is SortField {\n return !!sort && !!sort['field'] && !!sort['op'];\n}\n",
"/* Package of defining Vega-lite Specification's json schema at its utility functions */\n\nimport {Config, defaultOverlayConfig, AreaOverlay} from './config';\nimport {Data} from './data';\nimport {Encoding, UnitEncoding, has, isRanged} from './encoding';\nimport {Facet} from './facet';\nimport {FieldDef} from './fielddef';\nimport {Mark, ERRORBAR, TICK, AREA, RULE, LINE, POINT} from './mark';\nimport {stack} from './stack';\nimport {Transform} from './transform';\nimport {ROW, COLUMN, X, Y, X2, Y2} from './channel';\nimport * as vlEncoding from './encoding';\nimport {contains, duplicate, extend, hash, keys, omit, pick, vals} from './util';\n\nexport interface BaseSpec {\n /**\n * Name of the visualization for later reference.\n */\n name?: string;\n\n /**\n * An optional description of this mark for commenting purpose.\n * This property has no effect on the output visualization.\n */\n description?: string;\n\n /**\n * An object describing the data source\n */\n data?: Data;\n\n /**\n * An object describing filter and new field calculation.\n */\n transform?: Transform;\n\n /**\n * Configuration object\n */\n config?: Config;\n}\n\nexport interface UnitSpec extends BaseSpec {\n // FIXME description for top-level width\n width?: number;\n\n // FIXME description for top-level width\n height?: number;\n\n /**\n * The mark type.\n * One of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n * `\"area\"`, `\"point\"`, `\"rule\"`, and `\"text\"`.\n */\n mark: Mark;\n\n /**\n * A key-value mapping between encoding channels and definition of fields.\n */\n encoding?: UnitEncoding;\n}\n\n/**\n * Schema for a unit Vega-Lite specification, with the syntactic sugar extensions:\n * - `row` and `column` are included in the encoding.\n * - (Future) label, box plot\n *\n * Note: the spec could contain facet.\n *\n * @required [\"mark\", \"encoding\"]\n */\nexport interface ExtendedUnitSpec extends BaseSpec {\n // FIXME description for top-level width\n width?: number;\n\n // FIXME description for top-level width\n height?: number;\n\n /**\n * The mark type.\n * One of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n * `\"area\"`, `\"point\"`, `\"rule\"`, and `\"text\"`.\n */\n mark: Mark;\n\n /**\n * A key-value mapping between encoding channels and definition of fields.\n */\n encoding?: Encoding;\n}\n\nexport interface FacetSpec extends BaseSpec {\n facet: Facet;\n spec: LayerSpec | UnitSpec;\n}\n\nexport interface LayerSpec extends BaseSpec {\n // FIXME description for top-level width\n width?: number;\n\n // FIXME description for top-level width\n height?: number;\n\n /**\n * Unit specs that will be layered.\n */\n layers: UnitSpec[];\n}\n\n/** This is for the future schema */\nexport interface ExtendedFacetSpec extends BaseSpec {\n facet: Facet;\n\n spec: ExtendedUnitSpec | FacetSpec;\n}\n\nexport type ExtendedSpec = ExtendedUnitSpec | FacetSpec | LayerSpec;\nexport type Spec = UnitSpec | FacetSpec | LayerSpec;\n\n/* Custom type guards */\n\nexport function isSomeFacetSpec(spec: ExtendedSpec | ExtendedFacetSpec): spec is FacetSpec | ExtendedFacetSpec {\n return spec['facet'] !== undefined;\n}\n\nexport function isExtendedUnitSpec(spec: ExtendedSpec): spec is ExtendedUnitSpec {\n if (isSomeUnitSpec(spec)) {\n const hasRow = has(spec.encoding, ROW);\n const hasColumn = has(spec.encoding, COLUMN);\n\n return hasRow || hasColumn;\n }\n\n return false;\n}\n\nexport function isUnitSpec(spec: ExtendedSpec): spec is UnitSpec {\n if (isSomeUnitSpec(spec)) {\n return !isExtendedUnitSpec(spec);\n }\n\n return false;\n}\n\nexport function isSomeUnitSpec(spec: ExtendedSpec): spec is ExtendedUnitSpec | UnitSpec {\n return spec['mark'] !== undefined;\n}\n\nexport function isLayerSpec(spec: ExtendedSpec | ExtendedFacetSpec): spec is LayerSpec {\n return spec['layers'] !== undefined;\n}\n\n\n/**\n * Decompose extended unit specs into composition of pure unit specs.\n */\n// TODO: consider moving this to another file. Maybe vl.spec.normalize or vl.normalize\nexport function normalize(spec: ExtendedSpec): Spec {\n if (isExtendedUnitSpec(spec)) {\n return normalizeExtendedUnitSpec(spec);\n }\n if (isUnitSpec(spec)) {\n return normalizeUnitSpec(spec);\n }\n return spec;\n}\n\nexport function normalizeExtendedUnitSpec(spec: ExtendedUnitSpec): Spec {\n const hasRow = has(spec.encoding, ROW);\n const hasColumn = has(spec.encoding, COLUMN);\n\n // TODO: @arvind please add interaction syntax here\n let encoding = duplicate(spec.encoding);\n delete encoding.column;\n delete encoding.row;\n\n return extend(\n spec.name ? { name: spec.name } : {},\n spec.description ? { description: spec.description } : {},\n { data: spec.data },\n spec.transform ? { transform: spec.transform } : {},\n {\n facet: extend(\n hasRow ? { row: spec.encoding.row } : {},\n hasColumn ? { column: spec.encoding.column } : {}\n ),\n spec: normalizeUnitSpec(extend(\n spec.width ? { width: spec.width } : {},\n spec.height ? { height: spec.height } : {},\n {\n mark: spec.mark,\n encoding: encoding\n },\n spec.config ? { config: spec.config } : {}\n ))\n },\n spec.config ? { config: spec.config } : {}\n );\n}\n\nexport function normalizeUnitSpec(spec: UnitSpec): Spec {\n const config = spec.config;\n const overlayConfig = config && config.overlay;\n const overlayWithLine = overlayConfig && spec.mark === AREA &&\n contains([AreaOverlay.LINEPOINT, AreaOverlay.LINE], overlayConfig.area);\n const overlayWithPoint = overlayConfig && (\n (overlayConfig.line && spec.mark === LINE) ||\n (overlayConfig.area === AreaOverlay.LINEPOINT && spec.mark === AREA)\n );\n\n // TODO: thoroughly test\n if (spec.mark === ERRORBAR) {\n return normalizeErrorBarUnitSpec(spec);\n }\n // TODO: thoroughly test\n if (isRanged(spec.encoding)) {\n return normalizeRangedUnitSpec(spec);\n }\n\n if (overlayWithPoint || overlayWithLine) {\n return normalizeOverlay(spec, overlayWithPoint, overlayWithLine);\n }\n return spec;\n}\n\nexport function normalizeRangedUnitSpec(spec: UnitSpec): Spec {\n if (spec.encoding) {\n const hasX = has(spec.encoding, X);\n const hasY = has(spec.encoding, Y);\n const hasX2 = has(spec.encoding, X2);\n const hasY2 = has(spec.encoding, Y2);\n if ((hasX2 && !hasX) || (hasY2 && !hasY)) {\n let normalizedSpec = duplicate(spec);\n if (hasX2 && !hasX) {\n normalizedSpec.encoding.x = normalizedSpec.encoding.x2;\n delete normalizedSpec.encoding.x2;\n }\n if (hasY2 && !hasY) {\n normalizedSpec.encoding.y = normalizedSpec.encoding.y2;\n delete normalizedSpec.encoding.y2;\n }\n\n return normalizedSpec;\n }\n }\n return spec;\n}\n\nexport function normalizeErrorBarUnitSpec(spec: UnitSpec): Spec {\n // FIXME correctly deal with color and opacity\n\n let layerSpec = extend(spec.name ? {name: spec.name} : {},\n spec.description ? {description: spec.description} : {},\n spec.data ? {data: spec.data} : {},\n spec.transform ? {transform: spec.transform} : {},\n spec.config ? {config: spec.config} : {}, {layers: []}\n );\n if (!spec.encoding) {\n return layerSpec;\n }\n if (spec.mark === ERRORBAR) {\n const ruleSpec = {\n mark: RULE,\n encoding: extend(\n spec.encoding.x ? {x: duplicate(spec.encoding.x)} : {},\n spec.encoding.y ? {y: duplicate(spec.encoding.y)} : {},\n spec.encoding.x2 ? {x2: duplicate(spec.encoding.x2)} : {},\n spec.encoding.y2 ? {y2: duplicate(spec.encoding.y2)} : {},\n {})\n };\n const lowerTickSpec = {\n mark: TICK,\n encoding: extend(\n spec.encoding.x ? {x: duplicate(spec.encoding.x)} : {},\n spec.encoding.y ? {y: duplicate(spec.encoding.y)} : {},\n spec.encoding.size ? {size: duplicate(spec.encoding.size)} : {},\n {})\n };\n const upperTickSpec = {\n mark: TICK,\n encoding: extend({\n x: spec.encoding.x2 ? duplicate(spec.encoding.x2) : duplicate(spec.encoding.x),\n y: spec.encoding.y2 ? duplicate(spec.encoding.y2) : duplicate(spec.encoding.y)\n }, spec.encoding.size ? {size: duplicate(spec.encoding.size)} : {})\n };\n layerSpec.layers.push(normalizeUnitSpec(ruleSpec));\n layerSpec.layers.push(normalizeUnitSpec(lowerTickSpec));\n layerSpec.layers.push(normalizeUnitSpec(upperTickSpec));\n }\n return layerSpec;\n}\n\nexport function normalizeOverlay(spec: UnitSpec, overlayWithPoint: boolean, overlayWithLine: boolean): LayerSpec {\n let outerProps = ['name', 'description', 'data', 'transform'];\n let baseSpec = omit(spec, outerProps.concat('config'));\n\n let baseConfig = duplicate(spec.config);\n delete baseConfig.overlay;\n // TODO: remove shape, size\n\n // Need to copy stack config to overlayed layer\n const stacked = stack(spec.mark,\n spec.encoding,\n spec.config && spec.config.mark ? spec.config.mark.stacked : undefined\n );\n\n const layerSpec = extend(\n pick(spec, outerProps),\n { layers: [baseSpec] },\n keys(baseConfig).length > 0 ? { config: baseConfig } : {}\n );\n\n if (overlayWithLine) {\n // TODO: add name with suffix\n let lineSpec = duplicate(baseSpec);\n lineSpec.mark = LINE;\n // TODO: remove shape, size\n let markConfig = extend({},\n defaultOverlayConfig.lineStyle,\n spec.config.overlay.lineStyle,\n stacked ? {stacked: stacked.offset} : null\n );\n if (keys(markConfig).length > 0) {\n lineSpec.config = {mark: markConfig};\n }\n\n layerSpec.layers.push(lineSpec);\n }\n\n if (overlayWithPoint) {\n // TODO: add name with suffix\n let pointSpec = duplicate(baseSpec);\n pointSpec.mark = POINT;\n let markConfig = extend({},\n defaultOverlayConfig.pointStyle,\n spec.config.overlay.pointStyle,\n stacked ? {stacked: stacked.offset} : null\n );\n if (keys(markConfig).length > 0) {\n pointSpec.config = {mark: markConfig};\n }\n layerSpec.layers.push(pointSpec);\n }\n return layerSpec;\n}\n\n// TODO: add vl.spec.validate & move stuff from vl.validate to here\n\n/* Accumulate non-duplicate fieldDefs in a dictionary */\nfunction accumulate(dict: any, fieldDefs: FieldDef[]): any {\n fieldDefs.forEach(function(fieldDef) {\n // Consider only pure fieldDef properties (ignoring scale, axis, legend)\n var pureFieldDef = ['field', 'type', 'value', 'timeUnit', 'bin', 'aggregate'].reduce((f, key) => {\n if (fieldDef[key] !== undefined) {\n f[key] = fieldDef[key];\n }\n return f;\n }, {});\n let key = hash(pureFieldDef);\n dict[key] = dict[key] || fieldDef;\n });\n return dict;\n}\n\n/* Recursively get fieldDefs from a spec, returns a dictionary of fieldDefs */\nfunction fieldDefIndex(spec: ExtendedSpec | ExtendedFacetSpec, dict: any = {}): any {\n // TODO: Support repeat and concat\n if (isLayerSpec(spec)) {\n spec.layers.forEach(function(layer) {\n accumulate(dict, vlEncoding.fieldDefs(layer.encoding));\n });\n } else if (isSomeFacetSpec(spec)) {\n accumulate(dict, vlEncoding.fieldDefs(spec.facet));\n fieldDefIndex(spec.spec, dict);\n } else { // Unit Spec\n accumulate(dict, vlEncoding.fieldDefs(spec.encoding));\n }\n return dict;\n}\n\n/* Returns all non-duplicate fieldDefs in a spec in a flat array */\nexport function fieldDefs(spec: ExtendedSpec | ExtendedFacetSpec): FieldDef[] {\n return vals(fieldDefIndex(spec));\n};\n\nexport function isStacked(spec: ExtendedUnitSpec): boolean {\n return stack(spec.mark, spec.encoding,\n (spec.config && spec.config.mark) ? spec.config.mark.stacked : undefined\n ) !== null;\n}\n",
"import {SUM_OPS} from './aggregate';\nimport {Channel, STACK_GROUP_CHANNELS, X, Y} from './channel';\nimport {Encoding, has, isAggregate} from './encoding';\nimport {Mark, BAR, AREA, POINT, CIRCLE, SQUARE, LINE, TEXT, TICK} from './mark';\nimport {ScaleType} from './scale';\nimport {contains} from './util';\n\nexport enum StackOffset {\n ZERO = 'zero' as any,\n CENTER = 'center' as any,\n NORMALIZE = 'normalize' as any,\n NONE = 'none' as any\n}\n\nexport interface StackProperties {\n /** Dimension axis of the stack ('x' or 'y'). */\n groupbyChannel: Channel;\n\n /** Measure axis of the stack ('x' or 'y'). */\n fieldChannel: Channel;\n\n /** Stack-by channels e.g., color, detail */\n stackByChannels: Channel[];\n\n /** Stack offset property. */\n offset: StackOffset;\n}\n\nexport function stack(mark: Mark, encoding: Encoding, stacked: StackOffset): StackProperties {\n // Should not have stack explicitly disabled\n if (contains([StackOffset.NONE, null, false], stacked)) {\n return null;\n }\n\n // Should have stackable mark\n if (!contains([BAR, AREA, POINT, CIRCLE, SQUARE, LINE, TEXT, TICK], mark)) {\n return null;\n }\n\n // Should be aggregate plot\n if (!isAggregate(encoding)) {\n return null;\n }\n\n // Should have grouping level of detail\n const stackByChannels = STACK_GROUP_CHANNELS.reduce((sc, channel) => {\n if (has(encoding, channel) && !encoding[channel].aggregate) {\n sc.push(channel);\n }\n return sc;\n }, []);\n\n if (stackByChannels.length === 0) {\n return null;\n }\n\n // Has only one aggregate axis\n const hasXField = has(encoding, X);\n const hasYField = has(encoding, Y);\n const xIsAggregate = hasXField && !!encoding.x.aggregate;\n const yIsAggregate = hasYField && !!encoding.y.aggregate;\n\n if (xIsAggregate !== yIsAggregate) {\n const fieldChannel = xIsAggregate ? X : Y;\n const fieldChannelAggregate = encoding[fieldChannel].aggregate;\n const fieldChannelScale = encoding[fieldChannel].scale;\n\n if (fieldChannelScale && fieldChannelScale.type && fieldChannelScale.type !== ScaleType.LINEAR) {\n console.warn('Cannot stack non-linear (' + fieldChannelScale.type + ') scale');\n return null;\n }\n\n if (contains(SUM_OPS, fieldChannelAggregate)) {\n if (contains([BAR, AREA], mark)) {\n // Bar and Area with sum ops are automatically stacked by default\n stacked = stacked === undefined ? StackOffset.ZERO : stacked;\n }\n } else {\n console.warn('Cannot stack when the aggregate function is ' + fieldChannelAggregate + '(non-summative).');\n return null;\n }\n\n if (!stacked) {\n return null;\n }\n\n return {\n groupbyChannel: xIsAggregate ? (hasYField ? Y : null) : (hasXField ? X : null),\n fieldChannel: fieldChannel,\n stackByChannels: stackByChannels,\n offset: stacked\n };\n }\n return null;\n}\n",
"import {COLUMN, ROW, SHAPE, COLOR, Channel} from './channel';\nimport {DateTimeExpr, dateTimeExpr} from './datetime';\nimport {ScaleType} from './scale';\nimport {Dict, contains, keys, range} from './util';\n\nexport enum TimeUnit {\n YEAR = 'year' as any,\n MONTH = 'month' as any,\n DAY = 'day' as any,\n DATE = 'date' as any,\n HOURS = 'hours' as any,\n MINUTES = 'minutes' as any,\n SECONDS = 'seconds' as any,\n MILLISECONDS = 'milliseconds' as any,\n YEARMONTH = 'yearmonth' as any,\n YEARMONTHDATE = 'yearmonthdate' as any,\n YEARMONTHDATEHOURS = 'yearmonthdatehours' as any,\n YEARMONTHDATEHOURSMINUTES = 'yearmonthdatehoursminutes' as any,\n YEARMONTHDATEHOURSMINUTESSECONDS = 'yearmonthdatehoursminutesseconds' as any,\n\n // MONTHDATE always include 29 February since we use year 0th (which is a leap year)\n MONTHDATE = 'monthdate' as any,\n HOURSMINUTES = 'hoursminutes' as any,\n HOURSMINUTESSECONDS = 'hoursminutesseconds' as any,\n MINUTESSECONDS = 'minutesseconds' as any,\n SECONDSMILLISECONDS = 'secondsmilliseconds' as any,\n QUARTER = 'quarter' as any,\n YEARQUARTER = 'yearquarter' as any,\n QUARTERMONTH = 'quartermonth' as any,\n YEARQUARTERMONTH = 'yearquartermonth' as any,\n}\n\n/** Time Unit that only corresponds to only one part of Date objects. */\nexport const SINGLE_TIMEUNITS = [\n TimeUnit.YEAR,\n TimeUnit.QUARTER,\n TimeUnit.MONTH,\n TimeUnit.DAY,\n TimeUnit.DATE,\n TimeUnit.HOURS,\n TimeUnit.MINUTES,\n TimeUnit.SECONDS,\n TimeUnit.MILLISECONDS,\n];\n\nconst SINGLE_TIMEUNIT_INDEX: Dict<boolean> = SINGLE_TIMEUNITS.reduce((d, timeUnit) => {\n d[timeUnit] = true;\n return d;\n}, {} as Dict<boolean>);\n\nexport function isSingleTimeUnit(timeUnit: TimeUnit) {\n return !!SINGLE_TIMEUNIT_INDEX[timeUnit];\n}\n\n/**\n * Converts a date to only have the measurements relevant to the specified unit\n * i.e. ('yearmonth', '2000-12-04 07:58:14') -> '2000-12-01 00:00:00'\n * Note: the base date is Jan 01 1900 00:00:00\n */\nexport function convert(unit: TimeUnit, date: Date): Date {\n const result: Date = new Date(0, 0, 1, 0, 0, 0, 0); // start with uniform date\n SINGLE_TIMEUNITS.forEach(function(singleUnit) {\n if (containsTimeUnit(unit, singleUnit)) {\n switch (singleUnit) {\n case TimeUnit.DAY:\n throw new Error('Cannot convert to TimeUnits containing \\'day\\'');\n case TimeUnit.YEAR:\n result.setFullYear(date.getFullYear());\n break;\n case TimeUnit.QUARTER:\n // indicate quarter by setting month to be the first of the quarter i.e. may (4) -> april (3)\n result.setMonth((Math.floor(date.getMonth() / 3)) * 3);\n break;\n case TimeUnit.MONTH:\n result.setMonth(date.getMonth());\n break;\n case TimeUnit.DATE:\n result.setDate(date.getDate());\n break;\n case TimeUnit.HOURS:\n result.setHours(date.getHours());\n break;\n case TimeUnit.MINUTES:\n result.setMinutes(date.getMinutes());\n break;\n case TimeUnit.SECONDS:\n result.setSeconds(date.getSeconds());\n break;\n case TimeUnit.MILLISECONDS:\n result.setMilliseconds(date.getMilliseconds());\n break;\n }\n }\n });\n\n return result;\n}\n\nexport const MULTI_TIMEUNITS = [\n TimeUnit.YEARQUARTER,\n TimeUnit.YEARQUARTERMONTH,\n TimeUnit.YEARMONTH,\n TimeUnit.YEARMONTHDATE,\n TimeUnit.YEARMONTHDATEHOURS,\n TimeUnit.YEARMONTHDATEHOURSMINUTES,\n TimeUnit.YEARMONTHDATEHOURSMINUTESSECONDS,\n TimeUnit.QUARTERMONTH,\n TimeUnit.HOURSMINUTES,\n TimeUnit.HOURSMINUTESSECONDS,\n TimeUnit.MINUTESSECONDS,\n TimeUnit.SECONDSMILLISECONDS,\n];\n\nconst MULTI_TIMEUNIT_INDEX: Dict<boolean> = MULTI_TIMEUNITS.reduce((d, timeUnit) => {\n d[timeUnit] = true;\n return d;\n}, {} as Dict<boolean>);\n\nexport function isMultiTimeUnit(timeUnit: TimeUnit) {\n return !!MULTI_TIMEUNIT_INDEX[timeUnit];\n}\n\nexport const TIMEUNITS = SINGLE_TIMEUNITS.concat(MULTI_TIMEUNITS);\n\n/** Returns true if fullTimeUnit contains the timeUnit, false otherwise. */\nexport function containsTimeUnit(fullTimeUnit: TimeUnit, timeUnit: TimeUnit) {\n let fullTimeUnitStr = fullTimeUnit.toString();\n let timeUnitStr = timeUnit.toString();\n const index = fullTimeUnitStr.indexOf(timeUnitStr);\n return index > -1 &&\n (\n timeUnit !== TimeUnit.SECONDS ||\n index === 0 ||\n fullTimeUnitStr.charAt(index-1) !== 'i' // exclude milliseconds\n );\n}\n\nexport function defaultScaleType(timeUnit: TimeUnit) {\n switch (timeUnit) {\n case TimeUnit.HOURS:\n case TimeUnit.DAY:\n case TimeUnit.MONTH:\n case TimeUnit.QUARTER:\n return ScaleType.ORDINAL;\n }\n // date, year, minute, second, yearmonth, monthday, ...\n return ScaleType.TIME;\n}\n\n/**\n * Returns Vega expresssion for a given timeUnit and fieldRef\n */\nexport function fieldExpr(fullTimeUnit: TimeUnit, field: string): string {\n const fieldRef = 'datum[\"' + field + '\"]';\n\n function func(timeUnit: TimeUnit) {\n if (timeUnit === TimeUnit.QUARTER) {\n // Divide by 3 to get the corresponding quarter number, multiply by 3\n // to scale to the first month of the corresponding quarter(0,3,6,9).\n return 'floor(month(' + fieldRef + ')' + '/3)';\n } else {\n return timeUnit + '(' + fieldRef + ')' ;\n }\n }\n\n let d: DateTimeExpr = SINGLE_TIMEUNITS.reduce((_d, tu: TimeUnit) => {\n if (containsTimeUnit(fullTimeUnit, tu)) {\n _d[tu] = func(tu);\n }\n return _d;\n }, {});\n\n if (d.day && keys(d).length > 1) {\n console.warn('Time unit \"'+ fullTimeUnit +'\" is not supported. We are replacing it with ',\n (fullTimeUnit+'').replace('day', 'date')+'.');\n delete d.day;\n d.date = func(TimeUnit.DATE);\n }\n\n return dateTimeExpr(d);\n}\n\n/** Generate the complete domain. */\nexport function imputedDomain(timeUnit: TimeUnit, channel: Channel) {\n if (contains([ROW, COLUMN, SHAPE, COLOR], channel)) {\n return null;\n }\n\n switch (timeUnit) {\n case TimeUnit.SECONDS:\n return range(0, 60);\n case TimeUnit.MINUTES:\n return range(0, 60);\n case TimeUnit.HOURS:\n return range(0, 24);\n case TimeUnit.DAY:\n return range(0, 7);\n case TimeUnit.DATE:\n return range(1, 32);\n case TimeUnit.MONTH:\n return range(0, 12);\n case TimeUnit.QUARTER:\n return [0,1,2,3]; // Q1-Q4 (0th-index)\n }\n\n return null;\n}\n\n/** returns the smallest nice unit for scale.nice */\nexport function smallestUnit(timeUnit): string {\n if (!timeUnit) {\n return undefined;\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.SECONDS)) {\n return 'second';\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.MINUTES)) {\n return 'minute';\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.HOURS)) {\n return 'hour';\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.DAY) ||\n containsTimeUnit(timeUnit, TimeUnit.DATE)) {\n return 'day';\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.MONTH)) {\n return 'month';\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.YEAR)) {\n return 'year';\n }\n return undefined;\n}\n\n/** returns the template name used for axis labels for a time unit */\nexport function template(timeUnit: TimeUnit, field: string, shortTimeLabels: boolean): string {\n if (!timeUnit) {\n return undefined;\n }\n\n let dateComponents = [];\n let template = '';\n const hasYear = containsTimeUnit(timeUnit, TimeUnit.YEAR);\n\n if (containsTimeUnit(timeUnit, TimeUnit.QUARTER)) {\n // special template for quarter as prefix\n template = 'Q{{' + field + ' | quarter}}';\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.MONTH)) {\n // By default use short month name\n dateComponents.push(shortTimeLabels !== false ? '%b' : '%B');\n }\n\n if (containsTimeUnit(timeUnit, TimeUnit.DAY)) {\n dateComponents.push(shortTimeLabels ? '%a' : '%A');\n } else if (containsTimeUnit(timeUnit, TimeUnit.DATE)) {\n dateComponents.push('%d' + (hasYear ? ',' : '')); // add comma if there is year\n }\n\n if (hasYear) {\n dateComponents.push(shortTimeLabels ? '%y' : '%Y');\n }\n\n let timeComponents = [];\n\n if (containsTimeUnit(timeUnit, TimeUnit.HOURS)) {\n timeComponents.push('%H');\n }\n if (containsTimeUnit(timeUnit, TimeUnit.MINUTES)) {\n timeComponents.push('%M');\n }\n if (containsTimeUnit(timeUnit, TimeUnit.SECONDS)) {\n timeComponents.push('%S');\n }\n if (containsTimeUnit(timeUnit, TimeUnit.MILLISECONDS)) {\n timeComponents.push('%L');\n }\n\n let dateTimeComponents = [];\n if (dateComponents.length > 0) {\n dateTimeComponents.push(dateComponents.join(' '));\n }\n if (timeComponents.length > 0) {\n dateTimeComponents.push(timeComponents.join(':'));\n }\n\n if (dateTimeComponents.length > 0) {\n if (template) {\n // Add space between quarter and main time format\n template += ' ';\n }\n template += '{{' + field + ' | time:\\'' + dateTimeComponents.join(' ') + '\\'}}';\n }\n\n // If template is still an empty string, return undefined instead.\n return template || undefined;\n}\n\n",
"/** Constants and utilities for data type */\n\nexport enum Type {\n QUANTITATIVE = 'quantitative' as any,\n ORDINAL = 'ordinal' as any,\n TEMPORAL = 'temporal' as any,\n NOMINAL = 'nominal' as any\n}\n\nexport const QUANTITATIVE = Type.QUANTITATIVE;\nexport const ORDINAL = Type.ORDINAL;\nexport const TEMPORAL = Type.TEMPORAL;\nexport const NOMINAL = Type.NOMINAL;\n\n/**\n * Mapping from full type names to short type names.\n * @type {Object}\n */\nexport const SHORT_TYPE = {\n quantitative: 'Q',\n temporal: 'T',\n nominal: 'N',\n ordinal: 'O'\n};\n/**\n * Mapping from short type names to full type names.\n * @type {Object}\n */\nexport const TYPE_FROM_SHORT_TYPE = {\n Q: QUANTITATIVE,\n T: TEMPORAL,\n O: ORDINAL,\n N: NOMINAL\n};\n\n/**\n * Get full, lowercase type name for a given type.\n * @param type\n * @return Full type name.\n */\nexport function getFullName(type: Type): Type {\n const typeString = <any>type; // force type as string so we can translate short types\n return TYPE_FROM_SHORT_TYPE[typeString.toUpperCase()] || // short type is uppercase by default\n typeString.toLowerCase();\n}\n",
"/// <reference path=\"../typings/datalib.d.ts\"/>\n\nimport * as stringify from 'json-stable-stringify';\nexport {keys, extend, duplicate, isArray, vals, truncate, toMap, isObject, isString, isNumber, isBoolean} from 'datalib/src/util';\nimport {duplicate as _duplicate} from 'datalib/src/util';\nimport {isString, isNumber, isBoolean} from 'datalib/src/util';\n\n/**\n * Creates an object composed of the picked object properties.\n *\n * Example: (from lodash)\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n * pick(object, ['a', 'c']);\n * // → { 'a': 1, 'c': 3 }\n *\n */\nexport function pick(obj: any, props: string[]) {\n let copy = {};\n props.forEach((prop) => {\n if (obj.hasOwnProperty(prop)) {\n copy[prop] = obj[prop];\n }\n });\n return copy;\n}\n\n// Copied from datalib\nexport function range(start: number, stop?: number, step?: number): Array<number> {\n if (arguments.length < 3) {\n step = 1;\n if (arguments.length < 2) {\n stop = start;\n start = 0;\n }\n }\n if ((stop - start) / step === Infinity) {\n throw new Error('Infinite range');\n }\n var range = [], i = -1, j;\n if (step < 0) {\n /* tslint:disable */\n while ((j = start + step * ++i) > stop) {\n range.push(j);\n }\n } else {\n while ((j = start + step * ++i) < stop) {\n range.push(j);\n }\n /* tslint:enable */\n }\n return range;\n};\n\n/**\n * The opposite of _.pick; this method creates an object composed of the own\n * and inherited enumerable string keyed properties of object that are not omitted.\n */\nexport function omit(obj: any, props: string[]) {\n let copy = _duplicate(obj);\n props.forEach((prop) => {\n delete copy[prop];\n });\n return copy;\n}\n\nexport function hash(a: any) {\n if (isString(a) || isNumber(a) || isBoolean(a)) {\n return String(a);\n }\n return stringify(a);\n}\n\nexport function contains<T>(array: Array<T>, item: T) {\n return array.indexOf(item) > -1;\n}\n\n/** Returns the array without the elements in item */\nexport function without<T>(array: Array<T>, excludedItems: Array<T>) {\n return array.filter(function(item) {\n return !contains(excludedItems, item);\n });\n}\n\nexport function union<T>(array: Array<T>, other: Array<T>) {\n return array.concat(without(other, array));\n}\n\nexport function forEach(obj, f: (a, d, k, o) => any, thisArg?) {\n if (obj.forEach) {\n obj.forEach.call(thisArg, f);\n } else {\n for (let k in obj) {\n if (obj.hasOwnProperty(k)) {\n f.call(thisArg, obj[k], k, obj);\n }\n }\n }\n}\n\nexport function reduce(obj, f: (a, i, d, k, o) => any, init, thisArg?) {\n if (obj.reduce) {\n return obj.reduce.call(thisArg, f, init);\n } else {\n for (let k in obj) {\n if (obj.hasOwnProperty(k)) {\n init = f.call(thisArg, init, obj[k], k, obj);\n }\n }\n return init;\n }\n}\n\nexport function map(obj, f: (a, d, k, o) => any, thisArg?) {\n if (obj.map) {\n return obj.map.call(thisArg, f);\n } else {\n let output = [];\n for (let k in obj) {\n if (obj.hasOwnProperty(k)) {\n output.push(f.call(thisArg, obj[k], k, obj));\n }\n }\n return output;\n }\n}\n\nexport function some<T>(arr: Array<T>, f: (d: T, k?, i?) => boolean) {\n let i = 0;\n for (let k = 0; k<arr.length; k++) {\n if (f(arr[k], k, i++)) {\n return true;\n }\n }\n return false;\n}\n\nexport function every<T>(arr: Array<T>, f: (d: T, k?, i?) => boolean) {\n let i = 0;\n for (let k = 0; k<arr.length; k++) {\n if (!f(arr[k], k, i++)) {\n return false;\n }\n }\n return true;\n}\n\nexport function flatten(arrays: any[]) {\n return [].concat.apply([], arrays);\n}\n\nexport function mergeDeep(dest, ...src: any[]) {\n for (let i = 0; i < src.length; i++) {\n dest = deepMerge_(dest, src[i]);\n }\n return dest;\n};\n\n// recursively merges src into dest\nfunction deepMerge_(dest, src) {\n if (typeof src !== 'object' || src === null) {\n return dest;\n }\n\n for (let p in src) {\n if (!src.hasOwnProperty(p)) {\n continue;\n }\n if (src[p] === undefined) {\n continue;\n }\n if (typeof src[p] !== 'object' || src[p] === null) {\n dest[p] = src[p];\n } else if (typeof dest[p] !== 'object' || dest[p] === null) {\n dest[p] = mergeDeep(src[p].constructor === Array ? [] : {}, src[p]);\n } else {\n mergeDeep(dest[p], src[p]);\n }\n }\n return dest;\n}\n\nexport function unique<T>(values: T[], f?: (item: T) => string) {\n let results = [];\n var u = {}, v, i, n;\n for (i = 0, n = values.length; i < n; ++i) {\n v = f ? f(values[i]) : values[i];\n if (v in u) {\n continue;\n }\n u[v] = 1;\n results.push(values[i]);\n }\n return results;\n};\n\nexport function warning(message: any) {\n console.warn('[VL Warning]', message);\n}\n\nexport function error(message: any) {\n console.error('[VL Error]', message);\n}\n\nexport interface Dict<T> {\n [key: string]: T;\n}\n\nexport type StringSet = Dict<boolean>;\n\n/**\n * Returns true if the two dictionaries disagree. Applies only to defined values.\n */\nexport function differ<T>(dict: Dict<T>, other: Dict<T>) {\n for (let key in dict) {\n if (dict.hasOwnProperty(key)) {\n if (other[key] && dict[key] && other[key] !== dict[key]) {\n return true;\n }\n }\n }\n return false;\n}\n",
"import {ExtendedUnitSpec} from './spec';\n\n// TODO: move to vl.spec.validator?\n\nimport {toMap} from './util';\nimport {BAR} from './mark';\n\nexport interface RequiredChannelMap {\n [mark: string]: Array<string>;\n}\n\n/**\n * Required Encoding Channels for each mark type\n * @type {Object}\n */\nexport const DEFAULT_REQUIRED_CHANNEL_MAP: RequiredChannelMap = {\n text: ['text'],\n line: ['x', 'y'],\n area: ['x', 'y']\n};\n\nexport interface SupportedChannelMap {\n [mark: string]: {\n [channel: string]: number\n };\n}\n\n/**\n * Supported Encoding Channel for each mark type\n */\nexport const DEFAULT_SUPPORTED_CHANNEL_TYPE: SupportedChannelMap = {\n bar: toMap(['row', 'column', 'x', 'y', 'size', 'color', 'detail']),\n line: toMap(['row', 'column', 'x', 'y', 'color', 'detail']), // TODO: add size when Vega supports\n area: toMap(['row', 'column', 'x', 'y', 'color', 'detail']),\n tick: toMap(['row', 'column', 'x', 'y', 'color', 'detail']),\n circle: toMap(['row', 'column', 'x', 'y', 'color', 'size', 'detail']),\n square: toMap(['row', 'column', 'x', 'y', 'color', 'size', 'detail']),\n point: toMap(['row', 'column', 'x', 'y', 'color', 'size', 'detail', 'shape']),\n text: toMap(['row', 'column', 'size', 'color', 'text']) // TODO(#724) revise\n};\n\n// TODO: consider if we should add validate method and\n// requires ZSchema in the main vega-lite repo\n\n/**\n * Further check if encoding mapping of a spec is invalid and\n * return error if it is invalid.\n *\n * This checks if\n * (1) all the required encoding channels for the mark type are specified\n * (2) all the specified encoding channels are supported by the mark type\n * @param {[type]} spec [description]\n * @param {RequiredChannelMap = DefaultRequiredChannelMap} requiredChannelMap\n * @param {SupportedChannelMap = DefaultSupportedChannelMap} supportedChannelMap\n * @return {String} Return one reason why the encoding is invalid,\n * or null if the encoding is valid.\n */\nexport function getEncodingMappingError(spec: ExtendedUnitSpec,\n requiredChannelMap: RequiredChannelMap = DEFAULT_REQUIRED_CHANNEL_MAP,\n supportedChannelMap: SupportedChannelMap = DEFAULT_SUPPORTED_CHANNEL_TYPE\n ) {\n let mark = spec.mark;\n let encoding = spec.encoding;\n let requiredChannels = requiredChannelMap[mark];\n let supportedChannels = supportedChannelMap[mark];\n\n for (let i in requiredChannels) { // all required channels are in encoding`\n if (!(requiredChannels[i] in encoding)) {\n return 'Missing encoding channel \\\"' + requiredChannels[i] +\n '\\\" for mark \\\"' + mark + '\\\"';\n }\n }\n\n for (let channel in encoding) { // all channels in encoding are supported\n if (!supportedChannels[channel]) {\n return 'Encoding channel \\\"' + channel +\n '\\\" is not supported by mark type \\\"' + mark + '\\\"';\n }\n }\n\n if (mark === BAR && !encoding.x && !encoding.y) {\n return 'Missing both x and y for bar';\n }\n\n return null;\n}\n",
"import {isArray} from './util';\nimport {ScaleType, NiceTime} from './scale';\n\nexport interface VgData {\n name: string;\n source?: string;\n values?: any;\n format?: any;\n url?: any;\n transform?: any;\n}\n\nexport type VgParentRef = {\n parent: string\n};\n\nexport type VgFieldRef = string | VgParentRef | VgParentRef[];\n\nexport type VgDataRef = {\n data: string,\n field: VgFieldRef,\n sort: boolean | {\n field: VgFieldRef,\n op: string\n }\n};\n\nexport type VgValueRef = {\n value?: any,\n field?: string | {\n datum?: string,\n group?: string,\n parent?: string\n },\n template?: string,\n scale?: string, // TODO: object\n mult?: number,\n offset?: number,\n band?: boolean\n}\n\nexport type UnionedDomain = {\n fields: VgDataRef[]\n};\n\nexport type VgScale = {\n name: string,\n type: ScaleType,\n domain?: any[] | UnionedDomain | VgDataRef,\n domainMin?: any,\n domainMax?: any\n range?: any[] | VgDataRef | string,\n rangeMin?: any,\n rangeMax?: any,\n\n bandSize?: number,\n clamp?: boolean,\n exponent?: number,\n nice?: boolean | NiceTime,\n padding?: number,\n points?: boolean,\n reverse?: boolean,\n round?: boolean,\n zero?: boolean\n}\n\nexport function isUnionedDomain(domain: any[] | UnionedDomain | VgDataRef): domain is UnionedDomain {\n if (!isArray(domain)) {\n return 'fields' in domain;\n }\n return false;\n}\n\nexport function isDataRefDomain(domain: any[] | UnionedDomain | VgDataRef): domain is VgDataRef {\n if (!isArray(domain)) {\n return 'data' in domain;\n }\n return false;\n}\n\n// TODO: declare\nexport type VgMarkGroup = any;\nexport type VgAxis = any;\nexport type VgLegend = any;\nexport type VgTransform = any;\n\nexport interface VgStackTransform {\n type: string;\n offset?: any;\n groupby: any;\n field: any;\n sortby: any;\n output: any;\n}\n",
"export import axis = require('./axis');\nexport import aggregate = require('./aggregate');\nexport import bin = require('./bin');\nexport import channel = require('./channel');\nexport const compile = require('./compile/compile').compile;\nexport import config = require('./config');\nexport import data = require('./data');\nexport import datetime = require('./datetime');\nexport import encoding = require('./encoding');\nexport import facet = require('./facet');\nexport import fieldDef = require('./fielddef');\nexport import legend = require('./legend');\nexport import mark = require('./mark');\nexport import scale = require('./scale');\nexport import shorthand = require('./shorthand');\nexport import sort = require('./sort');\nexport import spec = require('./spec');\nexport import stack = require('./stack');\nexport import timeUnit = require('./timeunit');\nexport import transform = require('./transform');\nexport import type = require('./type');\nexport import util = require('./util');\nexport import validate = require('./validate');\n\nexport const version: string = require('../package.json').version;\n"
]
}