billboard.js 3.11.3 → 3.12.0-next.1

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.
Files changed (171) hide show
  1. package/README.md +1 -5
  2. package/dist/billboard.css +5 -1
  3. package/dist/billboard.js +19433 -24307
  4. package/dist/billboard.min.css +2 -2
  5. package/dist/billboard.min.js +26 -3
  6. package/dist/billboard.pkgd.js +22302 -29071
  7. package/dist/billboard.pkgd.min.js +33 -3
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +77 -175
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +423 -1134
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.js +660 -1524
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +15 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.js +503 -1175
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +30 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +351 -1055
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -3
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +339 -1324
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -3
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +1701 -3424
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2385 -4462
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +1783 -3467
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +33 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2031 -3979
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -3
  28. package/dist/theme/dark.css +5 -1
  29. package/dist/theme/dark.min.css +2 -2
  30. package/dist/theme/datalab.css +5 -1
  31. package/dist/theme/datalab.min.css +2 -2
  32. package/dist/theme/graph.css +5 -1
  33. package/dist/theme/graph.min.css +2 -2
  34. package/dist/theme/insight.css +5 -1
  35. package/dist/theme/insight.min.css +2 -2
  36. package/dist/theme/modern.css +5 -1
  37. package/dist/theme/modern.min.css +3 -4
  38. package/dist-esm/billboard.js +9035 -8651
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +19 -25
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +149 -148
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +295 -286
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +235 -234
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +40 -41
  44. package/package.json +24 -44
  45. package/src/Chart/api/axis.ts +6 -13
  46. package/src/Chart/api/chart.ts +12 -11
  47. package/src/Chart/api/data.ts +8 -7
  48. package/src/Chart/api/export.ts +28 -21
  49. package/src/Chart/api/flow.ts +4 -2
  50. package/src/Chart/api/grid.ts +1 -5
  51. package/src/Chart/api/load.ts +2 -2
  52. package/src/Chart/api/regions.ts +29 -5
  53. package/src/Chart/api/selection.ts +2 -2
  54. package/src/Chart/api/show.ts +2 -3
  55. package/src/Chart/api/subchart.ts +2 -2
  56. package/src/Chart/api/tooltip.ts +5 -7
  57. package/src/Chart/api/x.ts +2 -2
  58. package/src/Chart/api/zoom.ts +2 -2
  59. package/src/ChartInternal/Axis/Axis.ts +119 -44
  60. package/src/ChartInternal/Axis/AxisRenderer.ts +53 -38
  61. package/src/ChartInternal/Axis/AxisRendererHelper.ts +2 -2
  62. package/src/ChartInternal/ChartInternal.ts +79 -51
  63. package/src/ChartInternal/data/IData.ts +24 -31
  64. package/src/ChartInternal/data/convert.helper.ts +66 -68
  65. package/src/ChartInternal/data/convert.ts +11 -11
  66. package/src/ChartInternal/data/data.ts +40 -23
  67. package/src/ChartInternal/data/load.ts +7 -6
  68. package/src/ChartInternal/interactions/drag.ts +2 -1
  69. package/src/ChartInternal/interactions/eventrect.ts +54 -25
  70. package/src/ChartInternal/interactions/flow.ts +14 -4
  71. package/src/ChartInternal/interactions/interaction.ts +34 -12
  72. package/src/ChartInternal/interactions/subchart.ts +27 -25
  73. package/src/ChartInternal/interactions/zoom.ts +29 -18
  74. package/src/ChartInternal/internals/category.ts +1 -1
  75. package/src/ChartInternal/internals/class.ts +5 -5
  76. package/src/ChartInternal/internals/clip.ts +8 -4
  77. package/src/ChartInternal/internals/color.ts +70 -42
  78. package/src/ChartInternal/internals/domain.ts +59 -28
  79. package/src/ChartInternal/internals/format.ts +5 -5
  80. package/src/ChartInternal/internals/grid.ts +130 -47
  81. package/src/ChartInternal/internals/legend.ts +93 -61
  82. package/src/ChartInternal/internals/redraw.ts +3 -2
  83. package/src/ChartInternal/internals/region.ts +5 -3
  84. package/src/ChartInternal/internals/scale.ts +28 -15
  85. package/src/ChartInternal/internals/selection.ts +14 -13
  86. package/src/ChartInternal/internals/size.axis.ts +18 -10
  87. package/src/ChartInternal/internals/size.ts +97 -66
  88. package/src/ChartInternal/internals/style.ts +21 -19
  89. package/src/ChartInternal/internals/text.ts +64 -39
  90. package/src/ChartInternal/internals/title.ts +2 -2
  91. package/src/ChartInternal/internals/tooltip.ts +73 -28
  92. package/src/ChartInternal/internals/transform.ts +2 -2
  93. package/src/ChartInternal/internals/type.ts +12 -12
  94. package/src/ChartInternal/shape/arc.ts +78 -44
  95. package/src/ChartInternal/shape/area.ts +19 -22
  96. package/src/ChartInternal/shape/bar.ts +41 -31
  97. package/src/ChartInternal/shape/bubble.ts +5 -5
  98. package/src/ChartInternal/shape/candlestick.ts +15 -13
  99. package/src/ChartInternal/shape/gauge.ts +16 -9
  100. package/src/ChartInternal/shape/line.ts +62 -46
  101. package/src/ChartInternal/shape/point.common.ts +1 -4
  102. package/src/ChartInternal/shape/point.ts +52 -32
  103. package/src/ChartInternal/shape/polar.ts +4 -2
  104. package/src/ChartInternal/shape/radar.ts +40 -22
  105. package/src/ChartInternal/shape/shape.ts +84 -58
  106. package/src/ChartInternal/shape/treemap.ts +29 -20
  107. package/src/Plugin/bubblecompare/index.ts +1 -3
  108. package/src/Plugin/sparkline/index.ts +3 -4
  109. package/src/Plugin/stanford/ColorScale.ts +3 -2
  110. package/src/Plugin/stanford/Elements.ts +15 -6
  111. package/src/Plugin/stanford/Options.ts +5 -5
  112. package/src/Plugin/stanford/index.ts +13 -9
  113. package/src/Plugin/tableview/Options.ts +1 -1
  114. package/src/Plugin/tableview/const.ts +1 -4
  115. package/src/Plugin/tableview/index.ts +11 -9
  116. package/src/Plugin/textoverlap/index.ts +4 -6
  117. package/src/config/Options/Options.ts +3 -3
  118. package/src/config/Options/axis/axis.ts +36 -0
  119. package/src/config/Options/axis/x.ts +12 -13
  120. package/src/config/Options/axis/y.ts +13 -13
  121. package/src/config/Options/axis/y2.ts +23 -10
  122. package/src/config/Options/common/color.ts +4 -4
  123. package/src/config/Options/common/grid.ts +4 -4
  124. package/src/config/Options/common/legend.ts +12 -13
  125. package/src/config/Options/common/main.ts +23 -23
  126. package/src/config/Options/common/point.ts +17 -18
  127. package/src/config/Options/common/title.ts +2 -2
  128. package/src/config/Options/common/tooltip.ts +13 -11
  129. package/src/config/Options/data/axis.ts +2 -2
  130. package/src/config/Options/data/data.ts +45 -45
  131. package/src/config/Options/interaction/interaction.ts +1 -1
  132. package/src/config/Options/interaction/subchart.ts +2 -2
  133. package/src/config/Options/interaction/zoom.ts +9 -9
  134. package/src/config/Options/shape/arc.ts +10 -13
  135. package/src/config/Options/shape/area.ts +5 -7
  136. package/src/config/Options/shape/bar.ts +8 -10
  137. package/src/config/Options/shape/bubble.ts +1 -1
  138. package/src/config/Options/shape/candlestick.ts +2 -2
  139. package/src/config/Options/shape/donut.ts +4 -4
  140. package/src/config/Options/shape/gauge.ts +6 -6
  141. package/src/config/Options/shape/line.ts +3 -3
  142. package/src/config/Options/shape/pie.ts +5 -5
  143. package/src/config/Options/shape/polar.ts +3 -3
  144. package/src/config/Options/shape/radar.ts +2 -2
  145. package/src/config/Options/shape/scatter.ts +1 -1
  146. package/src/config/Options/shape/treemap.ts +1 -1
  147. package/src/config/Store/Element.ts +8 -5
  148. package/src/config/Store/State.ts +19 -13
  149. package/src/config/classes.ts +6 -4
  150. package/src/config/config.ts +1 -1
  151. package/src/config/resolver/axis.ts +4 -4
  152. package/src/config/resolver/interaction.ts +3 -7
  153. package/src/config/resolver/shape.ts +11 -12
  154. package/src/core.ts +2 -3
  155. package/src/index.esm.ts +2 -6
  156. package/src/index.ts +2 -2
  157. package/src/module/Cache.ts +2 -3
  158. package/src/module/browser.ts +15 -10
  159. package/src/module/error.ts +9 -8
  160. package/src/module/generator.ts +3 -5
  161. package/src/module/util.ts +60 -37
  162. package/src/module/worker.ts +14 -11
  163. package/src/scss/billboard.scss +6 -0
  164. package/src/scss/theme/dark.scss +6 -0
  165. package/src/scss/theme/datalab.scss +6 -0
  166. package/src/scss/theme/graph.scss +6 -0
  167. package/src/scss/theme/insight.scss +6 -0
  168. package/src/scss/theme/modern.scss +6 -0
  169. package/types/axis.d.ts +7 -0
  170. package/types/options.d.ts +7 -0
  171. package/types/options.shape.d.ts +7 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.3
8
+ * @version 3.12.0-next.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -83,224 +83,126 @@ __webpack_require__.d(__webpack_exports__, {
83
83
  "default": function() { return /* binding */ BubbleCompare; }
84
84
  });
85
85
 
86
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/newArrowCheck.js
87
- function _newArrowCheck(innerThis, boundThis) {
88
- if (innerThis !== boundThis) {
89
- throw new TypeError("Cannot instantiate an arrow function");
90
- }
91
- }
92
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
93
- function _assertThisInitialized(self) {
94
- if (self === void 0) {
95
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
96
- }
97
- return self;
98
- }
99
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
100
- function _setPrototypeOf(o, p) {
101
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
102
- o.__proto__ = p;
103
- return o;
104
- };
105
- return _setPrototypeOf(o, p);
106
- }
107
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
108
-
109
- function _inheritsLoose(subClass, superClass) {
110
- subClass.prototype = Object.create(superClass.prototype);
111
- subClass.prototype.constructor = subClass;
112
- _setPrototypeOf(subClass, superClass);
113
- }
114
86
  // EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
115
87
  var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(1);
116
88
  ;// CONCATENATED MODULE: ./src/Plugin/Plugin.ts
117
-
118
- /**
119
- * Copyright (c) 2017 ~ present NAVER Corp.
120
- * billboard.js project is licensed under the MIT license
121
- */
122
- /**
123
- * Base class to generate billboard.js plugin
124
- * @class Plugin
125
- */
126
- /**
127
- * Version info string for plugin
128
- * @name version
129
- * @static
130
- * @memberof Plugin
131
- * @type {string}
132
- * @example
133
- * bb.plugin.stanford.version; // ex) 1.9.0
134
- */
135
- let Plugin = /*#__PURE__*/function () {
89
+ var __defProp = Object.defineProperty;
90
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
91
+ var __publicField = (obj, key, value) => {
92
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
93
+ return value;
94
+ };
95
+ class Plugin {
136
96
  /**
137
97
  * Constructor
138
98
  * @param {Any} options config option object
139
99
  * @private
140
100
  */
141
- function Plugin(options) {
142
- if (options === void 0) {
143
- options = {};
144
- }
145
- this.$$ = void 0;
146
- this.options = void 0;
101
+ constructor(options = {}) {
102
+ __publicField(this, "$$");
103
+ __publicField(this, "options");
147
104
  this.options = options;
148
105
  }
149
-
150
106
  /**
151
107
  * Lifecycle hook for 'beforeInit' phase.
152
108
  * @private
153
109
  */
154
- var _proto = Plugin.prototype;
155
- _proto.$beforeInit = function $beforeInit() {}
156
-
110
+ $beforeInit() {
111
+ }
157
112
  /**
158
113
  * Lifecycle hook for 'init' phase.
159
114
  * @private
160
- */;
161
- _proto.$init = function $init() {}
162
-
115
+ */
116
+ $init() {
117
+ }
163
118
  /**
164
119
  * Lifecycle hook for 'afterInit' phase.
165
120
  * @private
166
- */;
167
- _proto.$afterInit = function $afterInit() {}
168
-
121
+ */
122
+ $afterInit() {
123
+ }
169
124
  /**
170
125
  * Lifecycle hook for 'redraw' phase.
171
126
  * @private
172
- */;
173
- _proto.$redraw = function $redraw() {}
174
-
127
+ */
128
+ $redraw() {
129
+ }
175
130
  /**
176
131
  * Lifecycle hook for 'willDestroy' phase.
177
132
  * @private
178
- */;
179
- _proto.$willDestroy = function $willDestroy() {
180
- var _this = this;
181
- Object.keys(this).forEach(function (key) {
182
- _newArrowCheck(this, _this);
133
+ */
134
+ $willDestroy() {
135
+ Object.keys(this).forEach((key) => {
183
136
  this[key] = null;
184
137
  delete this[key];
185
- }.bind(this));
186
- };
187
- return Plugin;
188
- }();
189
- Plugin.version = "3.11.3";
138
+ });
139
+ }
140
+ }
141
+ __publicField(Plugin, "version", "3.12.0-next.1");
190
142
 
191
143
  ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
192
-
193
-
194
-
195
-
196
-
197
-
198
- /**
199
- * Bubble compare diagram plugin.<br>
200
- * Compare data 3-dimensional ways: x-axis, y-axis & bubble-size.
201
- * - **NOTE:**
202
- * - Plugins aren't built-in. Need to be loaded or imported to be used.
203
- * - Non required modules from billboard.js core, need to be installed separately.
204
- * - **Required modules:**
205
- * - [d3-selection](https://github.com/d3/d3-selection)
206
- * @class plugin-bubblecompare
207
- * @requires d3-selection
208
- * @param {object} options bubble compare plugin options
209
- * @augments Plugin
210
- * @returns {BubbleCompare}
211
- * @example
212
- * // Plugin must be loaded before the use.
213
- * <script src="$YOUR_PATH/plugin/billboardjs-plugin-bubblecompare.js"></script>
214
- *
215
- * var chart = bb.generate({
216
- * data: {
217
- * columns: [ ... ],
218
- * type: "bubble"
219
- * }
220
- * ...
221
- * plugins: [
222
- * new bb.plugin.bubblecompare({
223
- * minR: 11,
224
- * maxR: 74,
225
- * expandScale: 1.1
226
- * }),
227
- * ]
228
- * });
229
- * @example
230
- * import {bb} from "billboard.js";
231
- * import BubbleCompare from "billboard.js/dist/billboardjs-plugin-bubblecompare";
232
- *
233
- * bb.generate({
234
- * plugins: [
235
- * new BubbleCompare({ ... })
236
- * ]
237
- * })
238
- */
239
- let BubbleCompare = /*#__PURE__*/function (_Plugin) {
240
- _inheritsLoose(BubbleCompare, _Plugin);
241
- function BubbleCompare(options) {
242
- var _this = _Plugin.call(this, options) || this;
243
- _this.$$ = void 0;
244
- return _assertThisInitialized(_this) || _assertThisInitialized(_this);
144
+ var bubblecompare_defProp = Object.defineProperty;
145
+ var bubblecompare_defNormalProp = (obj, key, value) => key in obj ? bubblecompare_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
146
+ var bubblecompare_publicField = (obj, key, value) => {
147
+ bubblecompare_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
148
+ return value;
149
+ };
150
+
151
+
152
+ const _BubbleCompare = class _BubbleCompare extends Plugin {
153
+ constructor(options) {
154
+ super(options);
155
+ bubblecompare_publicField(this, "$$");
156
+ return this;
245
157
  }
246
- var _proto = BubbleCompare.prototype;
247
- _proto.$init = function $init() {
248
- const $$ = this.$$;
158
+ $init() {
159
+ const { $$ } = this;
249
160
  $$.findClosest = this.findClosest.bind(this);
250
161
  $$.getBubbleR = this.getBubbleR.bind(this);
251
162
  $$.pointExpandedR = this.pointExpandedR.bind(this);
252
- };
253
- _proto.pointExpandedR = function pointExpandedR(d) {
254
- const baseR = this.getBubbleR(d),
255
- _this$options$expandS = this.options.expandScale,
256
- expandScale = _this$options$expandS === void 0 ? 1 : _this$options$expandS;
257
- BubbleCompare.raiseFocusedBubbleLayer(d);
163
+ }
164
+ pointExpandedR(d) {
165
+ const baseR = this.getBubbleR(d);
166
+ const { expandScale = 1 } = this.options;
167
+ _BubbleCompare.raiseFocusedBubbleLayer(d);
258
168
  this.changeCursorPoint();
259
169
  return baseR * expandScale;
260
- };
261
- BubbleCompare.raiseFocusedBubbleLayer = function raiseFocusedBubbleLayer(d) {
170
+ }
171
+ static raiseFocusedBubbleLayer(d) {
262
172
  d.raise && (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(d.node().parentNode.parentNode).raise();
263
- };
264
- _proto.changeCursorPoint = function changeCursorPoint() {
173
+ }
174
+ changeCursorPoint() {
265
175
  this.$$.$el.eventRect.style("cursor", "pointer");
266
- };
267
- _proto.findClosest = function findClosest(values, pos) {
268
- var _this2 = this;
269
- const $$ = this.$$;
270
- return values.filter(function (v) {
271
- _newArrowCheck(this, _this2);
272
- return v && !$$.isBarType(v.id);
273
- }.bind(this)).reduce(function (acc, cur) {
274
- _newArrowCheck(this, _this2);
176
+ }
177
+ findClosest(values, pos) {
178
+ const { $$ } = this;
179
+ return values.filter((v) => v && !$$.isBarType(v.id)).reduce((acc, cur) => {
275
180
  const d = $$.dist(cur, pos);
276
181
  return d < this.getBubbleR(cur) ? cur : acc;
277
- }.bind(this), 0);
278
- };
279
- _proto.getBubbleR = function getBubbleR(d) {
280
- var _this3 = this;
281
- const _this$options = this.options,
282
- minR = _this$options.minR,
283
- maxR = _this$options.maxR,
284
- curVal = this.getZData(d);
285
- if (!curVal) return minR;
286
- const _this$$$$data$targets = this.$$.data.targets.reduce(function (_ref, cur) {
287
- let accMin = _ref[0],
288
- accMax = _ref[1];
289
- _newArrowCheck(this, _this3);
182
+ }, 0);
183
+ }
184
+ getBubbleR(d) {
185
+ const { minR, maxR } = this.options;
186
+ const curVal = this.getZData(d);
187
+ if (!curVal)
188
+ return minR;
189
+ const [min, max] = this.$$.data.targets.reduce(
190
+ ([accMin, accMax], cur) => {
290
191
  const val = this.getZData(cur.values[0]);
291
192
  return [Math.min(accMin, val), Math.max(accMax, val)];
292
- }.bind(this), [1e4, 0]),
293
- min = _this$$$$data$targets[0],
294
- max = _this$$$$data$targets[1],
295
- size = min > 0 && max === min ? 0 : curVal / max;
193
+ },
194
+ [1e4, 0]
195
+ );
196
+ const size = min > 0 && max === min ? 0 : curVal / max;
296
197
  return Math.abs(size) * (maxR - minR) + minR;
297
- };
298
- _proto.getZData = function getZData(d) {
198
+ }
199
+ getZData(d) {
299
200
  return this.$$.isBubbleZType(d) ? this.$$.getBubbleZData(d.value, "z") : d.value;
300
- };
301
- return BubbleCompare;
302
- }(Plugin);
303
- BubbleCompare.version = "0.0.1";
201
+ }
202
+ };
203
+ bubblecompare_publicField(_BubbleCompare, "version", `0.0.1`);
204
+ let BubbleCompare = _BubbleCompare;
205
+
304
206
 
305
207
  }();
306
208
  __webpack_exports__ = __webpack_exports__["default"];
@@ -5,8 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.3
8
+ * @version 3.12.0-next.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
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={747:function(e){e.exports=t}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.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 o={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(o,{default:function(){return u}});var r=i(747);let s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.11.3";let u=function(i){var o,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(o=u).prototype=Object.create(s.prototype),o.prototype.constructor=o,n(o,s);var c=u.prototype;return c.$init=function(){const t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},c.pointExpandedR=function(t){const e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,r.select)(t.node().parentNode.parentNode).raise()},c.changeCursorPoint=function(){this.$$.$el.eventRect.style("cursor","pointer")},c.findClosest=function(e,n){var i=this;const o=this.$$;return e.filter(function(e){return t(this,i),e&&!o.isBarType(e.id)}.bind(this)).reduce(function(e,r){t(this,i);return o.dist(r,n)<this.getBubbleR(r)?r:e}.bind(this),0)},c.getBubbleR=function(e){var n=this;const i=this.options,o=i.minR,r=i.maxR,s=this.getZData(e);if(!s)return o;const u=this.$$.data.targets.reduce(function(e,i){let o=e[0],r=e[1];t(this,n);const s=this.getZData(i.values[0]);return[Math.min(o,s),Math.max(r,s)]}.bind(this),[1e4,0]),c=u[0],a=u[1],f=c>0&&a===c?0:s/a;return Math.abs(f)*(r-o)+o},c.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),o=o.default}()}));
11
+ */(function(o,a){typeof exports=="object"&&typeof module=="object"?module.exports=a(require("d3-selection")):typeof define=="function"&&define.amd?define("bb",["d3-selection"],a):typeof exports=="object"?exports.bb=a(require("d3-selection")):(o.bb=o.bb||{},o.bb.plugin=o.bb.plugin||{},o.bb.plugin.bubblecompare=a(o.d3))})(this,function(_){return function(){"use strict";var o={747:function(r){r.exports=_}},a={};function u(r){var i=a[r];if(i!==void 0)return i.exports;var s=a[r]={exports:{}};return o[r](s,s.exports,u),s.exports}(function(){u.d=function(r,i){for(var s in i)u.o(i,s)&&!u.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:i[s]})}})(),function(){u.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)}}();var p={};return function(){u.d(p,{default:function(){return R}});var r=u(747),i=Object.defineProperty,s=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,d=(n,e,t)=>(s(n,typeof e!="symbol"?e+"":e,t),t);class h{constructor(e={}){d(this,"$$"),d(this,"options"),this.options=e}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(e=>{this[e]=null,delete this[e]})}}d(h,"version","3.12.0-next.1");var v=Object.defineProperty,B=(n,e,t)=>e in n?v(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,m=(n,e,t)=>(B(n,typeof e!="symbol"?e+"":e,t),t);const $=class x extends h{constructor(e){return super(e),m(this,"$$"),this}$init(){const{$$:e}=this;e.findClosest=this.findClosest.bind(this),e.getBubbleR=this.getBubbleR.bind(this),e.pointExpandedR=this.pointExpandedR.bind(this)}pointExpandedR(e){const t=this.getBubbleR(e),{expandScale:c=1}=this.options;return x.raiseFocusedBubbleLayer(e),this.changeCursorPoint(),t*c}static raiseFocusedBubbleLayer(e){e.raise&&(0,r.select)(e.node().parentNode.parentNode).raise()}changeCursorPoint(){this.$$.$el.eventRect.style("cursor","pointer")}findClosest(e,t){const{$$:c}=this;return e.filter(b=>b&&!c.isBarType(b.id)).reduce((b,l)=>c.dist(l,t)<this.getBubbleR(l)?l:b,0)}getBubbleR(e){const{minR:t,maxR:c}=this.options,b=this.getZData(e);if(!b)return t;const[l,f]=this.$$.data.targets.reduce(([w,C],j)=>{const g=this.getZData(j.values[0]);return[Math.min(w,g),Math.max(C,g)]},[1e4,0]),P=l>0&&f===l?0:b/f;return Math.abs(P)*(c-t)+t}getZData(e){return this.$$.isBubbleZType(e)?this.$$.getBubbleZData(e.value,"z"):e.value}};m($,"version","0.0.1");let R=$}(),p=p.default,p}()});