billboard.js 3.9.2 → 3.9.4

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 (38) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +219 -187
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +871 -814
  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 +14 -14
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +15 -15
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +14 -14
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +11 -11
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +652 -627
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +664 -639
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +665 -640
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +664 -639
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +661 -636
  22. package/dist/theme/dark.css +1 -1
  23. package/dist/theme/dark.min.css +1 -1
  24. package/dist/theme/datalab.css +1 -1
  25. package/dist/theme/datalab.min.css +1 -1
  26. package/dist/theme/graph.css +1 -1
  27. package/dist/theme/graph.min.css +1 -1
  28. package/dist/theme/insight.css +1 -1
  29. package/dist/theme/insight.min.css +1 -1
  30. package/dist-esm/billboard.js +28 -18
  31. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  34. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  35. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  36. package/package.json +12 -12
  37. package/src/ChartInternal/internals/tooltip.ts +3 -3
  38. package/src/ChartInternal/shape/arc.ts +14 -4
package/dist/billboard.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.9.2
8
+ * @version 3.9.4
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -317,14 +317,14 @@ var TYPE_BY_CATEGORY = {
317
317
  Spline: [TYPE.SPLINE, TYPE.AREA_SPLINE, TYPE.AREA_SPLINE_RANGE]
318
318
  };
319
319
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
320
- function _typeof(obj) {
320
+ function _typeof(o) {
321
321
  "@babel/helpers - typeof";
322
322
 
323
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
324
- return typeof obj;
325
- } : function (obj) {
326
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
327
- }, _typeof(obj);
323
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
324
+ return typeof o;
325
+ } : function (o) {
326
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
327
+ }, _typeof(o);
328
328
  }
329
329
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
330
330
 
@@ -367,8 +367,8 @@ var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webp
367
367
 
368
368
 
369
369
  var util_this = undefined;
370
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
371
- function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
370
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
371
+ function _objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
372
372
  /**
373
373
  * Copyright (c) 2017 ~ present NAVER Corp.
374
374
  * billboard.js project is licensed under the MIT license
@@ -891,7 +891,7 @@ function getCssRules(styleSheets) {
891
891
  }
892
892
  } catch (e) {
893
893
  var _window$console;
894
- (_window$console = win.console) == null ? void 0 : _window$console.warn("Error while reading rules from " + sheet.href + ": " + e.toString());
894
+ (_window$console = win.console) == null || _window$console.warn("Error while reading rules from " + sheet.href + ": " + e.toString());
895
895
  }
896
896
  }.bind(this));
897
897
  return rules;
@@ -1290,8 +1290,8 @@ function logError(head, tail) {
1290
1290
  }
1291
1291
  ;// CONCATENATED MODULE: ./src/config/classes.ts
1292
1292
 
1293
- function classes_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1294
- function classes_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? classes_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : classes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1293
+ function classes_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1294
+ function classes_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? classes_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : classes_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1295
1295
  /**
1296
1296
  * Copyright (c) 2017 ~ present NAVER Corp.
1297
1297
  * billboard.js project is licensed under the MIT license
@@ -3589,8 +3589,8 @@ var tooltip_this = undefined;
3589
3589
  ;// CONCATENATED MODULE: ./src/config/Options/Options.ts
3590
3590
 
3591
3591
 
3592
- function Options_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3593
- function Options_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? Options_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : Options_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3592
+ function Options_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3593
+ function Options_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Options_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Options_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3594
3594
  /**
3595
3595
  * Copyright (c) 2017 ~ present NAVER Corp.
3596
3596
  * billboard.js project is licensed under the MIT license
@@ -3855,7 +3855,7 @@ function generateWait() {
3855
3855
  }
3856
3856
  runUntil(function () {
3857
3857
  _newArrowCheck(this, _this5);
3858
- callback == null ? void 0 : callback();
3858
+ callback == null || callback();
3859
3859
  }.bind(this), loop);
3860
3860
  };
3861
3861
  f.add = function (t) {
@@ -4067,7 +4067,7 @@ function json(json, keysParam) {
4067
4067
  } else {
4068
4068
  Object.keys(json).forEach(function (key) {
4069
4069
  var tmp = json[key].concat();
4070
- tmp.unshift == null ? void 0 : tmp.unshift(key);
4070
+ tmp.unshift == null || tmp.unshift(key);
4071
4071
  newRows.push(tmp);
4072
4072
  });
4073
4073
  data = columns(newRows);
@@ -4363,7 +4363,7 @@ function getDataKeyForJson(keysParam, config) {
4363
4363
  }.bind(this));
4364
4364
 
4365
4365
  // this needs to be sorted because its index and value.index is identical
4366
- (_$$$data$xs$t$id = $$.data.xs[t.id]) == null ? void 0 : _$$$data$xs$t$id.sort(function (v1, v2) {
4366
+ (_$$$data$xs$t$id = $$.data.xs[t.id]) == null || _$$$data$xs$t$id.sort(function (v1, v2) {
4367
4367
  _newArrowCheck(this, _this5);
4368
4368
  return v1 - v2;
4369
4369
  }.bind(this));
@@ -5459,7 +5459,7 @@ function callDone(fn, resizeAfter) {
5459
5459
  var $$ = this,
5460
5460
  api = $$.api;
5461
5461
  resizeAfter && $$.api.flush(!0);
5462
- fn == null ? void 0 : fn.call(api);
5462
+ fn == null || fn.call(api);
5463
5463
  }
5464
5464
  /* harmony default export */ var load = ({
5465
5465
  load: function load(rawTargets, args) {
@@ -5796,8 +5796,8 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5796
5796
  _$$$$el2 = $$.$el,
5797
5797
  eventRect = _$$$$el2.eventRect,
5798
5798
  zoomResetBtn = _$$$$el2.zoomResetBtn;
5799
- eventRect == null ? void 0 : eventRect.on(".zoom wheel.zoom .drag", null);
5800
- zoomResetBtn == null ? void 0 : zoomResetBtn.on("click", null).style("display", "none");
5799
+ eventRect == null || eventRect.on(".zoom wheel.zoom .drag", null);
5800
+ zoomResetBtn == null || zoomResetBtn.on("click", null).style("display", "none");
5801
5801
  },
5802
5802
  /**
5803
5803
  * Unbind all attached events
@@ -5819,7 +5819,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5819
5819
  _newArrowCheck(this, _this5);
5820
5820
  return v == null ? void 0 : v.on("wheel click mouseover mousemove mouseout touchstart touchmove touchend touchstart.eventRect touchmove.eventRect touchend.eventRect .brush .drag .zoom wheel.zoom dblclick.zoom", null);
5821
5821
  }.bind(this));
5822
- $$.unbindZoomEvent == null ? void 0 : $$.unbindZoomEvent();
5822
+ $$.unbindZoomEvent == null || $$.unbindZoomEvent();
5823
5823
  }
5824
5824
  });
5825
5825
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/class.ts
@@ -6509,7 +6509,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
6509
6509
  org.xDomain = x.domain();
6510
6510
  zoomEnabled && $$.zoom.updateScaleExtent();
6511
6511
  subX.domain(x.domain());
6512
- (_$$$brush = $$.brush) == null ? void 0 : _$$$brush.scale(subX);
6512
+ (_$$$brush = $$.brush) == null || _$$$brush.scale(subX);
6513
6513
  }
6514
6514
  if (withUpdateXDomain) {
6515
6515
  var domainValue = domain || !$$.brush || brushEmpty($$) ? org.xDomain : getBrushSelection($$).map(subX.invert);
@@ -6739,7 +6739,7 @@ function getLegendColor(id) {
6739
6739
  }
6740
6740
 
6741
6741
  // toggle legend state
6742
- (_$el$legend = $el.legend) == null ? void 0 : _$el$legend.selectAll("." + $LEGEND.legendItem).classed($LEGEND.legendItemHidden, function (id) {
6742
+ (_$el$legend = $el.legend) == null || _$el$legend.selectAll("." + $LEGEND.legendItem).classed($LEGEND.legendItemHidden, function (id) {
6743
6743
  var hide = !$$.isTargetToShow(id);
6744
6744
  if (hide) {
6745
6745
  this.style.opacity = null;
@@ -7503,7 +7503,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
7503
7503
  // event rects will redrawn when flow called
7504
7504
  if (config.interaction_enabled && !flow && wth.EventRect) {
7505
7505
  $$.redrawEventRect();
7506
- $$.bindZoomEvent == null ? void 0 : $$.bindZoomEvent();
7506
+ $$.bindZoomEvent == null || $$.bindZoomEvent();
7507
7507
  }
7508
7508
  } else {
7509
7509
  // arc
@@ -7528,7 +7528,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
7528
7528
  $$.hasDataLabel() && !$$.hasArcType(null, ["radar"]) && $$.updateText();
7529
7529
 
7530
7530
  // title
7531
- $$.redrawTitle == null ? void 0 : $$.redrawTitle();
7531
+ $$.redrawTitle == null || $$.redrawTitle();
7532
7532
  initializing && $$.updateTypesElements();
7533
7533
  $$.generateRedrawList(targetsToShow, flow, duration, wth.Subchart);
7534
7534
  $$.updateTooltipOnRedraw();
@@ -7890,7 +7890,7 @@ function getScale(type, min, max) {
7890
7890
  scale.y = (0,external_commonjs_d3_scale_commonjs2_d3_scale_amd_d3_scale_root_d3_.scaleLinear)().rangeRound([padding.top, current.height - padding.bottom]);
7891
7891
  } else {
7892
7892
  // update for arc
7893
- $$.updateArc == null ? void 0 : $$.updateArc();
7893
+ $$.updateArc == null || $$.updateArc();
7894
7894
  }
7895
7895
  },
7896
7896
  /**
@@ -8570,7 +8570,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8570
8570
  $el = $$.$el;
8571
8571
  if (hasAxis && !withoutAxis && $$.axis.x && config.axis_rotated) {
8572
8572
  var _$$$axis$subX;
8573
- (_$$$axis$subX = $$.axis.subX) == null ? void 0 : _$$$axis$subX.create($el.axis.subX);
8573
+ (_$$$axis$subX = $$.axis.subX) == null || _$$$axis$subX.create($el.axis.subX);
8574
8574
  }
8575
8575
 
8576
8576
  // pass 'withoutAxis' param to not animate at the init rendering
@@ -8700,7 +8700,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8700
8700
  bottom: 0,
8701
8701
  left: 0
8702
8702
  };
8703
- $$.updateSizeForLegend == null ? void 0 : $$.updateSizeForLegend(currLegend);
8703
+ $$.updateSizeForLegend == null || $$.updateSizeForLegend(currLegend);
8704
8704
  state.width = state.current.width - state.margin.left - state.margin.right;
8705
8705
  state.height = state.current.height - state.margin.top - state.margin.bottom;
8706
8706
  if (state.width < 0) {
@@ -8727,7 +8727,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8727
8727
  if (hasGauge && !config.gauge_fullCircle) {
8728
8728
  state.arcHeight += state.height - $$.getPaddingBottomForGauge();
8729
8729
  }
8730
- $$.updateRadius == null ? void 0 : $$.updateRadius();
8730
+ $$.updateRadius == null || $$.updateRadius();
8731
8731
  }
8732
8732
  if (state.isLegendRight && isNonAxis) {
8733
8733
  state.margin3.left = state.arcWidth / 2 + state.radiusExpanded * 1.1;
@@ -9589,75 +9589,76 @@ function title_getTextPos(pos, width) {
9589
9589
  len = d.length;
9590
9590
  var text, row, param, value, i;
9591
9591
  var _loop = function () {
9592
- var _this3 = this;
9593
- row = d[i];
9594
- if (!row || !(getRowValue(row) || getRowValue(row) === 0)) {
9595
- return "continue";
9596
- }
9597
- if (isUndefined(text)) {
9598
- var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
9599
- text = tplProcess(tpl[0], {
9600
- CLASS_TOOLTIP: $TOOLTIP.tooltip,
9601
- TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
9602
- });
9603
- }
9604
- if (!row.ratio && $el.arcs) {
9605
- param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]];
9606
- row.ratio = $$.getRatio.apply($$, param);
9607
- }
9608
- param = [row.ratio, row.id, row.index, d];
9609
- value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param)));
9610
- if ($$.isAreaRangeType(row)) {
9611
- var _map2 = ["high", "low"].map(function (v) {
9612
- _newArrowCheck(this, _this3);
9613
- return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param)));
9614
- }.bind(this)),
9615
- high = _map2[0],
9616
- low = _map2[1];
9617
- value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
9618
- } else if ($$.isCandlestickType(row)) {
9619
- var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) {
9620
- _newArrowCheck(this, _this3);
9621
- return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param)));
9622
- }.bind(this)),
9623
- open = _map3[0],
9624
- _high = _map3[1],
9625
- _low = _map3[2],
9626
- close = _map3[3],
9627
- volume = _map3[4];
9628
- value = "<b>Open:</b> " + open + " <b>High:</b> " + _high + " <b>Low:</b> " + _low + " <b>Close:</b> " + close + (volume ? " <b>Volume:</b> " + volume : "");
9629
- } else if ($$.isBarRangeType(row)) {
9630
- var _row$value = row.value,
9631
- start = _row$value[0],
9632
- end = _row$value[1];
9633
- value = valueFormat(start) + " ~ " + valueFormat(end);
9634
- }
9635
- if (value !== undefined) {
9636
- // Skip elements when their name is set to null
9637
- if (row.name === null) {
9638
- return "continue";
9592
+ var _this3 = this;
9593
+ row = d[i];
9594
+ if (!row || !(getRowValue(row) || getRowValue(row) === 0)) {
9595
+ return 0; // continue
9639
9596
  }
9640
- var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
9641
- _color = getBgColor(row),
9642
- contentValue = {
9643
- CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
9644
- COLOR: tplStr || !$$.patterns ? _color : "<svg><rect style=\"fill:" + _color + "\" width=\"10\" height=\"10\"></rect></svg>",
9645
- NAME: name,
9646
- VALUE: value
9647
- };
9648
- if (tplStr && isObject(contents.text)) {
9649
- var index = targetIds.indexOf(row.id);
9650
- Object.keys(contents.text).forEach(function (key) {
9651
- _newArrowCheck(this, _this3);
9652
- contentValue[key] = contents.text[key][index];
9653
- }.bind(this));
9597
+ if (isUndefined(text)) {
9598
+ var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
9599
+ text = tplProcess(tpl[0], {
9600
+ CLASS_TOOLTIP: $TOOLTIP.tooltip,
9601
+ TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
9602
+ });
9654
9603
  }
9655
- text += tplProcess(tpl[1], contentValue);
9656
- }
9657
- };
9604
+ if (!row.ratio && $el.arcs) {
9605
+ param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]];
9606
+ row.ratio = $$.getRatio.apply($$, param);
9607
+ }
9608
+ param = [row.ratio, row.id, row.index, d];
9609
+ value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param)));
9610
+ if ($$.isAreaRangeType(row)) {
9611
+ var _map2 = ["high", "low"].map(function (v) {
9612
+ _newArrowCheck(this, _this3);
9613
+ return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param)));
9614
+ }.bind(this)),
9615
+ high = _map2[0],
9616
+ low = _map2[1];
9617
+ value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
9618
+ } else if ($$.isCandlestickType(row)) {
9619
+ var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) {
9620
+ _newArrowCheck(this, _this3);
9621
+ return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param)));
9622
+ }.bind(this)),
9623
+ open = _map3[0],
9624
+ _high = _map3[1],
9625
+ _low = _map3[2],
9626
+ close = _map3[3],
9627
+ volume = _map3[4];
9628
+ value = "<b>Open:</b> " + open + " <b>High:</b> " + _high + " <b>Low:</b> " + _low + " <b>Close:</b> " + close + (volume ? " <b>Volume:</b> " + volume : "");
9629
+ } else if ($$.isBarRangeType(row)) {
9630
+ var _row$value = row.value,
9631
+ start = _row$value[0],
9632
+ end = _row$value[1];
9633
+ value = valueFormat(start) + " ~ " + valueFormat(end);
9634
+ }
9635
+ if (value !== undefined) {
9636
+ // Skip elements when their name is set to null
9637
+ if (row.name === null) {
9638
+ return 0; // continue
9639
+ }
9640
+ var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
9641
+ _color = getBgColor(row),
9642
+ contentValue = {
9643
+ CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
9644
+ COLOR: tplStr || !$$.patterns ? _color : "<svg><rect style=\"fill:" + _color + "\" width=\"10\" height=\"10\"></rect></svg>",
9645
+ NAME: name,
9646
+ VALUE: value
9647
+ };
9648
+ if (tplStr && isObject(contents.text)) {
9649
+ var index = targetIds.indexOf(row.id);
9650
+ Object.keys(contents.text).forEach(function (key) {
9651
+ _newArrowCheck(this, _this3);
9652
+ contentValue[key] = contents.text[key][index];
9653
+ }.bind(this));
9654
+ }
9655
+ text += tplProcess(tpl[1], contentValue);
9656
+ }
9657
+ },
9658
+ _ret;
9658
9659
  for (i = 0; i < len; i++) {
9659
- var _ret = _loop();
9660
- if (_ret === "continue") continue;
9660
+ _ret = _loop();
9661
+ if (_ret === 0) continue;
9661
9662
  }
9662
9663
  return text + "</table>";
9663
9664
  },
@@ -9686,7 +9687,7 @@ function title_getTextPos(pos, width) {
9686
9687
  eventRect = _$$$$el.eventRect,
9687
9688
  tooltip = _$$$$el.tooltip,
9688
9689
  bindto = config.tooltip_contents.bindto,
9689
- datum = tooltip.datum();
9690
+ datum = tooltip == null || tooltip.datum == null ? void 0 : tooltip.datum();
9690
9691
  if (!bindto && datum) {
9691
9692
  var _config$tooltip_posit,
9692
9693
  _config$tooltip_posit2,
@@ -9801,11 +9802,12 @@ function title_getTextPos(pos, width) {
9801
9802
  dataToShow = selectedData.filter(function (d) {
9802
9803
  _newArrowCheck(this, _this6);
9803
9804
  return d && isValue($$.getBaseValue(d));
9804
- }.bind(this));
9805
+ }.bind(this)),
9806
+ _tooltip;
9805
9807
  if (!tooltip || dataToShow.length === 0 || !config.tooltip_show) {
9806
9808
  return;
9807
9809
  }
9808
- var datum = tooltip.datum();
9810
+ var datum = (_tooltip = tooltip) == null || _tooltip.datum == null ? void 0 : _tooltip.datum();
9809
9811
  var dataStr = JSON.stringify(selectedData);
9810
9812
  if (!datum || datum.current !== dataStr) {
9811
9813
  var _selectedData$concat$ = selectedData.concat().sort()[0],
@@ -9873,7 +9875,8 @@ function title_getTextPos(pos, width) {
9873
9875
  config = $$.config,
9874
9876
  tooltip = $$.$el.tooltip;
9875
9877
  if (tooltip && tooltip.style("display") !== "none" && (!config.tooltip_doNotHide || force)) {
9876
- var selectedData = JSON.parse(tooltip.datum().current);
9878
+ var _tooltip$datum$curren,
9879
+ selectedData = JSON.parse((_tooltip$datum$curren = tooltip == null || tooltip.datum == null ? void 0 : tooltip.datum().current) != null ? _tooltip$datum$curren : {});
9877
9880
  callFn(config.tooltip_onhide, api, selectedData);
9878
9881
 
9879
9882
  // hide tooltip
@@ -10931,7 +10934,7 @@ var ChartInternal = /*#__PURE__*/function () {
10931
10934
  // Point types
10932
10935
  var hasPointType = $$.hasType("bubble") || $$.hasType("scatter");
10933
10936
  if (hasPointType) {
10934
- $$.updateTargetForCircle == null ? void 0 : $$.updateTargetForCircle();
10937
+ $$.updateTargetForCircle == null || $$.updateTargetForCircle();
10935
10938
  }
10936
10939
 
10937
10940
  // Fade-in each chart
@@ -11162,16 +11165,16 @@ function loadConfig(config) {
11162
11165
  if (state.resizing) {
11163
11166
  var _$$$brush;
11164
11167
  // arguments[1] is given when is called from resize
11165
- (_$$$brush = $$.brush) == null ? void 0 : _$$$brush.updateResize();
11168
+ (_$$$brush = $$.brush) == null || _$$$brush.updateResize();
11166
11169
  } else {
11167
11170
  var _$$$axis;
11168
11171
  // re-update config info
11169
- (_$$$axis = $$.axis) == null ? void 0 : _$$$axis.setOrient();
11172
+ (_$$$axis = $$.axis) == null || _$$$axis.setOrient();
11170
11173
  }
11171
11174
 
11172
11175
  // hide possible reset zoom button
11173
11176
  // https://github.com/naver/billboard.js/issues/2201
11174
- zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
11177
+ zoomResetBtn == null || zoomResetBtn.style("display", "none");
11175
11178
  $$.scale.zoom = null;
11176
11179
  soft ? $$.redraw({
11177
11180
  withTransform: !0,
@@ -12543,9 +12546,9 @@ var tooltip_tooltip = {
12543
12546
  // reset last touch point index
12544
12547
  inputType === "touch" && $$.callOverOutForTouch();
12545
12548
  $$.hideTooltip(!0);
12546
- $$.hideGridFocus == null ? void 0 : $$.hideGridFocus();
12547
- $$.unexpandCircles == null ? void 0 : $$.unexpandCircles();
12548
- $$.expandBarTypeShapes == null ? void 0 : $$.expandBarTypeShapes(!1);
12549
+ $$.hideGridFocus == null || $$.hideGridFocus();
12550
+ $$.unexpandCircles == null || $$.unexpandCircles();
12551
+ $$.expandBarTypeShapes == null || $$.expandBarTypeShapes(!1);
12549
12552
  }
12550
12553
  };
12551
12554
  /* harmony default export */ var api_tooltip = ({
@@ -14562,7 +14565,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14562
14565
  } else if (this.x) {
14563
14566
  var _this$subX;
14564
14567
  this.x.tickValues(values);
14565
- (_this$subX = this.subX) == null ? void 0 : _this$subX.tickValues(values);
14568
+ (_this$subX = this.subX) == null || _this$subX.tickValues(values);
14566
14569
  }
14567
14570
  return values;
14568
14571
  };
@@ -15005,7 +15008,7 @@ var Axis_Axis = /*#__PURE__*/function () {
15005
15008
  } else if (this.x) {
15006
15009
  var _this$subX2;
15007
15010
  this.x.tickValues([]);
15008
- (_this$subX2 = this.subX) == null ? void 0 : _this$subX2.tickValues([]);
15011
+ (_this$subX2 = this.subX) == null || _this$subX2.tickValues([]);
15009
15012
  }
15010
15013
  if (config.zoom_rescale && !flow) {
15011
15014
  xDomainForZoom = scale.x.orgDomain();
@@ -15044,8 +15047,8 @@ var Axis_Axis = /*#__PURE__*/function () {
15044
15047
  // Update sub domain
15045
15048
  if (wth.Y) {
15046
15049
  var _scale$subY, _scale$subY2;
15047
- (_scale$subY = scale.subY) == null ? void 0 : _scale$subY.domain($$.getYDomain(targetsToShow, "y"));
15048
- (_scale$subY2 = scale.subY2) == null ? void 0 : _scale$subY2.domain($$.getYDomain(targetsToShow, "y2"));
15050
+ (_scale$subY = scale.subY) == null || _scale$subY.domain($$.getYDomain(targetsToShow, "y"));
15051
+ (_scale$subY2 = scale.subY2) == null || _scale$subY2.domain($$.getYDomain(targetsToShow, "y2"));
15049
15052
  }
15050
15053
  }
15051
15054
 
@@ -15166,7 +15169,7 @@ var Axis_Axis = /*#__PURE__*/function () {
15166
15169
  // update data's index value to be alinged with the x Axis
15167
15170
  $$.updateDataIndexByX(xAxisTickValues);
15168
15171
  $$.updateXs(xAxisTickValues);
15169
- $$.updatePointClass == null ? void 0 : $$.updatePointClass(!0);
15172
+ $$.updatePointClass == null || $$.updatePointClass(!0);
15170
15173
  state.eventReceiver.data = xAxisTickValues;
15171
15174
  }
15172
15175
  $$.updateEventRectData();
@@ -15411,7 +15414,7 @@ var Axis_Axis = /*#__PURE__*/function () {
15411
15414
  selectedData = $$.getAllValuesOnIndex(index);
15412
15415
  if (isTooltipGrouped) {
15413
15416
  $$.showTooltip(selectedData, context);
15414
- $$.showGridFocus == null ? void 0 : $$.showGridFocus(selectedData);
15417
+ $$.showGridFocus == null || $$.showGridFocus(selectedData);
15415
15418
  if (!isSelectionEnabled || isSelectionGrouped) {
15416
15419
  return;
15417
15420
  }
@@ -15423,7 +15426,7 @@ var Axis_Axis = /*#__PURE__*/function () {
15423
15426
  return $$.isWithinShape(this, d);
15424
15427
  });
15425
15428
  if (shapeAtIndex.empty() && !isTooltipGrouped) {
15426
- $$.hideGridFocus == null ? void 0 : $$.hideGridFocus();
15429
+ $$.hideGridFocus == null || $$.hideGridFocus();
15427
15430
  $$.hideTooltip();
15428
15431
  isSelectionGrouped || $$.setExpand(index);
15429
15432
  }
@@ -15436,8 +15439,8 @@ var Axis_Axis = /*#__PURE__*/function () {
15436
15439
  }
15437
15440
  if (!isTooltipGrouped) {
15438
15441
  $$.showTooltip(d, context);
15439
- $$.showGridFocus == null ? void 0 : $$.showGridFocus(d);
15440
- $$.unexpandCircles == null ? void 0 : $$.unexpandCircles();
15442
+ $$.showGridFocus == null || $$.showGridFocus(d);
15443
+ $$.unexpandCircles == null || $$.unexpandCircles();
15441
15444
  selected.each(function (d) {
15442
15445
  _newArrowCheck(this, _this7);
15443
15446
  return $$.setExpand(index, d.id);
@@ -15611,7 +15614,7 @@ var Axis_Axis = /*#__PURE__*/function () {
15611
15614
  var index = d.index;
15612
15615
  main.selectAll("." + $SHAPE.shape + "-" + index).each(function (d2) {
15613
15616
  if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
15614
- $$.toggleShape == null ? void 0 : $$.toggleShape(this, d2, index);
15617
+ $$.toggleShape == null || $$.toggleShape(this, d2, index);
15615
15618
  config.data_onclick.bind($$.api)(d2, this);
15616
15619
  }
15617
15620
  });
@@ -15664,7 +15667,7 @@ var Axis_Axis = /*#__PURE__*/function () {
15664
15667
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
15665
15668
  $$.$el.main.selectAll("." + $SHAPE.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + $SHAPE.shape + "-" + closest.index).each(function () {
15666
15669
  if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
15667
- $$.toggleShape == null ? void 0 : $$.toggleShape(this, closest, closest.index);
15670
+ $$.toggleShape == null || $$.toggleShape(this, closest, closest.index);
15668
15671
  config.data_onclick.bind($$.api)(closest, this);
15669
15672
  }
15670
15673
  });
@@ -16360,7 +16363,7 @@ function smoothLines(el, type) {
16360
16363
  }.bind(this));
16361
16364
  });
16362
16365
  smoothLines(focusEl, "grid");
16363
- $$.showCircleFocus == null ? void 0 : $$.showCircleFocus(data);
16366
+ $$.showCircleFocus == null || $$.showCircleFocus(data);
16364
16367
  },
16365
16368
  hideGridFocus: function hideGridFocus() {
16366
16369
  var $$ = this,
@@ -16370,7 +16373,7 @@ function smoothLines(el, type) {
16370
16373
  main = $$.$el.main;
16371
16374
  if (inputType === "mouse" || !resizing) {
16372
16375
  main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus).style("visibility", "hidden");
16373
- $$.hideCircleFocus == null ? void 0 : $$.hideCircleFocus();
16376
+ $$.hideCircleFocus == null || $$.hideCircleFocus();
16374
16377
  }
16375
16378
  },
16376
16379
  updateGridFocus: function updateGridFocus() {
@@ -18474,8 +18477,8 @@ function smoothLines(el, type) {
18474
18477
  });
18475
18478
  ;// CONCATENATED MODULE: ./src/config/Options/axis/axis.ts
18476
18479
 
18477
- function axis_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18478
- function axis_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? axis_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : axis_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18480
+ function axis_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18481
+ function axis_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? axis_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : axis_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18479
18482
  /**
18480
18483
  * Copyright (c) 2017 ~ present NAVER Corp.
18481
18484
  * billboard.js project is licensed under the MIT license
@@ -18618,6 +18621,9 @@ var options = [data_axis, axis_axis, common_grid];
18618
18621
  var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_ = __webpack_require__(12);
18619
18622
  ;// CONCATENATED MODULE: ./src/ChartInternal/shape/arc.ts
18620
18623
 
18624
+
18625
+ function arc_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18626
+ function arc_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? arc_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : arc_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18621
18627
  /**
18622
18628
  * Copyright (c) 2017 ~ present NAVER Corp.
18623
18629
  * billboard.js project is licensed under the MIT license
@@ -18717,17 +18723,43 @@ function getRadiusFn(expandRate) {
18717
18723
  */
18718
18724
  function getAttrTweenFn(fn) {
18719
18725
  return function (d) {
18720
- var interpolate = (0,external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_.interpolate)(this._current, d);
18726
+ var _this2 = this,
18727
+ getAngleKeyValue = function (_ref) {
18728
+ var _ref$startAngle = _ref.startAngle,
18729
+ startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle,
18730
+ _ref$endAngle = _ref.endAngle,
18731
+ endAngle = _ref$endAngle === void 0 ? 0 : _ref$endAngle,
18732
+ _ref$padAngle = _ref.padAngle,
18733
+ padAngle = _ref$padAngle === void 0 ? 0 : _ref$padAngle;
18734
+ _newArrowCheck(this, _this2);
18735
+ return {
18736
+ startAngle: startAngle,
18737
+ endAngle: endAngle,
18738
+ padAngle: padAngle
18739
+ };
18740
+ }.bind(this),
18741
+ interpolate = (0,external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_.interpolate)(getAngleKeyValue(this._current), getAngleKeyValue(d));
18742
+ // d3.interpolate interpolates id value, if id is given as color string(ex. gold, silver, etc)
18743
+ // to avoid unexpected behavior, interpolate only angle values
18744
+ // https://github.com/naver/billboard.js/issues/3321
18745
+
18721
18746
  this._current = d;
18722
18747
  return function (t) {
18723
- var interpolated = interpolate(t);
18724
- return fn(interpolated);
18748
+ var interpolated = interpolate(t),
18749
+ data = d.data,
18750
+ index = d.index,
18751
+ value = d.value;
18752
+ return fn(arc_objectSpread(arc_objectSpread({}, interpolated), {}, {
18753
+ data: data,
18754
+ index: index,
18755
+ value: value
18756
+ }));
18725
18757
  };
18726
18758
  };
18727
18759
  }
18728
18760
  /* harmony default export */ var arc = ({
18729
18761
  initPie: function initPie() {
18730
- var _this2 = this,
18762
+ var _this3 = this,
18731
18763
  $$ = this,
18732
18764
  config = $$.config,
18733
18765
  dataType = config.data_type,
@@ -18735,10 +18767,10 @@ function getAttrTweenFn(fn) {
18735
18767
  startingAngle = config[dataType + "_startingAngle"] || 0,
18736
18768
  padAngle = (padding ? padding * .01 : config[dataType + "_padAngle"]) || 0;
18737
18769
  $$.pie = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.pie)().startAngle(startingAngle).endAngle(startingAngle + 2 * Math.PI).padAngle(padAngle).value(function (d) {
18738
- var _this3 = this;
18739
- _newArrowCheck(this, _this2);
18770
+ var _this4 = this;
18771
+ _newArrowCheck(this, _this3);
18740
18772
  return d.values.reduce(function (a, b) {
18741
- _newArrowCheck(this, _this3);
18773
+ _newArrowCheck(this, _this4);
18742
18774
  return a + b.value;
18743
18775
  }.bind(this), 0);
18744
18776
  }.bind(this)).sort($$.getSortCompareFn.bind($$)(!0));
@@ -18822,7 +18854,7 @@ function getAttrTweenFn(fn) {
18822
18854
  return startAngle;
18823
18855
  },
18824
18856
  updateAngle: function updateAngle(dValue) {
18825
- var _this4 = this,
18857
+ var _this5 = this,
18826
18858
  $$ = this,
18827
18859
  config = $$.config,
18828
18860
  state = $$.state,
@@ -18843,7 +18875,7 @@ function getAttrTweenFn(fn) {
18843
18875
  }
18844
18876
  pie($$.filterTargetsToShow()).forEach(function (t, i) {
18845
18877
  var _d$data;
18846
- _newArrowCheck(this, _this4);
18878
+ _newArrowCheck(this, _this5);
18847
18879
  if (!found && t.data.id === ((_d$data = d.data) == null ? void 0 : _d$data.id)) {
18848
18880
  found = !0;
18849
18881
  d = t;
@@ -18894,7 +18926,7 @@ function getAttrTweenFn(fn) {
18894
18926
  * @private
18895
18927
  */
18896
18928
  getSvgArcExpanded: function getSvgArcExpanded(rate) {
18897
- var _this5 = this;
18929
+ var _this6 = this;
18898
18930
  if (rate === void 0) {
18899
18931
  rate = 1;
18900
18932
  }
@@ -18905,7 +18937,7 @@ function getAttrTweenFn(fn) {
18905
18937
  corner = _getRadiusFn$call2.corner,
18906
18938
  arc = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.arc)().innerRadius(inner).outerRadius(outer);
18907
18939
  return function (d) {
18908
- _newArrowCheck(this, _this5);
18940
+ _newArrowCheck(this, _this6);
18909
18941
  var updated = $$.updateAngle(d),
18910
18942
  outerR = outer(updated);
18911
18943
  var cornerR = 0;
@@ -18925,7 +18957,7 @@ function getAttrTweenFn(fn) {
18925
18957
  * @private
18926
18958
  */
18927
18959
  transformForArcLabel: function transformForArcLabel(d) {
18928
- var _this6 = this,
18960
+ var _this7 = this,
18929
18961
  $$ = this,
18930
18962
  config = $$.config,
18931
18963
  radiusExpanded = $$.state.radiusExpanded,
@@ -18946,14 +18978,14 @@ function getAttrTweenFn(fn) {
18946
18978
  }
18947
18979
  var c = this.svgArc.centroid(updated),
18948
18980
  _c$map = c.map(function (v) {
18949
- _newArrowCheck(this, _this6);
18981
+ _newArrowCheck(this, _this7);
18950
18982
  return isNaN(v) ? 0 : v;
18951
18983
  }.bind(this)),
18952
18984
  x = _c$map[0],
18953
18985
  y = _c$map[1],
18954
18986
  h = Math.sqrt(x * x + y * y);
18955
18987
  var ratio = (_filter$map = ["donut", "pie", "polar"].filter($$.hasType.bind($$)).map(function (v) {
18956
- _newArrowCheck(this, _this6);
18988
+ _newArrowCheck(this, _this7);
18957
18989
  return config[v + "_label_ratio"];
18958
18990
  }.bind(this))) == null ? void 0 : _filter$map[0];
18959
18991
  if (ratio) {
@@ -18995,14 +19027,14 @@ function getAttrTweenFn(fn) {
18995
19027
  }
18996
19028
  },
18997
19029
  expandArc: function expandArc(targetIds) {
18998
- var _this7 = this,
19030
+ var _this8 = this,
18999
19031
  $$ = this,
19000
19032
  transiting = $$.state.transiting,
19001
19033
  $el = $$.$el;
19002
19034
  // MEMO: avoid to cancel transition
19003
19035
  if (transiting) {
19004
19036
  var interval = setInterval(function () {
19005
- _newArrowCheck(this, _this7);
19037
+ _newArrowCheck(this, _this8);
19006
19038
  if (!transiting) {
19007
19039
  clearInterval(interval);
19008
19040
  $el.legend.selectAll("." + $FOCUS.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
@@ -19021,7 +19053,7 @@ function getAttrTweenFn(fn) {
19021
19053
  });
19022
19054
  },
19023
19055
  unexpandArc: function unexpandArc(targetIds) {
19024
- var _this8 = this,
19056
+ var _this9 = this,
19025
19057
  $$ = this,
19026
19058
  transiting = $$.state.transiting,
19027
19059
  svg = $$.$el.svg;
@@ -19030,7 +19062,7 @@ function getAttrTweenFn(fn) {
19030
19062
  }
19031
19063
  var newTargetIds = $$.mapToTargetIds(targetIds);
19032
19064
  svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).selectAll("path").transition().duration(function (d) {
19033
- _newArrowCheck(this, _this8);
19065
+ _newArrowCheck(this, _this9);
19034
19066
  return $$.getExpandConfig(d.data.id, "duration");
19035
19067
  }.bind(this)).attrTween("d", getAttrTweenFn($$.svgArc.bind($$)));
19036
19068
  svg.selectAll("" + $ARC.arc).style("opacity", null);
@@ -19064,30 +19096,30 @@ function getAttrTweenFn(fn) {
19064
19096
  return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;
19065
19097
  },
19066
19098
  shouldShowArcLabel: function shouldShowArcLabel() {
19067
- var _this9 = this,
19099
+ var _this10 = this,
19068
19100
  $$ = this,
19069
19101
  config = $$.config;
19070
19102
  return ["donut", "gauge", "pie", "polar"].some(function (v) {
19071
- _newArrowCheck(this, _this9);
19103
+ _newArrowCheck(this, _this10);
19072
19104
  return $$.hasType(v) && config[v + "_label_show"];
19073
19105
  }.bind(this));
19074
19106
  },
19075
19107
  getArcLabelFormat: function getArcLabelFormat() {
19076
- var _this10 = this,
19108
+ var _this11 = this,
19077
19109
  $$ = this,
19078
19110
  config = $$.config,
19079
19111
  format = function (v) {
19080
- _newArrowCheck(this, _this10);
19112
+ _newArrowCheck(this, _this11);
19081
19113
  return v;
19082
19114
  }.bind(this);
19083
19115
  ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$)).forEach(function (v) {
19084
- _newArrowCheck(this, _this10);
19116
+ _newArrowCheck(this, _this11);
19085
19117
  format = config[v + "_label_format"];
19086
19118
  }.bind(this));
19087
19119
  return isFunction(format) ? format.bind($$.api) : format;
19088
19120
  },
19089
19121
  updateTargetsForArc: function updateTargetsForArc(targets) {
19090
- var _this11 = this,
19122
+ var _this12 = this,
19091
19123
  $$ = this,
19092
19124
  $el = $$.$el,
19093
19125
  hasGauge = $$.hasType("gauge"),
@@ -19096,7 +19128,7 @@ function getAttrTweenFn(fn) {
19096
19128
  classFocus = $$.classFocus.bind($$),
19097
19129
  chartArcs = $el.main.select("." + $ARC.chartArcs),
19098
19130
  mainPieUpdate = chartArcs.selectAll("." + $ARC.chartArc).data($$.pie(targets)).attr("class", function (d) {
19099
- _newArrowCheck(this, _this11);
19131
+ _newArrowCheck(this, _this12);
19100
19132
  return classChartArc(d) + classFocus(d.data);
19101
19133
  }.bind(this)),
19102
19134
  mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc).call(this.setCssRule(!1, "." + $ARC.chartArcs + " text", ["pointer-events:none", "text-anchor:middle"]));
@@ -19163,7 +19195,7 @@ function getAttrTweenFn(fn) {
19163
19195
  return !1;
19164
19196
  },
19165
19197
  redrawArc: function redrawArc(duration, durationForExit, withTransform) {
19166
- var _this12 = this,
19198
+ var _this13 = this,
19167
19199
  $$ = this,
19168
19200
  config = $$.config,
19169
19201
  state = $$.state,
@@ -19173,10 +19205,10 @@ function getAttrTweenFn(fn) {
19173
19205
  mainArc = main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arc).data($$.arcData.bind($$));
19174
19206
  mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove();
19175
19207
  mainArc = mainArc.enter().append("path").attr("class", $$.getClass("arc", !0)).style("fill", function (d) {
19176
- _newArrowCheck(this, _this12);
19208
+ _newArrowCheck(this, _this13);
19177
19209
  return $$.color(d.data);
19178
19210
  }.bind(this)).style("cursor", function (d) {
19179
- _newArrowCheck(this, _this12);
19211
+ _newArrowCheck(this, _this13);
19180
19212
  return isSelectable != null && isSelectable.bind != null && isSelectable.bind($$.api)(d) ? "pointer" : null;
19181
19213
  }.bind(this)).style("opacity", "0").each(function (d) {
19182
19214
  if ($$.isGaugeType(d.data)) {
@@ -19190,19 +19222,19 @@ function getAttrTweenFn(fn) {
19190
19222
  $$.hasMultiArcGauge() && $$.redrawMultiArcGauge();
19191
19223
  }
19192
19224
  mainArc.attr("transform", function (d) {
19193
- _newArrowCheck(this, _this12);
19225
+ _newArrowCheck(this, _this13);
19194
19226
  return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : "";
19195
19227
  }.bind(this)).style("opacity", function (d) {
19196
19228
  return d === this._current ? "0" : null;
19197
19229
  }).each(function () {
19198
- _newArrowCheck(this, _this12);
19230
+ _newArrowCheck(this, _this13);
19199
19231
  state.transiting = !0;
19200
19232
  }.bind(this)).transition().duration(duration).attrTween("d", function (d) {
19201
- var _this13 = this,
19233
+ var _this14 = this,
19202
19234
  updated = $$.updateAngle(d);
19203
19235
  if (!updated) {
19204
19236
  return function () {
19205
- _newArrowCheck(this, _this13);
19237
+ _newArrowCheck(this, _this14);
19206
19238
  return "M 0 0";
19207
19239
  }.bind(this);
19208
19240
  }
@@ -19221,7 +19253,7 @@ function getAttrTweenFn(fn) {
19221
19253
  return $$.getArc(interpolated, !0);
19222
19254
  };
19223
19255
  }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) {
19224
- _newArrowCheck(this, _this12);
19256
+ _newArrowCheck(this, _this13);
19225
19257
  var color;
19226
19258
  if ($$.levelColor) {
19227
19259
  color = $$.levelColor(d.data.values[0].value);
@@ -19256,7 +19288,7 @@ function getAttrTweenFn(fn) {
19256
19288
  * @private
19257
19289
  */
19258
19290
  redrawNeedle: function redrawNeedle() {
19259
- var _this14 = this,
19291
+ var _this15 = this,
19260
19292
  $$ = this,
19261
19293
  $el = $$.$el,
19262
19294
  config = $$.config,
@@ -19276,7 +19308,7 @@ function getAttrTweenFn(fn) {
19276
19308
  bottomRy = config.arc_needle_bottom_ry,
19277
19309
  needleAngle = $$.getNeedleAngle(),
19278
19310
  updateNeedleValue = function () {
19279
- _newArrowCheck(this, _this14);
19311
+ _newArrowCheck(this, _this15);
19280
19312
  var title = $$.getArcTitleWithNeedleValue();
19281
19313
  title && $$.setArcTitle(title);
19282
19314
  }.bind(this); // needle options
@@ -19292,14 +19324,14 @@ function getAttrTweenFn(fn) {
19292
19324
  * @private
19293
19325
  */
19294
19326
  $el.needle.updateHelper = function (v, updateConfig) {
19295
- var _this15 = this;
19327
+ var _this16 = this;
19296
19328
  if (updateConfig === void 0) {
19297
19329
  updateConfig = !1;
19298
19330
  }
19299
- _newArrowCheck(this, _this14);
19331
+ _newArrowCheck(this, _this15);
19300
19332
  if ($el.needle.style("display") !== "none") {
19301
19333
  $$.$T($el.needle).style("transform", "rotate(" + $$.getNeedleAngle(v) + "deg)").call(endall, function () {
19302
- _newArrowCheck(this, _this15);
19334
+ _newArrowCheck(this, _this16);
19303
19335
  updateConfig && (config.arc_needle_value = v);
19304
19336
  updateNeedleValue();
19305
19337
  }.bind(this));
@@ -19345,7 +19377,7 @@ function getAttrTweenFn(fn) {
19345
19377
  return (startingAngle + radian) * (180 / Math.PI);
19346
19378
  },
19347
19379
  redrawBackgroundArcs: function redrawBackgroundArcs() {
19348
- var _this16 = this,
19380
+ var _this17 = this,
19349
19381
  $$ = this,
19350
19382
  config = $$.config,
19351
19383
  state = $$.state,
@@ -19359,11 +19391,11 @@ function getAttrTweenFn(fn) {
19359
19391
  var index = 0;
19360
19392
  backgroundArc = backgroundArc.selectAll("path." + $ARC.chartArcsBackground).data($$.data.targets);
19361
19393
  backgroundArc.enter().append("path").attr("class", function (d, i) {
19362
- _newArrowCheck(this, _this16);
19394
+ _newArrowCheck(this, _this17);
19363
19395
  return $ARC.chartArcsBackground + " " + $ARC.chartArcsBackground + "-" + i;
19364
- }.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
19365
- var id = _ref2.id;
19366
- _newArrowCheck(this, _this16);
19396
+ }.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref3) {
19397
+ var id = _ref3.id;
19398
+ _newArrowCheck(this, _this17);
19367
19399
  if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
19368
19400
  return "M 0 0";
19369
19401
  }
@@ -19380,7 +19412,7 @@ function getAttrTweenFn(fn) {
19380
19412
  backgroundArc.exit().remove();
19381
19413
  } else {
19382
19414
  backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : function () {
19383
- _newArrowCheck(this, _this16);
19415
+ _newArrowCheck(this, _this17);
19384
19416
  var d = {
19385
19417
  data: [{
19386
19418
  value: config.gauge_max
@@ -19393,7 +19425,7 @@ function getAttrTweenFn(fn) {
19393
19425
  }
19394
19426
  },
19395
19427
  bindArcEvent: function bindArcEvent(arc) {
19396
- var _this17 = this,
19428
+ var _this18 = this,
19397
19429
  $$ = this,
19398
19430
  config = $$.config,
19399
19431
  state = $$.state,
@@ -19421,7 +19453,7 @@ function getAttrTweenFn(fn) {
19421
19453
  var arcData;
19422
19454
  if (updated) {
19423
19455
  arcData = $$.convertToArcData(updated);
19424
- $$.toggleShape == null ? void 0 : $$.toggleShape(this, arcData, i);
19456
+ $$.toggleShape == null || $$.toggleShape(this, arcData, i);
19425
19457
  config.data_onclick.bind($$.api)(arcData, this);
19426
19458
  }
19427
19459
  });
@@ -19441,7 +19473,7 @@ function getAttrTweenFn(fn) {
19441
19473
  selectArc(this, arcData, id);
19442
19474
  $$.setOverOut(!0, arcData);
19443
19475
  }).on("mouseout", function (event, d) {
19444
- _newArrowCheck(this, _this17);
19476
+ _newArrowCheck(this, _this18);
19445
19477
  if (state.transiting) {
19446
19478
  // skip while transiting
19447
19479
  return;
@@ -19462,7 +19494,7 @@ function getAttrTweenFn(fn) {
19462
19494
  // touch events
19463
19495
  if (isTouch && $$.hasArcType() && !$$.radars) {
19464
19496
  var getEventArc = function (event) {
19465
- _newArrowCheck(this, _this17);
19497
+ _newArrowCheck(this, _this18);
19466
19498
  var touch = event.changedTouches[0],
19467
19499
  eventArc = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(browser_doc.elementFromPoint(touch.clientX, touch.clientY));
19468
19500
  return eventArc;
@@ -19485,7 +19517,7 @@ function getAttrTweenFn(fn) {
19485
19517
  }
19486
19518
  },
19487
19519
  redrawArcText: function redrawArcText(duration) {
19488
- var _this18 = this,
19520
+ var _this19 = this,
19489
19521
  $$ = this,
19490
19522
  config = $$.config,
19491
19523
  state = $$.state,
@@ -19498,13 +19530,13 @@ function getAttrTweenFn(fn) {
19498
19530
  // for gauge type, update text when has no title & multi data
19499
19531
  if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
19500
19532
  text = main.selectAll("." + $ARC.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
19501
- _newArrowCheck(this, _this18);
19533
+ _newArrowCheck(this, _this19);
19502
19534
  return $$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null;
19503
19535
  }.bind(this)).call($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
19504
- _newArrowCheck(this, _this18);
19536
+ _newArrowCheck(this, _this19);
19505
19537
  return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? Math.round(state.radius / 5) + "px" : null;
19506
19538
  }.bind(this)).transition().duration(duration).style("opacity", function (d) {
19507
- _newArrowCheck(this, _this18);
19539
+ _newArrowCheck(this, _this19);
19508
19540
  return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0";
19509
19541
  }.bind(this));
19510
19542
  hasMultiArcGauge && text.attr("dy", "-.1em");
@@ -19530,14 +19562,14 @@ function getAttrTweenFn(fn) {
19530
19562
  * @private
19531
19563
  */
19532
19564
  getArcElementByIdOrIndex: function getArcElementByIdOrIndex(value) {
19533
- var _this19 = this,
19565
+ var _this20 = this,
19534
19566
  $$ = this,
19535
19567
  arcs = $$.$el.arcs,
19536
19568
  filterFn = isNumber(value) ? function (d) {
19537
- _newArrowCheck(this, _this19);
19569
+ _newArrowCheck(this, _this20);
19538
19570
  return d.index === value;
19539
19571
  }.bind(this) : function (d) {
19540
- _newArrowCheck(this, _this19);
19572
+ _newArrowCheck(this, _this20);
19541
19573
  return d.data.id === value;
19542
19574
  }.bind(this),
19543
19575
  _arcs;
@@ -19980,8 +20012,8 @@ function getAttrTweenFn(fn) {
19980
20012
  ;// CONCATENATED MODULE: ./src/ChartInternal/shape/candlestick.ts
19981
20013
 
19982
20014
 
19983
- function candlestick_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19984
- function candlestick_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? candlestick_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : candlestick_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20015
+ function candlestick_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20016
+ function candlestick_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? candlestick_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : candlestick_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19985
20017
  /**
19986
20018
  * Copyright (c) 2017 ~ present NAVER Corp.
19987
20019
  * billboard.js project is licensed under the MIT license
@@ -23571,8 +23603,8 @@ function setSelection(isSelection, ids, indices, resetOther) {
23571
23603
  $$.updateTargetsForSubchart($$.data.targets);
23572
23604
  $target = (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.selectAll("." + $COMMON.target);
23573
23605
  }
23574
- (_$target = $target) == null ? void 0 : _$target.style("opacity", null);
23575
- (_subchart$main2 = subchart.main) == null ? void 0 : _subchart$main2.style("display", null);
23606
+ (_$target = $target) == null || _$target.style("opacity", null);
23607
+ (_subchart$main2 = subchart.main) == null || _subchart$main2.style("display", null);
23576
23608
  this.resize();
23577
23609
  }
23578
23610
  },
@@ -23846,7 +23878,7 @@ extend(zoom, {
23846
23878
  if ($$.scale.zoom) {
23847
23879
  config.subchart_show ? $$.brush.getSelection().call($$.brush.move, null) : $$.zoom.updateTransformScale(external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_.zoomIdentity);
23848
23880
  $$.updateZoom(!0);
23849
- zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
23881
+ zoomResetBtn == null || zoomResetBtn.style("display", "none");
23850
23882
 
23851
23883
  // reset transform
23852
23884
  if ((0,external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_.zoomTransform)(eventRect.node()) !== external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_.zoomIdentity) {
@@ -23979,8 +24011,8 @@ extend(zoom, {
23979
24011
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/selection.ts
23980
24012
 
23981
24013
 
23982
- function selection_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23983
- function selection_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? selection_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : selection_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
24014
+ function selection_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24015
+ function selection_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) { t = null != arguments[r] ? arguments[r] : {}; r % 2 ? selection_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : selection_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23984
24016
  /**
23985
24017
  * Copyright (c) 2017 ~ present NAVER Corp.
23986
24018
  * billboard.js project is licensed under the MIT license
@@ -24224,7 +24256,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
24224
24256
  return isNaN(v);
24225
24257
  }.bind(this)).length === 0) {
24226
24258
  var _subchart$main;
24227
- (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.select("." + classes.brush).call(this);
24259
+ (_subchart$main = subchart.main) == null || _subchart$main.select("." + classes.brush).call(this);
24228
24260
  }
24229
24261
  return this;
24230
24262
  };
@@ -24567,7 +24599,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
24567
24599
  var isRotated = config.axis_rotated;
24568
24600
 
24569
24601
  // in case of resize, update range of orgXScale
24570
- (_org$xScale = org.xScale) == null ? void 0 : _org$xScale.range(scale.x.range());
24602
+ (_org$xScale = org.xScale) == null || _org$xScale.range(scale.x.range());
24571
24603
 
24572
24604
  // rescale from the original scale
24573
24605
  var newScale = transform[isRotated ? "rescaleY" : "rescaleX"](org.xScale || scale.x),
@@ -25195,7 +25227,7 @@ var _defaults = {};
25195
25227
 
25196
25228
  /**
25197
25229
  * @namespace bb
25198
- * @version 3.9.2
25230
+ * @version 3.9.4
25199
25231
  */
25200
25232
  var bb = {
25201
25233
  /**
@@ -25205,7 +25237,7 @@ var bb = {
25205
25237
  * bb.version; // "1.0.0"
25206
25238
  * @memberof bb
25207
25239
  */
25208
- version: "3.9.2",
25240
+ version: "3.9.4",
25209
25241
  /**
25210
25242
  * Generate chart
25211
25243
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: