@d3plus/core 3.0.0-alpha.0
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 +6219 -0
- package/es/index.js +4 -0
- package/es/src/charts/AreaPlot.js +86 -0
- package/es/src/charts/BarChart.js +93 -0
- package/es/src/charts/BoxWhisker.js +97 -0
- package/es/src/charts/BumpChart.js +148 -0
- package/es/src/charts/Donut.js +84 -0
- package/es/src/charts/Geomap.js +833 -0
- package/es/src/charts/LinePlot.js +84 -0
- package/es/src/charts/Matrix.js +358 -0
- package/es/src/charts/Network.js +787 -0
- package/es/src/charts/Pack.js +318 -0
- package/es/src/charts/Pie.js +242 -0
- package/es/src/charts/Plot.js +2212 -0
- package/es/src/charts/Priestley.js +312 -0
- package/es/src/charts/Radar.js +365 -0
- package/es/src/charts/RadialMatrix.js +393 -0
- package/es/src/charts/Rings.js +777 -0
- package/es/src/charts/Sankey.js +413 -0
- package/es/src/charts/StackedArea.js +80 -0
- package/es/src/charts/Tree.js +312 -0
- package/es/src/charts/Treemap.js +406 -0
- package/es/src/charts/Viz.js +2017 -0
- package/es/src/charts/drawSteps/drawAttribution.js +14 -0
- package/es/src/charts/drawSteps/drawBack.js +23 -0
- package/es/src/charts/drawSteps/drawColorScale.js +69 -0
- package/es/src/charts/drawSteps/drawLegend.js +120 -0
- package/es/src/charts/drawSteps/drawSubtitle.js +31 -0
- package/es/src/charts/drawSteps/drawTimeline.js +80 -0
- package/es/src/charts/drawSteps/drawTitle.js +31 -0
- package/es/src/charts/drawSteps/drawTotal.js +32 -0
- package/es/src/charts/drawSteps/zoomControls.js +254 -0
- package/es/src/charts/events/click.legend.js +76 -0
- package/es/src/charts/events/click.shape.js +26 -0
- package/es/src/charts/events/mouseenter.js +31 -0
- package/es/src/charts/events/mouseleave.js +21 -0
- package/es/src/charts/events/mousemove.legend.js +64 -0
- package/es/src/charts/events/mousemove.shape.js +42 -0
- package/es/src/charts/events/touchstart.body.js +7 -0
- package/es/src/charts/helpers/matrixData.js +104 -0
- package/es/src/charts/helpers/tileAttributions.js +34 -0
- package/es/src/charts/index.js +21 -0
- package/es/src/charts/plotBuffers/Bar.js +65 -0
- package/es/src/charts/plotBuffers/Box.js +60 -0
- package/es/src/charts/plotBuffers/Circle.js +39 -0
- package/es/src/charts/plotBuffers/Line.js +30 -0
- package/es/src/charts/plotBuffers/Rect.js +40 -0
- package/es/src/charts/plotBuffers/discreteBuffer.js +24 -0
- package/es/src/charts/plotBuffers/numericBuffer.js +111 -0
- package/es/src/components/Axis.js +1567 -0
- package/es/src/components/AxisBottom.js +77 -0
- package/es/src/components/AxisLeft.js +77 -0
- package/es/src/components/AxisRight.js +77 -0
- package/es/src/components/AxisTop.js +77 -0
- package/es/src/components/ColorScale.js +958 -0
- package/es/src/components/Legend.js +673 -0
- package/es/src/components/Message.js +95 -0
- package/es/src/components/TextBox.js +752 -0
- package/es/src/components/Timeline.js +760 -0
- package/es/src/components/Tooltip.js +726 -0
- package/es/src/components/index.js +11 -0
- package/es/src/shapes/Area.js +361 -0
- package/es/src/shapes/Bar.js +342 -0
- package/es/src/shapes/Box.js +482 -0
- package/es/src/shapes/Circle.js +201 -0
- package/es/src/shapes/Image.js +255 -0
- package/es/src/shapes/Line.js +289 -0
- package/es/src/shapes/Path.js +186 -0
- package/es/src/shapes/Rect.js +215 -0
- package/es/src/shapes/Shape.js +1156 -0
- package/es/src/shapes/Whisker.js +330 -0
- package/es/src/shapes/index.js +10 -0
- package/es/src/utils/BaseClass.js +204 -0
- package/es/src/utils/RESET.js +4 -0
- package/es/src/utils/accessor.js +19 -0
- package/es/src/utils/configPrep.js +76 -0
- package/es/src/utils/constant.js +15 -0
- package/es/src/utils/getProp.js +9 -0
- package/es/src/utils/index.js +7 -0
- package/es/src/utils/uuid.js +13 -0
- package/package.json +68 -0
- package/umd/d3plus-core.full.js +56459 -0
- package/umd/d3plus-core.full.js.map +1 -0
- package/umd/d3plus-core.full.min.js +7241 -0
- package/umd/d3plus-core.js +14422 -0
- package/umd/d3plus-core.js.map +1 -0
- package/umd/d3plus-core.min.js +4564 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _get_prototype_of(o) {
|
|
17
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
+
};
|
|
20
|
+
return _get_prototype_of(o);
|
|
21
|
+
}
|
|
22
|
+
function _inherits(subClass, superClass) {
|
|
23
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
+
}
|
|
26
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
+
constructor: {
|
|
28
|
+
value: subClass,
|
|
29
|
+
writable: true,
|
|
30
|
+
configurable: true
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
+
}
|
|
35
|
+
function _possible_constructor_return(self, call) {
|
|
36
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
+
return call;
|
|
38
|
+
}
|
|
39
|
+
return _assert_this_initialized(self);
|
|
40
|
+
}
|
|
41
|
+
function _set_prototype_of(o, p) {
|
|
42
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
+
o.__proto__ = p;
|
|
44
|
+
return o;
|
|
45
|
+
};
|
|
46
|
+
return _set_prototype_of(o, p);
|
|
47
|
+
}
|
|
48
|
+
function _type_of(obj) {
|
|
49
|
+
"@swc/helpers - typeof";
|
|
50
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
+
}
|
|
52
|
+
function _is_native_reflect_construct() {
|
|
53
|
+
try {
|
|
54
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
+
} catch (_) {}
|
|
56
|
+
return (_is_native_reflect_construct = function() {
|
|
57
|
+
return !!result;
|
|
58
|
+
})();
|
|
59
|
+
}
|
|
60
|
+
import { default as Axis } from "./Axis.js";
|
|
61
|
+
var AxisBottom = /*#__PURE__*/ function(Axis) {
|
|
62
|
+
"use strict";
|
|
63
|
+
_inherits(AxisBottom, Axis);
|
|
64
|
+
function AxisBottom() {
|
|
65
|
+
_class_call_check(this, AxisBottom);
|
|
66
|
+
var _this;
|
|
67
|
+
_this = _call_super(this, AxisBottom);
|
|
68
|
+
_this.orient("bottom");
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
return AxisBottom;
|
|
72
|
+
}(Axis);
|
|
73
|
+
/**
|
|
74
|
+
@class AxisBottom
|
|
75
|
+
@extends Axis
|
|
76
|
+
@desc Shorthand method for creating an axis where the ticks are drawn below the horizontal domain path. Extends all functionality of the base [Axis](#Axis) class.
|
|
77
|
+
*/ export { AxisBottom as default };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _get_prototype_of(o) {
|
|
17
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
+
};
|
|
20
|
+
return _get_prototype_of(o);
|
|
21
|
+
}
|
|
22
|
+
function _inherits(subClass, superClass) {
|
|
23
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
+
}
|
|
26
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
+
constructor: {
|
|
28
|
+
value: subClass,
|
|
29
|
+
writable: true,
|
|
30
|
+
configurable: true
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
+
}
|
|
35
|
+
function _possible_constructor_return(self, call) {
|
|
36
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
+
return call;
|
|
38
|
+
}
|
|
39
|
+
return _assert_this_initialized(self);
|
|
40
|
+
}
|
|
41
|
+
function _set_prototype_of(o, p) {
|
|
42
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
+
o.__proto__ = p;
|
|
44
|
+
return o;
|
|
45
|
+
};
|
|
46
|
+
return _set_prototype_of(o, p);
|
|
47
|
+
}
|
|
48
|
+
function _type_of(obj) {
|
|
49
|
+
"@swc/helpers - typeof";
|
|
50
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
+
}
|
|
52
|
+
function _is_native_reflect_construct() {
|
|
53
|
+
try {
|
|
54
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
+
} catch (_) {}
|
|
56
|
+
return (_is_native_reflect_construct = function() {
|
|
57
|
+
return !!result;
|
|
58
|
+
})();
|
|
59
|
+
}
|
|
60
|
+
import { default as Axis } from "./Axis.js";
|
|
61
|
+
var AxisLeft = /*#__PURE__*/ function(Axis) {
|
|
62
|
+
"use strict";
|
|
63
|
+
_inherits(AxisLeft, Axis);
|
|
64
|
+
function AxisLeft() {
|
|
65
|
+
_class_call_check(this, AxisLeft);
|
|
66
|
+
var _this;
|
|
67
|
+
_this = _call_super(this, AxisLeft);
|
|
68
|
+
_this.orient("left");
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
return AxisLeft;
|
|
72
|
+
}(Axis);
|
|
73
|
+
/**
|
|
74
|
+
@class AxisLeft
|
|
75
|
+
@extends Axis
|
|
76
|
+
@desc Shorthand method for creating an axis where the ticks are drawn to the left of the vertical domain path. Extends all functionality of the base [Axis](#Axis) class.
|
|
77
|
+
*/ export { AxisLeft as default };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _get_prototype_of(o) {
|
|
17
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
+
};
|
|
20
|
+
return _get_prototype_of(o);
|
|
21
|
+
}
|
|
22
|
+
function _inherits(subClass, superClass) {
|
|
23
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
+
}
|
|
26
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
+
constructor: {
|
|
28
|
+
value: subClass,
|
|
29
|
+
writable: true,
|
|
30
|
+
configurable: true
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
+
}
|
|
35
|
+
function _possible_constructor_return(self, call) {
|
|
36
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
+
return call;
|
|
38
|
+
}
|
|
39
|
+
return _assert_this_initialized(self);
|
|
40
|
+
}
|
|
41
|
+
function _set_prototype_of(o, p) {
|
|
42
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
+
o.__proto__ = p;
|
|
44
|
+
return o;
|
|
45
|
+
};
|
|
46
|
+
return _set_prototype_of(o, p);
|
|
47
|
+
}
|
|
48
|
+
function _type_of(obj) {
|
|
49
|
+
"@swc/helpers - typeof";
|
|
50
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
+
}
|
|
52
|
+
function _is_native_reflect_construct() {
|
|
53
|
+
try {
|
|
54
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
+
} catch (_) {}
|
|
56
|
+
return (_is_native_reflect_construct = function() {
|
|
57
|
+
return !!result;
|
|
58
|
+
})();
|
|
59
|
+
}
|
|
60
|
+
import { default as Axis } from "./Axis.js";
|
|
61
|
+
var AxisRight = /*#__PURE__*/ function(Axis) {
|
|
62
|
+
"use strict";
|
|
63
|
+
_inherits(AxisRight, Axis);
|
|
64
|
+
function AxisRight() {
|
|
65
|
+
_class_call_check(this, AxisRight);
|
|
66
|
+
var _this;
|
|
67
|
+
_this = _call_super(this, AxisRight);
|
|
68
|
+
_this.orient("right");
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
return AxisRight;
|
|
72
|
+
}(Axis);
|
|
73
|
+
/**
|
|
74
|
+
@class AxisRight
|
|
75
|
+
@extends Axis
|
|
76
|
+
@desc Shorthand method for creating an axis where the ticks are drawn to the right of the vertical domain path. Extends all functionality of the base [Axis](#Axis) class.
|
|
77
|
+
*/ export { AxisRight as default };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _get_prototype_of(o) {
|
|
17
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
18
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19
|
+
};
|
|
20
|
+
return _get_prototype_of(o);
|
|
21
|
+
}
|
|
22
|
+
function _inherits(subClass, superClass) {
|
|
23
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
24
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
25
|
+
}
|
|
26
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
27
|
+
constructor: {
|
|
28
|
+
value: subClass,
|
|
29
|
+
writable: true,
|
|
30
|
+
configurable: true
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
34
|
+
}
|
|
35
|
+
function _possible_constructor_return(self, call) {
|
|
36
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
37
|
+
return call;
|
|
38
|
+
}
|
|
39
|
+
return _assert_this_initialized(self);
|
|
40
|
+
}
|
|
41
|
+
function _set_prototype_of(o, p) {
|
|
42
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
43
|
+
o.__proto__ = p;
|
|
44
|
+
return o;
|
|
45
|
+
};
|
|
46
|
+
return _set_prototype_of(o, p);
|
|
47
|
+
}
|
|
48
|
+
function _type_of(obj) {
|
|
49
|
+
"@swc/helpers - typeof";
|
|
50
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
|
+
}
|
|
52
|
+
function _is_native_reflect_construct() {
|
|
53
|
+
try {
|
|
54
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
55
|
+
} catch (_) {}
|
|
56
|
+
return (_is_native_reflect_construct = function() {
|
|
57
|
+
return !!result;
|
|
58
|
+
})();
|
|
59
|
+
}
|
|
60
|
+
import { default as Axis } from "./Axis.js";
|
|
61
|
+
var AxisTop = /*#__PURE__*/ function(Axis) {
|
|
62
|
+
"use strict";
|
|
63
|
+
_inherits(AxisTop, Axis);
|
|
64
|
+
function AxisTop() {
|
|
65
|
+
_class_call_check(this, AxisTop);
|
|
66
|
+
var _this;
|
|
67
|
+
_this = _call_super(this, AxisTop);
|
|
68
|
+
_this.orient("top");
|
|
69
|
+
return _this;
|
|
70
|
+
}
|
|
71
|
+
return AxisTop;
|
|
72
|
+
}(Axis);
|
|
73
|
+
/**
|
|
74
|
+
@class AxisTop
|
|
75
|
+
@extends Axis
|
|
76
|
+
@desc Shorthand method for creating an axis where the ticks are drawn above the vertical domain path. Extends all functionality of the base [Axis](#Axis) class.
|
|
77
|
+
*/ export { AxisTop as default };
|