mascot-vis 1.12.1 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mascot-min.js +3 -3
- package/dist/mascot.js +24 -21
- package/package.json +1 -1
- package/dist/mascot-min.d.ts +0 -24350
- package/scenes - toDel/AreaChart.msc +0 -1
- package/scenes - toDel/AreaChart2.msc +0 -1
- package/scenes - toDel/BarChartHorz.msc +0 -1
- package/scenes - toDel/BarChartVert.msc +0 -1
- package/scenes - toDel/BoxPlot.msc +0 -1
- package/scenes - toDel/BubblePlot.msc +0 -1
- package/scenes - toDel/BulletChart.msc +0 -1
- package/scenes - toDel/BumpChart.msc +0 -1
- package/scenes - toDel/CirclePacking.msc +0 -1
- package/scenes - toDel/ConnectedScatterPlot.msc +0 -1
- package/scenes - toDel/DensityPlot.msc +0 -1
- package/scenes - toDel/DivergingBarChart.msc +0 -1
- package/scenes - toDel/DotPlot.msc +0 -1
- package/scenes - toDel/DoughnutChart.msc +0 -1
- package/scenes - toDel/DumbbellChart.msc +0 -1
- package/scenes - toDel/GanttChart.msc +0 -1
- package/scenes - toDel/GridAreaChart.msc +0 -1
- package/scenes - toDel/GridStackedAreaChart.msc +0 -1
- package/scenes - toDel/GroupedBarChart.msc +0 -1
- package/scenes - toDel/HeatMap.msc +0 -1
- package/scenes - toDel/Histogram.msc +0 -1
- package/scenes - toDel/Isotype.msc +0 -1
- package/scenes - toDel/LineGraph.msc +0 -1
- package/scenes - toDel/LineGraph2.msc +0 -1
- package/scenes - toDel/LollipopChart.msc +0 -1
- package/scenes - toDel/MosaicPlot.msc +0 -1
- package/scenes - toDel/MultiLineGraph.msc +0 -1
- package/scenes - toDel/MultipleAreaCharts.msc +0 -1
- package/scenes - toDel/MultipleBarCharts.msc +0 -1
- package/scenes - toDel/MultipleBoxPlots.msc +0 -1
- package/scenes - toDel/MultiplePieCharts.msc +0 -1
- package/scenes - toDel/MultipleWaffleCharts.msc +0 -1
- package/scenes - toDel/ParallelCoordinates.msc +0 -1
- package/scenes - toDel/PieChart.msc +0 -1
- package/scenes - toDel/RadarChart.msc +0 -1
- package/scenes - toDel/RadialBarChart.msc +0 -1
- package/scenes - toDel/RangeChart.msc +0 -1
- package/scenes - toDel/RoseChart.msc +0 -1
- package/scenes - toDel/Scatterplot.msc +0 -1
- package/scenes - toDel/ScatterplotMatrix.msc +0 -1
- package/scenes - toDel/SlopeGraph.msc +0 -1
- package/scenes - toDel/Sparklines.msc +0 -1
- package/scenes - toDel/StackedAreaChart.msc +0 -1
- package/scenes - toDel/StackedBarChart.msc +0 -1
- package/scenes - toDel/StellarChart.msc +0 -1
- package/scenes - toDel/StreamGraph.msc +0 -1
- package/scenes - toDel/StringlineChart.msc +0 -1
- package/scenes - toDel/TowerChart.msc +0 -1
- package/scenes - toDel/Treemap.msc +0 -1
- package/scenes - toDel/ViolinPlot.msc +0 -1
- package/scenes - toDel/WaffleChart.msc +0 -1
- package/scenes - toDel/WaterfallChart.msc +0 -1
- package/scenes - toDel/ridgelinePlot.msc +0 -1
- package/scenes - toDel/test.msc +0 -1
package/dist/mascot.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// version: 1.12.
|
|
2
|
+
// version: 1.12.2
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3'), require('pixi.js')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', 'd3', 'pixi.js'], factory) :
|
|
@@ -1737,23 +1737,25 @@
|
|
|
1737
1737
|
htEncs = group.getInternalEncodings("height");
|
|
1738
1738
|
if (xEncs.length > 0) {
|
|
1739
1739
|
let xEnc = xEncs[xEncs.length -1];
|
|
1740
|
-
|
|
1740
|
+
let cw = xEnc.scale.rangeExtent;
|
|
1741
1741
|
leftOffset = xEnc.scale.range[0];
|
|
1742
|
-
if (xEnc.scale.type === "point") {
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
}
|
|
1742
|
+
// if (xEnc.scale.type === "point") {
|
|
1743
|
+
// //TODO: need to handle variable sizes
|
|
1744
|
+
// cw += xEnc.anyItem.bounds.width;
|
|
1745
|
+
// }
|
|
1746
|
+
cellWidth = Math.max(cw, cellWidth);
|
|
1746
1747
|
} else if (wdEncs.length > 0 && wdEncs[wdEncs.length -1]._rectNegativeValues) { //width encoding with negative values
|
|
1747
1748
|
cellWidth = wdEncs[wdEncs.length -1].scale.rangeExtent;
|
|
1748
1749
|
leftOffset = wdEncs[wdEncs.length -1].scale.range[0];
|
|
1749
1750
|
}
|
|
1750
1751
|
if (yEncs.length > 0) {
|
|
1751
1752
|
let yEnc = yEncs[yEncs.length -1];
|
|
1752
|
-
|
|
1753
|
-
if (yEnc.scale.type === "point") {
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1753
|
+
let ch = yEnc.scale.rangeExtent;
|
|
1754
|
+
// if (yEnc.scale.type === "point") {
|
|
1755
|
+
// //TODO: need to handle variable sizes
|
|
1756
|
+
// ch += yEnc.anyItem.bounds.height;
|
|
1757
|
+
// }
|
|
1758
|
+
cellHeight = Math.max(ch, cellHeight);
|
|
1757
1759
|
} else if (htEncs.length > 0 && htEncs[htEncs.length -1]._rectNegativeValues) { //width encoding with negative values
|
|
1758
1760
|
cellHeight = htEncs[htEncs.length -1].scale.rangeExtent;
|
|
1759
1761
|
}
|
|
@@ -3029,12 +3031,10 @@
|
|
|
3029
3031
|
let scopes = rect2Scopes[p.id];
|
|
3030
3032
|
let bounds = p.bounds, left = bounds.left, top = bounds.top;
|
|
3031
3033
|
|
|
3032
|
-
let wd = orientation == Orientation.Horizontal ? bounds.width/max : bounds.width,
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
//p.dataScope = scopes[0];
|
|
3037
|
-
//coll.addChild(p);
|
|
3034
|
+
// let wd = orientation == Orientation.Horizontal ? bounds.width/max : bounds.width,
|
|
3035
|
+
// ht = orientation == Orientation.Horizontal ? bounds.height : bounds.height/max;
|
|
3036
|
+
let wd = orientation == Orientation.Horizontal ? bounds.width/scopes.length : bounds.width,
|
|
3037
|
+
ht = orientation == Orientation.Horizontal ? bounds.height : bounds.height/scopes.length;
|
|
3038
3038
|
|
|
3039
3039
|
for (let i = 0; i < scopes.length; i++) {
|
|
3040
3040
|
let c = p.duplicate();
|
|
@@ -3991,8 +3991,6 @@
|
|
|
3991
3991
|
if (extent < 100) extent = 100;
|
|
3992
3992
|
else if (extent > 500) extent = 500;
|
|
3993
3993
|
}
|
|
3994
|
-
if (this.rangeExtent)
|
|
3995
|
-
extent = this.rangeExtent;
|
|
3996
3994
|
|
|
3997
3995
|
let min, max, domain, range;
|
|
3998
3996
|
switch (fieldType) {
|
|
@@ -4219,6 +4217,8 @@
|
|
|
4219
4217
|
};
|
|
4220
4218
|
|
|
4221
4219
|
encoding.run();
|
|
4220
|
+
if (encoding.rangeExtent)
|
|
4221
|
+
encoding.scale.rangeExtent = encoding.rangeExtent;
|
|
4222
4222
|
return encoding;
|
|
4223
4223
|
}
|
|
4224
4224
|
|
|
@@ -5120,7 +5120,10 @@
|
|
|
5120
5120
|
let cellBounds = layout.cellBounds;
|
|
5121
5121
|
let parentPeers = item.parent.parent.children;
|
|
5122
5122
|
let idx = parentPeers.findIndex(d => item.parent == d || item.parent.parent == d );
|
|
5123
|
-
|
|
5123
|
+
// if (isMark(item)) //need to take into account of mark size, cannot based in bounds bottom alone (e.g., calendar heatmap)
|
|
5124
|
+
// return [cellBounds[idx].bottom - item.bounds.height/2, cellBounds[idx].bottom - item.bounds.height/2 - this.scale.rangeExtent];
|
|
5125
|
+
// else
|
|
5126
|
+
return [cellBounds[idx].bottom, cellBounds[idx].bottom - this.scale.rangeExtent];
|
|
5124
5127
|
} else if (item.type == "vertex" || item.type == "segment") {
|
|
5125
5128
|
let offset = this.scale.offset;
|
|
5126
5129
|
return [offset+ this.scale.rangeExtent, offset];
|
|
@@ -11217,7 +11220,7 @@
|
|
|
11217
11220
|
}
|
|
11218
11221
|
|
|
11219
11222
|
clone() {
|
|
11220
|
-
return new TreemapLayout({});
|
|
11223
|
+
return new TreemapLayout({width: this._width, height: this._height, top: this._top, left: this._left});
|
|
11221
11224
|
}
|
|
11222
11225
|
|
|
11223
11226
|
run() {
|