@hpcc-js/layout 2.47.2 → 2.47.5
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/README.md +36 -1
- package/dist/index.es6.js +5 -13
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +9 -17
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +6 -6
- package/src/ChartPanel.ts +3 -2
- package/src/Layered.ts +0 -1
- package/src/Legend.ts +22 -28
- package/src/Popup.ts +0 -1
- package/src/Surface.ts +0 -1
- package/src/__package__.ts +2 -2
- package/types/ChartPanel.d.ts +1 -1
- package/types/ChartPanel.d.ts.map +1 -1
- package/types/Layered.d.ts.map +1 -1
- package/types/Legend.d.ts.map +1 -1
- package/types/Popup.d.ts.map +1 -1
- package/types/Surface.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types-3.4/ChartPanel.d.ts +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/README.md
CHANGED
|
@@ -46,4 +46,39 @@ This package is part of the mono repository "@hpcc-js" (aka Visualization Framew
|
|
|
46
46
|
</script>
|
|
47
47
|
</body>
|
|
48
48
|
</html>
|
|
49
|
-
```
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
<ClientOnly>
|
|
52
|
+
<hpcc-vitepress style="width:100%;height:600px">
|
|
53
|
+
<div id="target" style="height:600px">
|
|
54
|
+
</div>
|
|
55
|
+
<script type="module">
|
|
56
|
+
import { Column, Pie, Line, Step } from "@hpcc-js/chart";
|
|
57
|
+
import { Carousel } from "@hpcc-js/layout"; // Has dependency on "dgrid" so can't be used in a module...
|
|
58
|
+
|
|
59
|
+
const columns = ["Subject", "Year 1", "Year 2", "Year 3"];
|
|
60
|
+
const data = [
|
|
61
|
+
["Geography", 75, 68, 65],
|
|
62
|
+
["English", 45, 55, -52],
|
|
63
|
+
["Math", 98, 92, 90],
|
|
64
|
+
["Science", 66, 60, 72]
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
const carousel = new Carousel()
|
|
68
|
+
.widgets([
|
|
69
|
+
new Pie().columns(columns).data(data),
|
|
70
|
+
new Line().columns(columns).data(data),
|
|
71
|
+
new Column().columns(columns).data(data),
|
|
72
|
+
new Step().columns(columns).data(data)
|
|
73
|
+
])
|
|
74
|
+
.target("target")
|
|
75
|
+
.render()
|
|
76
|
+
;
|
|
77
|
+
|
|
78
|
+
var active = 0;
|
|
79
|
+
setInterval(function () {
|
|
80
|
+
carousel.active(++active % 4).render();
|
|
81
|
+
}, 3000);
|
|
82
|
+
</script>
|
|
83
|
+
</hpcc-vitepress>
|
|
84
|
+
</ClientOnly>
|
package/dist/index.es6.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLWidget, FAChar, select, selectAll, d3Event, Platform, drag, Utility, scaleLinear, dispatch, formatLocale, formatSpecifier, format, formatPrefix, sum, Database, Palette, scaleOrdinal, SVGWidget, IconBar, Spacer, ProgressBar, ToggleButton, Text, Button, TitleBar } from '@hpcc-js/common';
|
|
2
|
-
import { Table } from '@hpcc-js/
|
|
2
|
+
import { Table } from '@hpcc-js/dgrid2';
|
|
3
3
|
import { instanceOfIHighlight } from '@hpcc-js/api';
|
|
4
4
|
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
@@ -18,8 +18,8 @@ function _mergeNamespaces(n, m) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
var PKG_NAME = "@hpcc-js/layout";
|
|
21
|
-
var PKG_VERSION = "2.47.
|
|
22
|
-
var BUILD_VERSION = "2.
|
|
21
|
+
var PKG_VERSION = "2.47.5";
|
|
22
|
+
var BUILD_VERSION = "2.103.1";
|
|
23
23
|
|
|
24
24
|
/*! *****************************************************************************
|
|
25
25
|
Copyright (c) Microsoft Corporation.
|
|
@@ -430,7 +430,6 @@ var Surface = /** @class */ (function (_super) {
|
|
|
430
430
|
};
|
|
431
431
|
// Events ---
|
|
432
432
|
Surface.prototype.click = function (obj) {
|
|
433
|
-
console.log("Clicked: " + obj.id);
|
|
434
433
|
};
|
|
435
434
|
return Surface;
|
|
436
435
|
}(HTMLWidget));
|
|
@@ -2617,14 +2616,8 @@ var Legend = /** @class */ (function (_super) {
|
|
|
2617
2616
|
}
|
|
2618
2617
|
};
|
|
2619
2618
|
Legend.prototype.onDblClick = function (rowData, rowIdx) {
|
|
2620
|
-
console.log("Legend onDblClick method");
|
|
2621
|
-
console.log("rowData: " + rowData);
|
|
2622
|
-
console.log("rowIdx: " + rowIdx);
|
|
2623
2619
|
};
|
|
2624
2620
|
Legend.prototype.onMouseOver = function (rowData, rowIdx) {
|
|
2625
|
-
console.log("Legend onMouseOver method");
|
|
2626
|
-
console.log("rowData: " + rowData);
|
|
2627
|
-
console.log("rowIdx: " + rowIdx);
|
|
2628
2621
|
};
|
|
2629
2622
|
Legend.prototype.resize = function (_size) {
|
|
2630
2623
|
var retVal;
|
|
@@ -3131,12 +3124,13 @@ var ChartPanel = /** @class */ (function (_super) {
|
|
|
3131
3124
|
if (this._prevdataVisible !== this.dataVisible()) {
|
|
3132
3125
|
this._prevdataVisible = this.dataVisible();
|
|
3133
3126
|
this._toggleData.selected(this._prevdataVisible);
|
|
3127
|
+
this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);
|
|
3134
3128
|
this._carousel.active(this._prevdataVisible ? 1 : 0);
|
|
3135
3129
|
}
|
|
3136
3130
|
if (this._prevlegendVisible !== this.legendVisible()) {
|
|
3137
3131
|
this._prevlegendVisible = this.legendVisible();
|
|
3138
3132
|
this._toggleLegend.selected(this._prevlegendVisible);
|
|
3139
|
-
this._legend.visible(this._prevlegendVisible);
|
|
3133
|
+
this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);
|
|
3140
3134
|
}
|
|
3141
3135
|
this._legend.orientation(this.legendPosition() === "bottom" ? "horizontal" : "vertical");
|
|
3142
3136
|
this.showLeft(!this.left());
|
|
@@ -4704,7 +4698,6 @@ var Layered = /** @class */ (function (_super) {
|
|
|
4704
4698
|
};
|
|
4705
4699
|
var widgetSize = context.widgetSize(idx, clientSize);
|
|
4706
4700
|
var widgetPosition = context.widgetPosition(idx, clientSize, widgetSize);
|
|
4707
|
-
console.log("widgetPosition", widgetPosition);
|
|
4708
4701
|
this.style.top = widgetPosition.y + "px";
|
|
4709
4702
|
this.style.left = widgetPosition.x + "px";
|
|
4710
4703
|
widget
|
|
@@ -4840,7 +4833,6 @@ var Popup = /** @class */ (function (_super) {
|
|
|
4840
4833
|
_super.prototype.exit.call(this, domNode, element);
|
|
4841
4834
|
};
|
|
4842
4835
|
Popup.prototype.click = function (obj) {
|
|
4843
|
-
console.log("Clicked: " + obj.id);
|
|
4844
4836
|
};
|
|
4845
4837
|
return Popup;
|
|
4846
4838
|
}(HTMLWidget));
|