vega-lite
Advanced tools
Comparing version 0.7.9 to 0.7.10
{ | ||
"name": "vega-lite", | ||
"main": "vega-lite.js", | ||
"version": "0.7.9", | ||
"version": "0.7.10", | ||
"homepage": "https://github.com/uwdata/vega-lite", | ||
@@ -6,0 +6,0 @@ "authors": [ |
@@ -25,2 +25,3 @@ 'use strict'; | ||
title: 'Horse power and miles per gallon', | ||
description: 'A scatter plot.', | ||
spec: { | ||
@@ -46,2 +47,3 @@ marktype: 'point', | ||
title: 'Horse power histogram', | ||
description: 'Simple histogram with bars broken down by the number of cylinders. Also has a legend.', | ||
spec: { | ||
@@ -89,3 +91,3 @@ marktype: 'bar', | ||
},{ | ||
title: 'small multiples', | ||
title: 'Small Multiples', | ||
spec: { | ||
@@ -98,7 +100,6 @@ 'marktype': 'point', | ||
}, | ||
'config': {'singleHeight': 400,'singleWidth': 400,'largeBandMaxCardinality': 20}, | ||
'data': {'url': 'data/movies.json'} | ||
} | ||
},{ | ||
title: 'ordinal on top', | ||
title: 'Ordinal on Top', | ||
spec: { | ||
@@ -110,3 +111,2 @@ 'marktype': 'point', | ||
}, | ||
'config': {'singleHeight': 400,'singleWidth': 400,'largeBandMaxCardinality': 20}, | ||
'data': {'url': 'data/movies.json'} | ||
@@ -113,0 +113,0 @@ } |
{ | ||
"name": "vega-lite", | ||
"author": "Jeffrey Heer, Dominik Moritz, Kanit \"Ham\" Wongsuphasawat", | ||
"version": "0.7.9", | ||
"version": "0.7.10", | ||
"collaborators": [ | ||
@@ -6,0 +6,0 @@ "Kanit Wongsuphasawat <kanitw@gmail.com> (http://kanitw.yellowpigz.com)", |
@@ -1,6 +0,6 @@ | ||
# Vega-lite | ||
# Vega-lite | ||
[![Build Status](https://travis-ci.org/uwdata/vega-lite.svg)](https://travis-ci.org/uwdata/vega-lite) | ||
[![npm dependencies](https://david-dm.org/uwdata/vega-lite.svg)](https://www.npmjs.com/package/vega-lite) | ||
[![npm version](https://img.shields.io/npm/v/vega-lite.svg)](https://www.npmjs.com/package/vega-lite) | ||
[![Build Status](https://travis-ci.org/uwdata/vega-lite.svg)](https://travis-ci.org/uwdata/vega-lite) | ||
[![npm dependencies](https://david-dm.org/uwdata/vega-lite.svg)](https://www.npmjs.com/package/vega-lite) | ||
[![npm version](https://img.shields.io/npm/v/vega-lite.svg)](https://www.npmjs.com/package/vega-lite) | ||
[![Coverage Status](https://coveralls.io/repos/uwdata/vega-lite/badge.svg)](https://coveralls.io/r/uwdata/vega-lite) | ||
@@ -23,2 +23,4 @@ | ||
We have more example visualizations in our [gallery](https://uwdata.github.io/vega-lite/gallery.html). | ||
### Barleys | ||
@@ -25,0 +27,0 @@ |
@@ -42,3 +42,3 @@ 'use strict'; | ||
requiredEncoding: ['x', 'y'], | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, alpha: 1} | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1} | ||
}; | ||
@@ -51,3 +51,3 @@ | ||
requiredEncoding: ['x', 'y'], | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, alpha: 1, detail:1} | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail:1} | ||
}; | ||
@@ -61,3 +61,3 @@ | ||
prop: area_props, | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, alpha: 1} | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1} | ||
}; | ||
@@ -68,3 +68,3 @@ | ||
prop: tick_props, | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, alpha: 1, detail: 1} | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, color: 1, detail: 1} | ||
}; | ||
@@ -75,3 +75,3 @@ | ||
prop: filled_point_props('circle'), | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, alpha: 1, detail: 1} | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, detail: 1} | ||
}; | ||
@@ -88,3 +88,3 @@ | ||
prop: point_props, | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, alpha: 1, shape: 1, detail: 1} | ||
supportedEncoding: {row: 1, col: 1, x: 1, y: 1, size: 1, color: 1, shape: 1, detail: 1} | ||
}; | ||
@@ -96,3 +96,3 @@ | ||
requiredEncoding: ['text'], | ||
supportedEncoding: {row: 1, col: 1, size: 1, color: 1, alpha: 1, text: 1} | ||
supportedEncoding: {row: 1, col: 1, size: 1, color: 1, text: 1} | ||
}; | ||
@@ -156,4 +156,2 @@ | ||
// fill | ||
@@ -166,8 +164,5 @@ if (e.has(COLOR)) { | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} | ||
// opacity | ||
var opacity = e.field(COLOR).opacity; | ||
if (opacity) p.opacity = {value: opacity}; | ||
@@ -224,10 +219,5 @@ return p; | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} else if (!e.has(COLOR)) { | ||
p.opacity = {value: style.opacity}; | ||
} | ||
// opacity | ||
var opacity = e.field(COLOR).opacity || style.opacity; | ||
if (opacity) p.opacity = {value: opacity}; | ||
@@ -262,8 +252,4 @@ return p; | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} | ||
var opacity = e.field(COLOR).opacity; | ||
if (opacity) p.opacity = {value: opacity}; | ||
@@ -309,8 +295,4 @@ p.strokeWidth = {value: e.config('strokeWidth')}; | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} | ||
var opacity = e.field(COLOR).opacity; | ||
if (opacity) p.opacity = {value: opacity}; | ||
@@ -364,10 +346,4 @@ return p; | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} else if (!e.has(COLOR)) { | ||
p.opacity = {value: style.opacity}; | ||
} | ||
var opacity = e.field(COLOR).opacity || style.opacity; | ||
if(opacity) p.opacity = {value: opacity}; | ||
@@ -412,10 +388,4 @@ return p; | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} else if (!e.has(COLOR)) { | ||
p.opacity = {value: style.opacity}; | ||
} | ||
var opacity = e.field(COLOR).opacity || style.opacity; | ||
if(opacity) p.opacity = {value: opacity}; | ||
@@ -459,10 +429,4 @@ return p; | ||
// alpha | ||
if (e.has(ALPHA)) { | ||
p.opacity = {scale: ALPHA, field: e.fieldRef(ALPHA)}; | ||
} else if (e.value(ALPHA) !== undefined) { | ||
p.opacity = {value: e.value(ALPHA)}; | ||
} else { | ||
p.opacity = {value: style.opacity}; | ||
} | ||
var opacity = e.field(COLOR).opacity || style.opacity; | ||
if(opacity) p.opacity = {value: opacity}; | ||
@@ -469,0 +433,0 @@ // text |
@@ -188,5 +188,2 @@ 'use strict'; | ||
break; | ||
case ALPHA: | ||
s.range = [0.2, 1.0]; | ||
break; | ||
default: | ||
@@ -193,0 +190,0 @@ throw new Error('Unknown encoding name: '+ s.name); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
consts.encodingTypes = [X, Y, ROW, COL, SIZE, SHAPE, COLOR, ALPHA, TEXT, DETAIL]; | ||
consts.encodingTypes = [X, Y, ROW, COL, SIZE, SHAPE, COLOR, TEXT, DETAIL]; | ||
@@ -10,0 +10,0 @@ consts.shorthand = { |
@@ -17,3 +17,2 @@ // utility for enc | ||
if (enc.color) count++; | ||
if (enc.alpha) count++; | ||
if (enc.size) count++; | ||
@@ -20,0 +19,0 @@ if (enc.shape) count++; |
@@ -18,3 +18,2 @@ 'use strict'; | ||
g.COLOR = 'color'; | ||
g.ALPHA = 'alpha'; | ||
g.TEXT = 'text'; | ||
@@ -21,0 +20,0 @@ g.DETAIL = 'detail'; |
@@ -348,2 +348,8 @@ // Package of defining Vega-lite Specification's json schema | ||
}, | ||
opacity: { | ||
type: 'number', | ||
default: undefined, // auto | ||
minimum: 0, | ||
maximum: 1 | ||
}, | ||
scale: { | ||
@@ -384,15 +390,2 @@ type: 'object', | ||
var alphaMixin = { | ||
type: 'object', | ||
supportedMarktypes: {point: true, tick: true, bar: true, line: true, area: true, circle: true, square: true, 'text': true}, | ||
properties: { | ||
value: { | ||
type: 'number', | ||
default: undefined, // auto | ||
minimum: 0, | ||
maximum: 1 | ||
} | ||
} | ||
}; | ||
var shapeMixin = { | ||
@@ -477,3 +470,3 @@ type: 'object', | ||
measure: true, | ||
dimension: 'ordinal-only' // using alpha / size to encoding category lead to order interpretation | ||
dimension: 'ordinal-only' // using size to encoding category lead to order interpretation | ||
} | ||
@@ -497,3 +490,3 @@ }); | ||
var color = merge(clone(multiRoleField), legendMixin, colorMixin, sortMixin); | ||
var alpha = merge(clone(quantitativeField), alphaMixin, sortMixin); | ||
var shape = merge(clone(onlyOrdinalField), legendMixin, shapeMixin, sortMixin); | ||
@@ -745,3 +738,2 @@ var detail = merge(clone(onlyOrdinalField), detailMixin, sortMixin); | ||
color: color, | ||
alpha: alpha, | ||
shape: shape, | ||
@@ -748,0 +740,0 @@ text: text, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7525006
104
100
119956