billboard.js 2.2.6 → 2.2.8-a
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/CHANGELOG.md +7 -0
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +3001 -3650
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/{billboard.esm.js → billboard.mjs} +379 -378
- package/dist/billboard.pkgd.js +18206 -14604
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +30 -45
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/{billboardjs-plugin-bubblecompare.esm.js → billboardjs-plugin-bubblecompare.mjs} +14 -21
- package/dist/plugin/billboardjs-plugin-stanford.js +281 -345
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/{billboardjs-plugin-stanford.esm.js → billboardjs-plugin-stanford.mjs} +31 -39
- package/dist/plugin/billboardjs-plugin-textoverlap.js +243 -291
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/{billboardjs-plugin-textoverlap.esm.js → billboardjs-plugin-textoverlap.mjs} +20 -28
- 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/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/ChartInternal/.DS_Store +0 -0
- package/src/ChartInternal/data/data.ts +3 -2
- package/src/ChartInternal/internals/redraw.ts +7 -6
- package/src/ChartInternal/shape/.DS_Store +0 -0
- package/src/ChartInternal/shape/arc.ts +4 -2
- package/src/Plugin/.DS_Store +0 -0
- package/src/config/.DS_Store +0 -0
- package/src/config/Options/.DS_Store +0 -0
- package/src/config/Store/.DS_Store +0 -0
- package/types/.DS_Store +0 -0
- package/types/plugin/.DS_Store +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -37,8 +37,9 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__1__;
|
|
|
37
37
|
/******/ // The require function
|
|
38
38
|
/******/ function __webpack_require__(moduleId) {
|
|
39
39
|
/******/ // Check if module is in cache
|
|
40
|
-
/******/
|
|
41
|
-
/******/
|
|
40
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
41
|
+
/******/ if (cachedModule !== undefined) {
|
|
42
|
+
/******/ return cachedModule.exports;
|
|
42
43
|
/******/ }
|
|
43
44
|
/******/ // Create a new module (and put it into the cache)
|
|
44
45
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
@@ -87,16 +88,14 @@ function _assertThisInitialized(self) {
|
|
|
87
88
|
if (self === void 0) {
|
|
88
89
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
89
90
|
}
|
|
90
|
-
|
|
91
91
|
return self;
|
|
92
92
|
}
|
|
93
93
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
94
94
|
function _setPrototypeOf(o, p) {
|
|
95
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
95
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
96
96
|
o.__proto__ = p;
|
|
97
97
|
return o;
|
|
98
98
|
};
|
|
99
|
-
|
|
100
99
|
return _setPrototypeOf(o, p);
|
|
101
100
|
}
|
|
102
101
|
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
@@ -113,12 +112,10 @@ var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_
|
|
|
113
112
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
114
113
|
* billboard.js project is licensed under the MIT license
|
|
115
114
|
*/
|
|
116
|
-
|
|
117
115
|
/**
|
|
118
116
|
* Base class to generate billboard.js plugin
|
|
119
117
|
* @class Plugin
|
|
120
118
|
*/
|
|
121
|
-
|
|
122
119
|
/**
|
|
123
120
|
* Version info string for plugin
|
|
124
121
|
* @name version
|
|
@@ -137,49 +134,47 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
137
134
|
function Plugin(options) {
|
|
138
135
|
options === void 0 && (options = {}), this.$$ = void 0, this.options = void 0, this.options = options;
|
|
139
136
|
}
|
|
137
|
+
|
|
140
138
|
/**
|
|
141
139
|
* Lifecycle hook for 'beforeInit' phase.
|
|
142
140
|
* @private
|
|
143
141
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
146
142
|
var _proto = Plugin.prototype;
|
|
147
143
|
return _proto.$beforeInit = function $beforeInit() {}
|
|
144
|
+
|
|
148
145
|
/**
|
|
149
146
|
* Lifecycle hook for 'init' phase.
|
|
150
147
|
* @private
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
*/, _proto.$init = function $init() {}
|
|
149
|
+
|
|
153
150
|
/**
|
|
154
151
|
* Lifecycle hook for 'afterInit' phase.
|
|
155
152
|
* @private
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
*/, _proto.$afterInit = function $afterInit() {}
|
|
154
|
+
|
|
158
155
|
/**
|
|
159
156
|
* Lifecycle hook for 'redraw' phase.
|
|
160
157
|
* @private
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
*/, _proto.$redraw = function $redraw() {}
|
|
159
|
+
|
|
163
160
|
/**
|
|
164
161
|
* Lifecycle hook for 'willDestroy' phase.
|
|
165
162
|
* @private
|
|
166
|
-
|
|
167
|
-
, _proto.$willDestroy = function $willDestroy() {
|
|
163
|
+
*/, _proto.$willDestroy = function $willDestroy() {
|
|
168
164
|
var _this = this;
|
|
169
|
-
|
|
170
165
|
Object.keys(this).forEach(function (key) {
|
|
171
166
|
_this[key] = null, delete _this[key];
|
|
172
167
|
});
|
|
173
168
|
}, Plugin;
|
|
174
169
|
}();
|
|
175
|
-
|
|
176
|
-
Plugin.version = "2.2.5";
|
|
170
|
+
Plugin.version = "2.2.8a";
|
|
177
171
|
|
|
178
172
|
;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
|
|
179
173
|
|
|
180
174
|
|
|
181
175
|
|
|
182
176
|
|
|
177
|
+
|
|
183
178
|
/**
|
|
184
179
|
* Bubble compare diagram plugin.<br>
|
|
185
180
|
* Compare data 3-dimensional ways: x-axis, y-axis & bubble-size.
|
|
@@ -221,24 +216,20 @@ Plugin.version = "2.2.5";
|
|
|
221
216
|
* ]
|
|
222
217
|
* })
|
|
223
218
|
*/
|
|
224
|
-
|
|
225
219
|
var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
226
220
|
function BubbleCompare(options) {
|
|
227
221
|
var _this;
|
|
228
|
-
|
|
229
222
|
return _this = _Plugin.call(this, options) || this, _this.$$ = void 0, _assertThisInitialized(_this) || _assertThisInitialized(_this);
|
|
230
223
|
}
|
|
231
|
-
|
|
232
224
|
_inheritsLoose(BubbleCompare, _Plugin);
|
|
233
|
-
|
|
234
225
|
var _proto = BubbleCompare.prototype;
|
|
235
226
|
return _proto.$init = function $init() {
|
|
236
227
|
var $$ = this.$$;
|
|
237
228
|
$$.findClosest = this.findClosest.bind(this), $$.getBubbleR = this.getBubbleR.bind(this), $$.pointExpandedR = this.pointExpandedR.bind(this);
|
|
238
229
|
}, _proto.pointExpandedR = function pointExpandedR(d) {
|
|
239
230
|
var baseR = this.getBubbleR(d),
|
|
240
|
-
|
|
241
|
-
|
|
231
|
+
_this$options$expandS = this.options.expandScale,
|
|
232
|
+
expandScale = _this$options$expandS === void 0 ? 1 : _this$options$expandS;
|
|
242
233
|
return BubbleCompare.raiseFocusedBubbleLayer(d), this.changeCursorPoint(), baseR * expandScale;
|
|
243
234
|
}, BubbleCompare.raiseFocusedBubbleLayer = function raiseFocusedBubbleLayer(d) {
|
|
244
235
|
d.raise && (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(d.node().parentNode.parentNode).raise();
|
|
@@ -246,8 +237,7 @@ var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
|
246
237
|
this.$$.$el.svg.select(".bb-event-rect").style("cursor", "pointer");
|
|
247
238
|
}, _proto.findClosest = function findClosest(values, pos) {
|
|
248
239
|
var _this2 = this,
|
|
249
|
-
|
|
250
|
-
|
|
240
|
+
$$ = this.$$;
|
|
251
241
|
return values.filter(function (v) {
|
|
252
242
|
return v && !$$.isBarType(v.id);
|
|
253
243
|
}).reduce(function (acc, cur) {
|
|
@@ -256,34 +246,29 @@ var BubbleCompare = /*#__PURE__*/function (_Plugin) {
|
|
|
256
246
|
}, 0);
|
|
257
247
|
}, _proto.getBubbleR = function getBubbleR(d) {
|
|
258
248
|
var _this3 = this,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
249
|
+
_this$options = this.options,
|
|
250
|
+
minR = _this$options.minR,
|
|
251
|
+
maxR = _this$options.maxR,
|
|
252
|
+
curVal = this.getZData(d);
|
|
264
253
|
if (!curVal) return minR;
|
|
265
|
-
|
|
266
254
|
var _this$$$$data$targets = this.$$.data.targets.reduce(function (_ref, cur) {
|
|
267
|
-
|
|
255
|
+
var accMin = _ref[0],
|
|
268
256
|
accMax = _ref[1],
|
|
269
257
|
val = _this3.getZData(cur.values[0]);
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
size = min > 0 && max === min ? 0 : curVal / max;
|
|
276
|
-
|
|
258
|
+
return [Math.min(accMin, val), Math.max(accMax, val)];
|
|
259
|
+
}, [1e4, 0]),
|
|
260
|
+
min = _this$$$$data$targets[0],
|
|
261
|
+
max = _this$$$$data$targets[1],
|
|
262
|
+
size = min > 0 && max === min ? 0 : curVal / max;
|
|
277
263
|
return Math.abs(size) * (maxR - minR) + minR;
|
|
278
264
|
}, _proto.getZData = function getZData(d) {
|
|
279
265
|
return this.$$.isBubbleZType(d) ? this.$$.getBubbleZData(d.value, "z") : d.value;
|
|
280
266
|
}, BubbleCompare;
|
|
281
267
|
}(Plugin);
|
|
282
|
-
|
|
283
268
|
BubbleCompare.version = "0.0.1";
|
|
284
269
|
|
|
285
270
|
}();
|
|
286
|
-
__webpack_exports__ = __webpack_exports__
|
|
271
|
+
__webpack_exports__ = __webpack_exports__["default"];
|
|
287
272
|
/******/ return __webpack_exports__;
|
|
288
273
|
/******/ })()
|
|
289
274
|
;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){
|
|
12
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,n)}i.d(r,{default:function(){return u}});var n=i(1),o=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();o.version="2.2.8a";var u=function(i){function r(e){var n;return(n=i.call(this,e)||this).$$=void 0,t(n)||t(n)}var o,u;u=i,(o=r).prototype=Object.create(u.prototype),o.prototype.constructor=o,e(o,u);var s=r.prototype;return s.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},s.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return r.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},r.raiseFocusedBubbleLayer=function(t){t.raise&&(0,n.select)(t.node().parentNode.parentNode).raise()},s.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},s.findClosest=function(t,e){var n=this,i=this.$$;return t.filter((function(t){return t&&!i.isBarType(t.id)})).reduce((function(t,r){return i.dist(r,e)<n.getBubbleR(r)?r:t}),0)},s.getBubbleR=function(t){var e=this,n=this.options,i=n.minR,r=n.maxR,o=this.getZData(t);if(!o)return i;var u=this.$$.data.targets.reduce((function(t,n){var i=t[0],r=t[1],o=e.getZData(n.values[0]);return[Math.min(i,o),Math.max(r,o)]}),[1e4,0]),s=u[0],a=u[1],c=s>0&&a===s?0:o/a;return Math.abs(c)*(r-i)+i},s.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},r}(o);u.version="0.0.1"}(),r=r.default}()}));
|
package/dist/plugin/{billboardjs-plugin-bubblecompare.esm.js → billboardjs-plugin-bubblecompare.mjs}
RENAMED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 2.2.
|
|
8
|
+
* @version 2.2.8a
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
12
|
import { select } from 'd3-selection';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
/******************************************************************************
|
|
15
15
|
Copyright (c) Microsoft Corporation.
|
|
16
16
|
|
|
17
17
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -25,8 +25,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
25
25
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
26
26
|
PERFORMANCE OF THIS SOFTWARE.
|
|
27
27
|
***************************************************************************** */
|
|
28
|
-
|
|
29
28
|
/* global Reflect, Promise */
|
|
29
|
+
|
|
30
30
|
var _extendStatics = function extendStatics(d, b) {
|
|
31
31
|
return _extendStatics = Object.setPrototypeOf || {
|
|
32
32
|
__proto__: []
|
|
@@ -36,12 +36,10 @@ var _extendStatics = function extendStatics(d, b) {
|
|
|
36
36
|
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
|
|
37
37
|
}, _extendStatics(d, b);
|
|
38
38
|
};
|
|
39
|
-
|
|
40
39
|
function __extends(d, b) {
|
|
41
40
|
function __() {
|
|
42
41
|
this.constructor = d;
|
|
43
42
|
}
|
|
44
|
-
|
|
45
43
|
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + (b + "") + " is not a constructor or null");
|
|
46
44
|
_extendStatics(d, b), d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
45
|
}
|
|
@@ -50,12 +48,10 @@ function __extends(d, b) {
|
|
|
50
48
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
51
49
|
* billboard.js project is licensed under the MIT license
|
|
52
50
|
*/
|
|
53
|
-
|
|
54
51
|
/**
|
|
55
52
|
* Base class to generate billboard.js plugin
|
|
56
53
|
* @class Plugin
|
|
57
54
|
*/
|
|
58
|
-
|
|
59
55
|
/**
|
|
60
56
|
* Version info string for plugin
|
|
61
57
|
* @name version
|
|
@@ -84,43 +80,40 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
84
80
|
function Plugin(options) {
|
|
85
81
|
options === void 0 && (options = {}), this.$$, this.options = options;
|
|
86
82
|
}
|
|
83
|
+
|
|
87
84
|
/**
|
|
88
85
|
* Lifecycle hook for 'beforeInit' phase.
|
|
89
86
|
* @private
|
|
90
87
|
*/
|
|
91
|
-
|
|
92
|
-
|
|
93
88
|
var _proto = Plugin.prototype;
|
|
94
89
|
return _proto.$beforeInit = function $beforeInit() {}
|
|
90
|
+
|
|
95
91
|
/**
|
|
96
92
|
* Lifecycle hook for 'init' phase.
|
|
97
93
|
* @private
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
*/, _proto.$init = function $init() {}
|
|
95
|
+
|
|
100
96
|
/**
|
|
101
97
|
* Lifecycle hook for 'afterInit' phase.
|
|
102
98
|
* @private
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
*/, _proto.$afterInit = function $afterInit() {}
|
|
100
|
+
|
|
105
101
|
/**
|
|
106
102
|
* Lifecycle hook for 'redraw' phase.
|
|
107
103
|
* @private
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
*/, _proto.$redraw = function $redraw() {}
|
|
105
|
+
|
|
110
106
|
/**
|
|
111
107
|
* Lifecycle hook for 'willDestroy' phase.
|
|
112
108
|
* @private
|
|
113
|
-
|
|
114
|
-
, _proto.$willDestroy = function $willDestroy() {
|
|
109
|
+
*/, _proto.$willDestroy = function $willDestroy() {
|
|
115
110
|
var _this = this;
|
|
116
|
-
|
|
117
111
|
Object.keys(this).forEach(function (key) {
|
|
118
112
|
_this[key] = null, delete _this[key];
|
|
119
113
|
});
|
|
120
114
|
}, Plugin;
|
|
121
115
|
}();
|
|
122
|
-
|
|
123
|
-
Plugin.version = "#2.2.6#";
|
|
116
|
+
Plugin.version = "#2.2.8a#";
|
|
124
117
|
|
|
125
118
|
/**
|
|
126
119
|
* Bubble compare diagram plugin.<br>
|
|
@@ -221,4 +214,4 @@ var BubbleCompare = /** @class */ (function (_super) {
|
|
|
221
214
|
return BubbleCompare;
|
|
222
215
|
}(Plugin));
|
|
223
216
|
|
|
224
|
-
export default
|
|
217
|
+
export { BubbleCompare as default };
|