Skip to content

Commit

Permalink
Deploy 2022 01 05 2 (microsoft#575)
Browse files Browse the repository at this point in the history
* minor version

* deploy to site
  • Loading branch information
danmarshall authored Jan 6, 2023
1 parent 1b264ab commit cf9de37
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 37 deletions.
27 changes: 19 additions & 8 deletions docs/app/js/sanddance-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4512,6 +4512,7 @@ var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
parcelHelpers.export(exports, "binnable", ()=>binnable);
parcelHelpers.export(exports, "outerExtentSignal", ()=>outerExtentSignal);
parcelHelpers.export(exports, "shouldBeIntegralBinStep", ()=>shouldBeIntegralBinStep);
/*!
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
Expand Down Expand Up @@ -4556,6 +4557,7 @@ function binnable(prefix, domainDataName, discreteColumn, outerSignalExtents) {
extent: {
signal: `[${extentSignal}[0], ${extentSignal}[1] + 1e-11]`
},
minstep: shouldBeIntegralBinStep(column) ? 1 : 0,
maxbins: {
signal: maxbinsSignalName
}
Expand Down Expand Up @@ -4657,6 +4659,10 @@ function outerExtentSignal(name, min, max, dataExtent) {
update: `[min(${min}, ${dataExtent}[0]), max(${max}, ${dataExtent}[1])]`
};
}
function shouldBeIntegralBinStep(column) {
//prevent Vega from showing ".5" steps between integer scale values
return column.quantitative && column.type === "integer" && column.stats.max - column.stats.min <= 7;
}

},{"./constants":"9PPhV","./expr":"f5d82","./defaults":"lzTCE","./transforms":"7WnfB","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"7WnfB":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
Expand Down Expand Up @@ -5068,7 +5074,8 @@ class Scatter extends (0, _layout.Layout) {
});
(0, _scope.addScales)(globalScope.scope, {
name: names.sizeScale,
type: "linear",
type: "pow",
exponent: 0.5,
domain: [
0,
{
Expand Down Expand Up @@ -5191,13 +5198,17 @@ class Scatter extends (0, _layout.Layout) {
const { column , domain , reverse , scaleName , signal , xyz } = cs;
if (!column) return;
let scale;
if (column.quantitative) scale = (0, _scales.linearScale)(scaleName, domain, [
0,
{
signal
}
], reverse, false, showAxes);
else scale = (0, _scales.pointScale)(scaleName, globalScope.data.name, [
if (column.quantitative) {
scale = (0, _scales.linearScale)(scaleName, domain, [
0,
{
signal
}
], reverse, false, showAxes);
if ((0, _bin.shouldBeIntegralBinStep)(column)) scale.bins = {
step: 1
};
} else scale = (0, _scales.pointScale)(scaleName, globalScope.data.name, [
0,
{
signal
Expand Down
26 changes: 18 additions & 8 deletions docs/dist/sanddance-explorer/v4/sanddance-explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3251,6 +3251,7 @@ function $02bd8e9b090c20c5$export$6868fd1605c79d3d(prefix, domainDataName, discr
extent: {
signal: `[${extentSignal}[0], ${extentSignal}[1] + 1e-11]`
},
minstep: $02bd8e9b090c20c5$export$a1300c781a434acb(column) ? 1 : 0,
maxbins: {
signal: maxbinsSignalName
}
Expand Down Expand Up @@ -3352,6 +3353,10 @@ function $02bd8e9b090c20c5$export$3794e0ea8ab2e895(name, min, max, dataExtent) {
update: `[min(${min}, ${dataExtent}[0]), max(${max}, ${dataExtent}[1])]`
};
}
function $02bd8e9b090c20c5$export$a1300c781a434acb(column) {
//prevent Vega from showing ".5" steps between integer scale values
return column.quantitative && column.type === "integer" && column.stats.max - column.stats.min <= 7;
}



Expand Down Expand Up @@ -3880,7 +3885,8 @@ class $154b2c962cf38cfb$export$1c460fb4285edadc extends (0, $9d478b599f3cbcb3$ex
});
(0, $b15ad8fb3905384f$export$290268902279a991)(globalScope.scope, {
name: names.sizeScale,
type: "linear",
type: "pow",
exponent: 0.5,
domain: [
0,
{
Expand Down Expand Up @@ -4003,13 +4009,17 @@ class $154b2c962cf38cfb$export$1c460fb4285edadc extends (0, $9d478b599f3cbcb3$ex
const { column: column , domain: domain , reverse: reverse , scaleName: scaleName , signal: signal , xyz: xyz } = cs;
if (!column) return;
let scale;
if (column.quantitative) scale = (0, $c0bec0cf2b65a746$export$fefe9507ec0904ed)(scaleName, domain, [
0,
{
signal: signal
}
], reverse, false, showAxes);
else scale = (0, $c0bec0cf2b65a746$export$b67158f831e00d0d)(scaleName, globalScope.data.name, [
if (column.quantitative) {
scale = (0, $c0bec0cf2b65a746$export$fefe9507ec0904ed)(scaleName, domain, [
0,
{
signal: signal
}
], reverse, false, showAxes);
if ((0, $02bd8e9b090c20c5$export$a1300c781a434acb)(column)) scale.bins = {
step: 1
};
} else scale = (0, $c0bec0cf2b65a746$export$b67158f831e00d0d)(scaleName, globalScope.data.name, [
0,
{
signal: signal
Expand Down
11 changes: 10 additions & 1 deletion docs/dist/sanddance/v4/sanddance.js
Original file line number Diff line number Diff line change
Expand Up @@ -2883,6 +2883,7 @@
extent: {
signal: `[${extentSignal}[0], ${extentSignal}[1] + 1e-11]`, //add a tiny bit to the upper extent to force the extra bin - https://github.com/vega/vega/issues/2899
},
minstep: shouldBeIntegralBinStep(column) ? 1 : 0,
maxbins: {
signal: maxbinsSignalName,
},
Expand Down Expand Up @@ -2975,6 +2976,10 @@
update: `[min(${min}, ${dataExtent}[0]), max(${max}, ${dataExtent}[1])]`,
};
}
function shouldBeIntegralBinStep(column) {
//prevent Vega from showing ".5" steps between integer scale values
return column.quantitative && (column.type === 'integer' && (column.stats.max - column.stats.min) <= 7);
}

/*!
* Copyright (c) Microsoft Corporation.
Expand Down Expand Up @@ -3501,7 +3506,8 @@
});
addScales(globalScope.scope, {
name: names.sizeScale,
type: 'linear',
type: 'pow',
exponent: 0.5,
domain: [0, { signal: `${names.sizeExtent}[1]` }],
range: [0, { signal: names.sizeRange }],
});
Expand Down Expand Up @@ -3620,6 +3626,9 @@
let scale;
if (column.quantitative) {
scale = linearScale(scaleName, domain, [0, { signal }], reverse, false, showAxes);
if (shouldBeIntegralBinStep(column)) {
scale.bins = { step: 1 };
}
}
else {
scale = pointScale(scaleName, globalScope.data.name, [0, { signal }], column.name, reverse);
Expand Down
11 changes: 10 additions & 1 deletion docs/tests/sanddance-specs/v1/js/sanddance-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2868,6 +2868,7 @@
extent: {
signal: `[${extentSignal}[0], ${extentSignal}[1] + 1e-11]`, //add a tiny bit to the upper extent to force the extra bin - https://github.com/vega/vega/issues/2899
},
minstep: shouldBeIntegralBinStep(column) ? 1 : 0,
maxbins: {
signal: maxbinsSignalName,
},
Expand Down Expand Up @@ -2960,6 +2961,10 @@
update: `[min(${min}, ${dataExtent}[0]), max(${max}, ${dataExtent}[1])]`,
};
}
function shouldBeIntegralBinStep(column) {
//prevent Vega from showing ".5" steps between integer scale values
return column.quantitative && (column.type === 'integer' && (column.stats.max - column.stats.min) <= 7);
}

/*!
* Copyright (c) Microsoft Corporation.
Expand Down Expand Up @@ -3486,7 +3491,8 @@
});
addScales(globalScope.scope, {
name: names.sizeScale,
type: 'linear',
type: 'pow',
exponent: 0.5,
domain: [0, { signal: `${names.sizeExtent}[1]` }],
range: [0, { signal: names.sizeRange }],
});
Expand Down Expand Up @@ -3605,6 +3611,9 @@
let scale;
if (column.quantitative) {
scale = linearScale(scaleName, domain, [0, { signal }], reverse, false, showAxes);
if (shouldBeIntegralBinStep(column)) {
scale.bins = { step: 1 };
}
}
else {
scale = pointScale(scaleName, globalScope.data.name, [0, { signal }], column.name, reverse);
Expand Down
27 changes: 19 additions & 8 deletions docs/tests/v4/es6/js/sanddance-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4512,6 +4512,7 @@ var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
parcelHelpers.export(exports, "binnable", ()=>binnable);
parcelHelpers.export(exports, "outerExtentSignal", ()=>outerExtentSignal);
parcelHelpers.export(exports, "shouldBeIntegralBinStep", ()=>shouldBeIntegralBinStep);
/*!
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
Expand Down Expand Up @@ -4556,6 +4557,7 @@ function binnable(prefix, domainDataName, discreteColumn, outerSignalExtents) {
extent: {
signal: `[${extentSignal}[0], ${extentSignal}[1] + 1e-11]`
},
minstep: shouldBeIntegralBinStep(column) ? 1 : 0,
maxbins: {
signal: maxbinsSignalName
}
Expand Down Expand Up @@ -4657,6 +4659,10 @@ function outerExtentSignal(name, min, max, dataExtent) {
update: `[min(${min}, ${dataExtent}[0]), max(${max}, ${dataExtent}[1])]`
};
}
function shouldBeIntegralBinStep(column) {
//prevent Vega from showing ".5" steps between integer scale values
return column.quantitative && column.type === "integer" && column.stats.max - column.stats.min <= 7;
}

},{"./constants":"9PPhV","./expr":"f5d82","./defaults":"lzTCE","./transforms":"7WnfB","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"7WnfB":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
Expand Down Expand Up @@ -5068,7 +5074,8 @@ class Scatter extends (0, _layout.Layout) {
});
(0, _scope.addScales)(globalScope.scope, {
name: names.sizeScale,
type: "linear",
type: "pow",
exponent: 0.5,
domain: [
0,
{
Expand Down Expand Up @@ -5191,13 +5198,17 @@ class Scatter extends (0, _layout.Layout) {
const { column , domain , reverse , scaleName , signal , xyz } = cs;
if (!column) return;
let scale;
if (column.quantitative) scale = (0, _scales.linearScale)(scaleName, domain, [
0,
{
signal
}
], reverse, false, showAxes);
else scale = (0, _scales.pointScale)(scaleName, globalScope.data.name, [
if (column.quantitative) {
scale = (0, _scales.linearScale)(scaleName, domain, [
0,
{
signal
}
], reverse, false, showAxes);
if ((0, _bin.shouldBeIntegralBinStep)(column)) scale.bins = {
step: 1
};
} else scale = (0, _scales.pointScale)(scaleName, globalScope.data.name, [
0,
{
signal
Expand Down
27 changes: 19 additions & 8 deletions docs/tests/v4/es6/js/sanddance-test-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -49353,6 +49353,7 @@ var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
parcelHelpers.export(exports, "binnable", ()=>binnable);
parcelHelpers.export(exports, "outerExtentSignal", ()=>outerExtentSignal);
parcelHelpers.export(exports, "shouldBeIntegralBinStep", ()=>shouldBeIntegralBinStep);
/*!
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
Expand Down Expand Up @@ -49397,6 +49398,7 @@ function binnable(prefix, domainDataName, discreteColumn, outerSignalExtents) {
extent: {
signal: `[${extentSignal}[0], ${extentSignal}[1] + 1e-11]`
},
minstep: shouldBeIntegralBinStep(column) ? 1 : 0,
maxbins: {
signal: maxbinsSignalName
}
Expand Down Expand Up @@ -49498,6 +49500,10 @@ function outerExtentSignal(name, min, max, dataExtent) {
update: `[min(${min}, ${dataExtent}[0]), max(${max}, ${dataExtent}[1])]`
};
}
function shouldBeIntegralBinStep(column) {
//prevent Vega from showing ".5" steps between integer scale values
return column.quantitative && column.type === "integer" && column.stats.max - column.stats.min <= 7;
}

},{"./constants":"3I5IU","./expr":"7TBI4","./defaults":"5kAFI","./transforms":"bWcDn","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"bWcDn":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
Expand Down Expand Up @@ -49909,7 +49915,8 @@ class Scatter extends (0, _layout.Layout) {
});
(0, _scope.addScales)(globalScope.scope, {
name: names.sizeScale,
type: "linear",
type: "pow",
exponent: 0.5,
domain: [
0,
{
Expand Down Expand Up @@ -50032,13 +50039,17 @@ class Scatter extends (0, _layout.Layout) {
const { column , domain , reverse , scaleName , signal , xyz } = cs;
if (!column) return;
let scale;
if (column.quantitative) scale = (0, _scales.linearScale)(scaleName, domain, [
0,
{
signal
}
], reverse, false, showAxes);
else scale = (0, _scales.pointScale)(scaleName, globalScope.data.name, [
if (column.quantitative) {
scale = (0, _scales.linearScale)(scaleName, domain, [
0,
{
signal
}
], reverse, false, showAxes);
if ((0, _bin.shouldBeIntegralBinStep)(column)) scale.bins = {
step: 1
};
} else scale = (0, _scales.pointScale)(scaleName, globalScope.data.name, [
0,
{
signal
Expand Down
4 changes: 2 additions & 2 deletions packages/sanddance-specs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/sanddance-specs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@msrvida/sanddance-specs",
"version": "1.6.2",
"version": "1.7.0",
"description": "SandDance Vega specification generator.",
"main": "dist/es6/index.js",
"repository": {
Expand Down

0 comments on commit cf9de37

Please sign in to comment.