billboard.js 3.8.0 → 3.8.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 (36) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +34 -29
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +72 -50
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +40 -23
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +40 -23
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +40 -23
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +40 -23
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +40 -23
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +22 -7
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +7 -2
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +8 -2
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +11 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +7 -2
  34. package/package.json +27 -27
  35. package/src/Chart/api/tooltip.ts +1 -1
  36. package/src/ChartInternal/interactions/eventrect.ts +8 -3
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  */
10
10
  /*-- Graph Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  */.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis,.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  */
10
10
  /*-- Insight Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  */.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-axis,.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  */
10
10
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
11
11
  import { pointer, select, namespaces, selectAll } from 'd3-selection';
@@ -25,6 +25,11 @@ import { zoomIdentity, zoomTransform, zoom as zoom$2 } from 'd3-zoom';
25
25
  * Copyright (c) 2017 ~ present NAVER Corp.
26
26
  * billboard.js project is licensed under the MIT license
27
27
  */
28
+ /**
29
+ * Window object
30
+ * @private
31
+ */
32
+ /* eslint-disable no-new-func, no-undef */
28
33
  var win = (function () {
29
34
  var root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
30
35
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
@@ -151,6 +156,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
151
156
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
152
157
  PERFORMANCE OF THIS SOFTWARE.
153
158
  ***************************************************************************** */
159
+ /* global Reflect, Promise */
160
+
154
161
  var _assign = function __assign() {
155
162
  _assign = Object.assign || function (t) {
156
163
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -3355,6 +3362,7 @@ function runWorker(useWorker, fn, callback, depsFn) {
3355
3362
  * Copyright (c) 2017 ~ present NAVER Corp.
3356
3363
  * billboard.js project is licensed under the MIT license
3357
3364
  */
3365
+ /* eslint-disable */
3358
3366
  /***** Functions to be executed on Web Worker *****
3359
3367
  * NOTE: Don't allowed to use
3360
3368
  * - arrow function syntax
@@ -10818,7 +10826,7 @@ var tooltip = {
10818
10826
  }
10819
10827
  else if ($$.isMultipleX()) {
10820
10828
  // if multiple xs, target point will be determined by mouse
10821
- mouse = [$$.scale.x(data.x), y];
10829
+ mouse = [$$.xx(data), y];
10822
10830
  }
10823
10831
  else {
10824
10832
  if (!config.tooltip_grouped) {
@@ -13237,8 +13245,9 @@ var eventrect = {
13237
13245
  var isInverted = config.axis_x_inverted;
13238
13246
  if ($el.eventRect) {
13239
13247
  $$.updateEventRect($el.eventRect, true);
13248
+ // do not initialize eventRect when data is empty
13240
13249
  }
13241
- else {
13250
+ else if ($$.data.targets.length) {
13242
13251
  var eventRects = $$.$el.main.select(".".concat($EVENT.eventRects))
13243
13252
  .style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? (config.axis_rotated ? "ns-resize" : "ew-resize") : null)
13244
13253
  .classed($EVENT.eventRectsMultiple, isMultipleX)
@@ -13259,6 +13268,8 @@ var eventrect = {
13259
13268
  if ($$.state.inputType === "touch" && !$el.svg.on("touchstart.eventRect") && !$$.hasArcType()) {
13260
13269
  $$.bindTouchOnEventRect(isMultipleX);
13261
13270
  }
13271
+ // when initilazed with empty data and data loaded later, need to update eventRect
13272
+ state.rendered && $$.updateEventRect($el.eventRect, true);
13262
13273
  }
13263
13274
  if (!isMultipleX) {
13264
13275
  // Set data and update eventReceiver.data
@@ -13378,8 +13389,8 @@ var eventrect = {
13378
13389
  .attr("width", width)
13379
13390
  .attr("height", height);
13380
13391
  // only for init
13381
- if (!rendered) {
13382
- rectElement.attr("class", $EVENT.eventRect);
13392
+ if (!rendered || force) {
13393
+ rectElement.classed($EVENT.eventRect, true);
13383
13394
  }
13384
13395
  }
13385
13396
  updateClientRect();
@@ -16522,6 +16533,10 @@ var optGrid = {
16522
16533
  * Copyright (c) 2017 ~ present NAVER Corp.
16523
16534
  * billboard.js project is licensed under the MIT license
16524
16535
  */
16536
+ /**
16537
+ * Modules exports for Axis based chart
16538
+ */
16539
+ // Chart
16525
16540
  var api = [
16526
16541
  apiAxis,
16527
16542
  apiCategory,
@@ -22265,7 +22280,7 @@ var zoomModule = function () {
22265
22280
  var defaults = {};
22266
22281
  /**
22267
22282
  * @namespace bb
22268
- * @version 3.8.0
22283
+ * @version 3.8.2
22269
22284
  */
22270
22285
  var bb = {
22271
22286
  /**
@@ -22275,7 +22290,7 @@ var bb = {
22275
22290
  * bb.version; // "1.0.0"
22276
22291
  * @memberof bb
22277
22292
  */
22278
- version: "3.8.0",
22293
+ version: "3.8.2",
22279
22294
  /**
22280
22295
  * Generate chart
22281
22296
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () {
104
104
  delete _this[key];
105
105
  });
106
106
  };
107
- Plugin.version = "3.8.0";
107
+ Plugin.version = "3.8.2";
108
108
  return Plugin;
109
109
  }());
110
110
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -278,7 +278,7 @@ var Plugin = /** @class */ (function () {
278
278
  delete _this[key];
279
279
  });
280
280
  };
281
- Plugin.version = "3.8.0";
281
+ Plugin.version = "3.8.2";
282
282
  return Plugin;
283
283
  }());
284
284
  var Plugin$1 = Plugin;
@@ -319,6 +319,11 @@ var Options$1 = Options;
319
319
  * Copyright (c) 2017 ~ present NAVER Corp.
320
320
  * billboard.js project is licensed under the MIT license
321
321
  */
322
+ /**
323
+ * Window object
324
+ * @private
325
+ */
326
+ /* eslint-disable no-new-func, no-undef */
322
327
  var win = (function () {
323
328
  var root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
324
329
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -230,6 +230,11 @@ _assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(
230
230
  * Copyright (c) 2017 ~ present NAVER Corp.
231
231
  * billboard.js project is licensed under the MIT license
232
232
  */
233
+ /**
234
+ * Window object
235
+ * @private
236
+ */
237
+ /* eslint-disable no-new-func, no-undef */
233
238
  var win = (function () {
234
239
  var root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
235
240
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
@@ -481,7 +486,7 @@ var Plugin = /** @class */ (function () {
481
486
  delete _this[key];
482
487
  });
483
488
  };
484
- Plugin.version = "3.8.0";
489
+ Plugin.version = "3.8.2";
485
490
  return Plugin;
486
491
  }());
487
492
  var Plugin$1 = Plugin;
@@ -744,6 +749,7 @@ function getCentroid(points) {
744
749
  * Copyright (c) 2017 ~ present NAVER Corp.
745
750
  * billboard.js project is licensed under the MIT license
746
751
  */
752
+ // @ts-nocheck
747
753
  /**
748
754
  * Stanford diagram plugin element class
749
755
  * @class ColorScale
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () {
121
121
  delete _this[key];
122
122
  });
123
123
  };
124
- Plugin.version = "3.8.0";
124
+ Plugin.version = "3.8.2";
125
125
  return Plugin;
126
126
  }());
127
127
  var Plugin$1 = Plugin;
@@ -233,6 +233,10 @@ var Options$1 = Options;
233
233
  * Copyright (c) 2021 ~ present NAVER Corp.
234
234
  * billboard.js project is licensed under the MIT license
235
235
  */
236
+ /**
237
+ * Constants values for plugin option
238
+ * @ignore
239
+ */
236
240
  var defaultStyle = {
237
241
  id: "__tableview-style__",
238
242
  class: "bb-tableview",
@@ -250,6 +254,11 @@ var tpl = {
250
254
  * Copyright (c) 2017 ~ present NAVER Corp.
251
255
  * billboard.js project is licensed under the MIT license
252
256
  */
257
+ /**
258
+ * Window object
259
+ * @private
260
+ */
261
+ /* eslint-disable no-new-func, no-undef */
253
262
  var win = (function () {
254
263
  var root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
255
264
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.8.0
8
+ * @version 3.8.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -60,6 +60,11 @@ function __spreadArray(to, from, pack) {
60
60
  * Copyright (c) 2017 ~ present NAVER Corp.
61
61
  * billboard.js project is licensed under the MIT license
62
62
  */
63
+ /**
64
+ * Window object
65
+ * @private
66
+ */
67
+ /* eslint-disable no-new-func, no-undef */
63
68
  var win = (function () {
64
69
  var root = (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
65
70
  (typeof global === "object" && global !== null && global.Object === Object && global) ||
@@ -258,7 +263,7 @@ var Plugin = /** @class */ (function () {
258
263
  delete _this[key];
259
264
  });
260
265
  };
261
- Plugin.version = "3.8.0";
266
+ Plugin.version = "3.8.2";
262
267
  return Plugin;
263
268
  }());
264
269
  var Plugin$1 = Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billboard.js",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "description": "Re-usable easy interface JavaScript chart library, based on D3 v4+",
5
5
  "homepage": "https://naver.github.io/billboard.js/",
6
6
  "main": "dist/billboard.js",
@@ -101,32 +101,32 @@
101
101
  "d3-zoom": "^3.0.0"
102
102
  },
103
103
  "devDependencies": {
104
- "@babel/core": "^7.21.4",
105
- "@babel/eslint-parser": "^7.21.3",
104
+ "@babel/core": "^7.21.8",
105
+ "@babel/eslint-parser": "^7.21.8",
106
106
  "@babel/plugin-proposal-class-properties": "^7.18.6",
107
107
  "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
108
108
  "@babel/plugin-transform-runtime": "^7.21.4",
109
- "@babel/preset-env": "^7.21.4",
110
- "@babel/preset-typescript": "^7.21.4",
111
- "@babel/runtime": "^7.21.0",
112
- "@commitlint/cli": "17.5.1",
113
- "@commitlint/config-conventional": "^17.4.4",
109
+ "@babel/preset-env": "^7.21.5",
110
+ "@babel/preset-typescript": "^7.21.5",
111
+ "@babel/runtime": "^7.21.5",
112
+ "@commitlint/cli": "17.6.3",
113
+ "@commitlint/config-conventional": "^17.6.3",
114
114
  "@rollup/plugin-babel": "^6.0.3",
115
115
  "@rollup/plugin-node-resolve": "^15.0.2",
116
116
  "@rollup/plugin-replace": "^5.0.2",
117
- "@rollup/plugin-typescript": "^11.1.0",
117
+ "@rollup/plugin-typescript": "^11.1.1",
118
118
  "@semantic-release/changelog": "^6.0.3",
119
119
  "@semantic-release/commit-analyzer": "^9.0.2",
120
120
  "@semantic-release/exec": "^6.0.3",
121
121
  "@semantic-release/git": "^10.0.1",
122
122
  "@semantic-release/npm": "^10.0.3",
123
- "@semantic-release/release-notes-generator": "^10.0.3",
124
- "@types/chai": "^4.3.4",
123
+ "@semantic-release/release-notes-generator": "^11.0.1",
124
+ "@types/chai": "^4.3.5",
125
125
  "@types/d3": "^7.4.0",
126
126
  "@types/mocha": "^10.0.1",
127
- "@types/sinon": "^10.0.13",
128
- "@typescript-eslint/eslint-plugin": "^5.58.0",
129
- "@typescript-eslint/parser": "^5.58.0",
127
+ "@types/sinon": "^10.0.15",
128
+ "@typescript-eslint/eslint-plugin": "^5.59.6",
129
+ "@typescript-eslint/parser": "^5.59.6",
130
130
  "babel-helper-modules": "^6.0.0",
131
131
  "babel-loader": "^9.1.2",
132
132
  "babel-plugin-add-module-exports": "^1.0.4",
@@ -142,7 +142,7 @@
142
142
  "chai": "^4.3.7",
143
143
  "clean-webpack-plugin": "^4.0.0",
144
144
  "cloc": "^2.11.0",
145
- "core-js": "^3.30.0",
145
+ "core-js": "^3.30.2",
146
146
  "coveralls": "^3.1.1",
147
147
  "cross-env": "^7.0.3",
148
148
  "css-loader": "^6.7.3",
@@ -153,10 +153,10 @@
153
153
  "d3-polygon": "^3.0.1",
154
154
  "docdash": "^2.0.1",
155
155
  "dtslint": "^4.2.1",
156
- "eslint": "^8.38.0",
156
+ "eslint": "^8.40.0",
157
157
  "eslint-config-naver": "^2.1.0",
158
158
  "eslint-plugin-import": "^2.27.5",
159
- "eslint-plugin-jsdoc": "^40.3.0",
159
+ "eslint-plugin-jsdoc": "^44.2.4",
160
160
  "eslint-webpack-plugin": "^4.0.1",
161
161
  "exports-loader": "^4.0.0",
162
162
  "hammer-simulator": "0.0.1",
@@ -164,9 +164,9 @@
164
164
  "istanbul-instrumenter-loader": "^3.0.1",
165
165
  "istanbul-lib-instrument": "^5.2.1",
166
166
  "jsdoc": "^4.0.2",
167
- "karma": "^6.4.1",
167
+ "karma": "^6.4.2",
168
168
  "karma-chai": "^0.1.0",
169
- "karma-chrome-launcher": "^3.1.1",
169
+ "karma-chrome-launcher": "^3.2.0",
170
170
  "karma-coverage-istanbul-reporter": "^3.0.3",
171
171
  "karma-mocha": "^2.0.1",
172
172
  "karma-mocha-reporter": "^2.2.3",
@@ -174,30 +174,30 @@
174
174
  "karma-sinon": "^1.0.5",
175
175
  "karma-sourcemap-loader": "^0.4.0",
176
176
  "karma-webpack": "^5.0.0",
177
- "lint-staged": "^13.2.1",
177
+ "lint-staged": "^13.2.2",
178
178
  "lite-fixture": "^1.0.2",
179
179
  "mini-css-extract-plugin": "^2.7.5",
180
180
  "mocha": "^10.2.0",
181
181
  "node-sass": "^8.0.0",
182
182
  "regenerator-runtime": "^0.13.11",
183
- "rollup": "^3.20.2",
183
+ "rollup": "^3.21.7",
184
184
  "rollup-plugin-delete": "^2.0.0",
185
185
  "sass-loader": "^13.2.2",
186
- "semantic-release": "^21.0.1",
186
+ "semantic-release": "^21.0.2",
187
187
  "simulant": "^0.2.2",
188
- "sinon": "^15.0.3",
188
+ "sinon": "^15.0.4",
189
189
  "string-replace-loader": "^3.1.0",
190
190
  "style-loader": "^3.3.2",
191
191
  "taffydb": "^2.7.3",
192
- "terser-webpack-plugin": "^5.3.7",
192
+ "terser-webpack-plugin": "^5.3.8",
193
193
  "tslib": "^2.5.0",
194
194
  "typescript": "5.0.4",
195
- "webpack": "^5.78.0",
195
+ "webpack": "^5.82.1",
196
196
  "webpack-bundle-analyzer": "^4.8.0",
197
197
  "webpack-clean": "^1.2.5",
198
- "webpack-cli": "^5.0.1",
198
+ "webpack-cli": "^5.1.1",
199
199
  "webpack-common-shake": "^2.1.0",
200
- "webpack-dev-server": "^4.13.2",
200
+ "webpack-dev-server": "^4.15.0",
201
201
  "webpack-merge": "^5.8.0",
202
202
  "webpackbar": "^5.0.2",
203
203
  "write-file-webpack-plugin": "^4.5.1"
@@ -86,7 +86,7 @@ const tooltip = {
86
86
  eventReceiver.rect = $el.main.select(`${$$.selectorTarget(data.id, undefined, "rect")}`);
87
87
  } else if ($$.isMultipleX()) {
88
88
  // if multiple xs, target point will be determined by mouse
89
- mouse = [$$.scale.x(data.x), y];
89
+ mouse = [$$.xx(data), y];
90
90
  } else {
91
91
  if (!config.tooltip_grouped) {
92
92
  mouse = [0, y];
@@ -32,7 +32,9 @@ export default {
32
32
 
33
33
  if ($el.eventRect) {
34
34
  $$.updateEventRect($el.eventRect, true);
35
- } else {
35
+
36
+ // do not initialize eventRect when data is empty
37
+ } else if ($$.data.targets.length) {
36
38
  const eventRects = $$.$el.main.select(`.${$EVENT.eventRects}`)
37
39
  .style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? (
38
40
  config.axis_rotated ? "ns-resize" : "ew-resize"
@@ -61,6 +63,9 @@ export default {
61
63
  if ($$.state.inputType === "touch" && !$el.svg.on("touchstart.eventRect") && !$$.hasArcType()) {
62
64
  $$.bindTouchOnEventRect(isMultipleX);
63
65
  }
66
+
67
+ // when initilazed with empty data and data loaded later, need to update eventRect
68
+ state.rendered && $$.updateEventRect($el.eventRect, true);
64
69
  }
65
70
 
66
71
  if (!isMultipleX) {
@@ -203,8 +208,8 @@ export default {
203
208
  .attr("height", height);
204
209
 
205
210
  // only for init
206
- if (!rendered) {
207
- rectElement.attr("class", $EVENT.eventRect);
211
+ if (!rendered || force) {
212
+ rectElement.classed($EVENT.eventRect, true);
208
213
  }
209
214
  }
210
215