billboard.js 4.0.3 → 4.1.0-next.2

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 (271) hide show
  1. package/README.md +82 -7
  2. package/dist/billboard.css +1 -1
  3. package/dist/billboard.js +1848 -494
  4. package/dist/billboard.min.css +1 -1
  5. package/dist/billboard.min.js +19 -24
  6. package/dist/billboard.pkgd.js +1844 -679
  7. package/dist/billboard.pkgd.min.js +24 -29
  8. package/dist/billboard.react.js +205 -0
  9. package/dist/billboard.react.min.js +9 -0
  10. package/dist/billboard.worker.js +10 -0
  11. package/dist/plugin/billboardjs-plugin-bubblecompare.js +5 -3
  12. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-sparkline.js +6 -3
  14. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  15. package/dist/plugin/billboardjs-plugin-stanford.js +6 -3
  16. package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
  17. package/dist/plugin/billboardjs-plugin-tableview.js +59 -27
  18. package/dist/plugin/billboardjs-plugin-tableview.min.js +5 -5
  19. package/dist/plugin/billboardjs-plugin-textoverlap.js +75 -55
  20. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +5 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  23. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +6 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +3 -3
  25. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +6 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
  27. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +59 -27
  28. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -11
  29. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +68 -3557
  30. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
  31. package/dist/theme/dark.css +1 -1
  32. package/dist/theme/dark.min.css +1 -1
  33. package/dist/theme/datalab.css +1 -1
  34. package/dist/theme/datalab.min.css +1 -1
  35. package/dist/theme/graph.css +1 -1
  36. package/dist/theme/graph.min.css +1 -1
  37. package/dist/theme/insight.css +1 -1
  38. package/dist/theme/insight.min.css +1 -1
  39. package/dist/theme/modern.css +1 -1
  40. package/dist/theme/modern.min.css +1 -1
  41. package/dist-esm/Chart/Chart.js +134 -152
  42. package/dist-esm/Chart/api/axis.js +217 -237
  43. package/dist-esm/Chart/api/category.js +54 -54
  44. package/dist-esm/Chart/api/chart.js +172 -215
  45. package/dist-esm/Chart/api/color.js +21 -21
  46. package/dist-esm/Chart/api/data.js +172 -173
  47. package/dist-esm/Chart/api/export.js +242 -262
  48. package/dist-esm/Chart/api/flow.js +198 -254
  49. package/dist-esm/Chart/api/focus.js +136 -143
  50. package/dist-esm/Chart/api/grid.js +191 -190
  51. package/dist-esm/Chart/api/group.js +31 -34
  52. package/dist-esm/Chart/api/legend.js +54 -63
  53. package/dist-esm/Chart/api/load.js +237 -257
  54. package/dist-esm/Chart/api/regions.js +148 -168
  55. package/dist-esm/Chart/api/selection.js +181 -139
  56. package/dist-esm/Chart/api/show.js +133 -147
  57. package/dist-esm/Chart/api/stubs.js +43 -42
  58. package/dist-esm/Chart/api/subchart.js +155 -172
  59. package/dist-esm/Chart/api/tooltip.js +132 -177
  60. package/dist-esm/Chart/api/x.js +67 -71
  61. package/dist-esm/Chart/api/zoom.js +183 -220
  62. package/dist-esm/ChartInternal/Axis/Axis.js +1059 -1266
  63. package/dist-esm/ChartInternal/Axis/AxisRenderer.js +408 -540
  64. package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +113 -149
  65. package/dist-esm/ChartInternal/ChartInternal.js +573 -749
  66. package/dist-esm/ChartInternal/data/convert.helper.js +133 -159
  67. package/dist-esm/ChartInternal/data/convert.js +200 -229
  68. package/dist-esm/ChartInternal/data/data.js +967 -1153
  69. package/dist-esm/ChartInternal/data/load.js +145 -197
  70. package/dist-esm/ChartInternal/interactions/drag.js +86 -122
  71. package/dist-esm/ChartInternal/interactions/eventrect.js +455 -621
  72. package/dist-esm/ChartInternal/interactions/flow.js +151 -215
  73. package/dist-esm/ChartInternal/interactions/interaction.js +214 -252
  74. package/dist-esm/ChartInternal/interactions/subchart.js +425 -300
  75. package/dist-esm/ChartInternal/interactions/zoom.js +321 -440
  76. package/dist-esm/ChartInternal/internals/category.js +18 -18
  77. package/dist-esm/ChartInternal/internals/class.js +89 -99
  78. package/dist-esm/ChartInternal/internals/clip.js +88 -119
  79. package/dist-esm/ChartInternal/internals/color.js +233 -288
  80. package/dist-esm/ChartInternal/internals/domain.js +452 -588
  81. package/dist-esm/ChartInternal/internals/format.js +64 -77
  82. package/dist-esm/ChartInternal/internals/grid.js +333 -457
  83. package/dist-esm/ChartInternal/internals/legend.js +675 -927
  84. package/dist-esm/ChartInternal/internals/redraw.js +200 -289
  85. package/dist-esm/ChartInternal/internals/region.js +106 -159
  86. package/dist-esm/ChartInternal/internals/scale.js +186 -215
  87. package/dist-esm/ChartInternal/internals/selection.js +132 -159
  88. package/dist-esm/ChartInternal/internals/size.axis.js +92 -139
  89. package/dist-esm/ChartInternal/internals/size.js +286 -394
  90. package/dist-esm/ChartInternal/internals/style.js +39 -41
  91. package/dist-esm/ChartInternal/internals/subchart.util.js +49 -0
  92. package/dist-esm/ChartInternal/internals/text.arc.js +155 -219
  93. package/dist-esm/ChartInternal/internals/text.js +368 -528
  94. package/dist-esm/ChartInternal/internals/text.util.js +179 -239
  95. package/dist-esm/ChartInternal/internals/title.js +96 -121
  96. package/dist-esm/ChartInternal/internals/tooltip.js +450 -586
  97. package/dist-esm/ChartInternal/internals/transform.js +79 -97
  98. package/dist-esm/ChartInternal/internals/type.js +285 -236
  99. package/dist-esm/ChartInternal/shape/arc.js +825 -1112
  100. package/dist-esm/ChartInternal/shape/area.js +73 -94
  101. package/dist-esm/ChartInternal/shape/bar.js +227 -288
  102. package/dist-esm/ChartInternal/shape/bubble.js +9 -8
  103. package/dist-esm/ChartInternal/shape/candlestick.js +110 -138
  104. package/dist-esm/ChartInternal/shape/core/barRadius.js +197 -133
  105. package/dist-esm/ChartInternal/shape/core/bubble.js +64 -73
  106. package/dist-esm/ChartInternal/shape/core/candlestick.js +93 -86
  107. package/dist-esm/ChartInternal/shape/core/dataRegion.js +68 -75
  108. package/dist-esm/ChartInternal/shape/core/geometry.js +112 -112
  109. package/dist-esm/ChartInternal/shape/core/path.js +142 -115
  110. package/dist-esm/ChartInternal/shape/core/point.js +105 -125
  111. package/dist-esm/ChartInternal/shape/core/treemap.js +83 -88
  112. package/dist-esm/ChartInternal/shape/funnel.js +310 -338
  113. package/dist-esm/ChartInternal/shape/gauge.js +71 -103
  114. package/dist-esm/ChartInternal/shape/line.js +208 -278
  115. package/dist-esm/ChartInternal/shape/point.js +310 -425
  116. package/dist-esm/ChartInternal/shape/polar.js +84 -109
  117. package/dist-esm/ChartInternal/shape/radar.js +228 -318
  118. package/dist-esm/ChartInternal/shape/shape.js +782 -843
  119. package/dist-esm/ChartInternal/shape/treemap.js +152 -190
  120. package/dist-esm/canvas/CanvasAxisRenderer.js +1180 -1328
  121. package/dist-esm/canvas/CanvasEngine.js +148 -166
  122. package/dist-esm/canvas/CanvasPainter.js +395 -411
  123. package/dist-esm/canvas/CanvasRenderer.js +1584 -1834
  124. package/dist-esm/canvas/CanvasTheme.js +899 -802
  125. package/dist-esm/canvas/HitDetector.js +394 -463
  126. package/dist-esm/canvas/axisTicks.js +672 -786
  127. package/dist-esm/canvas/classes.js +19 -17
  128. package/dist-esm/canvas/color.js +40 -59
  129. package/dist-esm/canvas/geometry.js +38 -38
  130. package/dist-esm/canvas/labels.js +318 -371
  131. package/dist-esm/canvas/pointPattern.js +578 -580
  132. package/dist-esm/canvas/util.js +242 -262
  133. package/dist-esm/config/Options/Options.js +29 -32
  134. package/dist-esm/config/Options/axis/axis.js +101 -101
  135. package/dist-esm/config/Options/axis/x.js +759 -755
  136. package/dist-esm/config/Options/axis/y.js +525 -522
  137. package/dist-esm/config/Options/axis/y2.js +501 -485
  138. package/dist-esm/config/Options/common/boost.js +93 -32
  139. package/dist-esm/config/Options/common/color.js +88 -87
  140. package/dist-esm/config/Options/common/grid.js +74 -73
  141. package/dist-esm/config/Options/common/legend.js +180 -179
  142. package/dist-esm/config/Options/common/main.js +474 -473
  143. package/dist-esm/config/Options/common/point.js +160 -159
  144. package/dist-esm/config/Options/common/title.js +47 -46
  145. package/dist-esm/config/Options/common/tooltip.js +253 -252
  146. package/dist-esm/config/Options/data/axis.js +173 -172
  147. package/dist-esm/config/Options/data/data.js +958 -957
  148. package/dist-esm/config/Options/data/selection.js +131 -130
  149. package/dist-esm/config/Options/interaction/interaction.js +53 -52
  150. package/dist-esm/config/Options/interaction/subchart.js +164 -73
  151. package/dist-esm/config/Options/interaction/zoom.js +86 -85
  152. package/dist-esm/config/Options/shape/arc.js +150 -149
  153. package/dist-esm/config/Options/shape/area.js +69 -68
  154. package/dist-esm/config/Options/shape/bar.js +147 -146
  155. package/dist-esm/config/Options/shape/bubble.js +35 -34
  156. package/dist-esm/config/Options/shape/candlestick.js +61 -60
  157. package/dist-esm/config/Options/shape/donut.js +181 -180
  158. package/dist-esm/config/Options/shape/funnel.js +49 -48
  159. package/dist-esm/config/Options/shape/gauge.js +237 -236
  160. package/dist-esm/config/Options/shape/line.js +58 -57
  161. package/dist-esm/config/Options/shape/pie.js +185 -184
  162. package/dist-esm/config/Options/shape/polar.js +167 -166
  163. package/dist-esm/config/Options/shape/radar.js +76 -75
  164. package/dist-esm/config/Options/shape/scatter.js +36 -36
  165. package/dist-esm/config/Options/shape/spline.js +46 -46
  166. package/dist-esm/config/Options/shape/treemap.js +80 -79
  167. package/dist-esm/config/Store/Element.js +64 -62
  168. package/dist-esm/config/Store/State.js +189 -200
  169. package/dist-esm/config/Store/Store.js +25 -26
  170. package/dist-esm/config/classes.js +157 -155
  171. package/dist-esm/config/config.js +26 -35
  172. package/dist-esm/config/const.js +120 -128
  173. package/dist-esm/config/resolver/axis.core.js +25 -25
  174. package/dist-esm/config/resolver/axis.js +26 -27
  175. package/dist-esm/config/resolver/canvas.js +2071 -2472
  176. package/dist-esm/config/resolver/canvasShape.js +201 -177
  177. package/dist-esm/config/resolver/category.js +26 -27
  178. package/dist-esm/config/resolver/export.js +24 -26
  179. package/dist-esm/config/resolver/flow.js +29 -31
  180. package/dist-esm/config/resolver/grid.js +34 -35
  181. package/dist-esm/config/resolver/interaction/selection.js +17 -17
  182. package/dist-esm/config/resolver/interaction/subchart.js +17 -17
  183. package/dist-esm/config/resolver/interaction/zoom.js +17 -17
  184. package/dist-esm/config/resolver/regions.js +30 -31
  185. package/dist-esm/config/resolver/shape/arc.helpers.js +19 -19
  186. package/dist-esm/config/resolver/shape/area.js +17 -17
  187. package/dist-esm/config/resolver/shape/axis.helpers.js +28 -25
  188. package/dist-esm/config/resolver/shape/bar.js +13 -13
  189. package/dist-esm/config/resolver/shape/bubble.js +18 -14
  190. package/dist-esm/config/resolver/shape/candlestick.js +13 -13
  191. package/dist-esm/config/resolver/shape/donut.js +11 -11
  192. package/dist-esm/config/resolver/shape/funnel.js +11 -11
  193. package/dist-esm/config/resolver/shape/gauge.js +12 -12
  194. package/dist-esm/config/resolver/shape/line.js +10 -10
  195. package/dist-esm/config/resolver/shape/pie.js +11 -11
  196. package/dist-esm/config/resolver/shape/polar.js +12 -12
  197. package/dist-esm/config/resolver/shape/radar.js +22 -14
  198. package/dist-esm/config/resolver/shape/scatter.js +13 -13
  199. package/dist-esm/config/resolver/shape/treemap.js +11 -11
  200. package/dist-esm/core.js +208 -211
  201. package/dist-esm/index.canvas.js +14 -13
  202. package/dist-esm/index.esm.js +25 -24
  203. package/dist-esm/module/Cache.js +117 -129
  204. package/dist-esm/module/browser.js +30 -35
  205. package/dist-esm/module/dsv.js +107 -127
  206. package/dist-esm/module/error.js +45 -52
  207. package/dist-esm/module/generator.js +75 -83
  208. package/dist-esm/module/sanitize.js +302 -399
  209. package/dist-esm/module/util/brush.js +27 -38
  210. package/dist-esm/module/util/dom.js +288 -348
  211. package/dist-esm/module/util/object.js +277 -341
  212. package/dist-esm/module/util/type-checks.js +21 -25
  213. package/dist-esm/module/worker.js +312 -130
  214. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +185 -198
  215. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +442 -450
  216. package/dist-esm/plugin/billboardjs-plugin-stanford.js +813 -950
  217. package/dist-esm/plugin/billboardjs-plugin-tableview.js +708 -788
  218. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +344 -301
  219. package/dist-esm/react/index.js +157 -0
  220. package/package.json +28 -8
  221. package/src/Chart/api/selection.ts +130 -5
  222. package/src/ChartInternal/Axis/Axis.ts +164 -65
  223. package/src/ChartInternal/Axis/AxisRenderer.ts +41 -8
  224. package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
  225. package/src/ChartInternal/ChartInternal.ts +1 -1
  226. package/src/ChartInternal/data/convert.ts +54 -4
  227. package/src/ChartInternal/data/data.ts +4 -1
  228. package/src/ChartInternal/interactions/eventrect.ts +8 -2
  229. package/src/ChartInternal/interactions/subchart.ts +437 -66
  230. package/src/ChartInternal/internals/color.ts +2 -2
  231. package/src/ChartInternal/internals/domain.ts +15 -3
  232. package/src/ChartInternal/internals/grid.ts +21 -1
  233. package/src/ChartInternal/internals/scale.ts +9 -2
  234. package/src/ChartInternal/internals/selection.ts +1 -1
  235. package/src/ChartInternal/internals/subchart.util.ts +55 -0
  236. package/src/ChartInternal/internals/text.arc.ts +3 -1
  237. package/src/ChartInternal/internals/text.ts +18 -5
  238. package/src/ChartInternal/internals/transform.ts +8 -2
  239. package/src/ChartInternal/internals/type.ts +105 -1
  240. package/src/ChartInternal/shape/IShape.ts +6 -3
  241. package/src/ChartInternal/shape/bar.ts +62 -31
  242. package/src/ChartInternal/shape/core/barRadius.ts +129 -0
  243. package/src/ChartInternal/shape/core/candlestick.ts +1 -1
  244. package/src/ChartInternal/shape/core/path.ts +76 -9
  245. package/src/ChartInternal/shape/funnel.ts +2 -3
  246. package/src/ChartInternal/shape/point.ts +2 -2
  247. package/src/ChartInternal/shape/shape.ts +149 -17
  248. package/src/Plugin/stanford/index.ts +0 -4
  249. package/src/Plugin/tableview/index.ts +85 -3
  250. package/src/Plugin/textoverlap/index.ts +9 -15
  251. package/src/canvas/CanvasAxisRenderer.ts +184 -36
  252. package/src/canvas/CanvasRenderer.ts +247 -160
  253. package/src/canvas/CanvasTheme.ts +212 -0
  254. package/src/canvas/axisTicks.ts +122 -40
  255. package/src/config/Options/axis/y2.ts +13 -0
  256. package/src/config/Options/common/boost.ts +64 -4
  257. package/src/config/Options/common/color.ts +2 -2
  258. package/src/config/Options/interaction/subchart.ts +98 -1
  259. package/src/config/Options/shape/gauge.ts +1 -1
  260. package/src/config/Options/shape/treemap.ts +2 -2
  261. package/src/config/Store/Element.ts +3 -1
  262. package/src/config/Store/State.ts +1 -0
  263. package/src/config/classes.ts +1 -0
  264. package/src/config/resolver/canvas.ts +92 -10
  265. package/src/module/util/type-checks.ts +3 -1
  266. package/src/module/voronoi.ts +119 -0
  267. package/src/module/worker.entry.ts +61 -0
  268. package/src/module/worker.ts +346 -63
  269. package/src/react/index.ts +193 -0
  270. package/types/options.d.ts +206 -3
  271. package/types/react/index.d.ts +27 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.3
8
+ * @version 4.1.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -65,6 +65,34 @@ __webpack_require__.d(__webpack_exports__, {
65
65
  "default": function() { return /* binding */ TableView; }
66
66
  });
67
67
 
68
+ // UNUSED EXPORTS: isValidTableViewOptions
69
+
70
+ ;// ./src/module/util/type-checks.ts
71
+ const isValue = (v) => v || v === 0;
72
+ const isFunction = (v) => typeof v === "function";
73
+ const isString = (v) => typeof v === "string";
74
+ const isNumber = (v) => typeof v === "number";
75
+ const isUndefined = (v) => typeof v === "undefined";
76
+ const isDefined = (v) => typeof v !== "undefined";
77
+ const isBoolean = (v) => typeof v === "boolean";
78
+ const ceil10 = (v) => Math.ceil(v / 10) * 10;
79
+ const asHalfPixel = (n) => Math.ceil(n) + 0.5;
80
+ const diffDomain = (d) => d[1] - d[0];
81
+ const isObjectType = (v) => typeof v === "object";
82
+ const isEmptyObject = (obj) => {
83
+ for (const x in obj) {
84
+ if (Object.prototype.hasOwnProperty.call(obj, x)) {
85
+ return false;
86
+ }
87
+ }
88
+ return true;
89
+ };
90
+ const isEmpty = (o) => isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && !(o instanceof Date) && isEmptyObject(o) || isNumber(o) && isNaN(o);
91
+ const notEmpty = (o) => !isEmpty(o);
92
+ const isArray = (arr) => Array.isArray(arr);
93
+ const isObject = (obj) => obj && !(obj == null ? void 0 : obj.nodeType) && isObjectType(obj) && !isArray(obj);
94
+
95
+
68
96
  ;// ./src/module/browser.ts
69
97
  function getGlobal() {
70
98
  return typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof self === "object" && self !== null && self.Object === Object && self || Function("return this")();
@@ -410,30 +438,6 @@ function sanitize(str) {
410
438
  );
411
439
  }
412
440
 
413
- ;// ./src/module/util/type-checks.ts
414
- const isValue = (v) => v || v === 0;
415
- const isFunction = (v) => typeof v === "function";
416
- const isString = (v) => typeof v === "string";
417
- const isNumber = (v) => typeof v === "number";
418
- const isUndefined = (v) => typeof v === "undefined";
419
- const isDefined = (v) => typeof v !== "undefined";
420
- const isBoolean = (v) => typeof v === "boolean";
421
- const ceil10 = (v) => Math.ceil(v / 10) * 10;
422
- const asHalfPixel = (n) => Math.ceil(n) + 0.5;
423
- const diffDomain = (d) => d[1] - d[0];
424
- const isObjectType = (v) => typeof v === "object";
425
- const isEmptyObject = (obj) => {
426
- for (const x in obj) {
427
- return false;
428
- }
429
- return true;
430
- };
431
- const isEmpty = (o) => isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && !(o instanceof Date) && isEmptyObject(o) || isNumber(o) && isNaN(o);
432
- const notEmpty = (o) => !isEmpty(o);
433
- const isArray = (arr) => Array.isArray(arr);
434
- const isObject = (obj) => obj && !(obj == null ? void 0 : obj.nodeType) && isObjectType(obj) && !isArray(obj);
435
-
436
-
437
441
  ;// ./src/module/util/object.ts
438
442
  var __defProp = Object.defineProperty;
439
443
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -758,7 +762,7 @@ class Plugin {
758
762
  });
759
763
  }
760
764
  }
761
- __publicField(Plugin, "version", "4.0.3");
765
+ __publicField(Plugin, "version", "4.1.0-next.2");
762
766
 
763
767
  ;// ./src/Plugin/tableview/const.ts
764
768
 
@@ -939,10 +943,38 @@ var tableview_publicField = (obj, key, value) => tableview_defNormalProp(obj, ty
939
943
 
940
944
 
941
945
 
946
+ const optionValidators = {
947
+ selector: isString,
948
+ categoryTitle: isString,
949
+ categoryFormat: isFunction,
950
+ class: isString,
951
+ style: isBoolean,
952
+ title: isString,
953
+ updateOnToggle: isBoolean,
954
+ nullString: isString,
955
+ numberFormat: isFunction
956
+ };
957
+ function isValidTableViewOptions(options) {
958
+ if (!isObjectType(options) || isArray(options) || options === null) {
959
+ return false;
960
+ }
961
+ return Object.entries(options).every(([key, value]) => {
962
+ const validate = optionValidators[key];
963
+ return !isFunction(validate) || value === void 0 || validate(value);
964
+ });
965
+ }
942
966
  class TableView extends Plugin {
943
- constructor(options) {
967
+ constructor(options = {}) {
968
+ var _a;
944
969
  super(options);
945
970
  tableview_publicField(this, "element");
971
+ if (!isValidTableViewOptions(options)) {
972
+ (_a = console == null ? void 0 : console.error) == null ? void 0 : _a.call(
973
+ console,
974
+ "[billboard.js] TableView plugin received invalid options; unsupported values will be ignored.",
975
+ options
976
+ );
977
+ }
946
978
  this.config = new Options();
947
979
  return this;
948
980
  }
@@ -5,11 +5,11 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.3
8
+ * @version 4.1.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
- */(function(a,d){typeof exports=="object"&&typeof module=="object"?module.exports=d():typeof define=="function"&&define.amd?define("bb",[],d):typeof exports=="object"?exports.bb=d():(a.bb=a.bb||{},a.bb.plugin=a.bb.plugin||{},a.bb.plugin.tableview=d())})(this,function(){return(function(){"use strict";var p={};(function(){p.d=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;){var r=t[n++],o=t[n++];p.o(e,r)?o===0&&n++:o===0?Object.defineProperty(e,r,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,r,{enumerable:!0,get:o})}else for(var r in t)p.o(t,r)&&!p.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(function(){p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var a={};p.d(a,{default:function(){return Ge}});const d=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Y=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),w=new Map;d.forEach(e=>w.set(e.toLowerCase(),e));const v=new Map;Y.forEach(e=>v.set(e.toLowerCase(),e));const J=new Set(["http:","https:","mailto:"]),K=new Set(["href","src","xlink:href"]),ee=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,te=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,ne=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,L=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,M=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,re=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function T(e){return e.replace(/&colon;/gi,":").replace(/&newline;/gi,`
12
- `).replace(/&tab;/gi," ").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&#(\d+);?/gi,(t,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(t,n)=>String.fromCharCode(parseInt(n,16)))}function z(e){const n=T(e).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?J.has(r[0]):!0}function oe(e){const n=T(e).replace(/[\u0000-\u001f]/g,"");M.lastIndex=0;let r;for(;(r=M.exec(n))!==null;)if(!z(r[1]))return null;const o=n.toLowerCase().replace(/\s/g,"");for(const i of re)if(o.includes(i))return null;return e}const ie={'"':"&quot;","'":"&#39;","`":"&#96;"},se=/["'`]/g;function $(e){return e.replace(se,t=>ie[t])}function ae(e,t,n=!1){if(K.has(e))return z(t)?n?$(t):t:null;if(e==="style"){const o=oe(t);return o===null?null:n?$(o):o}const r=T(t).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?$(t):t}function le(e){const t=e.match(ee);return t?t[1].toLowerCase():null}function ce(e){const t=le(e);return t!==null&&w.has(t)}function fe(e){var t,n,r;const o=e.match(te);if(o){const f=o[1].toLowerCase();return`</${(t=w.get(f))!=null?t:f}>`}const i=e.match(ne);if(!i)return"";const[,s,l,g]=i,c=s.toLowerCase(),u=(n=w.get(c))!=null?n:c,A=[];L.lastIndex=0;let _;for(;(_=L.exec(l))!==null;){const f=_[1].toLowerCase(),H=_[2],X=_[3],D=_[4];if(f.startsWith("on"))continue;const Z=(r=v.get(f))!=null?r:f;let S,y;if(H!==void 0)S=H,y='"';else if(X!==void 0)S=X,y="'";else if(D!==void 0)S=D,y='"';else{v.has(f)&&A.push(Z);continue}if(v.has(f)){const Q=ae(f,S,D!==void 0);Q!==null&&A.push(`${Z}=${y}${Q}${y}`)}}const Ue=A.length>0?` ${A.join(" ")}`:"";return`<${u}${Ue}${g?"/>":">"}`}function ue(e){return typeof e!="string"||!e||e.indexOf("<")===-1?e:e.replace(/<\/?[^>]*>|[^<>\s]+>/g,t=>t.startsWith("<!--")?"":t.startsWith("<")?ce(t)?fe(t):t.replace(/</g,"&lt;"):t.slice(0,-1)+"&gt;")}var pe,I,de,C,m,he,R,x,ge=Object.defineProperty,j=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,k=(e,t,n)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G=(e,t)=>{for(var n in t||(t={}))me.call(t,n)&&k(e,n,t[n]);if(j)for(var n of j(t))be.call(t,n)&&k(e,n,t[n]);return e};function U(e,t){for(let n=0;n<e.length;n++){const r=e[n];r!==null&&I(r)&&t(r,n)}}function Ve(e,t,n){return I(e[t])?e[t]:n}function Fe(e,t){for(const n in e)if(e[n]===t)return!0;return!1}function qe(e,t,...n){const r=de(e);return r&&e.call(t,...n),r}function Be(e,t){let n=0;const r=function(...o){!--n&&t.apply(this,o)};"duration"in e?e.each(()=>++n).on("end",r):(++n,e.call(r))}const We=e=>e.charAt(0).toUpperCase()+e.slice(1);function He(e,t="-"){return e.split(t).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Xe=e=>[].slice.call(e);function Ze(...e){const t=n=>{if(C(n))return n.map(t);if(m(n)&&n.constructor){const r=new n.constructor;for(const o in n)r[o]=t(n[o]);return r}return n};return e.map(n=>t(n)).reduce((n,r)=>G(G({},n),r))}function _e(e={},t){C(t)&&t.forEach(n=>_e(e,n));for(const n in t)/^\d+$/.test(n)||n in e||(e[n]=t[n]);return e}function Qe(e){const t=e[0]instanceof Date,n=Array.from(new Set(t?e.map(Number):e));return t?n.map(r=>new Date(r)):n}function Ye(e){return e&&e.length?e.reduce((t,n)=>t.concat(n)):[]}function V(e,...t){if(!t.length||t.length===1&&!t[0])return e;const n=t.shift();return m(e)&&m(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const o=n[r];o instanceof Date?e[r]=new Date(o.getTime()):m(o)?(!e[r]&&(e[r]={}),e[r]=V(e[r],o)):e[r]=C(o)?o.concat():o}}),V(e,...t)}function ye(e,t=!0){let n;return e[0]instanceof Date?n=t?(r,o)=>r-o:(r,o)=>o-r:t&&!e.every(isNaN)?n=(r,o)=>r-o:t||(n=(r,o)=>r>o&&-1||r<o&&1||r===o&&0),e.concat().sort(n)}function Je(e,t){let n=t.filter(r=>he(r));if(n.length)if(R(n[0])){let r=e==="min"?1/0:-1/0;for(const o of n)(e==="min"?o<r:o>r)&&(r=o);n=r}else n[0]instanceof Date&&(n=ye(n,e==="min")[0]);else n=void 0;return n}const Ke=(e,t,n=1)=>{const r=[],o=Math.max(0,Math.ceil((t-e)/n))|0;for(let i=0;i<o;i++)r.push(e+i*n);return r};let we=0;function et(e=!0){const t=++we;return e?String(t):t}function F(e,t,n,r,o){if(n>r)return-1;const i=Math.floor((n+r)/2);let{x:s,w:l=0}=e[i];return o&&(s=e[i].y,l=e[i].h),t>=s&&t<=s+l?i:t<s?F(e,t,n,i-1,o):F(e,t,i+1,r,o)}function E(e,t){return ue(e.replace(/\{=([^}]+)\}/g,(n,r)=>{var o;return(o=t[r])!=null?o:""}))}function tt(e){var t;let n;if(e instanceof Date)n=e;else if(x(e)){const{config:r,format:o}=this;n=(t=o.dataTime(r.data_xFormat)(e))!=null?t:new Date(e)}else R(e)&&!isNaN(e)&&(n=new Date(+e));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),n}function nt(e){if(m(e)&&!x(e)){const s=e;return{top:s.top||0,right:s.right||0,bottom:s.bottom||0,left:s.left||0}}const t=(x(e)?e.trim().split(/\s+/):[e]).map(s=>+s||0),[n,r=n,o=n,i=r]=t;return{top:n,right:r,bottom:o,left:i}}function ve(e,t){t()===!1?pe(()=>ve(e,t)):e()}function rt(e,t=(n=>n)){const n=new Set;return U(e,(r,o)=>{n.add(t(r,o))}),n}function ot(e,t,n=(r=>r)){const r=new Map;return U(e,(o,i)=>{r.set(t(o,i),n(o,i))}),r}const it=e=>e||e===0,st=e=>typeof e=="function",Ee=e=>typeof e=="string",q=e=>typeof e=="number",Oe=e=>typeof e=="undefined",Ae=e=>typeof e!="undefined",at=e=>typeof e=="boolean",lt=e=>Math.ceil(e/10)*10,ct=e=>Math.ceil(e)+.5,ft=e=>e[1]-e[0],P=e=>typeof e=="object",Se=e=>{for(const t in e)return!1;return!0},Te=e=>Oe(e)||e===null||Ee(e)&&e.length===0||P(e)&&!(e instanceof Date)&&Se(e)||q(e)&&isNaN(e),ut=e=>!Te(e),$e=e=>Array.isArray(e),pt=e=>e&&!(e!=null&&e.nodeType)&&P(e)&&!$e(e);function Ce(e){const t=this.config;let n,r,o;const i=()=>{const s=r.shift();if(s&&n&&P(n)&&s in n)return n=n[s],i();if(!s)return n};Object.keys(t).forEach(s=>{n=e,r=s.split("_"),o=i(),Ae(o)&&(t[s]=o)}),this.api&&(this.state.orgConfig=e)}var xe=Object.defineProperty,Pe=(e,t,n)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t,n)=>Pe(e,typeof t!="symbol"?t+"":t,n);class B{constructor(t={}){O(this,"$$"),O(this,"options"),O(this,"config"),this.options=t}loadConfig(){Ce.call(this,this.options)}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(t=>{this[t]=null,delete this[t]})}}O(B,"version","4.0.3");const h={id:"__tableview-style__",class:"bb-tableview",rule:`.bb-tableview {
11
+ */(function(a,b){typeof exports=="object"&&typeof module=="object"?module.exports=b():typeof define=="function"&&define.amd?define("bb",[],b):typeof exports=="object"?exports.bb=b():(a.bb=a.bb||{},a.bb.plugin=a.bb.plugin||{},a.bb.plugin.tableview=b())})(this,function(){return(function(){"use strict";var d={};(function(){d.d=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;){var r=t[n++],o=t[n++];d.o(e,r)?o===0&&n++:o===0?Object.defineProperty(e,r,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,r,{enumerable:!0,get:o})}else for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(function(){d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var a={};d.d(a,{default:function(){return Be}});const b=e=>e||e===0,x=e=>typeof e=="function",p=e=>typeof e=="string",M=e=>typeof e=="number",te=e=>typeof e=="undefined",ne=e=>typeof e!="undefined",z=e=>typeof e=="boolean",He=e=>Math.ceil(e/10)*10,Xe=e=>Math.ceil(e)+.5,Ze=e=>e[1]-e[0],v=e=>typeof e=="object",re=e=>{for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},oe=e=>te(e)||e===null||p(e)&&e.length===0||v(e)&&!(e instanceof Date)&&re(e)||M(e)&&isNaN(e),Qe=e=>!oe(e),I=e=>Array.isArray(e),Ye=e=>e&&!(e!=null&&e.nodeType)&&v(e)&&!I(e),ie=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),se=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),O=new Map;ie.forEach(e=>O.set(e.toLowerCase(),e));const E=new Map;se.forEach(e=>E.set(e.toLowerCase(),e));const ae=new Set(["http:","https:","mailto:"]),le=new Set(["href","src","xlink:href"]),ce=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,fe=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,ue=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,R=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,V=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,de=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function C(e){return e.replace(/&colon;/gi,":").replace(/&newline;/gi,`
12
+ `).replace(/&tab;/gi," ").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&#(\d+);?/gi,(t,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(t,n)=>String.fromCharCode(parseInt(n,16)))}function G(e){const n=C(e).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?ae.has(r[0]):!0}function pe(e){const n=C(e).replace(/[\u0000-\u001f]/g,"");V.lastIndex=0;let r;for(;(r=V.exec(n))!==null;)if(!G(r[1]))return null;const o=n.toLowerCase().replace(/\s/g,"");for(const i of de)if(o.includes(i))return null;return e}const he={'"':"&quot;","'":"&#39;","`":"&#96;"},ge=/["'`]/g;function P(e){return e.replace(ge,t=>he[t])}function be(e,t,n=!1){if(le.has(e))return G(t)?n?P(t):t:null;if(e==="style"){const o=pe(t);return o===null?null:n?P(o):o}const r=C(t).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?P(t):t}function me(e){const t=e.match(ce);return t?t[1].toLowerCase():null}function ye(e){const t=me(e);return t!==null&&O.has(t)}function _e(e){var t,n,r;const o=e.match(fe);if(o){const f=o[1].toLowerCase();return`</${(t=O.get(f))!=null?t:f}>`}const i=e.match(ue);if(!i)return"";const[,s,l,g]=i,c=s.toLowerCase(),u=(n=O.get(c))!=null?n:c,A=[];R.lastIndex=0;let _;for(;(_=R.exec(l))!==null;){const f=_[1].toLowerCase(),Y=_[2],J=_[3],j=_[4];if(f.startsWith("on"))continue;const K=(r=E.get(f))!=null?r:f;let $,w;if(Y!==void 0)$=Y,w='"';else if(J!==void 0)$=J,w="'";else if(j!==void 0)$=j,w='"';else{E.has(f)&&A.push(K);continue}if(E.has(f)){const ee=be(f,$,j!==void 0);ee!==null&&A.push(`${K}=${w}${ee}${w}`)}}const We=A.length>0?` ${A.join(" ")}`:"";return`<${u}${We}${g?"/>":">"}`}function we(e){return typeof e!="string"||!e||e.indexOf("<")===-1?e:e.replace(/<\/?[^>]*>|[^<>\s]+>/g,t=>t.startsWith("<!--")?"":t.startsWith("<")?ye(t)?_e(t):t.replace(/</g,"&lt;"):t.slice(0,-1)+"&gt;")}var ve,U,Oe,N,m,Ee,F,D,Te=Object.defineProperty,k=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,q=(e,t,n)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))Se.call(t,n)&&q(e,n,t[n]);if(k)for(var n of k(t))Ae.call(t,n)&&q(e,n,t[n]);return e};function W(e,t){for(let n=0;n<e.length;n++){const r=e[n];r!==null&&U(r)&&t(r,n)}}function Je(e,t,n){return U(e[t])?e[t]:n}function Ke(e,t){for(const n in e)if(e[n]===t)return!0;return!1}function et(e,t,...n){const r=Oe(e);return r&&e.call(t,...n),r}function tt(e,t){let n=0;const r=function(...o){!--n&&t.apply(this,o)};"duration"in e?e.each(()=>++n).on("end",r):(++n,e.call(r))}const nt=e=>e.charAt(0).toUpperCase()+e.slice(1);function rt(e,t="-"){return e.split(t).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const ot=e=>[].slice.call(e);function it(...e){const t=n=>{if(N(n))return n.map(t);if(m(n)&&n.constructor){const r=new n.constructor;for(const o in n)r[o]=t(n[o]);return r}return n};return e.map(n=>t(n)).reduce((n,r)=>B(B({},n),r))}function $e(e={},t){N(t)&&t.forEach(n=>$e(e,n));for(const n in t)/^\d+$/.test(n)||n in e||(e[n]=t[n]);return e}function st(e){const t=e[0]instanceof Date,n=Array.from(new Set(t?e.map(Number):e));return t?n.map(r=>new Date(r)):n}function at(e){return e&&e.length?e.reduce((t,n)=>t.concat(n)):[]}function H(e,...t){if(!t.length||t.length===1&&!t[0])return e;const n=t.shift();return m(e)&&m(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const o=n[r];o instanceof Date?e[r]=new Date(o.getTime()):m(o)?(!e[r]&&(e[r]={}),e[r]=H(e[r],o)):e[r]=N(o)?o.concat():o}}),H(e,...t)}function xe(e,t=!0){let n;return e[0]instanceof Date?n=t?(r,o)=>r-o:(r,o)=>o-r:t&&!e.every(isNaN)?n=(r,o)=>r-o:t||(n=(r,o)=>r>o&&-1||r<o&&1||r===o&&0),e.concat().sort(n)}function lt(e,t){let n=t.filter(r=>Ee(r));if(n.length)if(F(n[0])){let r=e==="min"?1/0:-1/0;for(const o of n)(e==="min"?o<r:o>r)&&(r=o);n=r}else n[0]instanceof Date&&(n=xe(n,e==="min")[0]);else n=void 0;return n}const ct=(e,t,n=1)=>{const r=[],o=Math.max(0,Math.ceil((t-e)/n))|0;for(let i=0;i<o;i++)r.push(e+i*n);return r};let Ce=0;function ft(e=!0){const t=++Ce;return e?String(t):t}function X(e,t,n,r,o){if(n>r)return-1;const i=Math.floor((n+r)/2);let{x:s,w:l=0}=e[i];return o&&(s=e[i].y,l=e[i].h),t>=s&&t<=s+l?i:t<s?X(e,t,n,i-1,o):X(e,t,i+1,r,o)}function T(e,t){return we(e.replace(/\{=([^}]+)\}/g,(n,r)=>{var o;return(o=t[r])!=null?o:""}))}function ut(e){var t;let n;if(e instanceof Date)n=e;else if(D(e)){const{config:r,format:o}=this;n=(t=o.dataTime(r.data_xFormat)(e))!=null?t:new Date(e)}else F(e)&&!isNaN(e)&&(n=new Date(+e));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),n}function dt(e){if(m(e)&&!D(e)){const s=e;return{top:s.top||0,right:s.right||0,bottom:s.bottom||0,left:s.left||0}}const t=(D(e)?e.trim().split(/\s+/):[e]).map(s=>+s||0),[n,r=n,o=n,i=r]=t;return{top:n,right:r,bottom:o,left:i}}function Pe(e,t){t()===!1?ve(()=>Pe(e,t)):e()}function pt(e,t=(n=>n)){const n=new Set;return W(e,(r,o)=>{n.add(t(r,o))}),n}function ht(e,t,n=(r=>r)){const r=new Map;return W(e,(o,i)=>{r.set(t(o,i),n(o,i))}),r}function Ne(e){const t=this.config;let n,r,o;const i=()=>{const s=r.shift();if(s&&n&&v(n)&&s in n)return n=n[s],i();if(!s)return n};Object.keys(t).forEach(s=>{n=e,r=s.split("_"),o=i(),ne(o)&&(t[s]=o)}),this.api&&(this.state.orgConfig=e)}var De=Object.defineProperty,Le=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t,n)=>Le(e,typeof t!="symbol"?t+"":t,n);class Z{constructor(t={}){S(this,"$$"),S(this,"options"),S(this,"config"),this.options=t}loadConfig(){Ne.call(this,this.options)}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(t=>{this[t]=null,delete this[t]})}}S(Z,"version","4.1.0-next.2");const h={id:"__tableview-style__",class:"bb-tableview",rule:`.bb-tableview {
13
13
  border-collapse:collapse;
14
14
  border-spacing:0;
15
15
  background:#fff;
@@ -33,6 +33,6 @@
33
33
  font-size:1.1em;
34
34
  font-weight:700;
35
35
  margin-bottom: -1px;
36
- }`},b={body:`<caption>{=title}</caption>
36
+ }`},y={body:`<caption>{=title}</caption>
37
37
  <thead><tr>{=thead}</tr></thead>
38
- <tbody>{=tbody}</tbody>`,thead:'<th scope="col">{=title}</th>',tbodyHeader:'<th scope="row">{=value}</th>',tbody:"<td>{=value}</td>"};class Ne{constructor(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let n=t;return this.$$.axis.isCategorized()?n=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(n=t.toLocaleDateString()),n},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-",numberFormat:function(t){return t.toLocaleString()}}}}var De=Object.defineProperty,Le=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,N=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Re=(e,t)=>{for(var n in t||(t={}))ze.call(t,n)&&N(e,n,t[n]);if(W)for(var n of W(t))Ie.call(t,n)&&N(e,n,t[n]);return e},je=(e,t)=>Le(e,Me(t)),ke=(e,t,n)=>N(e,typeof t!="symbol"?t+"":t,n);class Ge extends B{constructor(t){return super(t),ke(this,"element"),this.config=new Ne,this}$beforeInit(){this.loadConfig()}$init(){const{class:t,selector:n,style:r}=this.config;let o=document.querySelector(n||`.${t||h.class}`);if(!o){const i=this.$$.$el.chart.node();o=document.createElement("table"),i.parentNode.insertBefore(o,i.nextSibling)}if(o.tagName!=="TABLE"){const i=document.createElement("table");o.appendChild(i),o=i}if(r&&!document.getElementById(h.id)){const i=document.createElement("style");i.id=h.id,i.innerHTML=h.rule,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}o.classList.add(...[r&&h.class,t].filter(Boolean)),this.element=o}generateTable(){const{$$:t,config:n,element:r}=this,o=t.filterTargetsToShow(t.data.targets);let i=E(b.thead,{title:o.length?this.config.categoryTitle:""}),s="";const l=[];o.forEach(g=>{i+=E(b.thead,{title:g.id}),g.values.forEach((c,u)=>{l[u]||(l[u]=[c.x]),l[u].push(c.value)})}),l.forEach(g=>{s+=`<tr>${g.map((c,u)=>E(u?b.tbody:b.tbodyHeader,{value:u===0?n.categoryFormat.bind(this)(c):q(c)?n.numberFormat.bind(this)(c):n.nullString})).join("")}</tr>`}),r.innerHTML=E(b.body,je(Re({},n),{title:n.title||t.config.title_text||"",thead:i,tbody:s}))}$redraw(){const{state:t}=this.$$;!(t.resizing||!this.config.updateOnToggle&&t.toggling)&&this.generateTable()}$willDestroy(){var t,n;if((t=this.element.parentNode)==null||t.removeChild(this.element),this.$$.charts.length===1){const r=document.getElementById(h.id);(n=r==null?void 0:r.parentNode)==null||n.removeChild(r)}}}return a=a.default,a})()});
38
+ <tbody>{=tbody}</tbody>`,thead:'<th scope="col">{=title}</th>',tbodyHeader:'<th scope="row">{=value}</th>',tbody:"<td>{=value}</td>"};class je{constructor(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let n=t;return this.$$.axis.isCategorized()?n=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(n=t.toLocaleDateString()),n},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-",numberFormat:function(t){return t.toLocaleString()}}}}var Me=Object.defineProperty,ze=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,L=(e,t,n)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ge=(e,t)=>{for(var n in t||(t={}))Re.call(t,n)&&L(e,n,t[n]);if(Q)for(var n of Q(t))Ve.call(t,n)&&L(e,n,t[n]);return e},Ue=(e,t)=>ze(e,Ie(t)),Fe=(e,t,n)=>L(e,typeof t!="symbol"?t+"":t,n);const ke={selector:p,categoryTitle:p,categoryFormat:x,class:p,style:z,title:p,updateOnToggle:z,nullString:p,numberFormat:x};function qe(e){return!v(e)||I(e)||e===null?!1:Object.entries(e).every(([t,n])=>{const r=ke[t];return!x(r)||n===void 0||r(n)})}class Be extends Z{constructor(t={}){var n;return super(t),Fe(this,"element"),qe(t)||(n=console==null?void 0:console.error)==null||n.call(console,"[billboard.js] TableView plugin received invalid options; unsupported values will be ignored.",t),this.config=new je,this}$beforeInit(){this.loadConfig()}$init(){const{class:t,selector:n,style:r}=this.config;let o=document.querySelector(n||`.${t||h.class}`);if(!o){const i=this.$$.$el.chart.node();o=document.createElement("table"),i.parentNode.insertBefore(o,i.nextSibling)}if(o.tagName!=="TABLE"){const i=document.createElement("table");o.appendChild(i),o=i}if(r&&!document.getElementById(h.id)){const i=document.createElement("style");i.id=h.id,i.innerHTML=h.rule,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}o.classList.add(...[r&&h.class,t].filter(Boolean)),this.element=o}generateTable(){const{$$:t,config:n,element:r}=this,o=t.filterTargetsToShow(t.data.targets);let i=T(y.thead,{title:o.length?this.config.categoryTitle:""}),s="";const l=[];o.forEach(g=>{i+=T(y.thead,{title:g.id}),g.values.forEach((c,u)=>{l[u]||(l[u]=[c.x]),l[u].push(c.value)})}),l.forEach(g=>{s+=`<tr>${g.map((c,u)=>T(u?y.tbody:y.tbodyHeader,{value:u===0?n.categoryFormat.bind(this)(c):M(c)?n.numberFormat.bind(this)(c):n.nullString})).join("")}</tr>`}),r.innerHTML=T(y.body,Ue(Ge({},n),{title:n.title||t.config.title_text||"",thead:i,tbody:s}))}$redraw(){const{state:t}=this.$$;!(t.resizing||!this.config.updateOnToggle&&t.toggling)&&this.generateTable()}$willDestroy(){var t,n;if((t=this.element.parentNode)==null||t.removeChild(this.element),this.$$.charts.length===1){const r=document.getElementById(h.id);(n=r==null?void 0:r.parentNode)==null||n.removeChild(r)}}}return a=a.default,a})()});
@@ -5,56 +5,24 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.3
8
+ * @version 4.1.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
12
  (function webpackUniversalModuleDefinition(root, factory) {
13
13
  if(typeof exports === 'object' && typeof module === 'object')
14
- module.exports = factory(require("d3-delaunay"));
14
+ module.exports = factory();
15
15
  else if(typeof define === 'function' && define.amd)
16
- define("bb", ["d3-delaunay"], factory);
16
+ define("bb", [], factory);
17
17
  else if(typeof exports === 'object')
18
- exports["bb"] = factory(require("d3-delaunay"));
18
+ exports["bb"] = factory();
19
19
  else
20
- root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["textoverlap"] = factory(root["d3"]);
21
- })(this, function(__WEBPACK_EXTERNAL_MODULE__9__) {
20
+ root["bb"] = root["bb"] || {}, root["bb"]["plugin"] = root["bb"]["plugin"] || {}, root["bb"]["plugin"]["textoverlap"] = factory();
21
+ })(this, function() {
22
22
  return /******/ (function() { // webpackBootstrap
23
23
  /******/ "use strict";
24
- /******/ var __webpack_modules__ = ({
25
-
26
- /***/ 9:
27
- /***/ (function(module) {
28
-
29
- module.exports = __WEBPACK_EXTERNAL_MODULE__9__;
30
-
31
- /***/ })
32
-
33
- /******/ });
34
- /************************************************************************/
35
- /******/ // The module cache
36
- /******/ var __webpack_module_cache__ = {};
37
- /******/
38
- /******/ // The require function
39
- /******/ function __webpack_require__(moduleId) {
40
- /******/ // Check if module is in cache
41
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
42
- /******/ if (cachedModule !== undefined) {
43
- /******/ return cachedModule.exports;
44
- /******/ }
45
- /******/ // Create a new module (and put it into the cache)
46
- /******/ var module = __webpack_module_cache__[moduleId] = {
47
- /******/ // no module.id needed
48
- /******/ // no module.loaded needed
49
- /******/ exports: {}
50
- /******/ };
51
- /******/
52
- /******/ // Execute the module function
53
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
54
- /******/
55
- /******/ // Return the exports of the module
56
- /******/ return module.exports;
57
- /******/ }
24
+ /******/ // The require scope
25
+ /******/ var __webpack_require__ = {};
58
26
  /******/
59
27
  /************************************************************************/
60
28
  /******/ /* webpack/runtime/define property getters */
@@ -91,16 +59,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9__;
91
59
  /******/
92
60
  /************************************************************************/
93
61
  var __webpack_exports__ = {};
94
- // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
95
- !function() {
96
62
 
97
63
  // EXPORTS
98
64
  __webpack_require__.d(__webpack_exports__, {
99
65
  "default": function() { return /* binding */ TextOverlap; }
100
66
  });
101
67
 
102
- // EXTERNAL MODULE: external {"commonjs":"d3-delaunay","commonjs2":"d3-delaunay","amd":"d3-delaunay","root":"d3"}
103
- var external_commonjs_d3_delaunay_commonjs2_d3_delaunay_amd_d3_delaunay_root_d3_ = __webpack_require__(9);
104
68
  ;// ./src/module/polygon.ts
105
69
  function polygonArea(polygon) {
106
70
  const n = polygon.length;
@@ -131,6 +95,62 @@ function polygonCentroid(polygon) {
131
95
  return [x / k, y / k];
132
96
  }
133
97
 
98
+ ;// ./src/module/voronoi.ts
99
+ const EPSILON = 1e-9;
100
+ function clipByBisector(polygon, a, b) {
101
+ const dx = b[0] - a[0];
102
+ const dy = b[1] - a[1];
103
+ const c = (dx * (a[0] + b[0]) + dy * (a[1] + b[1])) / 2;
104
+ const output = [];
105
+ const n = polygon.length;
106
+ let prev = polygon[n - 1];
107
+ let prevDist = dx * prev[0] + dy * prev[1] - c;
108
+ for (let i = 0; i < n; i++) {
109
+ const curr = polygon[i];
110
+ const currDist = dx * curr[0] + dy * curr[1] - c;
111
+ if (prevDist > 0 !== currDist > 0) {
112
+ const t = prevDist / (prevDist - currDist);
113
+ output.push([
114
+ prev[0] + t * (curr[0] - prev[0]),
115
+ prev[1] + t * (curr[1] - prev[1])
116
+ ]);
117
+ }
118
+ if (currDist <= 0) {
119
+ output.push(curr);
120
+ }
121
+ prev = curr;
122
+ prevDist = currDist;
123
+ }
124
+ return output;
125
+ }
126
+ function voronoiCells(points, bounds) {
127
+ const [x0, y0, x1, y1] = [
128
+ Math.min(bounds[0], bounds[2]),
129
+ Math.min(bounds[1], bounds[3]),
130
+ Math.max(bounds[0], bounds[2]),
131
+ Math.max(bounds[1], bounds[3])
132
+ ];
133
+ const rect = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];
134
+ const n = points.length;
135
+ return points.map((site, i) => {
136
+ let cell = rect;
137
+ for (let j = 0; j < n && cell.length > 2; j++) {
138
+ if (j === i) {
139
+ continue;
140
+ }
141
+ const other = points[j];
142
+ if (Math.abs(other[0] - site[0]) < EPSILON && Math.abs(other[1] - site[1]) < EPSILON) {
143
+ if (j < i) {
144
+ return null;
145
+ }
146
+ continue;
147
+ }
148
+ cell = clipByBisector(cell, site, other);
149
+ }
150
+ return cell.length > 2 ? [...cell, cell[0]] : null;
151
+ });
152
+ }
153
+
134
154
  ;// ./src/module/util/type-checks.ts
135
155
  const isValue = (v) => v || v === 0;
136
156
  const isFunction = (v) => typeof v === "function";
@@ -145,7 +165,9 @@ const diffDomain = (d) => d[1] - d[0];
145
165
  const isObjectType = (v) => typeof v === "object";
146
166
  const isEmptyObject = (obj) => {
147
167
  for (const x in obj) {
148
- return false;
168
+ if (Object.prototype.hasOwnProperty.call(obj, x)) {
169
+ return false;
170
+ }
149
171
  }
150
172
  return true;
151
173
  };
@@ -244,7 +266,7 @@ class Plugin {
244
266
  });
245
267
  }
246
268
  }
247
- __publicField(Plugin, "version", "4.0.3");
269
+ __publicField(Plugin, "version", "4.1.0-next.2");
248
270
 
249
271
  ;// ./src/Plugin/textoverlap/Options.ts
250
272
  class Options {
@@ -303,12 +325,14 @@ class TextOverlap extends Plugin {
303
325
  $redraw() {
304
326
  const { $$: { $el }, config: { selector } } = this;
305
327
  const text = selector ? $el.main.selectAll(selector) : $el.text;
306
- !text.empty() && this.preventLabelOverlap(text);
328
+ if (!text.empty()) {
329
+ this.preventLabelOverlap(text);
330
+ }
307
331
  }
308
332
  /**
309
333
  * Generates the voronoi layout for data labels
310
334
  * @param {Array} points Indices values
311
- * @returns {object} Voronoi layout points and corresponding Data points
335
+ * @returns {Array} Voronoi cell polygons, in point order
312
336
  * @private
313
337
  */
314
338
  generateVoronoi(points) {
@@ -316,10 +340,7 @@ class TextOverlap extends Plugin {
316
340
  const { scale } = $$;
317
341
  const [min, max] = ["x", "y"].map((v) => scale[v].domain());
318
342
  [min[1], max[0]] = [max[0], min[1]];
319
- return external_commonjs_d3_delaunay_commonjs2_d3_delaunay_amd_d3_delaunay_root_d3_.Delaunay.from(points).voronoi([
320
- ...min,
321
- ...max
322
- ]);
343
+ return voronoiCells(points, [...min, ...max]);
323
344
  }
324
345
  /**
325
346
  * Set text label's position to preventg overlap.
@@ -329,10 +350,10 @@ class TextOverlap extends Plugin {
329
350
  preventLabelOverlap(text) {
330
351
  const { extent, area } = this.config;
331
352
  const points = text.data().map((v) => [v.index, v.value]);
332
- const voronoi = this.generateVoronoi(points);
353
+ const cells = this.generateVoronoi(points);
333
354
  let i = 0;
334
355
  text.each(function() {
335
- const cell = voronoi.cellPolygon(i);
356
+ const cell = cells[i];
336
357
  if (cell && this) {
337
358
  const [x, y] = points[i];
338
359
  const [cx, cy] = polygonCentroid(cell);
@@ -351,7 +372,6 @@ class TextOverlap extends Plugin {
351
372
  }
352
373
  }
353
374
 
354
- }();
355
375
  __webpack_exports__ = __webpack_exports__["default"];
356
376
  /******/ return __webpack_exports__;
357
377
  /******/ })()
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.3
8
+ * @version 4.1.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
- */(function(c,u){typeof exports=="object"&&typeof module=="object"?module.exports=u(require("d3-delaunay")):typeof define=="function"&&define.amd?define("bb",["d3-delaunay"],u):typeof exports=="object"?exports.bb=u(require("d3-delaunay")):(c.bb=c.bb||{},c.bb.plugin=c.bb.plugin||{},c.bb.plugin.textoverlap=u(c.d3))})(this,function(_){return(function(){"use strict";var c={348:(function(e){e.exports=_})},u={};function l(e){var t=u[e];if(t!==void 0)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,l),n.exports}(function(){l.d=function(e,t){if(Array.isArray(t))for(var n=0;n<t.length;){var r=t[n++],s=t[n++];l.o(e,r)?s===0&&n++:s===0?Object.defineProperty(e,r,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,r,{enumerable:!0,get:s})}else for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(function(){l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var p={};l.d(p,{default:function(){return T}});var m=l(348);function v(e){const t=e.length;let n=0,r=e[t-1];for(let s=0;s<t;s++){const o=r;r=e[s],n+=o[1]*r[0]-o[0]*r[1]}return n/2}function g(e){const t=e.length;let n=0,r=0,s=0,o=e[t-1];for(let i=0;i<t;i++){const a=o;o=e[i];const f=a[0]*o[1]-o[0]*a[1];s+=f,n+=(a[0]+o[0])*f,r+=(a[1]+o[1])*f}return s*=3,[n/s,r/s]}const B=e=>e||e===0,H=e=>typeof e=="function",x=e=>typeof e=="string",$=e=>typeof e=="number",O=e=>typeof e=="undefined",w=e=>typeof e!="undefined",I=e=>typeof e=="boolean",S=e=>Math.ceil(e/10)*10,z=e=>Math.ceil(e)+.5,G=e=>e[1]-e[0],b=e=>typeof e=="object",A=e=>{for(const t in e)return!1;return!0},P=e=>O(e)||e===null||x(e)&&e.length===0||b(e)&&!(e instanceof Date)&&A(e)||$(e)&&isNaN(e),J=e=>!P(e),j=e=>Array.isArray(e),K=e=>e&&!(e!=null&&e.nodeType)&&b(e)&&!j(e);function M(e){const t=this.config;let n,r,s;const o=()=>{const i=r.shift();if(i&&n&&b(n)&&i in n)return n=n[i],o();if(!i)return n};Object.keys(t).forEach(i=>{n=e,r=i.split("_"),s=o(),w(s)&&(t[i]=s)}),this.api&&(this.state.orgConfig=e)}var C=Object.defineProperty,D=(e,t,n)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);class y{constructor(t={}){h(this,"$$"),h(this,"options"),h(this,"config"),this.options=t}loadConfig(){M.call(this,this.options)}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(t=>{this[t]=null,delete this[t]})}}h(y,"version","4.0.3");class E{constructor(){return{selector:void 0,extent:1,area:0}}}class T extends y{constructor(t){return super(t),this.config=new E,this}$init(){this.loadConfig()}$redraw(){const{$$:{$el:t},config:{selector:n}}=this,r=n?t.main.selectAll(n):t.text;!r.empty()&&this.preventLabelOverlap(r)}generateVoronoi(t){const{$$:n}=this,{scale:r}=n,[s,o]=["x","y"].map(i=>r[i].domain());return[s[1],o[0]]=[o[0],s[1]],m.Delaunay.from(t).voronoi([...s,...o])}preventLabelOverlap(t){const{extent:n,area:r}=this.config,s=t.data().map(a=>[a.index,a.value]),o=this.generateVoronoi(s);let i=0;t.each(function(){const a=o.cellPolygon(i);if(a&&this){const[f,N]=s[i],[k,q]=g(a),V=Math.abs(v(a)),d=Math.round(Math.atan2(q-N,k-f)/Math.PI*2),F=n*(d===0?1:-1),L=d===-1?-n:n+5,U=Math.abs(d)===1?"middle":d===0?"start":"end";this.style.display=V<r?"none":"",this.setAttribute("text-anchor",U),this.setAttribute("dy",`0.${d===1?71:35}em`),this.setAttribute("transform",`translate(${F}, ${L})`)}i++})}}return p=p.default,p})()});
11
+ */(function(u,d){typeof exports=="object"&&typeof module=="object"?module.exports=d():typeof define=="function"&&define.amd?define("bb",[],d):typeof exports=="object"?exports.bb=d():(u.bb=u.bb||{},u.bb.plugin=u.bb.plugin||{},u.bb.plugin.textoverlap=d())})(this,function(){return(function(){"use strict";var y={};(function(){y.d=function(t,e){if(Array.isArray(e))for(var n=0;n<e.length;){var r=e[n++],s=e[n++];y.o(t,r)?s===0&&n++:s===0?Object.defineProperty(t,r,{enumerable:!0,value:e[n++]}):Object.defineProperty(t,r,{enumerable:!0,get:s})}else for(var r in e)y.o(e,r)&&!y.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}})(),(function(){y.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}})();var u={};y.d(u,{default:function(){return B}});function d(t){const e=t.length;let n=0,r=t[e-1];for(let s=0;s<e;s++){const i=r;r=t[s],n+=i[1]*r[0]-i[0]*r[1]}return n/2}function O(t){const e=t.length;let n=0,r=0,s=0,i=t[e-1];for(let o=0;o<e;o++){const l=i;i=t[o];const c=l[0]*i[1]-i[0]*l[1];s+=c,n+=(l[0]+i[0])*c,r+=(l[1]+i[1])*c}return s*=3,[n/s,r/s]}const x=1e-9;function _(t,e,n){const r=n[0]-e[0],s=n[1]-e[1],i=(r*(e[0]+n[0])+s*(e[1]+n[1]))/2,o=[],l=t.length;let c=t[l-1],p=r*c[0]+s*c[1]-i;for(let f=0;f<l;f++){const a=t[f],h=r*a[0]+s*a[1]-i;if(p>0!=h>0){const b=p/(p-h);o.push([c[0]+b*(a[0]-c[0]),c[1]+b*(a[1]-c[1])])}h<=0&&o.push(a),c=a,p=h}return o}function $(t,e){const[n,r,s,i]=[Math.min(e[0],e[2]),Math.min(e[1],e[3]),Math.max(e[0],e[2]),Math.max(e[1],e[3])],o=[[n,r],[s,r],[s,i],[n,i]],l=t.length;return t.map((c,p)=>{let f=o;for(let a=0;a<l&&f.length>2;a++){if(a===p)continue;const h=t[a];if(Math.abs(h[0]-c[0])<x&&Math.abs(h[1]-c[1])<x){if(a<p)return null;continue}f=_(f,c,h)}return f.length>2?[...f,f[0]]:null})}const S=t=>t||t===0,U=t=>typeof t=="function",M=t=>typeof t=="string",A=t=>typeof t=="number",P=t=>typeof t=="undefined",w=t=>typeof t!="undefined",k=t=>typeof t=="boolean",q=t=>Math.ceil(t/10)*10,H=t=>Math.ceil(t)+.5,z=t=>t[1]-t[0],g=t=>typeof t=="object",j=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},C=t=>P(t)||t===null||M(t)&&t.length===0||g(t)&&!(t instanceof Date)&&j(t)||A(t)&&isNaN(t),G=t=>!C(t),D=t=>Array.isArray(t),J=t=>t&&!(t!=null&&t.nodeType)&&g(t)&&!D(t);function E(t){const e=this.config;let n,r,s;const i=()=>{const o=r.shift();if(o&&n&&g(n)&&o in n)return n=n[o],i();if(!o)return n};Object.keys(e).forEach(o=>{n=t,r=o.split("_"),s=i(),w(s)&&(e[o]=s)}),this.api&&(this.state.orgConfig=t)}var N=Object.defineProperty,T=(t,e,n)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m=(t,e,n)=>T(t,typeof e!="symbol"?e+"":e,n);class v{constructor(e={}){m(this,"$$"),m(this,"options"),m(this,"config"),this.options=e}loadConfig(){E.call(this,this.options)}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(e=>{this[e]=null,delete this[e]})}}m(v,"version","4.1.0-next.2");class I{constructor(){return{selector:void 0,extent:1,area:0}}}class B extends v{constructor(e){return super(e),this.config=new I,this}$init(){this.loadConfig()}$redraw(){const{$$:{$el:e},config:{selector:n}}=this,r=n?e.main.selectAll(n):e.text;r.empty()||this.preventLabelOverlap(r)}generateVoronoi(e){const{$$:n}=this,{scale:r}=n,[s,i]=["x","y"].map(o=>r[o].domain());return[s[1],i[0]]=[i[0],s[1]],$(e,[...s,...i])}preventLabelOverlap(e){const{extent:n,area:r}=this.config,s=e.data().map(l=>[l.index,l.value]),i=this.generateVoronoi(s);let o=0;e.each(function(){const l=i[o];if(l&&this){const[c,p]=s[o],[f,a]=O(l),h=Math.abs(d(l)),b=Math.round(Math.atan2(a-p,f-c)/Math.PI*2),L=n*(b===0?1:-1),V=b===-1?-n:n+5,F=Math.abs(b)===1?"middle":b===0?"start":"end";this.style.display=h<r?"none":"",this.setAttribute("text-anchor",F),this.setAttribute("dy",`0.${b===1?71:35}em`),this.setAttribute("transform",`translate(${L}, ${V})`)}o++})}}return u=u.default,u})()});
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.3
8
+ * @version 4.1.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -23910,7 +23910,9 @@ const diffDomain = (d) => d[1] - d[0];
23910
23910
  const isObjectType = (v) => typeof v === "object";
23911
23911
  const isEmptyObject = (obj) => {
23912
23912
  for (const x in obj) {
23913
- return false;
23913
+ if (Object.prototype.hasOwnProperty.call(obj, x)) {
23914
+ return false;
23915
+ }
23914
23916
  }
23915
23917
  return true;
23916
23918
  };
@@ -24009,7 +24011,7 @@ class Plugin {
24009
24011
  });
24010
24012
  }
24011
24013
  }
24012
- __publicField(Plugin, "version", "4.0.3");
24014
+ __publicField(Plugin, "version", "4.1.0-next.2");
24013
24015
 
24014
24016
  ;// ./src/Plugin/bubblecompare/index.ts
24015
24017
  var bubblecompare_defProp = Object.defineProperty;