billboard.js 4.1.0-next.2 → 4.1.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/dist/billboard.css +1 -1
- package/dist/billboard.js +268 -107
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +16 -16
- package/dist/billboard.pkgd.js +3198 -1755
- package/dist/billboard.pkgd.min.js +23 -23
- package/dist/billboard.react.js +28 -49
- package/dist/billboard.react.min.js +2 -2
- package/dist/billboard.worker.js +1 -1
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +14 -31
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +14 -31
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +21 -35
- package/dist/plugin/billboardjs-plugin-stanford.min.js +7 -7
- package/dist/plugin/billboardjs-plugin-tableview.js +15 -30
- package/dist/plugin/billboardjs-plugin-tableview.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -30
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2959 -1684
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2960 -1685
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2961 -1686
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -18
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2962 -1687
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -11
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2963 -1688
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/Chart/Chart.js +1 -1
- package/dist-esm/Chart/api/axis.js +1 -1
- package/dist-esm/Chart/api/category.js +1 -1
- package/dist-esm/Chart/api/chart.js +9 -7
- package/dist-esm/Chart/api/color.js +1 -1
- package/dist-esm/Chart/api/data.js +3 -3
- package/dist-esm/Chart/api/export.js +1 -1
- package/dist-esm/Chart/api/flow.js +1 -1
- package/dist-esm/Chart/api/focus.js +1 -1
- package/dist-esm/Chart/api/grid.js +1 -1
- package/dist-esm/Chart/api/group.js +1 -1
- package/dist-esm/Chart/api/legend.js +1 -1
- package/dist-esm/Chart/api/load.js +1 -1
- package/dist-esm/Chart/api/regions.js +1 -1
- package/dist-esm/Chart/api/selection.js +1 -1
- package/dist-esm/Chart/api/show.js +1 -1
- package/dist-esm/Chart/api/stubs.js +1 -1
- package/dist-esm/Chart/api/subchart.js +1 -1
- package/dist-esm/Chart/api/tooltip.js +1 -1
- package/dist-esm/Chart/api/x.js +11 -9
- package/dist-esm/Chart/api/zoom.js +8 -7
- package/dist-esm/ChartInternal/Axis/Axis.js +7 -6
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +1 -1
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
- package/dist-esm/ChartInternal/ChartInternal.js +32 -8
- package/dist-esm/ChartInternal/data/convert.helper.js +7 -5
- package/dist-esm/ChartInternal/data/convert.js +1 -1
- package/dist-esm/ChartInternal/data/data.js +64 -33
- package/dist-esm/ChartInternal/data/load.js +1 -1
- package/dist-esm/ChartInternal/interactions/drag.js +1 -1
- package/dist-esm/ChartInternal/interactions/eventrect.js +1 -1
- package/dist-esm/ChartInternal/interactions/flow.js +17 -15
- package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
- package/dist-esm/ChartInternal/interactions/subchart.js +8 -6
- package/dist-esm/ChartInternal/interactions/zoom.js +8 -6
- package/dist-esm/ChartInternal/internals/category.js +1 -1
- package/dist-esm/ChartInternal/internals/class.js +1 -1
- package/dist-esm/ChartInternal/internals/clip.js +1 -1
- package/dist-esm/ChartInternal/internals/color.js +1 -1
- package/dist-esm/ChartInternal/internals/domain.js +13 -9
- package/dist-esm/ChartInternal/internals/format.js +5 -3
- package/dist-esm/ChartInternal/internals/grid.js +5 -4
- package/dist-esm/ChartInternal/internals/legend.js +8 -7
- package/dist-esm/ChartInternal/internals/redraw.js +2 -2
- package/dist-esm/ChartInternal/internals/region.js +1 -1
- package/dist-esm/ChartInternal/internals/scale.js +1 -1
- package/dist-esm/ChartInternal/internals/selection.js +1 -1
- package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
- package/dist-esm/ChartInternal/internals/size.js +56 -10
- package/dist-esm/ChartInternal/internals/style.js +1 -1
- package/dist-esm/ChartInternal/internals/subchart.util.js +1 -1
- package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
- package/dist-esm/ChartInternal/internals/text.js +12 -9
- package/dist-esm/ChartInternal/internals/text.util.js +4 -4
- package/dist-esm/ChartInternal/internals/title.js +3 -2
- package/dist-esm/ChartInternal/internals/tooltip.js +25 -20
- package/dist-esm/ChartInternal/internals/transform.js +1 -1
- package/dist-esm/ChartInternal/internals/type.js +1 -1
- package/dist-esm/ChartInternal/shape/arc.js +3 -2
- package/dist-esm/ChartInternal/shape/area.js +3 -2
- package/dist-esm/ChartInternal/shape/bar.js +1 -1
- package/dist-esm/ChartInternal/shape/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
- package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
- package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
- package/dist-esm/ChartInternal/shape/core/path.js +1 -1
- package/dist-esm/ChartInternal/shape/core/point.js +1 -1
- package/dist-esm/ChartInternal/shape/core/treemap.js +3 -2
- package/dist-esm/ChartInternal/shape/funnel.js +1 -1
- package/dist-esm/ChartInternal/shape/gauge.js +1 -1
- package/dist-esm/ChartInternal/shape/line.js +3 -2
- package/dist-esm/ChartInternal/shape/point.js +1 -1
- package/dist-esm/ChartInternal/shape/polar.js +1 -1
- package/dist-esm/ChartInternal/shape/radar.js +1 -1
- package/dist-esm/ChartInternal/shape/shape.js +3 -2
- package/dist-esm/ChartInternal/shape/treemap.js +1 -1
- package/dist-esm/canvas/CanvasAxisRenderer.js +27 -21
- package/dist-esm/canvas/CanvasEngine.js +1 -1
- package/dist-esm/canvas/CanvasPainter.js +1 -1
- package/dist-esm/canvas/CanvasRenderer.js +1 -1
- package/dist-esm/canvas/CanvasTheme.js +7 -8
- package/dist-esm/canvas/HitDetector.js +1 -1
- package/dist-esm/canvas/axisTicks.js +3 -2
- package/dist-esm/canvas/classes.js +1 -1
- package/dist-esm/canvas/color.js +1 -1
- package/dist-esm/canvas/geometry.js +1 -1
- package/dist-esm/canvas/labels.js +4 -4
- package/dist-esm/canvas/pointPattern.js +1 -1
- package/dist-esm/canvas/util.js +1 -1
- package/dist-esm/config/Options/Options.js +1 -1
- package/dist-esm/config/Options/axis/axis.js +1 -1
- package/dist-esm/config/Options/axis/x.js +1 -1
- package/dist-esm/config/Options/axis/y.js +1 -1
- package/dist-esm/config/Options/axis/y2.js +1 -13
- package/dist-esm/config/Options/common/boost.js +1 -1
- package/dist-esm/config/Options/common/color.js +1 -1
- package/dist-esm/config/Options/common/grid.js +1 -1
- package/dist-esm/config/Options/common/legend.js +1 -1
- package/dist-esm/config/Options/common/main.js +44 -2
- package/dist-esm/config/Options/common/point.js +1 -1
- package/dist-esm/config/Options/common/title.js +1 -1
- package/dist-esm/config/Options/common/tooltip.js +1 -1
- package/dist-esm/config/Options/data/axis.js +1 -1
- package/dist-esm/config/Options/data/data.js +1 -1
- package/dist-esm/config/Options/data/selection.js +1 -1
- package/dist-esm/config/Options/interaction/interaction.js +1 -1
- package/dist-esm/config/Options/interaction/subchart.js +1 -1
- package/dist-esm/config/Options/interaction/zoom.js +1 -1
- package/dist-esm/config/Options/shape/arc.js +1 -1
- package/dist-esm/config/Options/shape/area.js +1 -1
- package/dist-esm/config/Options/shape/bar.js +1 -1
- package/dist-esm/config/Options/shape/bubble.js +1 -1
- package/dist-esm/config/Options/shape/candlestick.js +1 -1
- package/dist-esm/config/Options/shape/donut.js +1 -1
- package/dist-esm/config/Options/shape/funnel.js +1 -1
- package/dist-esm/config/Options/shape/gauge.js +1 -1
- package/dist-esm/config/Options/shape/line.js +1 -1
- package/dist-esm/config/Options/shape/pie.js +1 -1
- package/dist-esm/config/Options/shape/polar.js +1 -1
- package/dist-esm/config/Options/shape/radar.js +1 -1
- package/dist-esm/config/Options/shape/scatter.js +1 -1
- package/dist-esm/config/Options/shape/spline.js +1 -1
- package/dist-esm/config/Options/shape/treemap.js +1 -1
- package/dist-esm/config/Store/Element.js +1 -1
- package/dist-esm/config/Store/State.js +4 -1
- package/dist-esm/config/Store/Store.js +1 -1
- package/dist-esm/config/classes.js +1 -1
- package/dist-esm/config/config.js +1 -1
- package/dist-esm/config/const.js +1 -1
- package/dist-esm/config/resolver/axis.core.js +1 -1
- package/dist-esm/config/resolver/axis.js +1 -1
- package/dist-esm/config/resolver/canvas.js +17 -12
- package/dist-esm/config/resolver/canvasShape.js +1 -1
- package/dist-esm/config/resolver/category.js +1 -1
- package/dist-esm/config/resolver/export.js +1 -1
- package/dist-esm/config/resolver/flow.js +1 -1
- package/dist-esm/config/resolver/grid.js +1 -1
- package/dist-esm/config/resolver/interaction/selection.js +1 -1
- package/dist-esm/config/resolver/interaction/subchart.js +1 -1
- package/dist-esm/config/resolver/interaction/zoom.js +1 -1
- package/dist-esm/config/resolver/regions.js +1 -1
- package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/area.js +1 -1
- package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/bar.js +1 -1
- package/dist-esm/config/resolver/shape/bubble.js +1 -1
- package/dist-esm/config/resolver/shape/candlestick.js +1 -1
- package/dist-esm/config/resolver/shape/donut.js +1 -1
- package/dist-esm/config/resolver/shape/funnel.js +1 -1
- package/dist-esm/config/resolver/shape/gauge.js +1 -1
- package/dist-esm/config/resolver/shape/line.js +1 -1
- package/dist-esm/config/resolver/shape/pie.js +1 -1
- package/dist-esm/config/resolver/shape/polar.js +1 -1
- package/dist-esm/config/resolver/shape/radar.js +1 -1
- package/dist-esm/config/resolver/shape/scatter.js +1 -1
- package/dist-esm/config/resolver/shape/treemap.js +1 -1
- package/dist-esm/core.js +5 -4
- package/dist-esm/index.canvas.js +1 -1
- package/dist-esm/index.esm.js +1 -1
- package/dist-esm/module/Cache.js +2 -2
- package/dist-esm/module/browser.js +2 -2
- package/dist-esm/module/dsv.js +1 -1
- package/dist-esm/module/error.js +1 -1
- package/dist-esm/module/generator.js +16 -3
- package/dist-esm/module/sanitize.js +1 -1
- package/dist-esm/module/util/brush.js +1 -1
- package/dist-esm/module/util/dom.js +9 -7
- package/dist-esm/module/util/object.js +1 -1
- package/dist-esm/module/util/type-checks.js +1 -1
- package/dist-esm/module/worker.js +1 -1
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -40
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -41
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist-esm/react/index.js +1 -1
- package/package.json +36 -36
- package/src/Chart/api/chart.ts +1 -0
- package/src/Chart/api/data.ts +5 -3
- package/src/ChartInternal/ChartInternal.ts +72 -25
- package/src/ChartInternal/data/data.ts +68 -34
- package/src/ChartInternal/internals/redraw.ts +8 -1
- package/src/ChartInternal/internals/size.ts +99 -2
- package/src/config/Options/axis/y2.ts +0 -13
- package/src/config/Options/common/main.ts +43 -1
- package/src/config/Store/State.ts +4 -0
- package/src/config/const.ts +4 -0
- package/src/config/resolver/canvas.ts +3 -0
- package/src/module/Cache.ts +1 -1
- package/src/module/generator.ts +27 -2
- package/types/options.d.ts +38 -0
package/dist/billboard.css
CHANGED
package/dist/billboard.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -18,67 +18,77 @@
|
|
|
18
18
|
}
|
|
19
19
|
})(this, function(__WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__11__, __WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__9__) {
|
|
20
20
|
return /******/ (function() { // webpackBootstrap
|
|
21
|
-
/******/
|
|
21
|
+
/******/ // runtime can't be in strict mode because 'output.globalObject' reads 'this'.
|
|
22
22
|
/******/ var __webpack_modules__ = ([
|
|
23
23
|
/* 0 */,
|
|
24
24
|
/* 1 */,
|
|
25
25
|
/* 2 */
|
|
26
26
|
/***/ (function(module) {
|
|
27
27
|
|
|
28
|
+
"use strict";
|
|
28
29
|
module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
|
|
29
30
|
|
|
30
31
|
/***/ }),
|
|
31
32
|
/* 3 */
|
|
32
33
|
/***/ (function(module) {
|
|
33
34
|
|
|
35
|
+
"use strict";
|
|
34
36
|
module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
|
|
35
37
|
|
|
36
38
|
/***/ }),
|
|
37
39
|
/* 4 */
|
|
38
40
|
/***/ (function(module) {
|
|
39
41
|
|
|
42
|
+
"use strict";
|
|
40
43
|
module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
|
|
41
44
|
|
|
42
45
|
/***/ }),
|
|
43
46
|
/* 5 */
|
|
44
47
|
/***/ (function(module) {
|
|
45
48
|
|
|
49
|
+
"use strict";
|
|
46
50
|
module.exports = __WEBPACK_EXTERNAL_MODULE__5__;
|
|
47
51
|
|
|
48
52
|
/***/ }),
|
|
49
53
|
/* 6 */
|
|
50
54
|
/***/ (function(module) {
|
|
51
55
|
|
|
56
|
+
"use strict";
|
|
52
57
|
module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
|
|
53
58
|
|
|
54
59
|
/***/ }),
|
|
55
60
|
/* 7 */
|
|
56
61
|
/***/ (function(module) {
|
|
57
62
|
|
|
63
|
+
"use strict";
|
|
58
64
|
module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
|
|
59
65
|
|
|
60
66
|
/***/ }),
|
|
61
67
|
/* 8 */
|
|
62
68
|
/***/ (function(module) {
|
|
63
69
|
|
|
70
|
+
"use strict";
|
|
64
71
|
module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
|
|
65
72
|
|
|
66
73
|
/***/ }),
|
|
67
74
|
/* 9 */
|
|
68
75
|
/***/ (function(module) {
|
|
69
76
|
|
|
77
|
+
"use strict";
|
|
70
78
|
module.exports = __WEBPACK_EXTERNAL_MODULE__9__;
|
|
71
79
|
|
|
72
80
|
/***/ }),
|
|
73
81
|
/* 10 */
|
|
74
82
|
/***/ (function(module) {
|
|
75
83
|
|
|
84
|
+
"use strict";
|
|
76
85
|
module.exports = __WEBPACK_EXTERNAL_MODULE__10__;
|
|
77
86
|
|
|
78
87
|
/***/ }),
|
|
79
88
|
/* 11 */
|
|
80
89
|
/***/ (function(module) {
|
|
81
90
|
|
|
91
|
+
"use strict";
|
|
82
92
|
module.exports = __WEBPACK_EXTERNAL_MODULE__11__;
|
|
83
93
|
|
|
84
94
|
/***/ })
|
|
@@ -110,57 +120,38 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__11__;
|
|
|
110
120
|
/******/
|
|
111
121
|
/************************************************************************/
|
|
112
122
|
/******/ /* webpack/runtime/define property getters */
|
|
113
|
-
/******/
|
|
114
|
-
/******/
|
|
115
|
-
/******/
|
|
116
|
-
/******/ if(
|
|
117
|
-
/******/
|
|
118
|
-
/******/ while(i < definition.length) {
|
|
119
|
-
/******/ var key = definition[i++];
|
|
120
|
-
/******/ var binding = definition[i++];
|
|
121
|
-
/******/ if(!__webpack_require__.o(exports, key)) {
|
|
122
|
-
/******/ if(binding === 0) {
|
|
123
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
|
|
124
|
-
/******/ } else {
|
|
125
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
|
|
126
|
-
/******/ }
|
|
127
|
-
/******/ } else if(binding === 0) { i++; }
|
|
128
|
-
/******/ }
|
|
129
|
-
/******/ } else {
|
|
130
|
-
/******/ for(var key in definition) {
|
|
131
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
132
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
133
|
-
/******/ }
|
|
134
|
-
/******/ }
|
|
123
|
+
/******/ // define getter/value functions for harmony exports
|
|
124
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
|
125
|
+
/******/ for(var key in definition) {
|
|
126
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
127
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
135
128
|
/******/ }
|
|
136
|
-
/******/ }
|
|
137
|
-
/******/ }
|
|
129
|
+
/******/ }
|
|
130
|
+
/******/ };
|
|
138
131
|
/******/
|
|
139
132
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
140
|
-
/******/
|
|
141
|
-
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|
142
|
-
/******/ }();
|
|
133
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); };
|
|
143
134
|
/******/
|
|
144
135
|
/******/ /* webpack/runtime/make namespace object */
|
|
145
|
-
/******/
|
|
146
|
-
/******/
|
|
147
|
-
/******/
|
|
148
|
-
/******/
|
|
149
|
-
/******/
|
|
150
|
-
/******/
|
|
151
|
-
/******/
|
|
152
|
-
/******/ };
|
|
153
|
-
/******/ }();
|
|
136
|
+
/******/ // define __esModule on exports
|
|
137
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
138
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
139
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
140
|
+
/******/ }
|
|
141
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
142
|
+
/******/ };
|
|
154
143
|
/******/
|
|
155
144
|
/************************************************************************/
|
|
156
145
|
var __webpack_exports__ = {};
|
|
157
|
-
// This entry needs to be wrapped in an IIFE because it needs to be
|
|
146
|
+
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
158
147
|
!function() {
|
|
148
|
+
"use strict";
|
|
159
149
|
// extracted by mini-css-extract-plugin
|
|
160
150
|
|
|
161
151
|
}();
|
|
162
|
-
// This entry needs to be wrapped in an IIFE because it needs to be
|
|
152
|
+
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
163
153
|
!function() {
|
|
154
|
+
"use strict";
|
|
164
155
|
// ESM COMPAT FLAG
|
|
165
156
|
__webpack_require__.r(__webpack_exports__);
|
|
166
157
|
|
|
@@ -239,6 +230,7 @@ const API_MODULE_NEEDED = {
|
|
|
239
230
|
category: "category",
|
|
240
231
|
categories: "category"
|
|
241
232
|
};
|
|
233
|
+
const RESIZE_FRAME_BUDGET = 16;
|
|
242
234
|
const AXIS_DEFAULT_TICK_COUNT = 10;
|
|
243
235
|
const AXIS_TICK_SIZE = 6;
|
|
244
236
|
const AXIS_TICK_PADDING = 3;
|
|
@@ -8961,12 +8953,50 @@ const $ZOOM = {
|
|
|
8961
8953
|
* - false: Disables automatic resize.
|
|
8962
8954
|
* - "parent": Enables automatic resize when the parent node is resized.
|
|
8963
8955
|
* - "viewBox": Enables automatic resize, and size will be fixed based on the viewbox.
|
|
8956
|
+
* - **NOTE:** `true` listens to the window's resize event, so a container resized by anything
|
|
8957
|
+
* else(a splitter drag, a sibling element growing, a CSS resize handle) is not detected.
|
|
8958
|
+
* Use `"parent"`, which observes the parent node itself, for those.
|
|
8964
8959
|
* @property {boolean|number} [resize.timer=true] Set resize timer option.
|
|
8965
8960
|
* - **NOTE:** Available options
|
|
8966
8961
|
* - The resize function will be called using:
|
|
8967
8962
|
* - true: `setTimeout()`
|
|
8968
8963
|
* - false: `requestIdleCallback()`
|
|
8969
8964
|
* - Given number(delay in ms) value, resize function will be triggered using `setTimeout()` with given delay.
|
|
8965
|
+
* - **NOTE:** With `resize.live`, this no longer decides when the size is reflected(every
|
|
8966
|
+
* animation frame does), but when the resize is treated as finished:
|
|
8967
|
+
* - `onresize`/`onresized` are called then, as they are without it.
|
|
8968
|
+
* - When the rendering is being stretched, this is also when it's redrawn to the exact
|
|
8969
|
+
* size. The stretched rendering stays on screen for this long after the resize stops,
|
|
8970
|
+
* so keep the delay short for charts large enough to be stretched.
|
|
8971
|
+
* - When every frame is redrawn, the last frame already drew the final size, so the
|
|
8972
|
+
* delayed call changes nothing on screen.
|
|
8973
|
+
* @property {boolean} [resize.live=false] Follow the container size while resizing, instead of
|
|
8974
|
+
* only when the delayed resize(`resize.timer`) runs.
|
|
8975
|
+
* - **NOTE:** Applies only when `resize.auto` is `true` or `"parent"`.
|
|
8976
|
+
* - **Strategy:** How the size is followed is measured, not configured. Two of them are used:
|
|
8977
|
+
* - **Redraw**: while a resize redraw fits in one animation frame(16ms), the chart is
|
|
8978
|
+
* redrawn on every frame, giving an exact rendering at every size.
|
|
8979
|
+
* - **Stretch**: once a redraw misses that budget, the rendering is stretched to the new
|
|
8980
|
+
* size for the rest of the resize, and redrawn when the resize settles. Stretching runs
|
|
8981
|
+
* no redraw at all: for SVG the `viewBox` is set to the drawn size and the width/height
|
|
8982
|
+
* attributes to the new one, and for canvas only the element's CSS box is resized, with
|
|
8983
|
+
* the backing store left as is. The size keeps following the container at any data amount.
|
|
8984
|
+
* - **Switching:** within a resize the strategy only goes from redraw to stretch, never back,
|
|
8985
|
+
* so frames can't alternate between an exact and a stretched rendering. The measured time
|
|
8986
|
+
* outlives the resize, so a chart already known to be expensive stretches from the first
|
|
8987
|
+
* frame of the next one.
|
|
8988
|
+
* - **While stretched:** text and stroke width are scaled with the box(SVG) and the drawn
|
|
8989
|
+
* bitmap is upscaled(canvas). Interaction is unaffected, as pointer coordinates are mapped
|
|
8990
|
+
* back through the element's transform. The redraw on settle restores the exact rendering.
|
|
8991
|
+
* - **Cost:** resize redraws skip the shape data join and the axis tick measurement, so they
|
|
8992
|
+
* are far cheaper than an initial render. A 5x1,000 line chart redraws in about 6ms(SVG)
|
|
8993
|
+
* and 3ms(canvas), a 10x10,000 one in about 78ms and 53ms. Ordinary charts therefore redraw
|
|
8994
|
+
* on every frame, and only the large ones fall back to stretching.
|
|
8995
|
+
* - **Several charts on a page:** the budget is measured per chart, and charts don't know
|
|
8996
|
+
* about each other. Eight charts of 2,000 points each spend about 75ms per frame together
|
|
8997
|
+
* while each one measures about 9ms and keeps redrawing. Turn it on for the charts the user
|
|
8998
|
+
* actually watches while resizing, rather than for every chart on a dense page.
|
|
8999
|
+
* - `onrendered` is called on every redrawn frame while resizing, not once per resize.
|
|
8970
9000
|
* @see [Demo: resize "parent"](https://naver.github.io/billboard.js/demo/#ChartOptions.resizeParent)
|
|
8971
9001
|
* @see [Demo: resize "viewBox"](https://naver.github.io/billboard.js/demo/#ChartOptions.resizeViewBox)
|
|
8972
9002
|
* @example
|
|
@@ -8986,11 +9016,15 @@ const $ZOOM = {
|
|
|
8986
9016
|
* timer: false,
|
|
8987
9017
|
*
|
|
8988
9018
|
* // set resize function will be triggered using `setTimeout()` with a delay of `100ms`.
|
|
8989
|
-
* timer: 100
|
|
9019
|
+
* timer: 100,
|
|
9020
|
+
*
|
|
9021
|
+
* // follow the container size while resizing
|
|
9022
|
+
* live: true
|
|
8990
9023
|
* }
|
|
8991
9024
|
*/
|
|
8992
9025
|
resize_auto: true,
|
|
8993
9026
|
resize_timer: true,
|
|
9027
|
+
resize_live: false,
|
|
8994
9028
|
/**
|
|
8995
9029
|
* Set a callback to execute when the chart is clicked.
|
|
8996
9030
|
* @name onclick
|
|
@@ -10837,6 +10871,12 @@ class State {
|
|
|
10837
10871
|
// if redraw() is on process
|
|
10838
10872
|
resizing: false,
|
|
10839
10873
|
// resize event called
|
|
10874
|
+
resizePreview: false,
|
|
10875
|
+
// rendered surface is stretched, pending an exact redraw
|
|
10876
|
+
resizeRedrawTime: 0,
|
|
10877
|
+
// ms the last resize redraw took, decides resize.live strategy
|
|
10878
|
+
// stretch instead of redrawing for the rest of this resize; null until decided
|
|
10879
|
+
resizeLiveScale: null,
|
|
10840
10880
|
toggling: false,
|
|
10841
10881
|
// legend toggle
|
|
10842
10882
|
zooming: false,
|
|
@@ -10928,9 +10968,9 @@ const KEY = {
|
|
|
10928
10968
|
dataMinMax: "$dataMinMax",
|
|
10929
10969
|
dataTotalSum: "$dataTotalSum",
|
|
10930
10970
|
dataTotalPerIndex: "$totalPerIndex",
|
|
10971
|
+
visibleTotalPerIndex: "$visibleTotalPerIndex",
|
|
10931
10972
|
domainMinMax: "$domainMinMax",
|
|
10932
10973
|
filteredTargets: "$filteredTargets",
|
|
10933
|
-
filteredNullish: "$filteredNullish",
|
|
10934
10974
|
svgLeft: "$svgLeft",
|
|
10935
10975
|
valuesByX: "$valuesByX",
|
|
10936
10976
|
legendItemTextBox: "legendItemTextBox",
|
|
@@ -11349,11 +11389,18 @@ const emulateEvent = {
|
|
|
11349
11389
|
|
|
11350
11390
|
|
|
11351
11391
|
const { setTimeout: generator_setTimeout, clearTimeout: generator_clearTimeout } = win;
|
|
11352
|
-
function generateResize(option) {
|
|
11392
|
+
function generateResize(option, live) {
|
|
11353
11393
|
const fn = [];
|
|
11354
11394
|
let timeout;
|
|
11395
|
+
let rafId = null;
|
|
11355
11396
|
const callResizeFn = function() {
|
|
11356
11397
|
callResizeFn.clear();
|
|
11398
|
+
if (live && rafId === null) {
|
|
11399
|
+
rafId = requestAnimationFrame(() => {
|
|
11400
|
+
rafId = null;
|
|
11401
|
+
live();
|
|
11402
|
+
});
|
|
11403
|
+
}
|
|
11357
11404
|
if (option === false) {
|
|
11358
11405
|
timeout = requestIdleCallback(() => {
|
|
11359
11406
|
timeout = null;
|
|
@@ -11372,6 +11419,12 @@ function generateResize(option) {
|
|
|
11372
11419
|
timeout = null;
|
|
11373
11420
|
}
|
|
11374
11421
|
};
|
|
11422
|
+
callResizeFn.clearLive = () => {
|
|
11423
|
+
if (rafId !== null) {
|
|
11424
|
+
cancelAnimationFrame(rafId);
|
|
11425
|
+
rafId = null;
|
|
11426
|
+
}
|
|
11427
|
+
};
|
|
11375
11428
|
callResizeFn.add = (f) => fn.push(f);
|
|
11376
11429
|
callResizeFn.remove = (f) => {
|
|
11377
11430
|
const index = fn.indexOf(f);
|
|
@@ -12346,7 +12399,8 @@ function normalizeTargetIds(targetIds) {
|
|
|
12346
12399
|
const $$ = this;
|
|
12347
12400
|
const { config } = $$;
|
|
12348
12401
|
const cacheKey = targetId ? `${KEY.dataTotalPerIndex}-${targetId}` : KEY.dataTotalPerIndex;
|
|
12349
|
-
|
|
12402
|
+
const cached = $$.cache.get(cacheKey);
|
|
12403
|
+
let sum = (cached == null ? void 0 : cached.generation) === $$.state.dataGeneration ? cached.value : null;
|
|
12350
12404
|
if (($$.config.data_groups.length || $$.isStackNormalized()) && !sum) {
|
|
12351
12405
|
sum = [];
|
|
12352
12406
|
let { targets } = $$.data;
|
|
@@ -12366,10 +12420,55 @@ function normalizeTargetIds(targetIds) {
|
|
|
12366
12420
|
sum[i] += isNumber(v.value) ? v.value : 0;
|
|
12367
12421
|
});
|
|
12368
12422
|
});
|
|
12369
|
-
$$.cache.add(cacheKey, sum);
|
|
12423
|
+
$$.cache.add(cacheKey, { generation: $$.state.dataGeneration, value: sum });
|
|
12370
12424
|
}
|
|
12371
12425
|
return sum;
|
|
12372
12426
|
},
|
|
12427
|
+
/**
|
|
12428
|
+
* Get per-index totals excluding hidden series, cached until data or visibility changes.
|
|
12429
|
+
* @param {string} targetId Target ID for per-group normalization
|
|
12430
|
+
* @returns {Array|null} Visible totals, or null for an ungrouped target
|
|
12431
|
+
* @private
|
|
12432
|
+
*/
|
|
12433
|
+
getVisibleTotalPerIndex(targetId) {
|
|
12434
|
+
const $$ = this;
|
|
12435
|
+
const { api, config, state, cache } = $$;
|
|
12436
|
+
let cached = cache.get(KEY.visibleTotalPerIndex);
|
|
12437
|
+
if (!cached || cached.generation !== state.dataGeneration) {
|
|
12438
|
+
cached = cache.add(KEY.visibleTotalPerIndex, {
|
|
12439
|
+
generation: state.dataGeneration,
|
|
12440
|
+
values: /* @__PURE__ */ new Map()
|
|
12441
|
+
});
|
|
12442
|
+
}
|
|
12443
|
+
if (cached.values.has(targetId)) {
|
|
12444
|
+
return cached.values.get(targetId);
|
|
12445
|
+
}
|
|
12446
|
+
const dataValues = api.data.values.bind(api);
|
|
12447
|
+
const { hiddenTargetIds } = state;
|
|
12448
|
+
let total = $$.getTotalPerIndex(targetId);
|
|
12449
|
+
if (total === null) {
|
|
12450
|
+
cached.values.set(targetId, total);
|
|
12451
|
+
return total;
|
|
12452
|
+
}
|
|
12453
|
+
if (hiddenTargetIds.size) {
|
|
12454
|
+
let hiddenIds = [...hiddenTargetIds];
|
|
12455
|
+
if (targetId) {
|
|
12456
|
+
const group = config.data_groups.find((g) => g.indexOf(targetId) >= 0);
|
|
12457
|
+
if (group) {
|
|
12458
|
+
hiddenIds = hiddenIds.filter((id) => group.indexOf(id) >= 0);
|
|
12459
|
+
}
|
|
12460
|
+
}
|
|
12461
|
+
if (hiddenIds.length) {
|
|
12462
|
+
let hiddenSum = dataValues(hiddenIds, false);
|
|
12463
|
+
if (hiddenSum.length) {
|
|
12464
|
+
hiddenSum = hiddenSum.reduce((acc, curr) => acc.map((v, i) => (isNumber(v) ? v : 0) + curr[i]));
|
|
12465
|
+
total = total.map((v, i) => v - hiddenSum[i]);
|
|
12466
|
+
}
|
|
12467
|
+
}
|
|
12468
|
+
}
|
|
12469
|
+
cached.values.set(targetId, total);
|
|
12470
|
+
return total;
|
|
12471
|
+
},
|
|
12373
12472
|
/**
|
|
12374
12473
|
* Get total data sum
|
|
12375
12474
|
* @param {boolean} subtractHidden Subtract hidden data from total
|
|
@@ -12538,9 +12637,11 @@ function normalizeTargetIds(targetIds) {
|
|
|
12538
12637
|
},
|
|
12539
12638
|
addHiddenTargetIds(targetIds) {
|
|
12540
12639
|
this.addTargetIds("hiddenTargetIds", targetIds);
|
|
12640
|
+
this.cache.remove(KEY.visibleTotalPerIndex);
|
|
12541
12641
|
},
|
|
12542
12642
|
removeHiddenTargetIds(targetIds) {
|
|
12543
12643
|
this.removeTargetIds("hiddenTargetIds", targetIds);
|
|
12644
|
+
this.cache.remove(KEY.visibleTotalPerIndex);
|
|
12544
12645
|
},
|
|
12545
12646
|
addHiddenLegendIds(targetIds) {
|
|
12546
12647
|
this.addTargetIds("hiddenLegendIds", targetIds);
|
|
@@ -13050,32 +13151,12 @@ function normalizeTargetIds(targetIds) {
|
|
|
13050
13151
|
ratio = (d.endAngle - d.startAngle) / arcLength;
|
|
13051
13152
|
}
|
|
13052
13153
|
} else if (type === "index") {
|
|
13053
|
-
const
|
|
13054
|
-
const { hiddenTargetIds } = state;
|
|
13055
|
-
let total = this.getTotalPerIndex(
|
|
13154
|
+
const total = $$.getVisibleTotalPerIndex(
|
|
13056
13155
|
$$.isStackNormalizedPerGroup() ? d.id : void 0
|
|
13057
13156
|
);
|
|
13058
13157
|
if (total === null) {
|
|
13059
13158
|
return ratio;
|
|
13060
13159
|
}
|
|
13061
|
-
if (hiddenTargetIds.size) {
|
|
13062
|
-
let hiddenIds = [...hiddenTargetIds];
|
|
13063
|
-
if ($$.isStackNormalizedPerGroup() && d.id) {
|
|
13064
|
-
const group = config.data_groups.find((g) => g.indexOf(d.id) >= 0);
|
|
13065
|
-
if (group) {
|
|
13066
|
-
hiddenIds = hiddenIds.filter((id) => group.indexOf(id) >= 0);
|
|
13067
|
-
}
|
|
13068
|
-
}
|
|
13069
|
-
if (hiddenIds.length) {
|
|
13070
|
-
let hiddenSum = dataValues(hiddenIds, false);
|
|
13071
|
-
if (hiddenSum.length) {
|
|
13072
|
-
hiddenSum = hiddenSum.reduce(
|
|
13073
|
-
(acc, curr) => acc.map((v, i) => (isNumber(v) ? v : 0) + curr[i])
|
|
13074
|
-
);
|
|
13075
|
-
total = total.map((v, i) => v - hiddenSum[i]);
|
|
13076
|
-
}
|
|
13077
|
-
}
|
|
13078
|
-
}
|
|
13079
13160
|
const divisor = total[d.index];
|
|
13080
13161
|
d.ratio = isNumber(d.value) && total && divisor ? d.value / divisor : 0;
|
|
13081
13162
|
ratio = d.ratio;
|
|
@@ -15313,7 +15394,9 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15313
15394
|
if (needShapeUpdate) {
|
|
15314
15395
|
state._cachedDrawShape = shape;
|
|
15315
15396
|
}
|
|
15316
|
-
(
|
|
15397
|
+
if (config.legend_show && $el.legend && !(config.legend_contents_bindto && config.legend_contents_template)) {
|
|
15398
|
+
(_d = $$.positionHtmlLegend) == null ? void 0 : _d.call($$);
|
|
15399
|
+
}
|
|
15317
15400
|
(_e = $$.resizeCanvas) == null ? void 0 : _e.call($$);
|
|
15318
15401
|
state.canvasFocusKey = null;
|
|
15319
15402
|
$$.renderCanvasFrame(shape, null, true);
|
|
@@ -15506,9 +15589,22 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15506
15589
|
return $$.config.size_width || $$.getParentRectValue("width");
|
|
15507
15590
|
},
|
|
15508
15591
|
getCurrentHeight() {
|
|
15592
|
+
var _a, _b;
|
|
15509
15593
|
const $$ = this;
|
|
15510
|
-
const { config } = $$;
|
|
15511
|
-
|
|
15594
|
+
const { config, state, $el } = $$;
|
|
15595
|
+
let h = config.size_height;
|
|
15596
|
+
if (!h) {
|
|
15597
|
+
const chartNode = state.isCanvasMode ? (_a = $el.chart) == null ? void 0 : _a.node() : null;
|
|
15598
|
+
const minHeight = chartNode == null ? void 0 : chartNode.style.minHeight;
|
|
15599
|
+
minHeight && (chartNode.style.minHeight = "");
|
|
15600
|
+
h = $$.getParentHeight();
|
|
15601
|
+
minHeight && (chartNode.style.minHeight = minHeight);
|
|
15602
|
+
const surface = chartNode ? parseFloat((_b = $$.canvasEngine) == null ? void 0 : _b.canvas.style.height) || 0 : 0;
|
|
15603
|
+
const reserve = state.current.height - surface;
|
|
15604
|
+
if (reserve > 0 && Math.round(h) === Math.round(surface)) {
|
|
15605
|
+
h += reserve;
|
|
15606
|
+
}
|
|
15607
|
+
}
|
|
15512
15608
|
return h > 0 ? h : 320 / ($$.hasType("gauge") && !config.gauge_fullCircle ? 2 : 1);
|
|
15513
15609
|
},
|
|
15514
15610
|
/**
|
|
@@ -15576,6 +15672,52 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15576
15672
|
cache.add(KEY.svgLeft, result);
|
|
15577
15673
|
return result;
|
|
15578
15674
|
},
|
|
15675
|
+
/**
|
|
15676
|
+
* Stretch the rendered surface to the container's current size, without redrawing.
|
|
15677
|
+
* Gives an immediate size feedback while the delayed resize is pending.
|
|
15678
|
+
* The drawn content keeps its previous geometry until the redraw takes place.
|
|
15679
|
+
* @private
|
|
15680
|
+
*/
|
|
15681
|
+
previewResize() {
|
|
15682
|
+
var _a, _b, _c;
|
|
15683
|
+
const $$ = this;
|
|
15684
|
+
const { state, $el } = $$;
|
|
15685
|
+
const { current } = state;
|
|
15686
|
+
const width = $$.getCurrentWidth();
|
|
15687
|
+
const height = $$.getCurrentHeight();
|
|
15688
|
+
if (!width || !height || !current.width || !current.height || width === current.width && height === current.height) {
|
|
15689
|
+
return;
|
|
15690
|
+
}
|
|
15691
|
+
if (state.isCanvasMode) {
|
|
15692
|
+
const canvas = (_a = $$.canvasEngine) == null ? void 0 : _a.canvas;
|
|
15693
|
+
if (!canvas) {
|
|
15694
|
+
return;
|
|
15695
|
+
}
|
|
15696
|
+
$el.chart.style("min-height", `${height}px`);
|
|
15697
|
+
canvas.style.width = `${width}px`;
|
|
15698
|
+
canvas.style.height = `${Math.max(0, height - ((_c = (_b = $$.getCanvasBottomLegendHeight) == null ? void 0 : _b.call($$)) != null ? _c : 0))}px`;
|
|
15699
|
+
} else if ($el.svg) {
|
|
15700
|
+
$el.svg.attr("viewBox", `0 0 ${current.width} ${current.height}`).attr("preserveAspectRatio", "none").attr("width", width).attr("height", height);
|
|
15701
|
+
} else {
|
|
15702
|
+
return;
|
|
15703
|
+
}
|
|
15704
|
+
state.resizePreview = true;
|
|
15705
|
+
},
|
|
15706
|
+
/**
|
|
15707
|
+
* Drop the stretched state set by previewResize(), to render on exact pixels again.
|
|
15708
|
+
* @private
|
|
15709
|
+
*/
|
|
15710
|
+
clearResizePreview() {
|
|
15711
|
+
const $$ = this;
|
|
15712
|
+
const { config, state, $el } = $$;
|
|
15713
|
+
if (!state.resizePreview) {
|
|
15714
|
+
return;
|
|
15715
|
+
}
|
|
15716
|
+
state.resizePreview = false;
|
|
15717
|
+
if (!state.isCanvasMode && $el.svg && config.resize_auto !== "viewBox") {
|
|
15718
|
+
$el.svg.attr("viewBox", null).attr("preserveAspectRatio", null);
|
|
15719
|
+
}
|
|
15720
|
+
},
|
|
15579
15721
|
updateDimension(withoutAxis) {
|
|
15580
15722
|
var _a, _b;
|
|
15581
15723
|
const $$ = this;
|
|
@@ -15599,6 +15741,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15599
15741
|
(_a = $$.resizeCanvas) == null ? void 0 : _a.call($$);
|
|
15600
15742
|
return;
|
|
15601
15743
|
}
|
|
15744
|
+
$$.clearResizePreview();
|
|
15602
15745
|
if (config.resize_auto === "viewBox") {
|
|
15603
15746
|
svg.attr("viewBox", `0 0 ${current.width} ${current.height}`);
|
|
15604
15747
|
} else {
|
|
@@ -18376,6 +18519,11 @@ var ChartInternal_publicField = (obj, key, value) => ChartInternal_defNormalProp
|
|
|
18376
18519
|
|
|
18377
18520
|
|
|
18378
18521
|
|
|
18522
|
+
|
|
18523
|
+
function getTime() {
|
|
18524
|
+
var _a, _b, _c;
|
|
18525
|
+
return (_c = (_b = (_a = win.performance) == null ? void 0 : _a.now) == null ? void 0 : _b.call(_a)) != null ? _c : Date.now();
|
|
18526
|
+
}
|
|
18379
18527
|
function getUnsupportedCanvasRenderType($$) {
|
|
18380
18528
|
if ($$.hasArcType()) {
|
|
18381
18529
|
return "arc charts";
|
|
@@ -18696,7 +18844,7 @@ class ChartInternal {
|
|
|
18696
18844
|
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_b = $$.hasLegendDefsPoint) == null ? void 0 : _b.call($$))) {
|
|
18697
18845
|
$el.defs = $el.svg.append("defs");
|
|
18698
18846
|
if (hasAxis) {
|
|
18699
|
-
["id", "idXAxis", "idYAxis", "
|
|
18847
|
+
["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
|
|
18700
18848
|
$$.appendClip($el.defs, state.clip[v]);
|
|
18701
18849
|
});
|
|
18702
18850
|
}
|
|
@@ -18943,30 +19091,50 @@ class ChartInternal {
|
|
|
18943
19091
|
var _a, _b;
|
|
18944
19092
|
const $$ = this;
|
|
18945
19093
|
const { $el, config, state } = $$;
|
|
18946
|
-
const
|
|
18947
|
-
const
|
|
19094
|
+
const { resize_auto, resize_live } = config;
|
|
19095
|
+
const isAutoResize = /^(true|parent)$/.test(resize_auto);
|
|
18948
19096
|
const list = [];
|
|
19097
|
+
const redrawOnResize = () => {
|
|
19098
|
+
var _a2;
|
|
19099
|
+
const prevWidth = state.current.width;
|
|
19100
|
+
const prevHeight = state.current.height;
|
|
19101
|
+
$$.setContainerSize();
|
|
19102
|
+
if (!state.resizePreview && prevWidth === state.current.width && prevHeight === state.current.height) {
|
|
19103
|
+
return false;
|
|
19104
|
+
}
|
|
19105
|
+
state.resizing = true;
|
|
19106
|
+
state.dirty.size = true;
|
|
19107
|
+
if (config.legend_show) {
|
|
19108
|
+
$$.updateSizes();
|
|
19109
|
+
state.isCanvasMode ? (_a2 = $$.updateHtmlLegend) == null ? void 0 : _a2.call($$) : $$.updateLegend();
|
|
19110
|
+
}
|
|
19111
|
+
$$.api.flush(false);
|
|
19112
|
+
return true;
|
|
19113
|
+
};
|
|
19114
|
+
const liveResize = () => {
|
|
19115
|
+
if (state.resizeLiveScale === null) {
|
|
19116
|
+
state.resizeLiveScale = state.resizeRedrawTime > RESIZE_FRAME_BUDGET;
|
|
19117
|
+
}
|
|
19118
|
+
if (state.resizeLiveScale) {
|
|
19119
|
+
$$.previewResize();
|
|
19120
|
+
return;
|
|
19121
|
+
}
|
|
19122
|
+
const start = getTime();
|
|
19123
|
+
if (redrawOnResize()) {
|
|
19124
|
+
state.resizeRedrawTime = getTime() - start;
|
|
19125
|
+
state.resizeLiveScale = state.resizeRedrawTime > RESIZE_FRAME_BUDGET;
|
|
19126
|
+
}
|
|
19127
|
+
};
|
|
19128
|
+
const resizeFunction = generateResize(
|
|
19129
|
+
config.resize_timer,
|
|
19130
|
+
isAutoResize && resize_live ? liveResize : void 0
|
|
19131
|
+
);
|
|
18949
19132
|
list.push(() => callFn(config.onresize, $$.api));
|
|
18950
|
-
|
|
18951
|
-
list.push(() => {
|
|
18952
|
-
var _a2;
|
|
18953
|
-
const prevWidth = state.current.width;
|
|
18954
|
-
const prevHeight = state.current.height;
|
|
18955
|
-
$$.setContainerSize();
|
|
18956
|
-
if (prevWidth === state.current.width && prevHeight === state.current.height) {
|
|
18957
|
-
return;
|
|
18958
|
-
}
|
|
18959
|
-
state.resizing = true;
|
|
18960
|
-
if (config.legend_show) {
|
|
18961
|
-
$$.updateSizes();
|
|
18962
|
-
state.isCanvasMode ? (_a2 = $$.updateHtmlLegend) == null ? void 0 : _a2.call($$) : $$.updateLegend();
|
|
18963
|
-
}
|
|
18964
|
-
$$.api.flush(false);
|
|
18965
|
-
});
|
|
18966
|
-
}
|
|
19133
|
+
isAutoResize && list.push(redrawOnResize);
|
|
18967
19134
|
list.push(() => {
|
|
18968
19135
|
callFn(config.onresized, $$.api);
|
|
18969
19136
|
state.resizing = false;
|
|
19137
|
+
state.resizeLiveScale = null;
|
|
18970
19138
|
});
|
|
18971
19139
|
list.forEach((v) => resizeFunction.add(v));
|
|
18972
19140
|
$$.resizeFunction = resizeFunction;
|
|
@@ -21190,6 +21358,7 @@ const canvasInternal = {
|
|
|
21190
21358
|
const $$ = this;
|
|
21191
21359
|
const { config, state, $el } = $$;
|
|
21192
21360
|
const container = $el.chart.node();
|
|
21361
|
+
$$.clearResizePreview();
|
|
21193
21362
|
$el.chart.style("min-height", `${state.current.height}px`);
|
|
21194
21363
|
(_a = $$.canvasEngine) == null ? void 0 : _a.resize(state.current.width, $$.getCanvasSurfaceHeight());
|
|
21195
21364
|
(_b = $$.canvasTheme) == null ? void 0 : _b.reload(container, config.canvas_theme);
|
|
@@ -21375,7 +21544,7 @@ function loadConfig(config) {
|
|
|
21375
21544
|
* chart.destroy();
|
|
21376
21545
|
*/
|
|
21377
21546
|
destroy() {
|
|
21378
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
21547
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
21379
21548
|
const $$ = this.internal;
|
|
21380
21549
|
const { state, $el: { chart, style, svg } } = $$;
|
|
21381
21550
|
if (notEmpty($$)) {
|
|
@@ -21393,7 +21562,8 @@ function loadConfig(config) {
|
|
|
21393
21562
|
(_f = $$.canvasRenderer) == null ? void 0 : _f.destroy();
|
|
21394
21563
|
(_g = $$.canvasEngine) == null ? void 0 : _g.destroy();
|
|
21395
21564
|
(_h = $$.resizeFunction) == null ? void 0 : _h.clear();
|
|
21396
|
-
(_j = (_i = $$.resizeFunction) == null ? void 0 : _i.
|
|
21565
|
+
(_j = (_i = $$.resizeFunction) == null ? void 0 : _i.clearLive) == null ? void 0 : _j.call(_i);
|
|
21566
|
+
(_l = (_k = $$.resizeFunction) == null ? void 0 : _k.resizeObserver) == null ? void 0 : _l.disconnect();
|
|
21397
21567
|
$$.resizeFunction && win.removeEventListener("resize", $$.resizeFunction);
|
|
21398
21568
|
chart.classed("bb", false).style("position", null);
|
|
21399
21569
|
if (state.isCanvasMode) {
|
|
@@ -21539,8 +21709,11 @@ extend(api_data_data, {
|
|
|
21539
21709
|
if (isArray(targets)) {
|
|
21540
21710
|
values = [];
|
|
21541
21711
|
targets.forEach((v) => {
|
|
21542
|
-
|
|
21543
|
-
|
|
21712
|
+
if (flat) {
|
|
21713
|
+
v.values.forEach((d) => values.push(d.value));
|
|
21714
|
+
} else {
|
|
21715
|
+
values.push(v.values.map((d) => d.value));
|
|
21716
|
+
}
|
|
21544
21717
|
});
|
|
21545
21718
|
}
|
|
21546
21719
|
}
|
|
@@ -31171,18 +31344,6 @@ var __pow = Math.pow;
|
|
|
31171
31344
|
|
|
31172
31345
|
;// ./src/config/Options/axis/y2.ts
|
|
31173
31346
|
/* harmony default export */ var y2 = ({
|
|
31174
|
-
/**
|
|
31175
|
-
* Set clip-path attribute for y2 axis element
|
|
31176
|
-
* - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
|
|
31177
|
-
* @name axis․y2․clipPath
|
|
31178
|
-
* @memberof Options
|
|
31179
|
-
* @type {boolean}
|
|
31180
|
-
* @default true
|
|
31181
|
-
* @example
|
|
31182
|
-
* // don't set 'clip-path' attribute
|
|
31183
|
-
* clipPath: false
|
|
31184
|
-
*/
|
|
31185
|
-
axis_y2_clipPath: true,
|
|
31186
31347
|
/**
|
|
31187
31348
|
* Show or hide y2 axis.
|
|
31188
31349
|
* - **NOTE**:
|
|
@@ -34663,7 +34824,7 @@ let funnel_funnel = () => (extendArc([funnel], [shape_funnel]), (funnel_funnel =
|
|
|
34663
34824
|
y = Math.sin(linePositioningAngle) * arcInnerRadius;
|
|
34664
34825
|
transform = `rotate(${lineAngle * 180 / Math.PI}, ${x}, ${y})`;
|
|
34665
34826
|
}
|
|
34666
|
-
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).attr("x", x).attr("y", y).attr("width", lineLength).attr("height", lineThickness).attr("transform", transform).style("stroke-dasharray", `0, ${lineLength + lineThickness}, 0`);
|
|
34827
|
+
;(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).attr("x", x).attr("y", y).attr("width", lineLength).attr("height", lineThickness).attr("transform", transform).style("stroke-dasharray", `0, ${lineLength + lineThickness}, 0`);
|
|
34667
34828
|
});
|
|
34668
34829
|
},
|
|
34669
34830
|
textForGaugeMinMax(value, isMax) {
|
|
@@ -36126,7 +36287,7 @@ const bb = {
|
|
|
36126
36287
|
* bb.version; // "1.0.0"
|
|
36127
36288
|
* @memberof bb
|
|
36128
36289
|
*/
|
|
36129
|
-
version: "4.1.0
|
|
36290
|
+
version: "4.1.0",
|
|
36130
36291
|
/**
|
|
36131
36292
|
* Generate chart
|
|
36132
36293
|
* - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:
|