billboard.js 3.14.1 → 3.14.3

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 (54) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +79 -41
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +9 -9
  5. package/dist/billboard.pkgd.js +79 -41
  6. package/dist/billboard.pkgd.min.js +9 -9
  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 +9 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +9 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +9 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +4 -4
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +9 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +9 -3
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +9 -3
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +7 -7
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +9 -3
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +9 -3
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/billboard.js +460 -420
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +4 -4
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +88 -15
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +86 -13
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +83 -10
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +70 -7
  43. package/package.json +29 -29
  44. package/src/ChartInternal/Axis/Axis.ts +23 -0
  45. package/src/ChartInternal/data/data.ts +5 -4
  46. package/src/ChartInternal/interactions/interaction.ts +1 -1
  47. package/src/ChartInternal/interactions/subchart.ts +2 -25
  48. package/src/ChartInternal/interactions/zoom.ts +21 -0
  49. package/src/ChartInternal/internals/tooltip.ts +25 -15
  50. package/src/config/Options/axis/x.ts +2 -1
  51. package/src/config/Options/shape/gauge.ts +3 -2
  52. package/src/module/util.ts +10 -2
  53. package/types/axis.d.ts +2 -2
  54. package/types/options.shape.d.ts +3 -2
@@ -5,20 +5,20 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.1
8
+ * @version 3.14.3
9
9
  */
10
10
  import { pointer, select, namespaces, selectAll } from 'd3-selection';
11
11
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
12
12
  import { brushSelection, brushY, brushX } from 'd3-brush';
13
- import { tsvParse, tsvParseRows, csvParse, csvParseRows } from 'd3-dsv';
13
+ import { csvParseRows, csvParse, tsvParseRows, tsvParse } from 'd3-dsv';
14
14
  import { drag as drag$1 } from 'd3-drag';
15
- import { scaleOrdinal, scaleLinear, scaleUtc, scaleTime, scaleLog, scaleSymlog } from 'd3-scale';
15
+ import { scaleOrdinal, scaleLinear, scaleSymlog, scaleLog, scaleTime, scaleUtc } from 'd3-scale';
16
16
  import { transition } from 'd3-transition';
17
- import { curveStepBefore, curveStepAfter, curveStep, curveLinear, curveLinearClosed, curveNatural, curveMonotoneY, curveMonotoneX, curveCatmullRomOpen, curveCatmullRomClosed, curveCatmullRom, curveCardinalOpen, curveCardinalClosed, curveCardinal, curveBundle, curveBasisOpen, curveBasisClosed, curveBasis, arc, pie as pie$1, area as area$1, line as line$1 } from 'd3-shape';
17
+ import { curveBasis, curveBasisClosed, curveBasisOpen, curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveMonotoneX, curveMonotoneY, curveNatural, curveLinearClosed, curveLinear, curveStep, curveStepAfter, curveStepBefore, pie as pie$1, arc, area as area$1, line as line$1 } from 'd3-shape';
18
18
  import { axisLeft, axisBottom, axisTop, axisRight } from 'd3-axis';
19
19
  import { easeLinear } from 'd3-ease';
20
20
  import { interpolate } from 'd3-interpolate';
21
- import { hierarchy, treemapResquarify, treemapSquarify, treemapSliceDice, treemapSlice, treemapDice, treemapBinary, treemap as treemap$1 } from 'd3-hierarchy';
21
+ import { treemap as treemap$1, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, hierarchy } from 'd3-hierarchy';
22
22
  import { zoomIdentity, zoomTransform, zoom as zoom$2 } from 'd3-zoom';
23
23
 
24
24
  /******************************************************************************
@@ -2174,10 +2174,10 @@ function getGlobal() {
2174
2174
  * @private
2175
2175
  */
2176
2176
  function getFallback(w) {
2177
- var hasRAF = typeof (w === null || w === void 0 ? void 0 : w.requestAnimationFrame) === "function" &&
2178
- typeof (w === null || w === void 0 ? void 0 : w.cancelAnimationFrame) === "function";
2179
- var hasRIC = typeof (w === null || w === void 0 ? void 0 : w.requestIdleCallback) === "function" &&
2180
- typeof (w === null || w === void 0 ? void 0 : w.cancelIdleCallback) === "function";
2177
+ var hasRAF = typeof (w === null || w === undefined ? undefined : w.requestAnimationFrame) === "function" &&
2178
+ typeof (w === null || w === undefined ? undefined : w.cancelAnimationFrame) === "function";
2179
+ var hasRIC = typeof (w === null || w === undefined ? undefined : w.requestIdleCallback) === "function" &&
2180
+ typeof (w === null || w === undefined ? undefined : w.cancelIdleCallback) === "function";
2181
2181
  var request = function (cb) { return setTimeout(cb, 1); };
2182
2182
  var cancel = function (id) { return clearTimeout(id); };
2183
2183
  return [
@@ -2188,7 +2188,7 @@ function getFallback(w) {
2188
2188
  ];
2189
2189
  }
2190
2190
  var win = getGlobal();
2191
- var doc = win === null || win === void 0 ? void 0 : win.document;
2191
+ var doc = win === null || win === undefined ? undefined : win.document;
2192
2192
  var _a = getFallback(win), requestAnimationFrame = _a[0], requestIdleCallback = _a[2];
2193
2193
 
2194
2194
  var isValue = function (v) { return v || v === 0; };
@@ -2220,7 +2220,7 @@ var isArray = function (arr) { return Array.isArray(arr); };
2220
2220
  * @returns {boolean}
2221
2221
  * @private
2222
2222
  */
2223
- var isObject = function (obj) { return obj && !(obj === null || obj === void 0 ? void 0 : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
2223
+ var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
2224
2224
  /**
2225
2225
  * Get specified key value from object
2226
2226
  * If default value is given, will return if given key value not found
@@ -2308,8 +2308,8 @@ function sanitize(str) {
2308
2308
  * @private
2309
2309
  */
2310
2310
  function setTextValue(node, text, dy, toMiddle) {
2311
- if (dy === void 0) { dy = [-1, 1]; }
2312
- if (toMiddle === void 0) { toMiddle = false; }
2311
+ if (dy === undefined) { dy = [-1, 1]; }
2312
+ if (toMiddle === undefined) { toMiddle = false; }
2313
2313
  if (!node || !isString(text)) {
2314
2314
  return;
2315
2315
  }
@@ -2382,7 +2382,7 @@ function getPathBox(path) {
2382
2382
  function getPointer(event, element) {
2383
2383
  var _a;
2384
2384
  var touches = event &&
2385
- ((_a = (event.touches || (event.sourceEvent && event.sourceEvent.touches))) === null || _a === void 0 ? void 0 : _a[0]);
2385
+ ((_a = (event.touches || (event.sourceEvent && event.sourceEvent.touches))) === null || _a === undefined ? undefined : _a[0]);
2386
2386
  var pointer$1 = [0, 0];
2387
2387
  try {
2388
2388
  pointer$1 = pointer(touches || event, element);
@@ -2431,9 +2431,9 @@ function getBoundingRect(node) {
2431
2431
  * @private
2432
2432
  */
2433
2433
  function getRandom(asStr, min, max) {
2434
- if (asStr === void 0) { asStr = true; }
2435
- if (min === void 0) { min = 0; }
2436
- if (max === void 0) { max = 10000; }
2434
+ if (asStr === undefined) { asStr = true; }
2435
+ if (min === undefined) { min = 0; }
2436
+ if (max === undefined) { max = 10000; }
2437
2437
  var crpt = win.crypto || win.msCrypto;
2438
2438
  var rand = crpt ?
2439
2439
  min + crpt.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) :
@@ -2455,7 +2455,7 @@ function findIndex(arr, v, start, end, isRotated) {
2455
2455
  return -1;
2456
2456
  }
2457
2457
  var mid = Math.floor((start + end) / 2);
2458
- var _a = arr[mid], x = _a.x, _b = _a.w, w = _b === void 0 ? 0 : _b;
2458
+ var _a = arr[mid], x = _a.x, _b = _a.w, w = _b === undefined ? 0 : _b;
2459
2459
  if (isRotated) {
2460
2460
  x = arr[mid].y;
2461
2461
  w = arr[mid].h;
@@ -2515,7 +2515,7 @@ function deepClone() {
2515
2515
  * @private
2516
2516
  */
2517
2517
  function extend(target, source) {
2518
- if (target === void 0) { target = {}; }
2518
+ if (target === undefined) { target = {}; }
2519
2519
  if (isArray(source)) {
2520
2520
  source.forEach(function (v) { return extend(target, v); });
2521
2521
  }
@@ -2543,7 +2543,7 @@ var capitalize = function (str) { return str.charAt(0).toUpperCase() + str.slice
2543
2543
  * @private
2544
2544
  */
2545
2545
  function camelize(str, separator) {
2546
- if (separator === void 0) { separator = "-"; }
2546
+ if (separator === undefined) { separator = "-"; }
2547
2547
  return str.split(separator)
2548
2548
  .map(function (v, i) { return (i ? v.charAt(0).toUpperCase() + v.slice(1).toLowerCase() : v.toLowerCase()); })
2549
2549
  .join("");
@@ -2564,7 +2564,7 @@ var toArray = function (v) { return [].slice.call(v); };
2564
2564
  * @private
2565
2565
  */
2566
2566
  function addCssRules(style, selector, prop) {
2567
- var _a = style.rootSelector, rootSelector = _a === void 0 ? "" : _a, sheet = style.sheet;
2567
+ var _a = style.rootSelector, rootSelector = _a === undefined ? "" : _a, sheet = style.sheet;
2568
2568
  var getSelector = function (s) {
2569
2569
  return s
2570
2570
  .replace(/\s?(bb-)/g, ".$1")
@@ -2589,7 +2589,7 @@ function getCssRules(styleSheets) {
2589
2589
  }
2590
2590
  }
2591
2591
  catch (e) {
2592
- (_a = win.console) === null || _a === void 0 ? void 0 : _a.warn("Error while reading rules from ".concat(sheet.href, ": ").concat(e.toString()));
2592
+ (_a = win.console) === null || _a === undefined ? undefined : _a.warn("Error while reading rules from ".concat(sheet.href, ": ").concat(e.toString()));
2593
2593
  }
2594
2594
  });
2595
2595
  return rules;
@@ -2603,8 +2603,8 @@ function getCssRules(styleSheets) {
2603
2603
  function getScrollPosition(node) {
2604
2604
  var _a, _b, _c, _d, _e, _f;
2605
2605
  return {
2606
- x: ((_b = (_a = win.pageXOffset) !== null && _a !== void 0 ? _a : win.scrollX) !== null && _b !== void 0 ? _b : 0) + ((_c = node.scrollLeft) !== null && _c !== void 0 ? _c : 0),
2607
- y: ((_e = (_d = win.pageYOffset) !== null && _d !== void 0 ? _d : win.scrollY) !== null && _e !== void 0 ? _e : 0) + ((_f = node.scrollTop) !== null && _f !== void 0 ? _f : 0)
2606
+ x: ((_b = (_a = win.pageXOffset) !== null && _a !== undefined ? _a : win.scrollX) !== null && _b !== undefined ? _b : 0) + ((_c = node.scrollLeft) !== null && _c !== undefined ? _c : 0),
2607
+ y: ((_e = (_d = win.pageYOffset) !== null && _d !== undefined ? _d : win.scrollY) !== null && _e !== undefined ? _e : 0) + ((_f = node.scrollTop) !== null && _f !== undefined ? _f : 0)
2608
2608
  };
2609
2609
  }
2610
2610
  /**
@@ -2616,12 +2616,18 @@ function getScrollPosition(node) {
2616
2616
  * @returns {object}
2617
2617
  */
2618
2618
  function getTransformCTM(node, x, y, inverse) {
2619
- if (x === void 0) { x = 0; }
2620
- if (y === void 0) { y = 0; }
2621
- if (inverse === void 0) { inverse = true; }
2619
+ if (x === undefined) { x = 0; }
2620
+ if (y === undefined) { y = 0; }
2621
+ if (inverse === undefined) { inverse = true; }
2622
2622
  var point = new DOMPoint(x, y);
2623
2623
  var screen = node.getScreenCTM();
2624
- return point.matrixTransform(inverse ? screen === null || screen === void 0 ? void 0 : screen.inverse() : screen);
2624
+ var res = point.matrixTransform(inverse ? screen === null || screen === undefined ? undefined : screen.inverse() : screen);
2625
+ if (inverse === false) {
2626
+ var rect = node.getBoundingClientRect();
2627
+ res.x -= rect.x;
2628
+ res.y -= rect.y;
2629
+ }
2630
+ return res;
2625
2631
  }
2626
2632
  /**
2627
2633
  * Gets the SVGMatrix of an SVGGElement
@@ -2685,7 +2691,7 @@ function mergeObj(target) {
2685
2691
  }
2686
2692
  });
2687
2693
  }
2688
- return mergeObj.apply(void 0, __spreadArray([target], objectN, false));
2694
+ return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
2689
2695
  }
2690
2696
  /**
2691
2697
  * Sort value
@@ -2695,7 +2701,7 @@ function mergeObj(target) {
2695
2701
  * @private
2696
2702
  */
2697
2703
  function sortValue(data, isAsc) {
2698
- if (isAsc === void 0) { isAsc = true; }
2704
+ if (isAsc === undefined) { isAsc = true; }
2699
2705
  var fn;
2700
2706
  if (data[0] instanceof Date) {
2701
2707
  fn = isAsc ? function (a, b) { return a - b; } : function (a, b) { return b - a; };
@@ -2741,7 +2747,7 @@ function getMinMax$1(type, data) {
2741
2747
  * @private
2742
2748
  */
2743
2749
  var getRange = function (start, end, step) {
2744
- if (step === void 0) { step = 1; }
2750
+ if (step === undefined) { step = 1; }
2745
2751
  var res = [];
2746
2752
  var n = Math.max(0, Math.ceil((end - start) / step)) | 0;
2747
2753
  for (var i = start; i < n; i++) {
@@ -2771,7 +2777,7 @@ var emulateEvent = {
2771
2777
  catch (_a) {
2772
2778
  // Polyfills DOM4 MouseEvent
2773
2779
  return function (el, eventType, params) {
2774
- if (params === void 0) { params = getParams(); }
2780
+ if (params === undefined) { params = getParams(); }
2775
2781
  var mouseEvent = doc.createEvent("MouseEvent");
2776
2782
  // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
2777
2783
  mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
@@ -2830,7 +2836,7 @@ function parseDate(date) {
2830
2836
  var _b = this, config = _b.config, format = _b.format;
2831
2837
  // if fails to parse, try by new Date()
2832
2838
  // https://github.com/naver/billboard.js/issues/1714
2833
- parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== void 0 ? _a : new Date(date);
2839
+ parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== undefined ? _a : new Date(date);
2834
2840
  }
2835
2841
  else if (isNumber(date) && !isNaN(date)) {
2836
2842
  parsedDate = new Date(+date);
@@ -2858,7 +2864,7 @@ function hasViewBox(svg) {
2858
2864
  * @returns {boolean}
2859
2865
  */
2860
2866
  function hasStyle(node, condition, all) {
2861
- if (all === void 0) { all = false; }
2867
+ if (all === undefined) { all = false; }
2862
2868
  var isD3Node = !!node.node;
2863
2869
  var has = false;
2864
2870
  for (var _i = 0, _a = Object.entries(condition); _i < _a.length; _i++) {
@@ -2876,7 +2882,7 @@ function hasStyle(node, condition, all) {
2876
2882
  * @private
2877
2883
  */
2878
2884
  function isTabVisible() {
2879
- return (doc === null || doc === void 0 ? void 0 : doc.hidden) === false || (doc === null || doc === void 0 ? void 0 : doc.visibilityState) === "visible";
2885
+ return (doc === null || doc === undefined ? undefined : doc.hidden) === false || (doc === null || doc === undefined ? undefined : doc.visibilityState) === "visible";
2880
2886
  }
2881
2887
  /**
2882
2888
  * Get the current input type
@@ -2888,7 +2894,7 @@ function isTabVisible() {
2888
2894
  function convertInputType(mouse, touch) {
2889
2895
  var DocumentTouch = win.DocumentTouch, matchMedia = win.matchMedia, navigator = win.navigator;
2890
2896
  // https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pointer#coarse
2891
- var hasPointerCoarse = matchMedia === null || matchMedia === void 0 ? void 0 : matchMedia("(pointer:coarse)").matches;
2897
+ var hasPointerCoarse = matchMedia === null || matchMedia === undefined ? undefined : matchMedia("(pointer:coarse)").matches;
2892
2898
  var hasTouch = false;
2893
2899
  if (touch) {
2894
2900
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
@@ -2915,7 +2921,7 @@ function convertInputType(mouse, touch) {
2915
2921
  }
2916
2922
  // For non-touch device, media feature condition is: '(pointer:coarse) = false' and '(pointer:fine) = true'
2917
2923
  // https://github.com/naver/billboard.js/issues/3854#issuecomment-2404183158
2918
- var hasMouse = mouse && !hasPointerCoarse && (matchMedia === null || matchMedia === void 0 ? void 0 : matchMedia("(pointer:fine)").matches);
2924
+ var hasMouse = mouse && !hasPointerCoarse && (matchMedia === null || matchMedia === undefined ? undefined : matchMedia("(pointer:fine)").matches);
2919
2925
  // fallback to 'mouse' if no input type is detected.
2920
2926
  return (hasMouse && "mouse") || (hasTouch && "touch") || "mouse";
2921
2927
  }
@@ -3225,7 +3231,7 @@ var Cache = /** @class */ (function () {
3225
3231
  * @private
3226
3232
  */
3227
3233
  Cache.prototype.add = function (key, value, isDataType) {
3228
- if (isDataType === void 0) { isDataType = false; }
3234
+ if (isDataType === undefined) { isDataType = false; }
3229
3235
  this.cache[key] = isDataType ? this.cloneTarget(value) : value;
3230
3236
  return this.cache[key];
3231
3237
  };
@@ -3247,11 +3253,11 @@ var Cache = /** @class */ (function () {
3247
3253
  * @private
3248
3254
  */
3249
3255
  Cache.prototype.get = function (key, isDataType) {
3250
- if (isDataType === void 0) { isDataType = false; }
3256
+ if (isDataType === undefined) { isDataType = false; }
3251
3257
  // when is isDataType, key should be string array
3252
3258
  if (isDataType && Array.isArray(key)) {
3253
3259
  var targets = [];
3254
- for (var i = 0, id = void 0; (id = key[i]); i++) {
3260
+ for (var i = 0, id = undefined; (id = key[i]); i++) {
3255
3261
  if (id in this.cache) {
3256
3262
  targets.push(this.cloneTarget(this.cache[id]));
3257
3263
  }
@@ -3431,7 +3437,7 @@ function checkModuleImport(ctx) {
3431
3437
  function logError(head, tail, info) {
3432
3438
  var _a;
3433
3439
  var prefix = "[billboard.js]";
3434
- var hasConsole = (_a = win.console) === null || _a === void 0 ? void 0 : _a.error;
3440
+ var hasConsole = (_a = win.console) === null || _a === undefined ? undefined : _a.error;
3435
3441
  if (hasConsole) {
3436
3442
  var tailMsg = ["background:red;color:white;display:block;font-size:15px", tail] ;
3437
3443
  console.error.apply(console, __spreadArray(["\u274C ".concat(prefix, " ").concat(head), "background:red;color:white;display:block;font-size:15px"], tailMsg, false));
@@ -3491,8 +3497,8 @@ function generateWait() {
3491
3497
  function loop() {
3492
3498
  var _a;
3493
3499
  var done = 0;
3494
- for (var i = 0, t = void 0; (t = transitionsToWait[i]); i++) {
3495
- if (t === true || ((_a = t.empty) === null || _a === void 0 ? void 0 : _a.call(t))) {
3500
+ for (var i = 0, t = undefined; (t = transitionsToWait[i]); i++) {
3501
+ if (t === true || ((_a = t.empty) === null || _a === undefined ? undefined : _a.call(t))) {
3496
3502
  done++;
3497
3503
  continue;
3498
3504
  }
@@ -3511,7 +3517,7 @@ function generateWait() {
3511
3517
  return done === transitionsToWait.length;
3512
3518
  }
3513
3519
  runUntil(function () {
3514
- callback === null || callback === void 0 ? void 0 : callback();
3520
+ callback === null || callback === undefined ? undefined : callback();
3515
3521
  }, loop);
3516
3522
  };
3517
3523
  f.add = function (t) {
@@ -3540,7 +3546,7 @@ function getObjectURL(fn, depsFn) {
3540
3546
  if (!(key in blob)) {
3541
3547
  // Web Worker body
3542
3548
  blob[key] = new win.Blob([
3543
- "".concat((_a = depsFn === null || depsFn === void 0 ? void 0 : depsFn.map(String).join(";")) !== null && _a !== void 0 ? _a : "", "\n\n\t\t\tself.onmessage=function({data}) {\n\t\t\t\tconst result = (").concat(fnString, ").apply(null, data);\n\t\t\t\tself.postMessage(result);\n\t\t\t};")
3549
+ "".concat((_a = depsFn === null || depsFn === undefined ? undefined : depsFn.map(String).join(";")) !== null && _a !== undefined ? _a : "", "\n\n\t\t\tself.onmessage=function({data}) {\n\t\t\t\tconst result = (").concat(fnString, ").apply(null, data);\n\t\t\t\tself.postMessage(result);\n\t\t\t};")
3544
3550
  ], {
3545
3551
  type: "text/javascript"
3546
3552
  });
@@ -3586,13 +3592,13 @@ function getWorker(src) {
3586
3592
  * @private
3587
3593
  */
3588
3594
  function runWorker(useWorker, fn, callback, depsFn) {
3589
- if (useWorker === void 0) { useWorker = true; }
3595
+ if (useWorker === undefined) { useWorker = true; }
3590
3596
  var runFn = function () {
3591
3597
  var args = [];
3592
3598
  for (var _i = 0; _i < arguments.length; _i++) {
3593
3599
  args[_i] = arguments[_i];
3594
3600
  }
3595
- var res = fn.apply(void 0, args);
3601
+ var res = fn.apply(undefined, args);
3596
3602
  callback(res);
3597
3603
  };
3598
3604
  if (win.Worker && useWorker) {
@@ -3724,7 +3730,7 @@ function json(json, keysParam) {
3724
3730
  Object.keys(json).forEach(function (key) {
3725
3731
  var _a;
3726
3732
  var tmp = json[key].concat();
3727
- (_a = tmp.unshift) === null || _a === void 0 ? void 0 : _a.call(tmp, key);
3733
+ (_a = tmp.unshift) === null || _a === undefined ? undefined : _a.call(tmp, key);
3728
3734
  newRows.push(tmp);
3729
3735
  });
3730
3736
  data = columns(newRows);
@@ -3742,7 +3748,7 @@ function json(json, keysParam) {
3742
3748
  * @private
3743
3749
  */
3744
3750
  function url(url, mimeType, headers, keys, done) {
3745
- if (mimeType === void 0) { mimeType = "csv"; }
3751
+ if (mimeType === undefined) { mimeType = "csv"; }
3746
3752
  var req = new XMLHttpRequest();
3747
3753
  var converter = { csv: csv, tsv: tsv, json: json };
3748
3754
  req.open("GET", url);
@@ -3810,8 +3816,8 @@ function tsv(tsv) {
3810
3816
  * @private
3811
3817
  */
3812
3818
  function getDataKeyForJson(keysParam, config) {
3813
- var keys = keysParam || (config === null || config === void 0 ? void 0 : config.data_keys);
3814
- if (keys === null || keys === void 0 ? void 0 : keys.x) {
3819
+ var keys = keysParam || (config === null || config === undefined ? undefined : config.data_keys);
3820
+ if (keys === null || keys === undefined ? undefined : keys.x) {
3815
3821
  config.data_x = keys.x;
3816
3822
  }
3817
3823
  return keys;
@@ -3969,7 +3975,7 @@ var dataConvert = {
3969
3975
  // indexing each value
3970
3976
  t.values.forEach(function (v, i) { return (v.index = i); });
3971
3977
  // this needs to be sorted because its index and value.index is identical
3972
- (_a = $$.data.xs[t.id]) === null || _a === void 0 ? void 0 : _a.sort(function (v1, v2) { return v1 - v2; });
3978
+ (_a = $$.data.xs[t.id]) === null || _a === undefined ? undefined : _a.sort(function (v1, v2) { return v1 - v2; });
3973
3979
  });
3974
3980
  // cache information about values
3975
3981
  state.hasNegativeValue = $$.hasNegativeValueInTargets(targets);
@@ -4096,7 +4102,7 @@ var data$1 = {
4096
4102
  * @private
4097
4103
  */
4098
4104
  getAllValuesOnIndex: function (index, filterNull) {
4099
- if (filterNull === void 0) { filterNull = false; }
4105
+ if (filterNull === undefined) { filterNull = false; }
4100
4106
  var $$ = this;
4101
4107
  var value = $$.filterTargetsToShow($$.data.targets)
4102
4108
  .map(function (t) { return $$.addName($$.getValueOnIndex(t.values, index)); });
@@ -4127,12 +4133,12 @@ var data$1 = {
4127
4133
  generateTargetX: function (rawX, id, index) {
4128
4134
  var $$ = this;
4129
4135
  var axis = $$.axis;
4130
- var x = (axis === null || axis === void 0 ? void 0 : axis.isCategorized()) ? index : (rawX || index);
4131
- if (axis === null || axis === void 0 ? void 0 : axis.isTimeSeries()) {
4136
+ var x = (axis === null || axis === undefined ? undefined : axis.isCategorized()) ? index : (rawX || index);
4137
+ if (axis === null || axis === undefined ? undefined : axis.isTimeSeries()) {
4132
4138
  var fn = parseDate.bind($$);
4133
4139
  x = rawX ? fn(rawX) : fn($$.getXValue(id, index));
4134
4140
  }
4135
- else if ((axis === null || axis === void 0 ? void 0 : axis.isCustomX()) && !(axis === null || axis === void 0 ? void 0 : axis.isCategorized())) {
4141
+ else if ((axis === null || axis === undefined ? undefined : axis.isCustomX()) && !(axis === null || axis === undefined ? undefined : axis.isCategorized())) {
4136
4142
  x = isValue(rawX) ? +rawX : $$.getXValue(id, index);
4137
4143
  }
4138
4144
  return x;
@@ -4324,7 +4330,7 @@ var data$1 = {
4324
4330
  },
4325
4331
  hasTarget: function (targets, id) {
4326
4332
  var ids = this.mapToIds(targets);
4327
- for (var i = 0, val = void 0; (val = ids[i]); i++) {
4333
+ for (var i = 0, val = undefined; (val = ids[i]); i++) {
4328
4334
  if (val === id) {
4329
4335
  return true;
4330
4336
  }
@@ -4345,9 +4351,9 @@ var data$1 = {
4345
4351
  var $$ = this;
4346
4352
  var axis = $$.axis;
4347
4353
  var xs = [];
4348
- if (targets === null || targets === void 0 ? void 0 : targets.length) {
4354
+ if (targets === null || targets === undefined ? undefined : targets.length) {
4349
4355
  xs = getUnique(mergeArray(targets.map(function (t) { return t.values.map(function (v) { return +v.x; }); })));
4350
- xs = (axis === null || axis === void 0 ? void 0 : axis.isTimeSeries()) ? xs.map(function (x) { return new Date(+x); }) : xs.map(Number);
4356
+ xs = (axis === null || axis === undefined ? undefined : axis.isTimeSeries()) ? xs.map(function (x) { return new Date(+x); }) : xs.map(Number);
4351
4357
  }
4352
4358
  return sortValue(xs);
4353
4359
  },
@@ -4480,7 +4486,7 @@ var data$1 = {
4480
4486
  * @private
4481
4487
  */
4482
4488
  getSortCompareFn: function (isReversed) {
4483
- if (isReversed === void 0) { isReversed = false; }
4489
+ if (isReversed === undefined) { isReversed = false; }
4484
4490
  var $$ = this;
4485
4491
  var config = $$.config;
4486
4492
  var order = config.data_order;
@@ -4560,13 +4566,14 @@ var data$1 = {
4560
4566
  var e = inputType === "touch" && event.changedTouches ?
4561
4567
  event.changedTouches[0] :
4562
4568
  event;
4563
- var point = isRotated ?
4564
- e.clientY + scrollPos.y - rect.top :
4565
- e.clientX + scrollPos.x - rect.left;
4569
+ var point = isRotated ? e.clientY + scrollPos.y : e.clientX + scrollPos.x;
4566
4570
  if (hasViewBox($el.svg)) {
4567
4571
  var pos = [point, 0];
4568
4572
  isRotated && pos.reverse();
4569
- point = getTransformCTM.apply(void 0, __spreadArray([$el.svg.node()], pos, false))[isRotated ? "y" : "x"];
4573
+ point = getTransformCTM.apply(undefined, __spreadArray([$el.eventRect.node()], pos, false))[isRotated ? "y" : "x"];
4574
+ }
4575
+ else {
4576
+ point -= isRotated ? rect.top : rect.left;
4570
4577
  }
4571
4578
  index = findIndex(coords, point, 0, coords.length - 1, isRotated);
4572
4579
  }
@@ -4724,9 +4731,9 @@ var data$1 = {
4724
4731
  return current;
4725
4732
  },
4726
4733
  getRangedData: function (d, key, type) {
4727
- if (key === void 0) { key = ""; }
4728
- if (type === void 0) { type = "areaRange"; }
4729
- var value = d === null || d === void 0 ? void 0 : d.value;
4734
+ if (key === undefined) { key = ""; }
4735
+ if (type === undefined) { type = "areaRange"; }
4736
+ var value = d === null || d === undefined ? undefined : d.value;
4730
4737
  if (isArray(value)) {
4731
4738
  if (type === "bar") {
4732
4739
  return value.reduce(function (a, c) { return c - a; });
@@ -4770,7 +4777,7 @@ var data$1 = {
4770
4777
  * @private
4771
4778
  */
4772
4779
  getRatio: function (type, d, asPercent) {
4773
- if (asPercent === void 0) { asPercent = false; }
4780
+ if (asPercent === undefined) { asPercent = false; }
4774
4781
  var $$ = this;
4775
4782
  var config = $$.config, state = $$.state;
4776
4783
  var api = $$.api;
@@ -4876,7 +4883,7 @@ var data$1 = {
4876
4883
  getDataById: function (id) {
4877
4884
  var _a;
4878
4885
  var d = this.cache.get(id) || this.api.data(id);
4879
- return (_a = d === null || d === void 0 ? void 0 : d[0]) !== null && _a !== void 0 ? _a : d;
4886
+ return (_a = d === null || d === undefined ? undefined : d[0]) !== null && _a !== undefined ? _a : d;
4880
4887
  }
4881
4888
  };
4882
4889
 
@@ -4891,11 +4898,11 @@ var data$1 = {
4891
4898
  * @private
4892
4899
  */
4893
4900
  function callDone(fn, resizeAfter) {
4894
- if (resizeAfter === void 0) { resizeAfter = false; }
4901
+ if (resizeAfter === undefined) { resizeAfter = false; }
4895
4902
  var $$ = this;
4896
4903
  var api = $$.api;
4897
4904
  resizeAfter && $$.api.flush(true);
4898
- fn === null || fn === void 0 ? void 0 : fn.call(api);
4905
+ fn === null || fn === undefined ? undefined : fn.call(api);
4899
4906
  }
4900
4907
  var dataLoad = {
4901
4908
  load: function (rawTargets, args) {
@@ -4917,7 +4924,7 @@ var dataLoad = {
4917
4924
  if (args.type || args.types) {
4918
4925
  targets.forEach(function (t) {
4919
4926
  var _a;
4920
- var type = ((_a = args.types) === null || _a === void 0 ? void 0 : _a[t.id]) || args.type;
4927
+ var type = ((_a = args.types) === null || _a === undefined ? undefined : _a[t.id]) || args.type;
4921
4928
  $$.setTargetType(t.id, type);
4922
4929
  });
4923
4930
  }
@@ -4993,7 +5000,7 @@ var dataLoad = {
4993
5000
  var _a;
4994
5001
  var $$ = this;
4995
5002
  var state = $$.state, $el = $$.$el, $T = $$.$T;
4996
- var hasLegendDefsPoint = !!((_a = $$.hasLegendDefsPoint) === null || _a === void 0 ? void 0 : _a.call($$));
5003
+ var hasLegendDefsPoint = !!((_a = $$.hasLegendDefsPoint) === null || _a === undefined ? undefined : _a.call($$));
4997
5004
  var done = customDoneCb;
4998
5005
  var targetIds = rawTargetIds;
4999
5006
  // reset internally cached data
@@ -5025,7 +5032,7 @@ var dataLoad = {
5025
5032
  // Remove target
5026
5033
  $$.data.targets = $$.data.targets.filter(function (t) { return t.id !== id; });
5027
5034
  // Remove custom point def element
5028
- hasLegendDefsPoint && ((_a = $el.defs) === null || _a === void 0 ? void 0 : _a.select("#".concat($$.getDefsPointId(suffixId))).remove());
5035
+ hasLegendDefsPoint && ((_a = $el.defs) === null || _a === undefined ? undefined : _a.select("#".concat($$.getDefsPointId(suffixId))).remove());
5029
5036
  });
5030
5037
  // since treemap uses different data types, it needs to be transformed
5031
5038
  state.hasFunnel && $$.updateFunnel($$.data.targets);
@@ -5065,7 +5072,7 @@ var interaction = {
5065
5072
  * @private
5066
5073
  */
5067
5074
  expandBarTypeShapes: function (expand, i, id, reset) {
5068
- if (expand === void 0) { expand = true; }
5075
+ if (expand === undefined) { expand = true; }
5069
5076
  var $$ = this;
5070
5077
  ["bar", "candlestick"]
5071
5078
  .filter(function (v) { return $$.$el[v]; })
@@ -5186,7 +5193,7 @@ var interaction = {
5186
5193
  var $$ = this;
5187
5194
  var config = $$.config, _c = $$.state, eventReceiver = _c.eventReceiver, hasAxis = _c.hasAxis, hasFunnel = _c.hasFunnel, hasRadar = _c.hasRadar, hasTreemap = _c.hasTreemap, _d = $$.$el, eventRect = _d.eventRect, funnel = _d.funnel, radar = _d.radar, svg = _d.svg, treemap = _d.treemap;
5188
5195
  var element = (_b = (((hasFunnel || hasTreemap) && eventReceiver.rect) ||
5189
- (hasRadar && radar.axes.select(".".concat($AXIS.axis, "-").concat(index, " text"))) || (eventRect || ((_a = $$.getArcElementByIdOrIndex) === null || _a === void 0 ? void 0 : _a.call($$, index))))) === null || _b === void 0 ? void 0 : _b.node();
5196
+ (hasRadar && radar.axes.select(".".concat($AXIS.axis, "-").concat(index, " text"))) || (eventRect || ((_a = $$.getArcElementByIdOrIndex) === null || _a === undefined ? undefined : _a.call($$, index))))) === null || _b === undefined ? undefined : _b.node();
5190
5197
  if (element) {
5191
5198
  var isMultipleX = $$.isMultipleX();
5192
5199
  var isRotated = config.axis_rotated;
@@ -5208,7 +5215,7 @@ var interaction = {
5208
5215
  // value 4, is to adjust coordinate value set from: scale.ts - updateScales(): $$.getResettedPadding(1)
5209
5216
  var y = top_1 + (mouse ? mouse[1] : 0) + (isRotated ? 4 : 0);
5210
5217
  if (hasViewBox(svg)) {
5211
- var ctm = getTransformCTM($$.$el.svg.node(), x, y, false);
5218
+ var ctm = getTransformCTM($$.$el.eventRect.node(), x, y, false);
5212
5219
  x = ctm.x;
5213
5220
  y = ctm.y;
5214
5221
  }
@@ -5221,7 +5228,7 @@ var interaction = {
5221
5228
  };
5222
5229
  // for funnel and treemap event bound to <g> node
5223
5230
  if (hasFunnel || hasTreemap) {
5224
- element = (funnel !== null && funnel !== void 0 ? funnel : treemap).node();
5231
+ element = (funnel !== null && funnel !== undefined ? funnel : treemap).node();
5225
5232
  }
5226
5233
  emulateEvent[/^(mouse|click)/.test(type) ? "mouse" : "touch"](element, type, params);
5227
5234
  }
@@ -5236,8 +5243,8 @@ var interaction = {
5236
5243
  unbindZoomEvent: function () {
5237
5244
  var $$ = this;
5238
5245
  var _a = $$.$el, eventRect = _a.eventRect, zoomResetBtn = _a.zoomResetBtn;
5239
- eventRect === null || eventRect === void 0 ? void 0 : eventRect.on(".zoom wheel.zoom .drag", null);
5240
- zoomResetBtn === null || zoomResetBtn === void 0 ? void 0 : zoomResetBtn.on("click", null).style("display", "none");
5246
+ eventRect === null || eventRect === undefined ? undefined : eventRect.on(".zoom wheel.zoom .drag", null);
5247
+ zoomResetBtn === null || zoomResetBtn === undefined ? undefined : zoomResetBtn.on("click", null).style("display", "none");
5241
5248
  },
5242
5249
  /**
5243
5250
  * Unbind all attached events
@@ -5269,14 +5276,14 @@ var interaction = {
5269
5276
  [
5270
5277
  svg,
5271
5278
  eventRect,
5272
- region === null || region === void 0 ? void 0 : region.list,
5273
- brush === null || brush === void 0 ? void 0 : brush.getSelection(),
5274
- arcs === null || arcs === void 0 ? void 0 : arcs.selectAll("path"),
5275
- legend === null || legend === void 0 ? void 0 : legend.selectAll("g"),
5279
+ region === null || region === undefined ? undefined : region.list,
5280
+ brush === null || brush === undefined ? undefined : brush.getSelection(),
5281
+ arcs === null || arcs === undefined ? undefined : arcs.selectAll("path"),
5282
+ legend === null || legend === undefined ? undefined : legend.selectAll("g"),
5276
5283
  treemap
5277
5284
  ]
5278
- .forEach(function (v) { return v === null || v === void 0 ? void 0 : v.on(list, null); });
5279
- (_a = $$.unbindZoomEvent) === null || _a === void 0 ? void 0 : _a.call($$);
5285
+ .forEach(function (v) { return v === null || v === undefined ? undefined : v.on(list, null); });
5286
+ (_a = $$.unbindZoomEvent) === null || _a === undefined ? undefined : _a.call($$);
5280
5287
  }
5281
5288
  };
5282
5289
 
@@ -5294,7 +5301,7 @@ var category = {
5294
5301
  categoryName: function (i) {
5295
5302
  var _a;
5296
5303
  var axis_x_categories = this.config.axis_x_categories;
5297
- return (_a = axis_x_categories === null || axis_x_categories === void 0 ? void 0 : axis_x_categories[i]) !== null && _a !== void 0 ? _a : i;
5304
+ return (_a = axis_x_categories === null || axis_x_categories === undefined ? undefined : axis_x_categories[i]) !== null && _a !== undefined ? _a : i;
5298
5305
  }
5299
5306
  };
5300
5307
 
@@ -5340,7 +5347,7 @@ var classModule = {
5340
5347
  var ids = [];
5341
5348
  return function (d) {
5342
5349
  var _a;
5343
- var id = d.id || ((_a = d.data) === null || _a === void 0 ? void 0 : _a.id) || d;
5350
+ var id = d.id || ((_a = d.data) === null || _a === undefined ? undefined : _a.id) || d;
5344
5351
  if (ids.indexOf(id) < 0) {
5345
5352
  ids.push(id);
5346
5353
  }
@@ -5374,8 +5381,8 @@ var classModule = {
5374
5381
  .replace(/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-"); // eslint-disable-line no-control-regex
5375
5382
  },
5376
5383
  selectorTarget: function (id, prefix, postfix) {
5377
- if (prefix === void 0) { prefix = ""; }
5378
- if (postfix === void 0) { postfix = ""; }
5384
+ if (prefix === undefined) { prefix = ""; }
5385
+ if (postfix === undefined) { postfix = ""; }
5379
5386
  var target = this.getTargetSelectorSuffix(id);
5380
5387
  // select target & circle
5381
5388
  return "".concat(prefix, ".").concat(CLASS.target + target, " ").concat(postfix, ", ").concat(prefix, ".").concat(CLASS.circles + target, " ").concat(postfix);
@@ -5390,7 +5397,7 @@ var classModule = {
5390
5397
  },
5391
5398
  selectorLegends: function (ids) {
5392
5399
  var _this = this;
5393
- return (ids === null || ids === void 0 ? void 0 : ids.length) ? ids.map(function (id) { return _this.selectorLegend(id); }) : null;
5400
+ return (ids === null || ids === undefined ? undefined : ids.length) ? ids.map(function (id) { return _this.selectorLegend(id); }) : null;
5394
5401
  }
5395
5402
  };
5396
5403
 
@@ -5487,7 +5494,7 @@ var color = {
5487
5494
  return function (d) {
5488
5495
  var _a;
5489
5496
  var id = d.id ||
5490
- ((_a = d.data) === null || _a === void 0 ? void 0 : _a.id) ||
5497
+ ((_a = d.data) === null || _a === undefined ? undefined : _a.id) ||
5491
5498
  d;
5492
5499
  var isLine = $$.isTypeOf(id, ["line", "spline", "step"]) || !config.data_types[id];
5493
5500
  var color;
@@ -5544,7 +5551,7 @@ var color = {
5544
5551
  * @private
5545
5552
  */
5546
5553
  generateTextBGColorFilter: function (color, attr) {
5547
- if (attr === void 0) { attr = {
5554
+ if (attr === undefined) { attr = {
5548
5555
  x: 0,
5549
5556
  y: 0,
5550
5557
  width: 1,
@@ -5601,7 +5608,7 @@ var color = {
5601
5608
  stops: []
5602
5609
  };
5603
5610
  if (radialGradient) {
5604
- var _a = radialGradient.cx, cx = _a === void 0 ? 0.3 : _a, _b = radialGradient.cy, cy = _b === void 0 ? 0.3 : _b, _c = radialGradient.r, r = _c === void 0 ? 0.7 : _c, _d = radialGradient.stops, stops = _d === void 0 ? [[0.1, color_1, 0], [0.9, color_1, 1]] : _d;
5611
+ var _a = radialGradient.cx, cx = _a === undefined ? 0.3 : _a, _b = radialGradient.cy, cy = _b === undefined ? 0.3 : _b, _c = radialGradient.r, r = _c === undefined ? 0.7 : _c, _d = radialGradient.stops, stops = _d === undefined ? [[0.1, color_1, 0], [0.9, color_1, 1]] : _d;
5605
5612
  gradient_1.stops = stops;
5606
5613
  gradient_1.defs = defs.append("radialGradient")
5607
5614
  .attr("id", "".concat(id))
@@ -5611,7 +5618,7 @@ var color = {
5611
5618
  }
5612
5619
  else {
5613
5620
  var isRotated = config.axis_rotated;
5614
- var _e = config["".concat(supportedType, "_linearGradient")], _f = _e.x, x = _f === void 0 ? isRotated ? [1, 0] : [0, 0] : _f, _g = _e.y, y = _g === void 0 ? isRotated ? [0, 0] : [0, 1] : _g, _h = _e.stops, stops = _h === void 0 ? [[0, color_1, 1], [1, color_1, 0]] : _h;
5621
+ var _e = config["".concat(supportedType, "_linearGradient")], _f = _e.x, x = _f === undefined ? isRotated ? [1, 0] : [0, 0] : _f, _g = _e.y, y = _g === undefined ? isRotated ? [0, 0] : [0, 1] : _g, _h = _e.stops, stops = _h === undefined ? [[0, color_1, 1], [1, color_1, 0]] : _h;
5615
5622
  gradient_1.stops = stops;
5616
5623
  gradient_1.defs = defs.append("linearGradient")
5617
5624
  .attr("id", "".concat(id))
@@ -5723,7 +5730,7 @@ var domain = {
5723
5730
  if ($$.isStackNormalized()) {
5724
5731
  return [0, 100];
5725
5732
  }
5726
- var isLog = (scale === null || scale === void 0 ? void 0 : scale[axisId]) && scale[axisId].type === "log";
5733
+ var isLog = (scale === null || scale === undefined ? undefined : scale[axisId]) && scale[axisId].type === "log";
5727
5734
  var targetsByAxisId = targets.filter(function (t) { return axis.getId(t.id) === axisId; });
5728
5735
  var yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId;
5729
5736
  if (yTargets.length === 0) { // use domain of the other axis if target of axisId is none
@@ -5823,7 +5830,7 @@ var domain = {
5823
5830
  var configValue = $$.config["axis_x_".concat(type)];
5824
5831
  var dataValue = getMinMax$1(type, targets.map(function (t) { return getMinMax$1(type, t.values.map(function (v) { return v.x; })); }));
5825
5832
  var value = isObject(configValue) ? configValue.value : configValue;
5826
- value = isDefined(value) && ((_a = $$.axis) === null || _a === void 0 ? void 0 : _a.isTimeSeries()) ? parseDate.bind(this)(value) : value;
5833
+ value = isDefined(value) && ((_a = $$.axis) === null || _a === undefined ? undefined : _a.isTimeSeries()) ? parseDate.bind(this)(value) : value;
5827
5834
  if (isObject(configValue) && configValue.fit && ((type === "min" && value < dataValue) || (type === "max" && value > dataValue))) {
5828
5835
  value = undefined;
5829
5836
  }
@@ -5856,7 +5863,7 @@ var domain = {
5856
5863
  }
5857
5864
  var _a = isNumber(padding) ?
5858
5865
  { left: padding, right: padding } :
5859
- padding, _b = _a.left, left = _b === void 0 ? defaultValue : _b, _c = _a.right, right = _c === void 0 ? defaultValue : _c;
5866
+ padding, _b = _a.left, left = _b === undefined ? defaultValue : _b, _c = _a.right, right = _c === undefined ? defaultValue : _c;
5860
5867
  // when the unit is pixel, convert pixels to axis scale value
5861
5868
  if (padding.unit === "px") {
5862
5869
  var domainLength = Math.abs(diff + (diff * 0.2));
@@ -5887,7 +5894,7 @@ var domain = {
5887
5894
  $$.getXDomainMinMax(targets, "min"),
5888
5895
  $$.getXDomainMinMax(targets, "max")
5889
5896
  ];
5890
- var _a = domain[0], min = _a === void 0 ? 0 : _a, _b = domain[1], max = _b === void 0 ? 0 : _b;
5897
+ var _a = domain[0], min = _a === undefined ? 0 : _a, _b = domain[1], max = _b === undefined ? 0 : _b;
5891
5898
  if (x.type !== "log") {
5892
5899
  var isCategorized = axis.isCategorized();
5893
5900
  var isTimeSeries = axis.isTimeSeries();
@@ -5927,7 +5934,7 @@ var domain = {
5927
5934
  org.xDomain = x.domain();
5928
5935
  // zoomEnabled && $$.zoom.updateScaleExtent();
5929
5936
  subX.domain(x.domain());
5930
- (_a = $$.brush) === null || _a === void 0 ? void 0 : _a.scale(subX);
5937
+ (_a = $$.brush) === null || _a === undefined ? undefined : _a.scale(subX);
5931
5938
  }
5932
5939
  if (withUpdateXDomain) {
5933
5940
  var domainValue = domain || (!$$.brush || brushEmpty($$)) ?
@@ -5972,8 +5979,8 @@ var domain = {
5972
5979
  * @private
5973
5980
  */
5974
5981
  getZoomDomain: function (type, getCurrent) {
5975
- if (type === void 0) { type = "zoom"; }
5976
- if (getCurrent === void 0) { getCurrent = false; }
5982
+ if (type === undefined) { type = "zoom"; }
5983
+ if (getCurrent === undefined) { getCurrent = false; }
5977
5984
  var $$ = this;
5978
5985
  var config = $$.config, scale = $$.scale, org = $$.org;
5979
5986
  var _a = getCurrent && scale[type] ? scale[type].domain() : org.xDomain, min = _a[0], max = _a[1];
@@ -6037,7 +6044,7 @@ var domain = {
6037
6044
  * @private
6038
6045
  */
6039
6046
  withinRange: function (domain, current, range) {
6040
- if (current === void 0) { current = [0, 0]; }
6047
+ if (current === undefined) { current = [0, 0]; }
6041
6048
  var $$ = this;
6042
6049
  var isInverted = $$.config.axis_x_inverted;
6043
6050
  var _a = range, min = _a[0], max = _a[1];
@@ -6157,9 +6164,9 @@ function getLegendColor(id) {
6157
6164
  */
6158
6165
  function getFormattedText(id, formatted) {
6159
6166
  var _a;
6160
- if (formatted === void 0) { formatted = true; }
6167
+ if (formatted === undefined) { formatted = true; }
6161
6168
  var config = this.config;
6162
- var text = (_a = config.data_names[id]) !== null && _a !== void 0 ? _a : id;
6169
+ var text = (_a = config.data_names[id]) !== null && _a !== undefined ? _a : id;
6163
6170
  if (formatted && isFunction(config.legend_format)) {
6164
6171
  text = config.legend_format(text, id !== text ? id : undefined);
6165
6172
  }
@@ -6214,7 +6221,7 @@ var legend$1 = {
6214
6221
  $$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions);
6215
6222
  }
6216
6223
  // toggle legend state
6217
- (_a = $el.legend) === null || _a === void 0 ? void 0 : _a.selectAll(".".concat($LEGEND.legendItem)).classed($LEGEND.legendItemHidden, function (id) {
6224
+ (_a = $el.legend) === null || _a === undefined ? undefined : _a.selectAll(".".concat($LEGEND.legendItem)).classed($LEGEND.legendItemHidden, function (id) {
6218
6225
  var hide = !$$.isTargetToShow(id);
6219
6226
  if (hide) {
6220
6227
  this.style.opacity = null;
@@ -6365,7 +6372,7 @@ var legend$1 = {
6365
6372
  var _a;
6366
6373
  var $$ = this;
6367
6374
  var _b = $$.state, current = _b.current, isLegendRight = _b.isLegendRight, legendItemHeight = _b.legendItemHeight, legendStep = _b.legendStep;
6368
- var isFitPadding = ((_a = $$.config.padding) === null || _a === void 0 ? void 0 : _a.mode) === "fit";
6375
+ var isFitPadding = ((_a = $$.config.padding) === null || _a === undefined ? undefined : _a.mode) === "fit";
6369
6376
  var height = $$.config.legend_show ?
6370
6377
  (isLegendRight ? current.height : (Math.max(isFitPadding ? 10 : 20, legendItemHeight)) * (legendStep + 1)) :
6371
6378
  0;
@@ -6909,7 +6916,7 @@ var legend$1 = {
6909
6916
  var redraw = {
6910
6917
  redraw: function (options) {
6911
6918
  var _a, _b, _c, _d;
6912
- if (options === void 0) { options = {}; }
6919
+ if (options === undefined) { options = {}; }
6913
6920
  var $$ = this;
6914
6921
  var config = $$.config, state = $$.state, $el = $$.$el;
6915
6922
  var main = $el.main, treemap = $el.treemap;
@@ -6920,7 +6927,7 @@ var redraw = {
6920
6927
  var duration = wth.Transition ? config.transition_duration : 0;
6921
6928
  var durationForExit = wth.TransitionForExit ? duration : 0;
6922
6929
  var durationForAxis = wth.TransitionForAxis ? duration : 0;
6923
- var transitions = (_a = $$.axis) === null || _a === void 0 ? void 0 : _a.generateTransitions(durationForAxis);
6930
+ var transitions = (_a = $$.axis) === null || _a === undefined ? undefined : _a.generateTransitions(durationForAxis);
6924
6931
  $$.updateSizes(initializing);
6925
6932
  // update legend and transform each g
6926
6933
  if (wth.Legend && config.legend_show) {
@@ -6960,7 +6967,7 @@ var redraw = {
6960
6967
  // event rects will redrawn when flow called
6961
6968
  if (config.interaction_enabled && !flow && wth.EventRect) {
6962
6969
  $$.redrawEventRect();
6963
- (_b = $$.bindZoomEvent) === null || _b === void 0 ? void 0 : _b.call($$);
6970
+ (_b = $$.bindZoomEvent) === null || _b === undefined ? undefined : _b.call($$);
6964
6971
  }
6965
6972
  }
6966
6973
  else {
@@ -6978,13 +6985,13 @@ var redraw = {
6978
6985
  if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
6979
6986
  $$.updateCircle();
6980
6987
  }
6981
- else if ((_c = $$.hasLegendDefsPoint) === null || _c === void 0 ? void 0 : _c.call($$)) {
6988
+ else if ((_c = $$.hasLegendDefsPoint) === null || _c === undefined ? undefined : _c.call($$)) {
6982
6989
  $$.data.targets.forEach($$.point("create", this));
6983
6990
  }
6984
6991
  // text
6985
6992
  $$.hasDataLabel() && !$$.hasArcType(null, ["radar"]) && $$.updateText();
6986
6993
  // title
6987
- (_d = $$.redrawTitle) === null || _d === void 0 ? void 0 : _d.call($$);
6994
+ (_d = $$.redrawTitle) === null || _d === undefined ? undefined : _d.call($$);
6988
6995
  initializing && $$.updateTypesElements();
6989
6996
  $$.generateRedrawList(targetsToShow, flow, duration, wth.Subchart);
6990
6997
  $$.updateTooltipOnRedraw();
@@ -7023,7 +7030,7 @@ var redraw = {
7023
7030
  state.redrawing = false;
7024
7031
  callFn(config.onrendered, $$.api);
7025
7032
  };
7026
- if (afterRedraw) {
7033
+ {
7027
7034
  // Only use transition when current tab is visible.
7028
7035
  if (withTransition && redrawList.length) {
7029
7036
  // Wait for end of transitions for callback
@@ -7080,7 +7087,7 @@ var redraw = {
7080
7087
  return list;
7081
7088
  },
7082
7089
  updateAndRedraw: function (options) {
7083
- if (options === void 0) { options = {}; }
7090
+ if (options === undefined) { options = {}; }
7084
7091
  var $$ = this;
7085
7092
  var config = $$.config, state = $$.state;
7086
7093
  var transitions;
@@ -7122,7 +7129,7 @@ var redraw = {
7122
7129
  * @private
7123
7130
  */
7124
7131
  function getScale(type, min, max) {
7125
- if (type === void 0) { type = "linear"; }
7132
+ if (type === undefined) { type = "linear"; }
7126
7133
  var scale = ({
7127
7134
  linear: scaleLinear,
7128
7135
  log: scaleSymlog,
@@ -7132,7 +7139,7 @@ function getScale(type, min, max) {
7132
7139
  })[type]();
7133
7140
  scale.type = type;
7134
7141
  /_?log/.test(type) && scale.clamp(true);
7135
- return scale.range([min !== null && min !== void 0 ? min : 0, max !== null && max !== void 0 ? max : 1]);
7142
+ return scale.range([min !== null && min !== undefined ? min : 0, max !== null && max !== undefined ? max : 1]);
7136
7143
  }
7137
7144
  var scale = {
7138
7145
  /**
@@ -7174,8 +7181,8 @@ var scale = {
7174
7181
  */
7175
7182
  getYScaleById: function (id, isSub) {
7176
7183
  var _a;
7177
- if (isSub === void 0) { isSub = false; }
7178
- var isY2 = ((_a = this.axis) === null || _a === void 0 ? void 0 : _a.getId(id)) === "y2";
7184
+ if (isSub === undefined) { isSub = false; }
7185
+ var isY2 = ((_a = this.axis) === null || _a === undefined ? undefined : _a.getId(id)) === "y2";
7179
7186
  var key = isSub ? (isY2 ? "subY2" : "subY") : (isY2 ? "y2" : "y");
7180
7187
  return this.scale[key];
7181
7188
  },
@@ -7227,7 +7234,7 @@ var scale = {
7227
7234
  */
7228
7235
  updateScales: function (isInit, updateXDomain) {
7229
7236
  var _a, _b;
7230
- if (updateXDomain === void 0) { updateXDomain = true; }
7237
+ if (updateXDomain === undefined) { updateXDomain = true; }
7231
7238
  var $$ = this;
7232
7239
  var axis = $$.axis, config = $$.config, format = $$.format, org = $$.org, scale = $$.scale, _c = $$.state, current = _c.current, width = _c.width, height = _c.height, width2 = _c.width2, height2 = _c.height2, hasAxis = _c.hasAxis, hasTreemap = _c.hasTreemap;
7233
7240
  if (hasAxis) {
@@ -7248,12 +7255,12 @@ var scale = {
7248
7255
  };
7249
7256
  // update scales
7250
7257
  // x Axis
7251
- var xDomain = updateXDomain && ((_a = scale.x) === null || _a === void 0 ? void 0 : _a.orgDomain());
7258
+ var xDomain = updateXDomain && ((_a = scale.x) === null || _a === undefined ? undefined : _a.orgDomain());
7252
7259
  var xSubDomain = updateXDomain && org.xDomain;
7253
7260
  scale.x = $$.getXScale(min.x, max.x, xDomain, function () { return axis.x.tickOffset(); });
7254
7261
  scale.subX = $$.getXScale(min.x, max.x, xSubDomain, function (d) {
7255
7262
  var _a;
7256
- return (d % 1 ? 0 : ((_a = axis.subX) !== null && _a !== void 0 ? _a : axis.x).tickOffset());
7263
+ return (d % 1 ? 0 : ((_a = axis.subX) !== null && _a !== undefined ? _a : axis.x).tickOffset());
7257
7264
  });
7258
7265
  format.xAxisTick = axis.getXAxisTickFormat();
7259
7266
  format.subXAxisTick = axis.getXAxisTickFormat(true);
@@ -7279,7 +7286,7 @@ var scale = {
7279
7286
  }
7280
7287
  else {
7281
7288
  // update for arc
7282
- (_b = $$.updateArc) === null || _b === void 0 ? void 0 : _b.call($$);
7289
+ (_b = $$.updateArc) === null || _b === undefined ? undefined : _b.call($$);
7283
7290
  }
7284
7291
  },
7285
7292
  /**
@@ -7394,7 +7401,7 @@ var size = {
7394
7401
  var labelWidth = 0;
7395
7402
  // if axis label position set to inner, exclude from the value
7396
7403
  if (hasAxis && (isString(leftLabel) || isString(leftLabel.text) ||
7397
- /^inner-/.test(leftLabel === null || leftLabel === void 0 ? void 0 : leftLabel.position))) {
7404
+ /^inner-/.test(leftLabel === null || leftLabel === undefined ? undefined : leftLabel.position))) {
7398
7405
  var label = $el.main.select(".".concat(leftAxisClass, "-label"));
7399
7406
  if (!label.empty()) {
7400
7407
  labelWidth = label.node().getBoundingClientRect().left;
@@ -7412,7 +7419,7 @@ var size = {
7412
7419
  var $$ = this;
7413
7420
  var config = $$.config, hasAxis = $$.state.hasAxis, $el = $$.$el;
7414
7421
  if (hasAxis && !withoutAxis && $$.axis.x && config.axis_rotated) {
7415
- (_a = $$.axis.subX) === null || _a === void 0 ? void 0 : _a.create($el.axis.subX);
7422
+ (_a = $$.axis.subX) === null || _a === undefined ? undefined : _a.create($el.axis.subX);
7416
7423
  }
7417
7424
  // pass 'withoutAxis' param to not animate at the init rendering
7418
7425
  $$.updateScales(withoutAxis);
@@ -7464,12 +7471,12 @@ var size = {
7464
7471
  */
7465
7472
  getCurrentPaddingByDirection: function (type, withoutRecompute, withXAxisTickTextOverflow) {
7466
7473
  var _a;
7467
- if (withoutRecompute === void 0) { withoutRecompute = false; }
7468
- if (withXAxisTickTextOverflow === void 0) { withXAxisTickTextOverflow = false; }
7474
+ if (withoutRecompute === undefined) { withoutRecompute = false; }
7475
+ if (withXAxisTickTextOverflow === undefined) { withXAxisTickTextOverflow = false; }
7469
7476
  var $$ = this;
7470
7477
  var config = $$.config, $el = $$.$el, hasAxis = $$.state.hasAxis;
7471
7478
  var isRotated = config.axis_rotated;
7472
- var isFitPadding = ((_a = config.padding) === null || _a === void 0 ? void 0 : _a.mode) === "fit";
7479
+ var isFitPadding = ((_a = config.padding) === null || _a === undefined ? undefined : _a.mode) === "fit";
7473
7480
  var paddingOption = isNumber(config["padding_".concat(type)]) ?
7474
7481
  config["padding_".concat(type)] :
7475
7482
  undefined;
@@ -7497,7 +7504,7 @@ var size = {
7497
7504
  }
7498
7505
  var padding = hasAxis && isLeftRight && (isAxisInner || (isUndefined(paddingOption) && !isAxisShow)) ?
7499
7506
  0 :
7500
- (isFitPadding ? (isAxisShow ? axisSize : 0) + (paddingOption !== null && paddingOption !== void 0 ? paddingOption : 0) : (isUndefined(paddingOption) ? axisSize : paddingOption));
7507
+ (isFitPadding ? (isAxisShow ? axisSize : 0) + (paddingOption !== null && paddingOption !== undefined ? paddingOption : 0) : (isUndefined(paddingOption) ? axisSize : paddingOption));
7501
7508
  if (isLeftRight && hasAxis) {
7502
7509
  if (axisId && (isFitPadding || isAxisInner) && config["axis_".concat(axisId, "_label")].text) {
7503
7510
  padding += $$.axis.getAxisLabelPosition(axisId).isOuter ? defaultPadding : 0;
@@ -7533,7 +7540,7 @@ var size = {
7533
7540
  return padding + (axisSize * axesLen) - gap;
7534
7541
  },
7535
7542
  getCurrentPadding: function (withXAxisTickTextOverflow) {
7536
- if (withXAxisTickTextOverflow === void 0) { withXAxisTickTextOverflow = false; }
7543
+ if (withXAxisTickTextOverflow === undefined) { withXAxisTickTextOverflow = false; }
7537
7544
  var $$ = this;
7538
7545
  var _a = ["top", "bottom", "left", "right"]
7539
7546
  .map(function (v) { return $$.getCurrentPaddingByDirection(v, null, withXAxisTickTextOverflow); }), top = _a[0], bottom = _a[1], left = _a[2], right = _a[3];
@@ -7577,7 +7584,7 @@ var size = {
7577
7584
  var config = $$.config, state = $$.state, legend = $$.$el.legend;
7578
7585
  var isRotated = config.axis_rotated;
7579
7586
  var isNonAxis = $$.hasArcType() || state.hasFunnel || state.hasTreemap;
7580
- var isFitPadding = ((_a = config.padding) === null || _a === void 0 ? void 0 : _a.mode) === "fit";
7587
+ var isFitPadding = ((_a = config.padding) === null || _a === undefined ? undefined : _a.mode) === "fit";
7581
7588
  !isInit && $$.setContainerSize();
7582
7589
  var currLegend = {
7583
7590
  width: legend ? $$.getLegendWidth() : 0,
@@ -7641,7 +7648,7 @@ var size = {
7641
7648
  bottom: 0,
7642
7649
  left: 0
7643
7650
  };
7644
- (_b = $$.updateSizeForLegend) === null || _b === void 0 ? void 0 : _b.call($$, currLegend);
7651
+ (_b = $$.updateSizeForLegend) === null || _b === undefined ? undefined : _b.call($$, currLegend);
7645
7652
  state.width = state.current.width - state.margin.left - state.margin.right;
7646
7653
  state.height = state.current.height - state.margin.top - state.margin.bottom;
7647
7654
  if (state.width < 0) {
@@ -7666,10 +7673,10 @@ var size = {
7666
7673
  if ($$.hasArcType()) {
7667
7674
  var hasGauge = $$.hasType("gauge");
7668
7675
  var isLegendRight = config.legend_show && state.isLegendRight;
7669
- var textWidth = (_c = (state.hasRadar && $$.cache.get(KEY.radarTextWidth))) !== null && _c !== void 0 ? _c : 0;
7676
+ var textWidth = (_c = (state.hasRadar && $$.cache.get(KEY.radarTextWidth))) !== null && _c !== undefined ? _c : 0;
7670
7677
  state.arcWidth = state.width - (isLegendRight ? currLegend.width + 10 : 0) - textWidth;
7671
7678
  state.arcHeight = state.height - (isLegendRight && !hasGauge ? 0 : 10);
7672
- if ((_d = config.arc_rangeText_values) === null || _d === void 0 ? void 0 : _d.length) {
7679
+ if ((_d = config.arc_rangeText_values) === null || _d === undefined ? undefined : _d.length) {
7673
7680
  if (hasGauge) {
7674
7681
  state.arcWidth -= 25;
7675
7682
  state.arcHeight -= 10;
@@ -7683,7 +7690,7 @@ var size = {
7683
7690
  if (hasGauge && !config.gauge_fullCircle) {
7684
7691
  state.arcHeight += state.height - $$.getPaddingBottomForGauge();
7685
7692
  }
7686
- (_e = $$.updateRadius) === null || _e === void 0 ? void 0 : _e.call($$);
7693
+ (_e = $$.updateRadius) === null || _e === undefined ? undefined : _e.call($$);
7687
7694
  }
7688
7695
  if (state.isLegendRight && isNonAxis) {
7689
7696
  state.margin3.left = state.arcWidth / 2 + state.radiusExpanded * 1.1;
@@ -7707,7 +7714,7 @@ var style = {
7707
7714
  return config.boost_useCssRule ?
7708
7715
  function (selection) {
7709
7716
  selection.each(function (d) {
7710
- var res = propsFn && (propsFn === null || propsFn === void 0 ? void 0 : propsFn.call($$, d));
7717
+ var res = propsFn && (propsFn === null || propsFn === undefined ? undefined : propsFn.call($$, d));
7711
7718
  var shapeSelector = "".concat(withShape ? ".".concat($SHAPE.shapes + $$.getTargetSelectorSuffix(d.id)) : "").concat(selector);
7712
7719
  (selector in cssRule) && style.sheet.deleteRule(cssRule[shapeSelector]);
7713
7720
  $$.state.cssRule[shapeSelector] = addCssRules(style, shapeSelector, props.filter(Boolean).map(function (v) { return (isString(res) && v.indexOf(":") === -1 ? "".concat(v, ": ").concat(res) : (v || "")); }));
@@ -7764,7 +7771,7 @@ function setRotatePos(d, pos, anchor, isRotated, isInverted) {
7764
7771
  var $$ = this;
7765
7772
  var value = d.value;
7766
7773
  var isCandlestickType = $$.isCandlestickType(d);
7767
- var isNegative = (isNumber(value) && value < 0) || (isCandlestickType && !((_a = $$.getCandlestickData(d)) === null || _a === void 0 ? void 0 : _a._isUp));
7774
+ var isNegative = (isNumber(value) && value < 0) || (isCandlestickType && !((_a = $$.getCandlestickData(d)) === null || _a === undefined ? undefined : _a._isUp));
7768
7775
  var x = pos.x, y = pos.y;
7769
7776
  var gap = 4;
7770
7777
  var doubleGap = gap * 2;
@@ -7813,7 +7820,7 @@ function getTextPos(d, type) {
7813
7820
  var id = d.id, index = d.index, value = d.value;
7814
7821
  return (_a = (isFunction(position) ?
7815
7822
  position.bind(this.api)(type, value, id, index, this.$el.text) :
7816
- (id in position ? position[id] : position)[type])) !== null && _a !== void 0 ? _a : 0;
7823
+ (id in position ? position[id] : position)[type])) !== null && _a !== undefined ? _a : 0;
7817
7824
  }
7818
7825
  var text = {
7819
7826
  opacityForText: function (d) {
@@ -7873,12 +7880,12 @@ var text = {
7873
7880
  .merge(text)
7874
7881
  .attr("class", classText)
7875
7882
  .attr("text-anchor", function (d) {
7876
- var isInverted = config["axis_".concat(axis === null || axis === void 0 ? void 0 : axis.getId(d.id), "_inverted")];
7883
+ var isInverted = config["axis_".concat(axis === null || axis === undefined ? undefined : axis.getId(d.id), "_inverted")];
7877
7884
  // when value is negative or
7878
7885
  var isEndAnchor = isInverted ? d.value > 0 : d.value < 0;
7879
7886
  if ($$.isCandlestickType(d)) {
7880
7887
  var data = $$.getCandlestickData(d);
7881
- isEndAnchor = !(data === null || data === void 0 ? void 0 : data._isUp);
7888
+ isEndAnchor = !(data === null || data === undefined ? undefined : data._isUp);
7882
7889
  }
7883
7890
  else if ($$.isTreemapType(d)) {
7884
7891
  return labelsCentered ? "middle" : "start";
@@ -7930,7 +7937,7 @@ var text = {
7930
7937
  }
7931
7938
  if ($$.isCandlestickType(d) && !isFunction(labelColors)) {
7932
7939
  var value = $$.getCandlestickData(d);
7933
- if (!(value === null || value === void 0 ? void 0 : value._isUp)) {
7940
+ if (!(value === null || value === undefined ? undefined : value._isUp)) {
7934
7941
  var downColor = config.candlestick_color_down;
7935
7942
  color = isObject(downColor) ? downColor[d.id] : downColor;
7936
7943
  }
@@ -7983,7 +7990,7 @@ var text = {
7983
7990
  .each(function (d, i) {
7984
7991
  // do not apply transition for newly added text elements
7985
7992
  var node = $T(hasTreemap && this.childElementCount ? this.parentNode : this, !!(withTransition && this.getAttribute("x")), t);
7986
- var isInverted = config["axis_".concat(axis === null || axis === void 0 ? void 0 : axis.getId(d.id), "_inverted")];
7993
+ var isInverted = config["axis_".concat(axis === null || axis === undefined ? undefined : axis.getId(d.id), "_inverted")];
7987
7994
  var pos = {
7988
7995
  x: getX.bind(this)(d, i),
7989
7996
  y: getY.bind(this)(d, i)
@@ -8121,7 +8128,7 @@ var text = {
8121
8128
  var xPos = points ? points[0][0] : 0;
8122
8129
  if ($$.isCandlestickType(d)) {
8123
8130
  if (isRotated) {
8124
- xPos = ((_a = $$.getCandlestickData(d)) === null || _a === void 0 ? void 0 : _a._isUp) ? points[2][2] + 4 : points[2][1] - 4;
8131
+ xPos = ((_a = $$.getCandlestickData(d)) === null || _a === undefined ? undefined : _a._isUp) ? points[2][2] + 4 : points[2][1] - 4;
8125
8132
  }
8126
8133
  else {
8127
8134
  xPos += (points[1][0] - xPos) / 2;
@@ -8167,7 +8174,7 @@ var text = {
8167
8174
  var $$ = this;
8168
8175
  var axis = $$.axis, config = $$.config, state = $$.state;
8169
8176
  var isRotated = config.axis_rotated;
8170
- var isInverted = config["axis_".concat(axis === null || axis === void 0 ? void 0 : axis.getId(d.id), "_inverted")];
8177
+ var isInverted = config["axis_".concat(axis === null || axis === undefined ? undefined : axis.getId(d.id), "_inverted")];
8171
8178
  var isBarType = $$.isBarType(d);
8172
8179
  var isFunnelType = $$.isFunnelType(d);
8173
8180
  var isTreemapType = $$.isTreemapType(d);
@@ -8279,7 +8286,7 @@ var text = {
8279
8286
  * @private
8280
8287
  */
8281
8288
  meetsLabelThreshold: function (ratio, type) {
8282
- if (ratio === void 0) { ratio = 0; }
8289
+ if (ratio === undefined) { ratio = 0; }
8283
8290
  var $$ = this;
8284
8291
  var config = $$.config;
8285
8292
  var threshold = config["".concat(type, "_label_threshold")] || 0;
@@ -8299,7 +8306,7 @@ var text = {
8299
8306
  * @private
8300
8307
  */
8301
8308
  function getTextXPos(pos, width) {
8302
- if (pos === void 0) { pos = "left"; }
8309
+ if (pos === undefined) { pos = "left"; }
8303
8310
  var isNum = isNumber(width);
8304
8311
  var position;
8305
8312
  if (pos.indexOf("center") > -1) {
@@ -8390,7 +8397,7 @@ var tooltip$1 = {
8390
8397
  // Show tooltip if needed
8391
8398
  if (config.tooltip_init_show) {
8392
8399
  var isArc = !(hasAxis || hasRadar);
8393
- if (((_b = $$.axis) === null || _b === void 0 ? void 0 : _b.isTimeSeries()) && isString(config.tooltip_init_x)) {
8400
+ if (((_b = $$.axis) === null || _b === undefined ? undefined : _b.isTimeSeries()) && isString(config.tooltip_init_x)) {
8394
8401
  config.tooltip_init_x = parseDate.call($$, config.tooltip_init_x);
8395
8402
  }
8396
8403
  $$.api.tooltip.show({
@@ -8400,7 +8407,7 @@ var tooltip$1 = {
8400
8407
  });
8401
8408
  var position = config.tooltip_init_position;
8402
8409
  if (!config.tooltip_contents.bindto && !isEmpty(position)) {
8403
- var _d = position.top, top_1 = _d === void 0 ? 0 : _d, _e = position.left, left = _e === void 0 ? 50 : _e;
8410
+ var _d = position.top, top_1 = _d === undefined ? 0 : _d, _e = position.left, left = _e === undefined ? 50 : _e;
8404
8411
  $el.tooltip.style("top", isString(top_1) ? top_1 : "".concat(top_1, "px"))
8405
8412
  .style("left", isString(left) ? left : "".concat(left, "px"))
8406
8413
  .style("display", null);
@@ -8420,7 +8427,7 @@ var tooltip$1 = {
8420
8427
  }
8421
8428
  var $$ = this;
8422
8429
  var api = $$.api, config = $$.config;
8423
- return isFunction(config.tooltip_contents) ? config.tooltip_contents.bind(api).apply(void 0, args) : $$.getTooltipContent.apply($$, args);
8430
+ return isFunction(config.tooltip_contents) ? config.tooltip_contents.bind(api).apply(undefined, args) : $$.getTooltipContent.apply($$, args);
8424
8431
  },
8425
8432
  /**
8426
8433
  * Returns the tooltip content(HTML string)
@@ -8446,14 +8453,14 @@ var tooltip$1 = {
8446
8453
  for (var _i = 0; _i < arguments.length; _i++) {
8447
8454
  arg[_i] = arguments[_i];
8448
8455
  }
8449
- return sanitize((titleFn || defaultTitleFormat).apply(void 0, arg));
8456
+ return sanitize((titleFn || defaultTitleFormat).apply(undefined, arg));
8450
8457
  };
8451
8458
  var nameFormat = function () {
8452
8459
  var arg = [];
8453
8460
  for (var _i = 0; _i < arguments.length; _i++) {
8454
8461
  arg[_i] = arguments[_i];
8455
8462
  }
8456
- return sanitize((nameFn || (function (name) { return name; })).apply(void 0, arg));
8463
+ return sanitize((nameFn || (function (name) { return name; })).apply(undefined, arg));
8457
8464
  };
8458
8465
  var valueFormat = function () {
8459
8466
  var arg = [];
@@ -8463,7 +8470,7 @@ var tooltip$1 = {
8463
8470
  var fn = valueFn || (state.hasTreemap || $$.isStackNormalized() ?
8464
8471
  function (v, ratio) { return "".concat((ratio * 100).toFixed(2), "%"); } :
8465
8472
  defaultValueFormat);
8466
- return sanitize(fn.apply(void 0, arg));
8473
+ return sanitize(fn.apply(undefined, arg));
8467
8474
  };
8468
8475
  var order = config.tooltip_order;
8469
8476
  var getRowValue = function (row) { return ($$.axis && $$.isBubbleZType(row) ?
@@ -8528,16 +8535,16 @@ var tooltip$1 = {
8528
8535
  param = [row.ratio, row.id, row.index];
8529
8536
  if ($$.isAreaRangeType(row)) {
8530
8537
  var _c = ["high", "low"].map(function (v) {
8531
- return valueFormat.apply(void 0, __spreadArray([$$.getRangedData(row, v)], param, false));
8538
+ return valueFormat.apply(undefined, __spreadArray([$$.getRangedData(row, v)], param, false));
8532
8539
  }), high = _c[0], low = _c[1];
8533
- var mid = valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param, false));
8540
+ var mid = valueFormat.apply(undefined, __spreadArray([getRowValue(row)], param, false));
8534
8541
  value = "<b>Mid:</b> ".concat(mid, " <b>High:</b> ").concat(high, " <b>Low:</b> ").concat(low);
8535
8542
  }
8536
8543
  else if ($$.isCandlestickType(row)) {
8537
8544
  var _d = ["open", "high", "low", "close", "volume"]
8538
8545
  .map(function (v) {
8539
8546
  var value = $$.getRangedData(row, v, "candlestick");
8540
- return value ? valueFormat.apply(void 0, __spreadArray([$$.getRangedData(row, v, "candlestick")], param, false)) :
8547
+ return value ? valueFormat.apply(undefined, __spreadArray([$$.getRangedData(row, v, "candlestick")], param, false)) :
8541
8548
  undefined;
8542
8549
  }), open_1 = _d[0], high = _d[1], low = _d[2], close_1 = _d[3], volume = _d[4];
8543
8550
  value =
@@ -8548,14 +8555,14 @@ var tooltip$1 = {
8548
8555
  value = "".concat(valueFormat(rangeValue, undefined, id, index));
8549
8556
  }
8550
8557
  else {
8551
- value = valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param, false));
8558
+ value = valueFormat.apply(undefined, __spreadArray([getRowValue(row)], param, false));
8552
8559
  }
8553
8560
  if (value !== undefined) {
8554
8561
  // Skip elements when their name is set to null
8555
8562
  if (row.name === null) {
8556
8563
  return "continue";
8557
8564
  }
8558
- var name_1 = nameFormat.apply(void 0, __spreadArray([(_a = row.name) !== null && _a !== void 0 ? _a : row.id], param, false));
8565
+ var name_1 = nameFormat.apply(undefined, __spreadArray([(_a = row.name) !== null && _a !== undefined ? _a : row.id], param, false));
8559
8566
  var color_1 = getBgColor(row);
8560
8567
  var contentValue_1 = {
8561
8568
  CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
@@ -8602,17 +8609,17 @@ var tooltip$1 = {
8602
8609
  var config = $$.config, scale = $$.scale, state = $$.state, _c = $$.$el, eventRect = _c.eventRect, tooltip = _c.tooltip, svg = _c.svg;
8603
8610
  var bindto = config.tooltip_contents.bindto;
8604
8611
  var isRotated = config.axis_rotated;
8605
- var datum = tooltip === null || tooltip === void 0 ? void 0 : tooltip.datum();
8612
+ var datum = tooltip === null || tooltip === undefined ? undefined : tooltip.datum();
8606
8613
  if (!bindto && datum) {
8607
- var data = dataToShow !== null && dataToShow !== void 0 ? dataToShow : JSON.parse(datum.current);
8608
- var _d = getPointer(state.event, eventTarget !== null && eventTarget !== void 0 ? eventTarget : eventRect === null || eventRect === void 0 ? void 0 : eventRect.node()), x = _d[0], y = _d[1]; // get mouse event position
8614
+ var data = dataToShow !== null && dataToShow !== undefined ? dataToShow : JSON.parse(datum.current);
8615
+ var _d = getPointer(state.event, eventTarget !== null && eventTarget !== undefined ? eventTarget : eventRect === null || eventRect === undefined ? undefined : eventRect.node()), x = _d[0], y = _d[1]; // get mouse event position
8609
8616
  var currPos = { x: x, y: y };
8610
8617
  if (state.hasAxis && scale.x && datum && "x" in datum) {
8611
8618
  var getYPos = function (value, id, axisId) {
8612
8619
  var _a;
8613
- if (value === void 0) { value = 0; }
8614
- if (axisId === void 0) { axisId = "y"; }
8615
- var scaleFn = scale[id ? (_a = $$.axis) === null || _a === void 0 ? void 0 : _a.getId(id) : axisId];
8620
+ if (value === undefined) { value = 0; }
8621
+ if (axisId === undefined) { axisId = "y"; }
8622
+ var scaleFn = scale[id ? (_a = $$.axis) === null || _a === undefined ? undefined : _a.getId(id) : axisId];
8616
8623
  return scaleFn ?
8617
8624
  scaleFn(value) + (isRotated ? state.margin.left : state.margin.top) :
8618
8625
  0;
@@ -8627,9 +8634,9 @@ var tooltip$1 = {
8627
8634
  currPos.yAxis = getYPos;
8628
8635
  }
8629
8636
  }
8630
- var _e = datum.width, width = _e === void 0 ? 0 : _e, _f = datum.height, height = _f === void 0 ? 0 : _f;
8637
+ var _e = datum.width, width = _e === undefined ? 0 : _e, _f = datum.height, height = _f === undefined ? 0 : _f;
8631
8638
  // Get tooltip position
8632
- var pos_1 = (_b = (_a = config.tooltip_position) === null || _a === void 0 ? void 0 : _a.bind($$.api)(data, width, height, eventRect === null || eventRect === void 0 ? void 0 : eventRect.node(), currPos)) !== null && _b !== void 0 ? _b : (hasViewBox(svg) ?
8639
+ var pos_1 = (_b = (_a = config.tooltip_position) === null || _a === undefined ? undefined : _a.bind($$.api)(data, width, height, eventRect === null || eventRect === undefined ? undefined : eventRect.node(), currPos)) !== null && _b !== undefined ? _b : (hasViewBox(svg) ?
8633
8640
  $$.getTooltipPositionViewBox.bind($$)(width, height, currPos) :
8634
8641
  $$.getTooltipPosition.bind($$)(width, height, currPos));
8635
8642
  ["top", "left"].forEach(function (v) {
@@ -8642,34 +8649,46 @@ var tooltip$1 = {
8642
8649
  });
8643
8650
  }
8644
8651
  },
8652
+ /**
8653
+ * Get tooltip position when svg has vieBox attribute
8654
+ * @param {number} tWidth Tooltip width value
8655
+ * @param {number} tHeight Tooltip height value
8656
+ * @param {object} currPos Current event position value from SVG coordinate
8657
+ * @returns {object} top, left value
8658
+ */
8645
8659
  getTooltipPositionViewBox: function (tWidth, tHeight, currPos) {
8646
8660
  var _a, _b;
8647
8661
  var $$ = this;
8648
- var _c = $$.$el, eventRect = _c.eventRect, main = _c.main, config = $$.config, state = $$.state;
8662
+ var _c = $$.$el, eventRect = _c.eventRect, svg = _c.svg, config = $$.config, state = $$.state;
8649
8663
  var isRotated = config.axis_rotated;
8650
- var hasArcType = $$.hasArcType(undefined, ["radar"]) || state.hasFunnel ||
8651
- state.hasTreemap;
8652
- var target = (_b = (_a = (state.hasRadar ? main : eventRect)) === null || _a === void 0 ? void 0 : _a.node()) !== null && _b !== void 0 ? _b : state.event.target;
8653
- var size = 38; // getTransformCTM($el.svg.node(), 10, 0, false).x;
8664
+ var hasArcType = $$.hasArcType() || state.hasFunnel || state.hasTreemap;
8665
+ var target = (_b = (_a = (hasArcType ? svg : eventRect)) === null || _a === undefined ? undefined : _a.node()) !== null && _b !== undefined ? _b : state.event.target;
8654
8666
  var x = currPos.x, y = currPos.y;
8655
8667
  if (state.hasAxis) {
8656
8668
  x = isRotated ? x : currPos.xAxis;
8657
8669
  y = isRotated ? currPos.xAxis : y;
8658
8670
  }
8659
- // currPos는 SVG 좌표계 기준으로 전달됨
8671
+ // currPos value based on SVG coordinate
8660
8672
  var ctm = getTransformCTM(target, x, y, false);
8673
+ var rect = target.getBoundingClientRect();
8674
+ var size = getTransformCTM(target, 20, 0, false).x;
8661
8675
  var top = ctm.y;
8662
- var left = ctm.x + size;
8676
+ var left = ctm.x + (tWidth / 2) + size;
8663
8677
  if (hasArcType) {
8664
- top += tHeight;
8665
- left -= size; // (tWidth / 2);
8678
+ if (state.hasFunnel || state.hasTreemap || state.hasRadar) {
8679
+ left -= (tWidth / 2) + size;
8680
+ top += tHeight;
8681
+ }
8682
+ else {
8683
+ top += rect.height / 2;
8684
+ left += (rect.width / 2) - (tWidth - size);
8685
+ }
8666
8686
  }
8667
- var rect = (hasArcType ? main.node() : target).getBoundingClientRect();
8668
- if (left + tWidth > rect.right) {
8669
- left = rect.right - tWidth - size;
8687
+ if (left + tWidth > rect.width) {
8688
+ left = rect.width - tWidth - size;
8670
8689
  }
8671
- if (top + tHeight > rect.bottom) {
8672
- top -= tHeight + size;
8690
+ if (top + tHeight > rect.height) {
8691
+ top -= tHeight * 2;
8673
8692
  }
8674
8693
  return {
8675
8694
  top: top,
@@ -8704,8 +8723,8 @@ var tooltip$1 = {
8704
8723
  else if (hasArcType) {
8705
8724
  var notTouch = inputType !== "touch";
8706
8725
  if (notTouch) {
8707
- var titlePadding = (_b = (_a = $$.getTitlePadding) === null || _a === void 0 ? void 0 : _a.call($$)) !== null && _b !== void 0 ? _b : 0;
8708
- if (titlePadding && hasGauge && ((_c = config.arc_rangeText_values) === null || _c === void 0 ? void 0 : _c.length)) {
8726
+ var titlePadding = (_b = (_a = $$.getTitlePadding) === null || _a === undefined ? undefined : _a.call($$)) !== null && _b !== undefined ? _b : 0;
8727
+ if (titlePadding && hasGauge && ((_c = config.arc_rangeText_values) === null || _c === undefined ? undefined : _c.length)) {
8709
8728
  titlePadding += 10;
8710
8729
  }
8711
8730
  x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
@@ -8817,7 +8836,7 @@ var tooltip$1 = {
8817
8836
  var $$ = this;
8818
8837
  var api = $$.api, config = $$.config, tooltip = $$.$el.tooltip;
8819
8838
  if (tooltip && tooltip.style("display") !== "none" && (!config.tooltip_doNotHide || force)) {
8820
- var selectedData = JSON.parse((_a = tooltip.datum().current) !== null && _a !== void 0 ? _a : {});
8839
+ var selectedData = JSON.parse((_a = tooltip.datum().current) !== null && _a !== undefined ? _a : {});
8821
8840
  callFn(config.tooltip_onhide, api, selectedData);
8822
8841
  // hide tooltip
8823
8842
  tooltip
@@ -8838,7 +8857,7 @@ var tooltip$1 = {
8838
8857
  var charts = $$.charts, config = $$.config, event = $$.state.event;
8839
8858
  // Prevent propagation among instances if isn't instantiated from the user's event
8840
8859
  // https://github.com/naver/billboard.js/issues/1979
8841
- if ((event === null || event === void 0 ? void 0 : event.isTrusted) && config.tooltip_linked && charts.length > 1) {
8860
+ if ((event === null || event === undefined ? undefined : event.isTrusted) && config.tooltip_linked && charts.length > 1) {
8842
8861
  var linkedName_1 = config.tooltip_linked_name;
8843
8862
  charts
8844
8863
  .filter(function (c) { return c !== $$.api; })
@@ -8849,7 +8868,7 @@ var tooltip$1 = {
8849
8868
  var isInDom = doc.body.contains($el.chart.node());
8850
8869
  if (isLinked && linkedName_1 === name && isInDom) {
8851
8870
  var data = $el.tooltip.data()[0];
8852
- var isNotSameIndex = index !== (data === null || data === void 0 ? void 0 : data.index);
8871
+ var isNotSameIndex = index !== (data === null || data === undefined ? undefined : data.index);
8853
8872
  try {
8854
8873
  c.tooltip[show && isNotSameIndex ? "show" : "hide"]({ index: index });
8855
8874
  }
@@ -8870,15 +8889,15 @@ var tooltip$1 = {
8870
8889
  var $$ = this;
8871
8890
  var config = $$.config, _b = $$.$el, eventRect = _b.eventRect, svg = _b.svg, tooltip = _b.tooltip, _c = $$.state, event = _c.event, hasAxis = _c.hasAxis, hasRadar = _c.hasRadar, hasTreemap = _c.hasTreemap;
8872
8891
  // Update tooltip, when tooltip is in shown state
8873
- if ((tooltip === null || tooltip === void 0 ? void 0 : tooltip.style("display")) === "block" && event) {
8874
- var rect = context !== null && context !== void 0 ? context : (_a = (hasRadar ? svg : eventRect)) === null || _a === void 0 ? void 0 : _a.node();
8892
+ if ((tooltip === null || tooltip === undefined ? undefined : tooltip.style("display")) === "block" && event) {
8893
+ var rect = context !== null && context !== undefined ? context : (_a = (hasRadar ? svg : eventRect)) === null || _a === undefined ? undefined : _a.node();
8875
8894
  // for Axis based & Radar
8876
8895
  if (hasAxis || hasRadar) {
8877
8896
  if ($$.isMultipleX()) {
8878
8897
  $$.selectRectForMultipleXs(rect, false);
8879
8898
  }
8880
8899
  else {
8881
- var idx = index !== null && index !== void 0 ? index : $$.getDataIndexFromEvent(event);
8900
+ var idx = index !== null && index !== undefined ? index : $$.getDataIndexFromEvent(event);
8882
8901
  if (index === -1) {
8883
8902
  $$.api.tooltip.hide();
8884
8903
  }
@@ -8897,7 +8916,7 @@ var tooltip$1 = {
8897
8916
  if (data) {
8898
8917
  var d = $$.hasArcType() ?
8899
8918
  $$.convertToArcData($$.updateAngle(data)) :
8900
- data === null || data === void 0 ? void 0 : data.data;
8919
+ data === null || data === undefined ? undefined : data.data;
8901
8920
  hasTreemap && (target = svg.node());
8902
8921
  d && $$.showTooltip([d], target);
8903
8922
  }
@@ -8917,7 +8936,7 @@ var tooltip$1 = {
8917
8936
  var transform = {
8918
8937
  getTranslate: function (target, index) {
8919
8938
  var _a;
8920
- if (index === void 0) { index = 0; }
8939
+ if (index === undefined) { index = 0; }
8921
8940
  var $$ = this;
8922
8941
  var config = $$.config, state = $$.state;
8923
8942
  var isRotated = config.axis_rotated;
@@ -8958,7 +8977,7 @@ var transform = {
8958
8977
  else if (target === "arc") {
8959
8978
  x = state.arcWidth / 2;
8960
8979
  y = state.arcHeight / 2;
8961
- if ((_a = config.arc_rangeText_values) === null || _a === void 0 ? void 0 : _a.length) {
8980
+ if ((_a = config.arc_rangeText_values) === null || _a === undefined ? undefined : _a.length) {
8962
8981
  y += 5 + ($$.hasType("gauge") && config.title_text ? 10 : 0);
8963
8982
  }
8964
8983
  }
@@ -8976,13 +8995,13 @@ var transform = {
8976
8995
  transformMain: function (withTransition, transitions) {
8977
8996
  var $$ = this;
8978
8997
  var main = $$.$el.main, $T = $$.$T;
8979
- var xAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisX) ?
8998
+ var xAxis = (transitions === null || transitions === undefined ? undefined : transitions.axisX) ?
8980
8999
  transitions.axisX :
8981
9000
  $T(main.select(".".concat($AXIS.axisX)), withTransition);
8982
- var yAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY) ?
9001
+ var yAxis = (transitions === null || transitions === undefined ? undefined : transitions.axisY) ?
8983
9002
  transitions.axisY :
8984
9003
  $T(main.select(".".concat($AXIS.axisY)), withTransition);
8985
- var y2Axis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY2) ?
9004
+ var y2Axis = (transitions === null || transitions === undefined ? undefined : transitions.axisY2) ?
8986
9005
  transitions.axisY2 :
8987
9006
  $T(main.select(".".concat($AXIS.axisY2)), withTransition);
8988
9007
  $T(main, withTransition)
@@ -9059,16 +9078,16 @@ var typeInternals = {
9059
9078
  */
9060
9079
  hasType: function (type, targetsValue, checkFromData) {
9061
9080
  var _a;
9062
- if (checkFromData === void 0) { checkFromData = false; }
9081
+ if (checkFromData === undefined) { checkFromData = false; }
9063
9082
  var $$ = this;
9064
9083
  var config = $$.config, current = $$.state.current;
9065
9084
  var types = config.data_types;
9066
9085
  var targets = targetsValue || $$.data.targets;
9067
9086
  var has = false;
9068
- if (!checkFromData && ((_a = current.types) === null || _a === void 0 ? void 0 : _a.indexOf(type)) > -1) {
9087
+ if (!checkFromData && ((_a = current.types) === null || _a === undefined ? undefined : _a.indexOf(type)) > -1) {
9069
9088
  has = true;
9070
9089
  }
9071
- else if (targets === null || targets === void 0 ? void 0 : targets.length) {
9090
+ else if (targets === null || targets === undefined ? undefined : targets.length) {
9072
9091
  targets.forEach(function (target) {
9073
9092
  var t = types[target.id];
9074
9093
  if (t === type || (!t && type === "line")) {
@@ -9098,7 +9117,7 @@ var typeInternals = {
9098
9117
  */
9099
9118
  hasTypeOf: function (type, targets, exclude) {
9100
9119
  var _this = this;
9101
- if (exclude === void 0) { exclude = []; }
9120
+ if (exclude === undefined) { exclude = []; }
9102
9121
  if (type in TYPE_BY_CATEGORY) {
9103
9122
  return !TYPE_BY_CATEGORY[type]
9104
9123
  .filter(function (v) { return exclude.indexOf(v) === -1; })
@@ -9116,7 +9135,7 @@ var typeInternals = {
9116
9135
  isTypeOf: function (d, type) {
9117
9136
  var _a;
9118
9137
  var id = isString(d) ? d : d.id;
9119
- var dataType = this.config && (((_a = this.config.data_types) === null || _a === void 0 ? void 0 : _a[id]) || this.config.data_type);
9138
+ var dataType = this.config && (((_a = this.config.data_types) === null || _a === undefined ? undefined : _a[id]) || this.config.data_type);
9120
9139
  return isArray(type) ? type.indexOf(dataType) >= 0 : dataType === type;
9121
9140
  },
9122
9141
  hasPointType: function () {
@@ -9198,7 +9217,7 @@ var typeInternals = {
9198
9217
  var config = this.config;
9199
9218
  var pattern = config.point_pattern;
9200
9219
  var isCircle = false;
9201
- if ((node === null || node === void 0 ? void 0 : node.tagName) === "circle") {
9220
+ if ((node === null || node === undefined ? undefined : node.tagName) === "circle") {
9202
9221
  isCircle = true;
9203
9222
  }
9204
9223
  else {
@@ -9300,8 +9319,8 @@ var shape = {
9300
9319
  }
9301
9320
  });
9302
9321
  if (!$$.hasArcType() || hasRadar || hasTreemap) {
9303
- var cx = void 0;
9304
- var cy = void 0;
9322
+ var cx = undefined;
9323
+ var cy = undefined;
9305
9324
  // generate circle x/y functions depending on updated params
9306
9325
  if (!hasTreemap) {
9307
9326
  cx = hasRadar ? $$.radarCircleX : (isRotated ? $$.circleY : $$.circleX);
@@ -9348,18 +9367,18 @@ var shape = {
9348
9367
  var _a;
9349
9368
  var xKey = d.id in xs ? xs[d.id] : "";
9350
9369
  var ind = xKey ? indices[xKey] : indices;
9351
- for (var j = 0, groups = void 0; (groups = config.data_groups[j]); j++) {
9370
+ for (var j = 0, groups = undefined; (groups = config.data_groups[j]); j++) {
9352
9371
  if (groups.indexOf(d.id) < 0) {
9353
9372
  continue;
9354
9373
  }
9355
- for (var k = 0, key = void 0; (key = groups[k]); k++) {
9374
+ for (var k = 0, key = undefined; (key = groups[k]); k++) {
9356
9375
  if (key in ind) {
9357
9376
  ind[d.id] = ind[key];
9358
9377
  break;
9359
9378
  }
9360
9379
  // for same grouped data, add other data to same indices
9361
9380
  if (d.id !== key && xKey) {
9362
- ind[key] = (_a = ind[d.id]) !== null && _a !== void 0 ? _a : i[xKey];
9381
+ ind[key] = (_a = ind[d.id]) !== null && _a !== undefined ? _a : i[xKey];
9363
9382
  }
9364
9383
  }
9365
9384
  }
@@ -9551,7 +9570,7 @@ var shape = {
9551
9570
  if (!row || Number(row.x) !== dataXAsNumber) {
9552
9571
  row = rowValueMapByXValue[dataXAsNumber];
9553
9572
  }
9554
- if ((row === null || row === void 0 ? void 0 : row.value) * value >= 0 && isNumber(rValue)) {
9573
+ if ((row === null || row === undefined ? undefined : row.value) * value >= 0 && isNumber(rValue)) {
9555
9574
  var addOffset = value === 0 ?
9556
9575
  ((groupsZeroAs === "positive" &&
9557
9576
  rValue > 0) ||
@@ -9587,12 +9606,12 @@ var shape = {
9587
9606
  var $$ = this;
9588
9607
  var config = $$.config, org = $$.org, scale = $$.scale, state = $$.state;
9589
9608
  var maxDataCount = $$.getMaxDataCount();
9590
- var isGrouped = type === "bar" && ((_a = config.data_groups) === null || _a === void 0 ? void 0 : _a.length);
9609
+ var isGrouped = type === "bar" && ((_a = config.data_groups) === null || _a === undefined ? undefined : _a.length);
9591
9610
  var configName = "".concat(type, "_width");
9592
- var k = ((_c = (_b = $$.getZoomTransform) === null || _b === void 0 ? void 0 : _b.call($$)) !== null && _c !== void 0 ? _c : { k: 1 }).k;
9611
+ var k = ((_c = (_b = $$.getZoomTransform) === null || _b === undefined ? undefined : _b.call($$)) !== null && _c !== undefined ? _c : { k: 1 }).k;
9593
9612
  var xMinMax = [
9594
- (_d = config.axis_x_min) !== null && _d !== void 0 ? _d : org.xDomain[0],
9595
- (_e = config.axis_x_max) !== null && _e !== void 0 ? _e : org.xDomain[1]
9613
+ (_d = config.axis_x_min) !== null && _d !== undefined ? _d : org.xDomain[0],
9614
+ (_e = config.axis_x_max) !== null && _e !== undefined ? _e : org.xDomain[1]
9596
9615
  ].map($$.axis.isTimeSeries() ? parseDate.bind($$) : Number);
9597
9616
  var tickInterval = axis.tickInterval(maxDataCount);
9598
9617
  if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
@@ -9659,7 +9678,7 @@ var shape = {
9659
9678
  if (!$$.isTargetToShow(d.id)) {
9660
9679
  isWithin = false;
9661
9680
  }
9662
- else if ((_a = $$.hasValidPointType) === null || _a === void 0 ? void 0 : _a.call($$, that.nodeName)) {
9681
+ else if ((_a = $$.hasValidPointType) === null || _a === undefined ? undefined : _a.call($$, that.nodeName)) {
9663
9682
  isWithin = $$.isStepType(d) ?
9664
9683
  $$.isWithinStep(that, $$.getYScaleById(d.id)($$.getBaseValue(d))) :
9665
9684
  $$.isWithinCircle(that, $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0);
@@ -9906,7 +9925,7 @@ var ChartInternal = /** @class */ (function () {
9906
9925
  config.axis_y2_show = false;
9907
9926
  config.subchart_show = false;
9908
9927
  }
9909
- if ($$.hasPointType() || ((_a = $$.hasLegendDefsPoint) === null || _a === void 0 ? void 0 : _a.call($$))) {
9928
+ if ($$.hasPointType() || ((_a = $$.hasLegendDefsPoint) === null || _a === undefined ? undefined : _a.call($$))) {
9910
9929
  $$.point = $$.generatePoint();
9911
9930
  }
9912
9931
  if (state.hasAxis) {
@@ -9997,15 +10016,15 @@ var ChartInternal = /** @class */ (function () {
9997
10016
  var isTouch = state.inputType === "touch";
9998
10017
  var onclick_1 = config.onclick, onover = config.onover, onout = config.onout;
9999
10018
  $el.svg
10000
- .on("click", (onclick_1 === null || onclick_1 === void 0 ? void 0 : onclick_1.bind($$.api)) || null)
10001
- .on(isTouch ? "touchstart" : "mouseenter", (onover === null || onover === void 0 ? void 0 : onover.bind($$.api)) || null)
10002
- .on(isTouch ? "touchend" : "mouseleave", (onout === null || onout === void 0 ? void 0 : onout.bind($$.api)) || null);
10019
+ .on("click", (onclick_1 === null || onclick_1 === undefined ? undefined : onclick_1.bind($$.api)) || null)
10020
+ .on(isTouch ? "touchstart" : "mouseenter", (onover === null || onover === undefined ? undefined : onover.bind($$.api)) || null)
10021
+ .on(isTouch ? "touchend" : "mouseleave", (onout === null || onout === undefined ? undefined : onout.bind($$.api)) || null);
10003
10022
  }
10004
10023
  config.svg_classname && $el.svg.attr("class", config.svg_classname);
10005
10024
  // Define defs
10006
10025
  var hasColorPatterns = isFunction(config.color_tiles) && $$.patterns;
10007
10026
  if (hasAxis || hasColorPatterns || hasPolar || hasTreemap ||
10008
- labelsBGColor || ((_a = $$.hasLegendDefsPoint) === null || _a === void 0 ? void 0 : _a.call($$))) {
10027
+ labelsBGColor || ((_a = $$.hasLegendDefsPoint) === null || _a === undefined ? undefined : _a.call($$))) {
10009
10028
  $el.defs = $el.svg.append("defs");
10010
10029
  if (hasAxis) {
10011
10030
  ["id", "idXAxis", "idYAxis", "idGrid"].forEach(function (v) {
@@ -10054,11 +10073,11 @@ var ChartInternal = /** @class */ (function () {
10054
10073
  $$.initChartElements();
10055
10074
  if (hasAxis) {
10056
10075
  // Cover whole with rects for events
10057
- hasInteraction && ((_b = $$.initEventRect) === null || _b === void 0 ? void 0 : _b.call($$));
10076
+ hasInteraction && ((_b = $$.initEventRect) === null || _b === undefined ? undefined : _b.call($$));
10058
10077
  // Grids
10059
10078
  $$.initGrid();
10060
10079
  // Add Axis here, when clipPath is 'true'
10061
- config.clipPath && ((_c = $$.axis) === null || _c === void 0 ? void 0 : _c.init());
10080
+ config.clipPath && ((_c = $$.axis) === null || _c === undefined ? undefined : _c.init());
10062
10081
  }
10063
10082
  // Set targets
10064
10083
  $$.updateTargets($$.data.targets);
@@ -10226,7 +10245,7 @@ var ChartInternal = /** @class */ (function () {
10226
10245
  // Point types
10227
10246
  var hasPointType = $$.hasType("bubble") || $$.hasType("scatter");
10228
10247
  if (hasPointType) {
10229
- (_a = $$.updateTargetForCircle) === null || _a === void 0 ? void 0 : _a.call($$);
10248
+ (_a = $$.updateTargetForCircle) === null || _a === undefined ? undefined : _a.call($$);
10230
10249
  }
10231
10250
  // Fade-in each chart
10232
10251
  $$.filterTargetsToShowAtInit(hasPointType);
@@ -10237,7 +10256,7 @@ var ChartInternal = /** @class */ (function () {
10237
10256
  * @private
10238
10257
  */
10239
10258
  ChartInternal.prototype.filterTargetsToShowAtInit = function (hasPointType) {
10240
- if (hasPointType === void 0) { hasPointType = false; }
10259
+ if (hasPointType === undefined) { hasPointType = false; }
10241
10260
  var $$ = this;
10242
10261
  var svg = $$.$el.svg, $T = $$.$T;
10243
10262
  var selector = ".".concat($COMMON.target);
@@ -10440,15 +10459,15 @@ var apiChart = {
10440
10459
  if (state.rendered) {
10441
10460
  // reset possible zoom scale when is called from resize event
10442
10461
  if (state.resizing) { // arguments[1] is given when is called from resize
10443
- (_a = $$.brush) === null || _a === void 0 ? void 0 : _a.updateResize();
10462
+ (_a = $$.brush) === null || _a === undefined ? undefined : _a.updateResize();
10444
10463
  }
10445
10464
  else {
10446
10465
  // re-update config info
10447
- (_b = $$.axis) === null || _b === void 0 ? void 0 : _b.setOrient();
10466
+ (_b = $$.axis) === null || _b === undefined ? undefined : _b.setOrient();
10448
10467
  }
10449
10468
  // hide possible reset zoom button
10450
10469
  // https://github.com/naver/billboard.js/issues/2201
10451
- zoomResetBtn === null || zoomResetBtn === void 0 ? void 0 : zoomResetBtn.style("display", "none");
10470
+ zoomResetBtn === null || zoomResetBtn === undefined ? undefined : zoomResetBtn.style("display", "none");
10452
10471
  $$.scale.zoom = null;
10453
10472
  soft ?
10454
10473
  $$.redraw({
@@ -10553,7 +10572,7 @@ var apiChart = {
10553
10572
  config: function (name, value, redraw) {
10554
10573
  var $$ = this.internal;
10555
10574
  var config = $$.config, state = $$.state;
10556
- var key = name === null || name === void 0 ? void 0 : name.replace(/\./g, "_");
10575
+ var key = name === null || name === undefined ? undefined : name.replace(/\./g, "_");
10557
10576
  var res;
10558
10577
  if (name && key in config) {
10559
10578
  if (isDefined(value)) {
@@ -10654,7 +10673,7 @@ extend(data, {
10654
10673
  * // --> [10, 20, 30, 40]
10655
10674
  */
10656
10675
  values: function (targetIds, flat) {
10657
- if (flat === void 0) { flat = true; }
10676
+ if (flat === undefined) { flat = true; }
10658
10677
  var values = null;
10659
10678
  if (targetIds) {
10660
10679
  var targets = this.data(targetIds);
@@ -10777,7 +10796,7 @@ var apiData = { data: data };
10777
10796
  */
10778
10797
  var b64EncodeUnicode = function (str) {
10779
10798
  var _a;
10780
- return (_a = win.btoa) === null || _a === void 0 ? void 0 : _a.call(win, encodeURIComponent(str)
10799
+ return (_a = win.btoa) === null || _a === undefined ? undefined : _a.call(win, encodeURIComponent(str)
10781
10800
  .replace(/%([0-9A-F]{2})/g, function (match, p) { return String.fromCharCode(Number("0x".concat(p))); }));
10782
10801
  };
10783
10802
  /**
@@ -10812,7 +10831,7 @@ function nodeToSvgDataUrl(node, option, orgSize) {
10812
10831
  var styleXml = serializer.serializeToString(style);
10813
10832
  // foreignObject not supported in IE11 and below
10814
10833
  // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
10815
- var dataStr = "<svg xmlns=\"".concat(namespaces.svg, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" \n\t\tviewBox=\"0 0 ").concat(orgSize.width, " ").concat(orgSize.height, "\" \n\t\tpreserveAspectRatio=\"").concat((option === null || option === void 0 ? void 0 : option.preserveAspectRatio) === false ? "none" : "xMinYMid meet", "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t").concat(styleXml, "\n\t\t\t\t").concat(nodeXml.replace(/(url\()[^#]+/g, "$1"), "\n\t\t\t</foreignObject></svg>");
10834
+ var dataStr = "<svg xmlns=\"".concat(namespaces.svg, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" \n\t\tviewBox=\"0 0 ").concat(orgSize.width, " ").concat(orgSize.height, "\" \n\t\tpreserveAspectRatio=\"").concat((option === null || option === undefined ? undefined : option.preserveAspectRatio) === false ? "none" : "xMinYMid meet", "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t").concat(styleXml, "\n\t\t\t\t").concat(nodeXml.replace(/(url\()[^#]+/g, "$1"), "\n\t\t\t</foreignObject></svg>");
10816
10835
  return "data:image/svg+xml;base64,".concat(b64EncodeUnicode(dataStr));
10817
10836
  }
10818
10837
  /**
@@ -11429,7 +11448,7 @@ function showHide(show, targetIdsValue, options) {
11429
11448
  // https://github.com/naver/billboard.js/issues/1758
11430
11449
  if (!show && hiddenIds.length === 0) {
11431
11450
  targets.style("display", "none");
11432
- callFn((_a = $$.config) === null || _a === void 0 ? void 0 : _a.data_onhidden, _this, targetIds);
11451
+ callFn((_a = $$.config) === null || _a === undefined ? undefined : _a.data_onhidden, _this, targetIds);
11433
11452
  }
11434
11453
  targets.style("opacity", opacity);
11435
11454
  });
@@ -11462,7 +11481,7 @@ var apiShow = {
11462
11481
  * chart.show(["data1", "data3"]);
11463
11482
  */
11464
11483
  show: function (targetIdsValue, options) {
11465
- if (options === void 0) { options = {}; }
11484
+ if (options === undefined) { options = {}; }
11466
11485
  showHide.call(this, true, targetIdsValue, options);
11467
11486
  },
11468
11487
  /**
@@ -11485,7 +11504,7 @@ var apiShow = {
11485
11504
  * chart.hide(["data1", "data3"]);
11486
11505
  */
11487
11506
  hide: function (targetIdsValue, options) {
11488
- if (options === void 0) { options = {}; }
11507
+ if (options === undefined) { options = {}; }
11489
11508
  showHide.call(this, false, targetIdsValue, options);
11490
11509
  },
11491
11510
  /**
@@ -11509,7 +11528,7 @@ var apiShow = {
11509
11528
  */
11510
11529
  toggle: function (targetIds, options) {
11511
11530
  var _this = this;
11512
- if (options === void 0) { options = {}; }
11531
+ if (options === undefined) { options = {}; }
11513
11532
  var $$ = this.internal;
11514
11533
  var targets = { show: [], hide: [] };
11515
11534
  // sort show & hide target ids
@@ -11605,7 +11624,7 @@ var tooltip = {
11605
11624
  // determine focus data
11606
11625
  if (args.data) {
11607
11626
  var data = args.data;
11608
- var y = (_a = $$.getYScaleById(data.id)) === null || _a === void 0 ? void 0 : _a(data.value);
11627
+ var y = (_a = $$.getYScaleById(data.id)) === null || _a === undefined ? undefined : _a(data.value);
11609
11628
  if ((hasFunnel || hasTreemap) && data.id) {
11610
11629
  var selector = $$.selectorTarget(data.id, undefined, ".".concat($SHAPE.shape));
11611
11630
  eventReceiver.rect = $el.main.select(selector);
@@ -11618,8 +11637,8 @@ var tooltip = {
11618
11637
  if (!config.tooltip_grouped) {
11619
11638
  mouse = [0, y];
11620
11639
  }
11621
- index = (_b = data.index) !== null && _b !== void 0 ? _b : ($$.hasArcType() && data.id ?
11622
- (_c = $$.getArcElementByIdOrIndex(data.id)) === null || _c === void 0 ? void 0 : _c.datum().index :
11640
+ index = (_b = data.index) !== null && _b !== undefined ? _b : ($$.hasArcType() && data.id ?
11641
+ (_c = $$.getArcElementByIdOrIndex(data.id)) === null || _c === undefined ? undefined : _c.datum().index :
11623
11642
  $$.getIndexByX(data.x));
11624
11643
  }
11625
11644
  }
@@ -11643,7 +11662,7 @@ var tooltip = {
11643
11662
  var _a, _b, _c;
11644
11663
  var $$ = this.internal;
11645
11664
  var inputType = $$.state.inputType, tooltip = $$.$el.tooltip;
11646
- var data = tooltip === null || tooltip === void 0 ? void 0 : tooltip.datum();
11665
+ var data = tooltip === null || tooltip === undefined ? undefined : tooltip.datum();
11647
11666
  if (data) {
11648
11667
  var index_1 = JSON.parse(data.current)[0].index;
11649
11668
  // make to finalize, possible pending event flow set from '.tooltip.show()' call
@@ -11654,9 +11673,9 @@ var tooltip = {
11654
11673
  // reset last touch point index
11655
11674
  inputType === "touch" && $$.callOverOutForTouch();
11656
11675
  $$.hideTooltip(true);
11657
- (_a = $$.hideGridFocus) === null || _a === void 0 ? void 0 : _a.call($$);
11658
- (_b = $$.unexpandCircles) === null || _b === void 0 ? void 0 : _b.call($$);
11659
- (_c = $$.expandBarTypeShapes) === null || _c === void 0 ? void 0 : _c.call($$, false);
11676
+ (_a = $$.hideGridFocus) === null || _a === undefined ? undefined : _a.call($$);
11677
+ (_b = $$.unexpandCircles) === null || _b === undefined ? undefined : _b.call($$);
11678
+ (_c = $$.expandBarTypeShapes) === null || _c === undefined ? undefined : _c.call($$, false);
11660
11679
  }
11661
11680
  };
11662
11681
  var apiTooltip = { tooltip: tooltip };
@@ -12509,7 +12528,7 @@ var apiGroup = {
12509
12528
  * @private
12510
12529
  */
12511
12530
  function regionsFn(regions, isAdd) {
12512
- if (isAdd === void 0) { isAdd = false; }
12531
+ if (isAdd === undefined) { isAdd = false; }
12513
12532
  var $$ = this.internal;
12514
12533
  var config = $$.config;
12515
12534
  var withTransition = config.transition_duration && isTabVisible();
@@ -12727,7 +12746,7 @@ var AxisRendererHelper = /** @class */ (function () {
12727
12746
  * @private
12728
12747
  */
12729
12748
  AxisRendererHelper.getSizeFor1Char = function (text, memoize) {
12730
- if (memoize === void 0) { memoize = true; }
12749
+ if (memoize === undefined) { memoize = true; }
12731
12750
  // default size for one character
12732
12751
  var size = {
12733
12752
  w: 5.5,
@@ -12855,7 +12874,7 @@ var AxisRendererHelper = /** @class */ (function () {
12855
12874
 
12856
12875
  var AxisRenderer = /** @class */ (function () {
12857
12876
  function AxisRenderer(params) {
12858
- if (params === void 0) { params = {}; }
12877
+ if (params === undefined) { params = {}; }
12859
12878
  var config = {
12860
12879
  innerTickSize: 6,
12861
12880
  outerTickSize: params.outerTick ? 6 : 0,
@@ -13041,7 +13060,7 @@ var AxisRenderer = /** @class */ (function () {
13041
13060
  */
13042
13061
  AxisRenderer.prototype.getGeneratedTicks = function (count) {
13043
13062
  var _a;
13044
- var len = ((_a = this.generatedTicks) === null || _a === void 0 ? void 0 : _a.length) - 1;
13063
+ var len = ((_a = this.generatedTicks) === null || _a === undefined ? undefined : _a.length) - 1;
13045
13064
  var res = this.generatedTicks;
13046
13065
  if (len > count) {
13047
13066
  var interval_1 = Math.round((len / count) + 0.1);
@@ -13255,7 +13274,7 @@ var AxisRenderer = /** @class */ (function () {
13255
13274
  interval = tickOffset * 2;
13256
13275
  }
13257
13276
  else {
13258
- var scale_1 = (_a = this.params.owner.scale.zoom) !== null && _a !== void 0 ? _a : this.helper.scale;
13277
+ var scale_1 = (_a = this.params.owner.scale.zoom) !== null && _a !== undefined ? _a : this.helper.scale;
13259
13278
  var length_1 = this.g.select("path.domain")
13260
13279
  .node()
13261
13280
  .getTotalLength() - outerTickSize * 2;
@@ -13356,18 +13375,18 @@ var Axis = /** @class */ (function () {
13356
13375
  return !this.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));
13357
13376
  };
13358
13377
  Axis.prototype.isTimeSeries = function (id) {
13359
- if (id === void 0) { id = "x"; }
13378
+ if (id === undefined) { id = "x"; }
13360
13379
  return this.owner.config["axis_".concat(id, "_type")] === "timeseries";
13361
13380
  };
13362
13381
  Axis.prototype.isLog = function (id) {
13363
- if (id === void 0) { id = "x"; }
13382
+ if (id === undefined) { id = "x"; }
13364
13383
  return this.owner.config["axis_".concat(id, "_type")] === "log";
13365
13384
  };
13366
13385
  Axis.prototype.isTimeSeriesY = function () {
13367
13386
  return this.isTimeSeries("y");
13368
13387
  };
13369
13388
  Axis.prototype.getAxisType = function (id) {
13370
- if (id === void 0) { id = "x"; }
13389
+ if (id === undefined) { id = "x"; }
13371
13390
  var type = "linear";
13372
13391
  if (this.isTimeSeries(id)) {
13373
13392
  type = this.owner.config.axis_x_localtime ? "time" : "utc";
@@ -13377,6 +13396,26 @@ var Axis = /** @class */ (function () {
13377
13396
  }
13378
13397
  return type;
13379
13398
  };
13399
+ /**
13400
+ * Get extent value
13401
+ * @returns {Array} default extent
13402
+ * @private
13403
+ */
13404
+ Axis.prototype.getExtent = function () {
13405
+ var $$ = this.owner;
13406
+ var config = $$.config, scale = $$.scale;
13407
+ var extent = config.axis_x_extent;
13408
+ if (extent) {
13409
+ if (isFunction(extent)) {
13410
+ extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
13411
+ }
13412
+ else if (this.isTimeSeries() && extent.every(isNaN)) {
13413
+ var fn_1 = parseDate.bind($$);
13414
+ extent = extent.map(function (v) { return scale.subX(fn_1(v)); });
13415
+ }
13416
+ }
13417
+ return extent;
13418
+ };
13380
13419
  Axis.prototype.init = function () {
13381
13420
  var _this = this;
13382
13421
  var $$ = this.owner;
@@ -13558,8 +13597,8 @@ var Axis = /** @class */ (function () {
13558
13597
  .scale((isX && $$.scale.zoom) || scale)
13559
13598
  .orient(orient);
13560
13599
  if (isX && this.isTimeSeries() && tickValues && !isFunction(tickValues)) {
13561
- var fn_1 = parseDate.bind($$);
13562
- tickValues = tickValues.map(function (v) { return fn_1(v); });
13600
+ var fn_2 = parseDate.bind($$);
13601
+ tickValues = tickValues.map(function (v) { return fn_2(v); });
13563
13602
  }
13564
13603
  else if (!isX && this.isTimeSeriesY()) {
13565
13604
  // https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time
@@ -13599,7 +13638,7 @@ var Axis = /** @class */ (function () {
13599
13638
  }
13600
13639
  else if (this.x) {
13601
13640
  this.x.tickValues(values);
13602
- (_a = this.subX) === null || _a === void 0 ? void 0 : _a.tickValues(values);
13641
+ (_a = this.subX) === null || _a === undefined ? undefined : _a.tickValues(values);
13603
13642
  }
13604
13643
  return values;
13605
13644
  };
@@ -13962,7 +14001,7 @@ var Axis = /** @class */ (function () {
13962
14001
  var start = values[0];
13963
14002
  var end = values[values.length - 1];
13964
14003
  var interval = (end - start) / (count + 1);
13965
- var tickValue = void 0;
14004
+ var tickValue = undefined;
13966
14005
  // re-construct unique values
13967
14006
  tickValues = [start];
13968
14007
  for (var i = 0; i < count; i++) {
@@ -14030,7 +14069,7 @@ var Axis = /** @class */ (function () {
14030
14069
  }
14031
14070
  else if (this.x) {
14032
14071
  this.x.tickValues([]);
14033
- (_a = this.subX) === null || _a === void 0 ? void 0 : _a.tickValues([]);
14072
+ (_a = this.subX) === null || _a === undefined ? undefined : _a.tickValues([]);
14034
14073
  }
14035
14074
  if (config.zoom_rescale && !flow) {
14036
14075
  xDomainForZoom = scale.x.orgDomain();
@@ -14059,8 +14098,8 @@ var Axis = /** @class */ (function () {
14059
14098
  }
14060
14099
  // Update sub domain
14061
14100
  if (wth.Y) {
14062
- (_b = scale.subY) === null || _b === void 0 ? void 0 : _b.domain($$.getYDomain(targetsToShow, "y"));
14063
- (_c = scale.subY2) === null || _c === void 0 ? void 0 : _c.domain($$.getYDomain(targetsToShow, "y2"));
14101
+ (_b = scale.subY) === null || _b === undefined ? undefined : _b.domain($$.getYDomain(targetsToShow, "y"));
14102
+ (_c = scale.subY2) === null || _c === undefined ? undefined : _c.domain($$.getYDomain(targetsToShow, "y2"));
14064
14103
  }
14065
14104
  };
14066
14105
  /**
@@ -14122,7 +14161,7 @@ var Axis = /** @class */ (function () {
14122
14161
  var _a;
14123
14162
  var $$ = this.owner;
14124
14163
  var _b = $$.config, isRotated = _b.axis_rotated, axis_tooltip = _b.axis_tooltip, _c = $$.$el, axis = _c.axis, axisTooltip = _c.axisTooltip;
14125
- var bgColor = (_a = axis_tooltip.backgroundColor) !== null && _a !== void 0 ? _a : "black";
14164
+ var bgColor = (_a = axis_tooltip.backgroundColor) !== null && _a !== undefined ? _a : "black";
14126
14165
  $$.generateTextBGColorFilter(bgColor, {
14127
14166
  x: -0.15,
14128
14167
  y: -0.2,
@@ -14131,16 +14170,16 @@ var Axis = /** @class */ (function () {
14131
14170
  });
14132
14171
  ["x", "y", "y2"].forEach(function (v) {
14133
14172
  var _a, _b, _c;
14134
- axisTooltip[v] = (_a = axis[v]) === null || _a === void 0 ? void 0 : _a.append("text").classed($AXIS["axis".concat(v.toUpperCase(), "Tooltip")], true).attr("filter", $$.updateTextBGColor({ id: v }, bgColor));
14173
+ axisTooltip[v] = (_a = axis[v]) === null || _a === undefined ? undefined : _a.append("text").classed($AXIS["axis".concat(v.toUpperCase(), "Tooltip")], true).attr("filter", $$.updateTextBGColor({ id: v }, bgColor));
14135
14174
  if (isRotated) {
14136
14175
  var pos = v === "x" ? "x" : "y";
14137
14176
  var val = v === "y" ? "1.15em" : (v === "x" ? "-0.3em" : "-0.4em");
14138
- (_b = axisTooltip[v]) === null || _b === void 0 ? void 0 : _b.attr(pos, val).attr("d".concat(v === "x" ? "y" : "x"), v === "x" ? "0.4em" : "-1.3em").style("text-anchor", v === "x" ? "end" : null);
14177
+ (_b = axisTooltip[v]) === null || _b === undefined ? undefined : _b.attr(pos, val).attr("d".concat(v === "x" ? "y" : "x"), v === "x" ? "0.4em" : "-1.3em").style("text-anchor", v === "x" ? "end" : null);
14139
14178
  }
14140
14179
  else {
14141
14180
  var pos = v === "x" ? "y" : "x";
14142
14181
  var val = v === "x" ? "1.15em" : "".concat(v === "y" ? "-" : "", "0.4em");
14143
- (_c = axisTooltip[v]) === null || _c === void 0 ? void 0 : _c.attr(pos, val).attr("d".concat(v === "x" ? "x" : "y"), v === "x" ? "-1em" : "0.3em").style("text-anchor", v === "y" ? "end" : null);
14182
+ (_c = axisTooltip[v]) === null || _c === undefined ? undefined : _c.attr(pos, val).attr("d".concat(v === "x" ? "x" : "y"), v === "x" ? "-1em" : "0.3em").style("text-anchor", v === "y" ? "end" : null);
14144
14183
  }
14145
14184
  });
14146
14185
  };
@@ -14208,7 +14247,7 @@ var eventrect = {
14208
14247
  // update data's index value to be alinged with the x Axis
14209
14248
  $$.updateDataIndexByX(xAxisTickValues);
14210
14249
  $$.updateXs(xAxisTickValues);
14211
- (_a = $$.updatePointClass) === null || _a === void 0 ? void 0 : _a.call($$, true);
14250
+ (_a = $$.updatePointClass) === null || _a === undefined ? undefined : _a.call($$, true);
14212
14251
  state.eventReceiver.data = xAxisTickValues;
14213
14252
  }
14214
14253
  $$.updateEventRectData();
@@ -14302,7 +14341,7 @@ var eventrect = {
14302
14341
  * @private
14303
14342
  */
14304
14343
  updateEventRect: function (eventRect, force) {
14305
- if (force === void 0) { force = false; }
14344
+ if (force === undefined) { force = false; }
14306
14345
  var $$ = this;
14307
14346
  var state = $$.state, $el = $$.$el;
14308
14347
  var eventReceiver = state.eventReceiver, width = state.width, height = state.height, rendered = state.rendered, resizing = state.resizing;
@@ -14338,10 +14377,10 @@ var eventrect = {
14338
14377
  var $$ = this;
14339
14378
  var isRebindCall = isBoolean(target);
14340
14379
  var eventRect = isRebindCall ? $$.$el.eventRect : target;
14341
- var unbindEvent = isRebindCall ? target !== (eventRect === null || eventRect === void 0 ? void 0 : eventRect.datum().multipleX) : false;
14380
+ var unbindEvent = isRebindCall ? target !== (eventRect === null || eventRect === undefined ? undefined : eventRect.datum().multipleX) : false;
14342
14381
  if (eventRect) {
14343
14382
  // release previous event listeners
14344
- unbindEvent && (eventRect === null || eventRect === void 0 ? void 0 : eventRect.on("mouseover mousemove mouseout click", null));
14383
+ unbindEvent && (eventRect === null || eventRect === undefined ? undefined : eventRect.on("mouseover mousemove mouseout click", null));
14345
14384
  $$.isMultipleX() ?
14346
14385
  $$.generateEventRectsForMultipleXs(eventRect) :
14347
14386
  $$.generateEventRectsForSingleX(eventRect);
@@ -14371,7 +14410,7 @@ var eventrect = {
14371
14410
  }
14372
14411
  else {
14373
14412
  var rectW_1;
14374
- var rectX = void 0;
14413
+ var rectX = undefined;
14375
14414
  if ($$.axis.isCategorized()) {
14376
14415
  rectW_1 = $$.getEventRectWidth();
14377
14416
  rectX = function (d) { return xScale(d.x) - (rectW_1 / 2); };
@@ -14401,7 +14440,7 @@ var eventrect = {
14401
14440
  else {
14402
14441
  Object.keys(x).forEach(function (key, i) {
14403
14442
  var _a;
14404
- x[key] = (_a = x[key]) !== null && _a !== void 0 ? _a : xDomain[i];
14443
+ x[key] = (_a = x[key]) !== null && _a !== undefined ? _a : xDomain[i];
14405
14444
  });
14406
14445
  val = Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2);
14407
14446
  }
@@ -14458,7 +14497,7 @@ var eventrect = {
14458
14497
  var selectedData = $$.getAllValuesOnIndex(index);
14459
14498
  if (isTooltipGrouped) {
14460
14499
  $$.showTooltip(selectedData, context);
14461
- (_a = $$.showGridFocus) === null || _a === void 0 ? void 0 : _a.call($$, selectedData);
14500
+ (_a = $$.showGridFocus) === null || _a === undefined ? undefined : _a.call($$, selectedData);
14462
14501
  if (!isSelectionEnabled || isSelectionGrouped) {
14463
14502
  return;
14464
14503
  }
@@ -14473,7 +14512,7 @@ var eventrect = {
14473
14512
  return $$.isWithinShape(this, d);
14474
14513
  });
14475
14514
  if (shapeAtIndex.empty() && !isTooltipGrouped && config.interaction_onout) {
14476
- (_b = $$.hideGridFocus) === null || _b === void 0 ? void 0 : _b.call($$);
14515
+ (_b = $$.hideGridFocus) === null || _b === undefined ? undefined : _b.call($$);
14477
14516
  $$.hideTooltip();
14478
14517
  !isSelectionGrouped && $$.setExpand(index);
14479
14518
  }
@@ -14482,13 +14521,13 @@ var eventrect = {
14482
14521
  var _a, _b;
14483
14522
  var d = selected.data();
14484
14523
  if (isSelectionEnabled &&
14485
- (isSelectionGrouped || (isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind($$.api)(d)))) {
14524
+ (isSelectionGrouped || (isSelectable === null || isSelectable === undefined ? undefined : isSelectable.bind($$.api)(d)))) {
14486
14525
  context.style.cursor = "pointer";
14487
14526
  }
14488
14527
  if (!isTooltipGrouped) {
14489
14528
  $$.showTooltip(d, context);
14490
- (_a = $$.showGridFocus) === null || _a === void 0 ? void 0 : _a.call($$, d);
14491
- (_b = $$.unexpandCircles) === null || _b === void 0 ? void 0 : _b.call($$);
14529
+ (_a = $$.showGridFocus) === null || _a === undefined ? undefined : _a.call($$, d);
14530
+ (_b = $$.unexpandCircles) === null || _b === undefined ? undefined : _b.call($$);
14492
14531
  selected.each(function (d) { return $$.setExpand(index, d.id); });
14493
14532
  }
14494
14533
  });
@@ -14500,7 +14539,7 @@ var eventrect = {
14500
14539
  * @private
14501
14540
  */
14502
14541
  selectRectForMultipleXs: function (context, triggerEvent) {
14503
- if (triggerEvent === void 0) { triggerEvent = true; }
14542
+ if (triggerEvent === undefined) { triggerEvent = true; }
14504
14543
  var $$ = this;
14505
14544
  var config = $$.config, state = $$.state;
14506
14545
  var targetsToShow = $$.filterTargetsToShow($$.data.targets);
@@ -14584,7 +14623,7 @@ var eventrect = {
14584
14623
  state.event = event;
14585
14624
  $$.updateEventRect();
14586
14625
  Object.values($$.$el.axisTooltip)
14587
- .forEach(function (v) { return v === null || v === void 0 ? void 0 : v.style("display", null); });
14626
+ .forEach(function (v) { return v === null || v === undefined ? undefined : v.style("display", null); });
14588
14627
  })
14589
14628
  .on("mousemove", function (event) {
14590
14629
  var d = getData_1(event);
@@ -14652,7 +14691,7 @@ var eventrect = {
14652
14691
  .each(function (d2) {
14653
14692
  var _a;
14654
14693
  if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
14655
- (_a = $$.toggleShape) === null || _a === void 0 ? void 0 : _a.call($$, this, d2, index);
14694
+ (_a = $$.toggleShape) === null || _a === undefined ? undefined : _a.call($$, this, d2, index);
14656
14695
  config.data_onclick.bind($$.api)(d2, this);
14657
14696
  }
14658
14697
  });
@@ -14708,7 +14747,7 @@ var eventrect = {
14708
14747
  .each(function () {
14709
14748
  var _a;
14710
14749
  if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
14711
- (_a = $$.toggleShape) === null || _a === void 0 ? void 0 : _a.call($$, this, closest, closest.index);
14750
+ (_a = $$.toggleShape) === null || _a === undefined ? undefined : _a.call($$, this, closest, closest.index);
14712
14751
  config.data_onclick.bind($$.api)(closest, this);
14713
14752
  }
14714
14753
  });
@@ -14761,7 +14800,7 @@ var flow = {
14761
14800
  if (node && name.length > 1) {
14762
14801
  node = node[name[1]];
14763
14802
  }
14764
- if (node === null || node === void 0 ? void 0 : node.size()) {
14803
+ if (node === null || node === undefined ? undefined : node.size()) {
14765
14804
  elements[v] = node;
14766
14805
  }
14767
14806
  });
@@ -14778,7 +14817,7 @@ var flow = {
14778
14817
  setFlowList: function (elements, args) {
14779
14818
  var $$ = this;
14780
14819
  var flow = args.flow, targets = args.targets;
14781
- var _a = flow.duration, duration = _a === void 0 ? args.duration : _a, flowIndex = flow.index, flowLength = flow.length, orgDataCount = flow.orgDataCount;
14820
+ var _a = flow.duration, duration = _a === undefined ? args.duration : _a, flowIndex = flow.index, flowLength = flow.length, orgDataCount = flow.orgDataCount;
14782
14821
  var transform = $$.getFlowTransform(targets, orgDataCount, flowIndex, flowLength);
14783
14822
  var wait = generateWait();
14784
14823
  var n;
@@ -14817,7 +14856,7 @@ var flow = {
14817
14856
  var isRotated = config.axis_rotated;
14818
14857
  var flow = args.flow, shape = args.shape, xv = args.xv;
14819
14858
  var _a = shape.pos, cx = _a.cx, cy = _a.cy, xForText = _a.xForText, yForText = _a.yForText;
14820
- var _b = flow.done, done = _b === void 0 ? function () { } : _b, flowLength = flow.length;
14859
+ var _b = flow.done, done = _b === undefined ? function () { } : _b, flowLength = flow.length;
14821
14860
  // Remove flowed elements
14822
14861
  if (flowLength) {
14823
14862
  ["circle", "text", "shape", "eventRect"].forEach(function (v) {
@@ -14912,13 +14951,13 @@ var flow = {
14912
14951
  }
14913
14952
  }
14914
14953
  }
14915
- else if (orgDataCount === 1 || (flowStart === null || flowStart === void 0 ? void 0 : flowStart.x) === (flowEnd === null || flowEnd === void 0 ? void 0 : flowEnd.x)) {
14954
+ else if (orgDataCount === 1 || (flowStart === null || flowStart === undefined ? undefined : flowStart.x) === (flowEnd === null || flowEnd === undefined ? undefined : flowEnd.x)) {
14916
14955
  translateX = x(orgDomain[0]) - x(domain[0]);
14917
14956
  }
14918
14957
  else {
14919
14958
  translateX = $$.axis.isTimeSeries() ?
14920
14959
  x(orgDomain[0]) - x(domain[0]) :
14921
- x((flowStart === null || flowStart === void 0 ? void 0 : flowStart.x) || 0) - x(flowEnd.x);
14960
+ x((flowStart === null || flowStart === undefined ? undefined : flowStart.x) || 0) - x(flowEnd.x);
14922
14961
  }
14923
14962
  var scaleX = diffDomain(orgDomain) / diffDomain(domain);
14924
14963
  return "translate(".concat(translateX, ",0) scale(").concat(scaleX, ",1)");
@@ -15224,7 +15263,7 @@ var grid = {
15224
15263
  .attr("dy", -5))
15225
15264
  .text(function (d) {
15226
15265
  var _a;
15227
- return (_a = d.text) !== null && _a !== void 0 ? _a : this.remove();
15266
+ return (_a = d.text) !== null && _a !== undefined ? _a : this.remove();
15228
15267
  });
15229
15268
  gridLines[type] = lines;
15230
15269
  },
@@ -15298,19 +15337,19 @@ var grid = {
15298
15337
  var config = $$.config, format = $$.format, _c = $$.state, event = _c.event, width = _c.width, height = _c.height;
15299
15338
  var isRotated = config.axis_rotated;
15300
15339
  // get mouse event position
15301
- var _d = getPointer(event, (_a = $$.$el.eventRect) === null || _a === void 0 ? void 0 : _a.node()), x = _d[0], y = _d[1];
15340
+ var _d = getPointer(event, (_a = $$.$el.eventRect) === null || _a === undefined ? undefined : _a.node()), x = _d[0], y = _d[1];
15302
15341
  var pos = { x: x, y: y };
15303
15342
  for (var _i = 0, _e = Object.entries($$.$el.axisTooltip); _i < _e.length; _i++) {
15304
15343
  var _f = _e[_i], axis = _f[0], node = _f[1];
15305
15344
  var attr = (axis === "x" && !isRotated) || (axis !== "x" && isRotated) ? "x" : "y";
15306
15345
  var value = pos[attr];
15307
- var scaleText = (_b = $$.scale[axis]) === null || _b === void 0 ? void 0 : _b.invert(value);
15346
+ var scaleText = (_b = $$.scale[axis]) === null || _b === undefined ? undefined : _b.invert(value);
15308
15347
  if (scaleText) {
15309
15348
  scaleText = axis === "x" && $$.axis.isTimeSeries() ?
15310
15349
  format.xAxisTick(scaleText) :
15311
- scaleText === null || scaleText === void 0 ? void 0 : scaleText.toFixed(2);
15350
+ scaleText === null || scaleText === undefined ? undefined : scaleText.toFixed(2);
15312
15351
  // set position & its text value based on position
15313
- node === null || node === void 0 ? void 0 : node.attr(attr, value).text(scaleText);
15352
+ node === null || node === undefined ? undefined : node.attr(attr, value).text(scaleText);
15314
15353
  }
15315
15354
  }
15316
15355
  $$.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility", null)
@@ -15336,7 +15375,7 @@ var grid = {
15336
15375
  var $$ = this;
15337
15376
  $$.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility", "hidden");
15338
15377
  Object.values($$.$el.axisTooltip)
15339
- .forEach(function (v) { return v === null || v === void 0 ? void 0 : v.style("display", "none"); });
15378
+ .forEach(function (v) { return v === null || v === undefined ? undefined : v.style("display", "none"); });
15340
15379
  },
15341
15380
  /**
15342
15381
  * Show grid focus line
@@ -15404,7 +15443,7 @@ var grid = {
15404
15443
  .forEach(function (v, i) { return el.attr(v, xy[i]); });
15405
15444
  });
15406
15445
  smoothLines(focusEl);
15407
- (_a = $$.showCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$, data);
15446
+ (_a = $$.showCircleFocus) === null || _a === undefined ? undefined : _a.call($$, data);
15408
15447
  },
15409
15448
  hideGridFocus: function () {
15410
15449
  var _a;
@@ -15413,7 +15452,7 @@ var grid = {
15413
15452
  if (inputType === "mouse" || !resizing) {
15414
15453
  main.selectAll("line.".concat($FOCUS.xgridFocus, ", line.").concat($FOCUS.ygridFocus))
15415
15454
  .style("visibility", "hidden");
15416
- (_a = $$.hideCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$);
15455
+ (_a = $$.hideCircleFocus) === null || _a === undefined ? undefined : _a.call($$);
15417
15456
  }
15418
15457
  },
15419
15458
  updateGridFocus: function () {
@@ -15423,7 +15462,7 @@ var grid = {
15423
15462
  var xgridFocus = grid.main.select("line.".concat($FOCUS.xgridFocus));
15424
15463
  if (inputType === "touch") {
15425
15464
  if (xgridFocus.empty()) {
15426
- resizing && ((_a = $$.showCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$));
15465
+ resizing && ((_a = $$.showCircleFocus) === null || _a === undefined ? undefined : _a.call($$));
15427
15466
  }
15428
15467
  else {
15429
15468
  $$.showGridFocus();
@@ -15533,7 +15572,7 @@ var region = {
15533
15572
  region.list.each(function (d) {
15534
15573
  var _a;
15535
15574
  var g = select(this);
15536
- if (g.select("text").empty() && ((_a = d.label) === null || _a === void 0 ? void 0 : _a.text)) {
15575
+ if (g.select("text").empty() && ((_a = d.label) === null || _a === undefined ? undefined : _a.text)) {
15537
15576
  select(this).append("text")
15538
15577
  .style("opacity", "0");
15539
15578
  }
@@ -15552,13 +15591,13 @@ var region = {
15552
15591
  label = $T(label, withTransition)
15553
15592
  .attr("transform", function (d) {
15554
15593
  var _a;
15555
- var _b = (_a = d.label) !== null && _a !== void 0 ? _a : {}, _c = _b.x, x = _c === void 0 ? 0 : _c, _d = _b.y, y = _d === void 0 ? 0 : _d, _e = _b.rotated, rotated = _e === void 0 ? false : _e;
15594
+ var _b = (_a = d.label) !== null && _a !== undefined ? _a : {}, _c = _b.x, x = _c === undefined ? 0 : _c, _d = _b.y, y = _d === undefined ? 0 : _d, _e = _b.rotated, rotated = _e === undefined ? false : _e;
15556
15595
  return "translate(".concat($$.regionX.bind($$)(d) + x, ", ").concat($$.regionY.bind($$)(d) + y, ")").concat(rotated ? " rotate(-90)" : "");
15557
15596
  })
15558
- .attr("text-anchor", function (d) { var _a; return (((_a = d.label) === null || _a === void 0 ? void 0 : _a.rotated) ? "end" : null); })
15597
+ .attr("text-anchor", function (d) { var _a; return (((_a = d.label) === null || _a === undefined ? undefined : _a.rotated) ? "end" : null); })
15559
15598
  .attr("dy", "1em")
15560
- .style("fill", function (d) { var _a, _b; return (_b = (_a = d.label) === null || _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : null; })
15561
- .text(function (d) { var _a; return (_a = d.label) === null || _a === void 0 ? void 0 : _a.text; });
15599
+ .style("fill", function (d) { var _a, _b; return (_b = (_a = d.label) === null || _a === undefined ? undefined : _a.color) !== null && _b !== undefined ? _b : null; })
15600
+ .text(function (d) { var _a; return (_a = d.label) === null || _a === undefined ? undefined : _a.text; });
15562
15601
  return [
15563
15602
  regions
15564
15603
  .style("fill-opacity", function (d) { return (isValue(d.opacity) ? d.opacity : null); })
@@ -15653,10 +15692,10 @@ var sizeAxis = {
15653
15692
  var _a, _b;
15654
15693
  var $$ = this;
15655
15694
  if ($$.axis) {
15656
- var position = (_a = $$.axis) === null || _a === void 0 ? void 0 : _a.getLabelPositionById(id);
15695
+ var position = (_a = $$.axis) === null || _a === undefined ? undefined : _a.getLabelPositionById(id);
15657
15696
  var width = $$.axis.getMaxTickSize(id, withoutRecompute).width;
15658
15697
  var gap = width === 0 ? 0.5 : 0;
15659
- return width + (((_b = $$.config.padding) === null || _b === void 0 ? void 0 : _b.mode) === "fit" ?
15698
+ return width + (((_b = $$.config.padding) === null || _b === undefined ? undefined : _b.mode) === "fit" ?
15660
15699
  position.isInner ? (10 + gap) : 10 :
15661
15700
  position.isInner ?
15662
15701
  (20 + gap) :
@@ -15672,11 +15711,11 @@ var sizeAxis = {
15672
15711
  var config = $$.config, state = $$.state;
15673
15712
  var rotatedPadding = state.rotatedPadding, isLegendRight = state.isLegendRight, isLegendInset = state.isLegendInset;
15674
15713
  var isRotated = config.axis_rotated;
15675
- var isFitPadding = ((_a = config.padding) === null || _a === void 0 ? void 0 : _a.mode) === "fit";
15714
+ var isFitPadding = ((_a = config.padding) === null || _a === undefined ? undefined : _a.mode) === "fit";
15676
15715
  var isInner = config["axis_".concat(id, "_inner")];
15677
15716
  var hasLabelText = config["axis_".concat(id, "_label")].text;
15678
15717
  var defaultHeight = 13;
15679
- var h = ((_b = config.padding) === null || _b === void 0 ? void 0 : _b.mode) === "fit" ?
15718
+ var h = ((_b = config.padding) === null || _b === undefined ? undefined : _b.mode) === "fit" ?
15680
15719
  (isInner && !hasLabelText ? (id === "y" ? 1 : 0) : 20) :
15681
15720
  30;
15682
15721
  if (id === "x" && !config.axis_x_show) {
@@ -16381,7 +16420,8 @@ var x = {
16381
16420
  */
16382
16421
  axis_x_height: undefined,
16383
16422
  /**
16384
- * Set default extent for subchart and zoom. This can be an array or function that returns an array.
16423
+ * Set extent for subchart and zoom(drag only). This can be an array or function that returns an array.
16424
+ * - **NOTE:** Specifying value, will limit the zoom scope selection within.
16385
16425
  * @name axis․x․extent
16386
16426
  * @memberof Options
16387
16427
  * @type {Array|Function}
@@ -17768,7 +17808,7 @@ var options = {
17768
17808
  * @private
17769
17809
  */
17770
17810
  function getRadiusFn(expandRate) {
17771
- if (expandRate === void 0) { expandRate = 0; }
17811
+ if (expandRate === undefined) { expandRate = 0; }
17772
17812
  var $$ = this;
17773
17813
  var config = $$.config, state = $$.state;
17774
17814
  var hasMultiArcGauge = $$.hasMultiArcGauge();
@@ -17826,7 +17866,7 @@ function getRadiusFn(expandRate) {
17826
17866
  * @private
17827
17867
  */
17828
17868
  corner: function (d, outerRadius) {
17829
- var _a = config.arc_cornerRadius_ratio, ratio = _a === void 0 ? 0 : _a, _b = config.arc_cornerRadius, cornerRadius = _b === void 0 ? 0 : _b;
17869
+ var _a = config.arc_cornerRadius_ratio, ratio = _a === undefined ? 0 : _a, _b = config.arc_cornerRadius, cornerRadius = _b === undefined ? 0 : _b;
17830
17870
  var id = d.data.id, value = d.value;
17831
17871
  var corner = 0;
17832
17872
  if (ratio) {
@@ -17850,7 +17890,7 @@ function getRadiusFn(expandRate) {
17850
17890
  function getAttrTweenFn(fn) {
17851
17891
  return function (d) {
17852
17892
  var getAngleKeyValue = function (_a) {
17853
- var _b = _a.startAngle, startAngle = _b === void 0 ? 0 : _b, _c = _a.endAngle, endAngle = _c === void 0 ? 0 : _c, _d = _a.padAngle, padAngle = _d === void 0 ? 0 : _d;
17893
+ var _b = _a.startAngle, startAngle = _b === undefined ? 0 : _b, _c = _a.endAngle, endAngle = _c === undefined ? 0 : _c, _d = _a.padAngle, padAngle = _d === undefined ? 0 : _d;
17854
17894
  return ({
17855
17895
  startAngle: startAngle,
17856
17896
  endAngle: endAngle,
@@ -17881,7 +17921,7 @@ var shapeArc = {
17881
17921
  .startAngle(startingAngle)
17882
17922
  .endAngle(startingAngle + (2 * Math.PI))
17883
17923
  .padAngle(padAngle)
17884
- .value(function (d) { var _a, _b; return (_b = (_a = d.values) === null || _a === void 0 ? void 0 : _a.reduce(function (a, b) { return a + b.value; }, 0)) !== null && _b !== void 0 ? _b : d; })
17924
+ .value(function (d) { var _a, _b; return (_b = (_a = d.values) === null || _a === undefined ? undefined : _a.reduce(function (a, b) { return a + b.value; }, 0)) !== null && _b !== undefined ? _b : d; })
17885
17925
  .sort($$.getSortCompareFn.bind($$)(true));
17886
17926
  },
17887
17927
  updateRadius: function () {
@@ -17914,7 +17954,7 @@ var shapeArc = {
17914
17954
  */
17915
17955
  getRadius: function (d) {
17916
17956
  var $$ = this;
17917
- var data = d === null || d === void 0 ? void 0 : d.data;
17957
+ var data = d === null || d === undefined ? undefined : d.data;
17918
17958
  var _a = $$.state, innerRadius = _a.innerRadius, outerRadius = _a.outerRadius;
17919
17959
  if (!isNumber(innerRadius) && data) {
17920
17960
  innerRadius = innerRadius[data.id] || 0;
@@ -17974,7 +18014,7 @@ var shapeArc = {
17974
18014
  */
17975
18015
  updateAngle: function (dValue, forRange) {
17976
18016
  var _a;
17977
- if (forRange === void 0) { forRange = false; }
18017
+ if (forRange === undefined) { forRange = false; }
17978
18018
  var $$ = this;
17979
18019
  var config = $$.config, state = $$.state;
17980
18020
  var hasGauge = forRange && $$.hasType("gauge");
@@ -18004,7 +18044,7 @@ var shapeArc = {
18004
18044
  pie($$.filterTargetsToShow())
18005
18045
  .forEach(function (t, i) {
18006
18046
  var _a;
18007
- if (!found && t.data.id === ((_a = d.data) === null || _a === void 0 ? void 0 : _a.id)) {
18047
+ if (!found && t.data.id === ((_a = d.data) === null || _a === undefined ? undefined : _a.id)) {
18008
18048
  found = true;
18009
18049
  d = t;
18010
18050
  d.index = i;
@@ -18021,7 +18061,7 @@ var shapeArc = {
18021
18061
  var gMin = config.gauge_min, gMax = config.gauge_max;
18022
18062
  var max = forRange && !hasGauge ? $$.getTotalDataSum(state.rendered) : gMax;
18023
18063
  var gTic = radius / (max - gMin);
18024
- var value = (_a = d.value) !== null && _a !== void 0 ? _a : 0;
18064
+ var value = (_a = d.value) !== null && _a !== undefined ? _a : 0;
18025
18065
  var gValue = value < gMin ? 0 : value < max ? value - gMin : (max - gMin);
18026
18066
  d.startAngle = gStart;
18027
18067
  d.endAngle = gStart + gTic * gValue;
@@ -18038,7 +18078,7 @@ var shapeArc = {
18038
18078
  var _a;
18039
18079
  var path = "M 0 0";
18040
18080
  if (d.value || d.data) {
18041
- var data = withoutUpdate ? d : (_a = $$.updateAngle(d)) !== null && _a !== void 0 ? _a : null;
18081
+ var data = withoutUpdate ? d : (_a = $$.updateAngle(d)) !== null && _a !== undefined ? _a : null;
18042
18082
  if (data) {
18043
18083
  path = arc$1.cornerRadius(corner(data, outer(data)))(data);
18044
18084
  }
@@ -18056,7 +18096,7 @@ var shapeArc = {
18056
18096
  * @private
18057
18097
  */
18058
18098
  getSvgArcExpanded: function (rate) {
18059
- if (rate === void 0) { rate = 1; }
18099
+ if (rate === undefined) { rate = 1; }
18060
18100
  var $$ = this;
18061
18101
  var _a = getRadiusFn.call($$, rate), inner = _a.inner, outer = _a.outer, corner = _a.corner;
18062
18102
  var arc$1 = arc()
@@ -18085,7 +18125,7 @@ var shapeArc = {
18085
18125
  var format = config.arc_rangeText_format;
18086
18126
  var fixed = $$.hasType("gauge") && config.arc_rangeText_fixed;
18087
18127
  var values = config.arc_rangeText_values;
18088
- if (values === null || values === void 0 ? void 0 : values.length) {
18128
+ if (values === null || values === undefined ? undefined : values.length) {
18089
18129
  var isPercent_1 = config.arc_rangeText_unit === "%";
18090
18130
  var totalSum_1 = $$.getTotalDataSum(state.rendered);
18091
18131
  if (isPercent_1) {
@@ -18121,7 +18161,7 @@ var shapeArc = {
18121
18161
  */
18122
18162
  transformForArcLabel: function (d, forRange) {
18123
18163
  var _a, _b, _c;
18124
- if (forRange === void 0) { forRange = false; }
18164
+ if (forRange === undefined) { forRange = false; }
18125
18165
  var $$ = this;
18126
18166
  var config = $$.config, radiusExpanded = $$.state.radiusExpanded;
18127
18167
  var updated = $$.updateAngle(d, forRange);
@@ -18138,8 +18178,8 @@ var shapeArc = {
18138
18178
  var pos = isFunction(rangeTextPosition) ?
18139
18179
  rangeTextPosition(rangeValues[d.index]) :
18140
18180
  rangeTextPosition;
18141
- x += (_a = pos === null || pos === void 0 ? void 0 : pos.x) !== null && _a !== void 0 ? _a : 0;
18142
- y += (_b = pos === null || pos === void 0 ? void 0 : pos.y) !== null && _b !== void 0 ? _b : 0;
18181
+ x += (_a = pos === null || pos === undefined ? undefined : pos.x) !== null && _a !== undefined ? _a : 0;
18182
+ y += (_b = pos === null || pos === undefined ? undefined : pos.y) !== null && _b !== undefined ? _b : 0;
18143
18183
  }
18144
18184
  translate = "translate(".concat(x, ",").concat(y, ")");
18145
18185
  }
@@ -18153,7 +18193,7 @@ var shapeArc = {
18153
18193
  var h = Math.sqrt(x * x + y * y);
18154
18194
  var ratio = (_c = ["donut", "gauge", "pie", "polar"]
18155
18195
  .filter($$.hasType.bind($$))
18156
- .map(function (v) { return config["".concat(v, "_label_ratio")]; })) === null || _c === void 0 ? void 0 : _c[0];
18196
+ .map(function (v) { return config["".concat(v, "_label_ratio")]; })) === null || _c === undefined ? undefined : _c[0];
18157
18197
  if (ratio) {
18158
18198
  ratio = isFunction(ratio) ? ratio.bind($$.api)(d, outerRadius, h) : ratio;
18159
18199
  }
@@ -18190,7 +18230,7 @@ var shapeArc = {
18190
18230
  var node = select(this);
18191
18231
  var updated = $$.updateAngle(d);
18192
18232
  var ratio = $$.getRatio("arc", updated);
18193
- var isUnderThreshold = $$.meetsLabelThreshold(ratio, (_a = ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$))) === null || _a === void 0 ? void 0 : _a[0]);
18233
+ var isUnderThreshold = $$.meetsLabelThreshold(ratio, (_a = ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$))) === null || _a === undefined ? undefined : _a[0]);
18194
18234
  if (isUnderThreshold) {
18195
18235
  var value = (updated || d).value;
18196
18236
  var text = ($$.getArcLabelFormat() || $$.defaultArcValueFormat)(value, ratio, d.data.id).toString();
@@ -18406,7 +18446,7 @@ var shapeArc = {
18406
18446
  .append("path")
18407
18447
  .attr("class", $$.getClass("arc", true))
18408
18448
  .style("fill", function (d) { return $$.color(d.data); })
18409
- .style("cursor", function (d) { var _a; return (((_a = isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind) === null || _a === void 0 ? void 0 : _a.call(isSelectable, $$.api)(d)) ? "pointer" : null); })
18449
+ .style("cursor", function (d) { var _a; return (((_a = isSelectable === null || isSelectable === undefined ? undefined : isSelectable.bind) === null || _a === undefined ? undefined : _a.call(isSelectable, $$.api)(d)) ? "pointer" : null); })
18410
18450
  .style("opacity", "0")
18411
18451
  .each(function (d) {
18412
18452
  if ($$.isGaugeType(d.data)) {
@@ -18518,7 +18558,7 @@ var shapeArc = {
18518
18558
  * @private
18519
18559
  */
18520
18560
  $el.needle.updateHelper = function (v, updateConfig) {
18521
- if (updateConfig === void 0) { updateConfig = false; }
18561
+ if (updateConfig === undefined) { updateConfig = false; }
18522
18562
  if ($el.needle.style("display") !== "none") {
18523
18563
  $$.$T($el.needle)
18524
18564
  .style("transform", "rotate(".concat($$.getNeedleAngle(v), "deg)"))
@@ -18649,7 +18689,7 @@ var shapeArc = {
18649
18689
  var arcData;
18650
18690
  if (updated) {
18651
18691
  arcData = $$.convertToArcData(updated);
18652
- (_a = $$.toggleShape) === null || _a === void 0 ? void 0 : _a.call($$, this, arcData, i);
18692
+ (_a = $$.toggleShape) === null || _a === undefined ? undefined : _a.call($$, this, arcData, i);
18653
18693
  config.data_onclick.bind($$.api)(arcData, this);
18654
18694
  }
18655
18695
  });
@@ -18663,7 +18703,7 @@ var shapeArc = {
18663
18703
  state.event = event;
18664
18704
  var updated = $$.updateAngle(d);
18665
18705
  var arcData = updated ? $$.convertToArcData(updated) : null;
18666
- var id = (arcData === null || arcData === void 0 ? void 0 : arcData.id) || undefined;
18706
+ var id = (arcData === null || arcData === undefined ? undefined : arcData.id) || undefined;
18667
18707
  selectArc(this, arcData, id);
18668
18708
  $$.setOverOut(true, arcData);
18669
18709
  })
@@ -18688,7 +18728,7 @@ var shapeArc = {
18688
18728
  if (isTouch && $$.hasArcType() && !$$.radars) {
18689
18729
  var getEventArc_1 = function (event) {
18690
18730
  var _a, _b;
18691
- var _c = (_b = (_a = event.changedTouches) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : { clientX: 0, clientY: 0 }, clientX = _c.clientX, clientY = _c.clientY;
18731
+ var _c = (_b = (_a = event.changedTouches) === null || _a === undefined ? undefined : _a[0]) !== null && _b !== undefined ? _b : { clientX: 0, clientY: 0 }, clientX = _c.clientX, clientY = _c.clientY;
18692
18732
  var eventArc = select(doc.elementFromPoint(clientX, clientY));
18693
18733
  return eventArc;
18694
18734
  };
@@ -18700,9 +18740,9 @@ var shapeArc = {
18700
18740
  state.event = event;
18701
18741
  var eventArc = getEventArc_1(event);
18702
18742
  var datum = eventArc.datum();
18703
- var updated = ((datum === null || datum === void 0 ? void 0 : datum.data) && datum.data.id) ? $$.updateAngle(datum) : null;
18743
+ var updated = ((datum === null || datum === undefined ? undefined : datum.data) && datum.data.id) ? $$.updateAngle(datum) : null;
18704
18744
  var arcData = updated ? $$.convertToArcData(updated) : null;
18705
- var id = (arcData === null || arcData === void 0 ? void 0 : arcData.id) || undefined;
18745
+ var id = (arcData === null || arcData === undefined ? undefined : arcData.id) || undefined;
18706
18746
  $$.callOverOutForTouch(arcData);
18707
18747
  isUndefined(id) ? unselectArc() : selectArc(this, arcData, id);
18708
18748
  });
@@ -18735,7 +18775,7 @@ var shapeArc = {
18735
18775
  if (hasGauge) {
18736
18776
  var isFullCircle = config.gauge_fullCircle;
18737
18777
  isFullCircle &&
18738
- (text === null || text === void 0 ? void 0 : text.attr("dy", "".concat(hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
18778
+ (text === null || text === undefined ? undefined : text.attr("dy", "".concat(hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
18739
18779
  if (config.gauge_label_show) {
18740
18780
  arcs.select(".".concat($GAUGE.chartArcsGaugeUnit))
18741
18781
  .attr("dy", "".concat(isFullCircle ? 1.5 : 0.75, "em"))
@@ -18764,7 +18804,7 @@ var shapeArc = {
18764
18804
  var $$ = this;
18765
18805
  var arcs = $$.$el.arcs;
18766
18806
  var filterFn = isNumber(value) ? function (d) { return d.index === value; } : function (d) { return d.data.id === value; };
18767
- return arcs === null || arcs === void 0 ? void 0 : arcs.selectAll(".".concat($COMMON.target, " path")).filter(filterFn);
18807
+ return arcs === null || arcs === undefined ? undefined : arcs.selectAll(".".concat($COMMON.target, " path")).filter(filterFn);
18768
18808
  }
18769
18809
  };
18770
18810
 
@@ -18797,7 +18837,7 @@ var shapeArea = {
18797
18837
  * @private
18798
18838
  */
18799
18839
  updateArea: function (withTransition, isSub) {
18800
- if (isSub === void 0) { isSub = false; }
18840
+ if (isSub === undefined) { isSub = false; }
18801
18841
  var $$ = this;
18802
18842
  var config = $$.config, state = $$.state, $el = $$.$el, $T = $$.$T;
18803
18843
  var $root = isSub ? $el.subchart : $el;
@@ -18828,7 +18868,7 @@ var shapeArea = {
18828
18868
  * @returns {Array}
18829
18869
  */
18830
18870
  redrawArea: function (drawFn, withTransition, isSub) {
18831
- if (isSub === void 0) { isSub = false; }
18871
+ if (isSub === undefined) { isSub = false; }
18832
18872
  var $$ = this;
18833
18873
  var area = (isSub ? this.$el.subchart : this.$el).area;
18834
18874
  var orgAreaOpacity = $$.state.orgAreaOpacity;
@@ -18954,7 +18994,7 @@ var shapeBar = {
18954
18994
  // Bars for each data
18955
18995
  mainBarEnter.append("g")
18956
18996
  .attr("class", classBars)
18957
- .style("cursor", function (d) { var _a; return (((_a = isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind) === null || _a === void 0 ? void 0 : _a.call(isSelectable, $$.api)(d)) ? "pointer" : null); })
18997
+ .style("cursor", function (d) { var _a; return (((_a = isSelectable === null || isSelectable === undefined ? undefined : isSelectable.bind) === null || _a === undefined ? undefined : _a.call(isSelectable, $$.api)(d)) ? "pointer" : null); })
18958
18998
  .call($$.setCssRule(true, " .".concat($BAR.bar), ["fill"], $$.color));
18959
18999
  },
18960
19000
  /**
@@ -18964,7 +19004,7 @@ var shapeBar = {
18964
19004
  * @private
18965
19005
  */
18966
19006
  updateBar: function (withTransition, isSub) {
18967
- if (isSub === void 0) { isSub = false; }
19007
+ if (isSub === undefined) { isSub = false; }
18968
19008
  var $$ = this;
18969
19009
  var config = $$.config, $el = $$.$el, $T = $$.$T;
18970
19010
  var $root = isSub ? $el.subchart : $el;
@@ -19005,7 +19045,7 @@ var shapeBar = {
19005
19045
  * @private
19006
19046
  */
19007
19047
  redrawBar: function (drawFn, withTransition, isSub) {
19008
- if (isSub === void 0) { isSub = false; }
19048
+ if (isSub === undefined) { isSub = false; }
19009
19049
  var $$ = this;
19010
19050
  var bar = (isSub ? $$.$el.subchart : $$.$el).bar;
19011
19051
  return [
@@ -19283,7 +19323,7 @@ var shapeCandlestick = {
19283
19323
  * @private
19284
19324
  */
19285
19325
  updateCandlestick: function (withTransition, isSub) {
19286
- if (isSub === void 0) { isSub = false; }
19326
+ if (isSub === undefined) { isSub = false; }
19287
19327
  var $$ = this;
19288
19328
  var $el = $$.$el, $T = $$.$T;
19289
19329
  var $root = isSub ? $el.subchart : $el;
@@ -19320,7 +19360,7 @@ var shapeCandlestick = {
19320
19360
  return function (d, i, g) {
19321
19361
  var points = getPoints(d, i);
19322
19362
  var value = $$.getCandlestickData(d);
19323
- var isUp = value === null || value === void 0 ? void 0 : value._isUp;
19363
+ var isUp = value === null || value === undefined ? undefined : value._isUp;
19324
19364
  // switch points if axis is rotated, not applicable for sub chart
19325
19365
  var indexX = +isRotated;
19326
19366
  var indexY = +!indexX;
@@ -19363,7 +19403,7 @@ var shapeCandlestick = {
19363
19403
  * @returns {Function}
19364
19404
  */
19365
19405
  generateGetCandlestickPoints: function (indices, isSub) {
19366
- if (isSub === void 0) { isSub = false; }
19406
+ if (isSub === undefined) { isSub = false; }
19367
19407
  var $$ = this;
19368
19408
  var axis = isSub ? $$.axis.subX : $$.axis.x;
19369
19409
  var targetsNum = $$.getIndicesMax(indices) + 1;
@@ -19414,7 +19454,7 @@ var shapeCandlestick = {
19414
19454
  * @returns {Array}
19415
19455
  */
19416
19456
  redrawCandlestick: function (drawFn, withTransition, isSub) {
19417
- if (isSub === void 0) { isSub = false; }
19457
+ if (isSub === undefined) { isSub = false; }
19418
19458
  var $$ = this;
19419
19459
  var $el = $$.$el, $T = $$.$T;
19420
19460
  var candlestick = (isSub ? $el.subchart : $el).candlestick;
@@ -19439,7 +19479,7 @@ var shapeCandlestick = {
19439
19479
  var value = _a.value;
19440
19480
  var d;
19441
19481
  if (isArray(value)) {
19442
- var open_1 = value[0], high = value[1], low = value[2], close_1 = value[3], _b = value[4], volume = _b === void 0 ? false : _b;
19482
+ var open_1 = value[0], high = value[1], low = value[2], close_1 = value[3], _b = value[4], volume = _b === undefined ? false : _b;
19443
19483
  d = { open: open_1, high: high, low: low, close: close_1 };
19444
19484
  if (volume !== false) {
19445
19485
  d.volume = volume;
@@ -19462,7 +19502,7 @@ var shapeCandlestick = {
19462
19502
  * @private
19463
19503
  */
19464
19504
  function getSize(checkNeck) {
19465
- if (checkNeck === void 0) { checkNeck = false; }
19505
+ if (checkNeck === undefined) { checkNeck = false; }
19466
19506
  var $$ = this;
19467
19507
  var config = $$.config, _a = $$.state.current, width = _a.width, height = _a.height;
19468
19508
  var padding = $$.getCurrentPadding();
@@ -19543,7 +19583,7 @@ function getCoord(d) {
19543
19583
  * @private
19544
19584
  */
19545
19585
  function getClipPath(forBackground) {
19546
- if (forBackground === void 0) { forBackground = false; }
19586
+ if (forBackground === undefined) { forBackground = false; }
19547
19587
  var $$ = this;
19548
19588
  var _a = getSize.call($$, true), width = _a.width, height = _a.height, top = _a.top, left = _a.left;
19549
19589
  var neck = getNecklSize.call($$, { width: width, height: height });
@@ -19626,7 +19666,7 @@ var shapeFunnel = {
19626
19666
  var funnel = $$.$el.funnel, config = $$.config, state = $$.state;
19627
19667
  var getTarget = function (event) {
19628
19668
  var _a;
19629
- var target = event.isTrusted ? event.target : (_a = state.eventReceiver.rect) === null || _a === void 0 ? void 0 : _a.node();
19669
+ var target = event.isTrusted ? event.target : (_a = state.eventReceiver.rect) === null || _a === undefined ? undefined : _a.node();
19630
19670
  var data;
19631
19671
  if (/^path$/i.test(target.tagName)) {
19632
19672
  state.event = event;
@@ -19710,12 +19750,12 @@ var shapeFunnel = {
19710
19750
  var _a = getSize.call($$), top = _a.top, left = _a.left, right = _a.right;
19711
19751
  var center = (left - right) / 2;
19712
19752
  var points = {};
19713
- var accumulatedHeight = top !== null && top !== void 0 ? top : 0;
19753
+ var accumulatedHeight = top !== null && top !== undefined ? top : 0;
19714
19754
  targets.each(function (d, i) {
19715
19755
  var _a;
19716
19756
  points[d.id] = [
19717
19757
  [center, accumulatedHeight],
19718
- [center, accumulatedHeight += ((_a = targets === null || targets === void 0 ? void 0 : targets[i]) !== null && _a !== void 0 ? _a : d).ratio]
19758
+ [center, accumulatedHeight += ((_a = targets === null || targets === undefined ? undefined : targets[i]) !== null && _a !== undefined ? _a : d).ratio]
19719
19759
  ];
19720
19760
  });
19721
19761
  return function (d) { return points[d.id]; };
@@ -19748,8 +19788,8 @@ var shapeGauge = {
19748
19788
  var $$ = this;
19749
19789
  var config = $$.config, arcs = $$.$el.arcs;
19750
19790
  var appendText = function (className, value) {
19751
- if (className === void 0) { className = null; }
19752
- if (value === void 0) { value = ""; }
19791
+ if (className === undefined) { className = null; }
19792
+ if (value === undefined) { value = ""; }
19753
19793
  arcs.append("text")
19754
19794
  .attr("class", className)
19755
19795
  .style("text-anchor", "middle")
@@ -19855,7 +19895,7 @@ var shapeGauge = {
19855
19895
  * @private
19856
19896
  */
19857
19897
  function getStrokeDashArray(start, end, pattern, isLastX) {
19858
- if (isLastX === void 0) { isLastX = false; }
19898
+ if (isLastX === undefined) { isLastX = false; }
19859
19899
  var dash = start ? [start, 0] : pattern;
19860
19900
  var _loop_1 = function (i) {
19861
19901
  pattern.forEach(function (v) {
@@ -19893,7 +19933,7 @@ function getRegions(d, _regions, isTimeSeries) {
19893
19933
  // Check start/end of regions
19894
19934
  if (isDefined(_regions)) {
19895
19935
  var getValue = function (v, def) { return (isUndefined(v) ? def : (isTimeSeries ? parseDate.call($$, v) : v)); };
19896
- for (var i = 0, reg = void 0; (reg = _regions[i]); i++) {
19936
+ for (var i = 0, reg = undefined; (reg = _regions[i]); i++) {
19897
19937
  var start = getValue(reg.start, d[0].x);
19898
19938
  var end = getValue(reg.end, d[d.length - 1].x);
19899
19939
  var style = reg.style || { dasharray: dasharray };
@@ -19944,7 +19984,7 @@ var shapeLine = {
19944
19984
  * @private
19945
19985
  */
19946
19986
  updateLine: function (withTransition, isSub) {
19947
- if (isSub === void 0) { isSub = false; }
19987
+ if (isSub === undefined) { isSub = false; }
19948
19988
  var $$ = this;
19949
19989
  var extraLineClasses = $$.format.extraLineClasses, $el = $$.$el, $T = $$.$T;
19950
19990
  var $root = isSub ? $el.subchart : $el;
@@ -19972,7 +20012,7 @@ var shapeLine = {
19972
20012
  * @private
19973
20013
  */
19974
20014
  redrawLine: function (drawFn, withTransition, isSub) {
19975
- if (isSub === void 0) { isSub = false; }
20015
+ if (isSub === undefined) { isSub = false; }
19976
20016
  var $$ = this;
19977
20017
  var $el = $$.$el, $T = $$.$T;
19978
20018
  var line = (isSub ? $el.subchart : $el).line;
@@ -20135,7 +20175,7 @@ var shapeLine = {
20135
20175
  lastLength: 0
20136
20176
  };
20137
20177
  var isLastX = false;
20138
- for (var i = 0, data = void 0; (data = d[i]); i++) {
20178
+ for (var i = 0, data = undefined; (data = d[i]); i++) {
20139
20179
  var prevData = d[i - 1];
20140
20180
  var hasPrevData = prevData && isValue(prevData.value);
20141
20181
  var style = $$.isWithinRegions(data.x, regions);
@@ -20148,7 +20188,7 @@ var shapeLine = {
20148
20188
  path += "".concat(i && hasPrevData ? "L" : "M").concat(xValue(data), ",").concat(yValue(data));
20149
20189
  }
20150
20190
  else if (hasPrevData) {
20151
- style = ((style === null || style === void 0 ? void 0 : style.dasharray) || dasharray).split(" ").map(Number);
20191
+ style = ((style === null || style === undefined ? undefined : style.dasharray) || dasharray).split(" ").map(Number);
20152
20192
  // Draw with region // TODO: Fix for horizotal charts
20153
20193
  xp = getScale(axisType.x, prevData.x, data.x);
20154
20194
  yp = getScale(axisType.y, prevData.value, data.value);
@@ -20203,7 +20243,7 @@ var shapeLine = {
20203
20243
  return path;
20204
20244
  },
20205
20245
  isWithinRegions: function (withinX, withinRegions) {
20206
- for (var i = 0, reg = void 0; (reg = withinRegions[i]); i++) {
20246
+ for (var i = 0, reg = undefined; (reg = withinRegions[i]); i++) {
20207
20247
  if (reg.start < withinX && withinX <= reg.end) {
20208
20248
  return reg.style;
20209
20249
  }
@@ -20242,7 +20282,7 @@ var shapePoint = {
20242
20282
  var config = this.config;
20243
20283
  var opacity = config.point_opacity;
20244
20284
  if (isUndefined(opacity)) {
20245
- opacity = config.point_show && !((_a = this.isPointFocusOnly) === null || _a === void 0 ? void 0 : _a.call(this)) ? null : "0";
20285
+ opacity = config.point_show && !((_a = this.isPointFocusOnly) === null || _a === undefined ? undefined : _a.call(this)) ? null : "0";
20246
20286
  opacity = isValue(this.getBaseValue(d)) ?
20247
20287
  (this.isBubbleType(d) || this.isScatterType(d) ? "0.5" : opacity) :
20248
20288
  "0";
@@ -20308,7 +20348,7 @@ var shapePoint = {
20308
20348
  });
20309
20349
  },
20310
20350
  updateCircle: function (isSub) {
20311
- if (isSub === void 0) { isSub = false; }
20351
+ if (isSub === undefined) { isSub = false; }
20312
20352
  var $$ = this;
20313
20353
  var config = $$.config, state = $$.state, $el = $$.$el;
20314
20354
  var focusOnly = $$.isPointFocusOnly();
@@ -20342,7 +20382,7 @@ var shapePoint = {
20342
20382
  return $$.config.point_radialGradient ? $$.getGradienColortUrl(d.id) : (fn ? fn(d) : null);
20343
20383
  },
20344
20384
  redrawCircle: function (cx, cy, withTransition, flow, isSub) {
20345
- if (isSub === void 0) { isSub = false; }
20385
+ if (isSub === undefined) { isSub = false; }
20346
20386
  var $$ = this;
20347
20387
  var rendered = $$.state.rendered, $el = $$.$el, $T = $$.$T;
20348
20388
  var $root = isSub ? $el.subchart : $el;
@@ -20386,7 +20426,7 @@ var shapePoint = {
20386
20426
  circle = circle
20387
20427
  .filter(function (t) {
20388
20428
  var _a;
20389
- var data = (_a = d.filter) === null || _a === void 0 ? void 0 : _a.call(d, function (v) { return v.id === t.id; });
20429
+ var data = (_a = d.filter) === null || _a === undefined ? undefined : _a.call(d, function (v) { return v.id === t.id; });
20390
20430
  return data.length ? select(this).datum(data[0]) : false;
20391
20431
  });
20392
20432
  }
@@ -20421,7 +20461,7 @@ var shapePoint = {
20421
20461
  return this.xx(d);
20422
20462
  },
20423
20463
  updateCircleY: function (isSub) {
20424
- if (isSub === void 0) { isSub = false; }
20464
+ if (isSub === undefined) { isSub = false; }
20425
20465
  var $$ = this;
20426
20466
  var getPoints = $$.generateGetLinePoints($$.getShapeIndices($$.isLineType), isSub);
20427
20467
  return function (d, i) {
@@ -20513,7 +20553,7 @@ var shapePoint = {
20513
20553
  var mouse = getPointer(state.event, node);
20514
20554
  var element = select(node);
20515
20555
  var prefix = this.isCirclePoint(node) ? "c" : "";
20516
- var pointSensitivity = this.getPointSensitivity(element === null || element === void 0 ? void 0 : element.datum());
20556
+ var pointSensitivity = this.getPointSensitivity(element === null || element === undefined ? undefined : element.datum());
20517
20557
  var cx = +element.attr("".concat(prefix, "x"));
20518
20558
  var cy = +element.attr("".concat(prefix, "y"));
20519
20559
  // if node don't have cx/y or x/y attribute value
@@ -20703,7 +20743,7 @@ function insertPointInfoDefs(point, id) {
20703
20743
  clone.style.fill = "inherit";
20704
20744
  clone.style.stroke = "inherit";
20705
20745
  copyAttr(node, clone);
20706
- if ((_a = node.childNodes) === null || _a === void 0 ? void 0 : _a.length) {
20746
+ if ((_a = node.childNodes) === null || _a === undefined ? undefined : _a.length) {
20707
20747
  var parent_1 = select(clone);
20708
20748
  if ("innerHTML" in clone) {
20709
20749
  parent_1.html(node.innerHTML);
@@ -20734,7 +20774,7 @@ var shapePointCommon = {
20734
20774
  hasLegendDefsPoint: function () {
20735
20775
  var _a;
20736
20776
  var config = this.config;
20737
- return config.legend_show && ((_a = config.point_pattern) === null || _a === void 0 ? void 0 : _a.length) && config.legend_usePoint;
20777
+ return config.legend_show && ((_a = config.point_pattern) === null || _a === undefined ? undefined : _a.length) && config.legend_usePoint;
20738
20778
  },
20739
20779
  getDefsPointId: function (id) {
20740
20780
  var datetimeId = this.state.datetimeId;
@@ -20757,7 +20797,7 @@ var shapePointCommon = {
20757
20797
  }
20758
20798
  return function (d) {
20759
20799
  var _a, _b, _c, _d;
20760
- var id = $$.getTargetSelectorSuffix(d.id || ((_a = d.data) === null || _a === void 0 ? void 0 : _a.id) || d);
20800
+ var id = $$.getTargetSelectorSuffix(d.id || ((_a = d.data) === null || _a === undefined ? undefined : _a.id) || d);
20761
20801
  var element = select(this);
20762
20802
  ids.indexOf(id) < 0 && ids.push(id);
20763
20803
  var point = pattern[ids.indexOf(id) % pattern.length];
@@ -20771,13 +20811,13 @@ var shapePointCommon = {
20771
20811
  insertPointInfoDefs.bind($$)(point, pointId);
20772
20812
  }
20773
20813
  if (method === "create") {
20774
- return (_b = $$.custom) === null || _b === void 0 ? void 0 : _b.create.bind(context).apply(void 0, __spreadArray([element, pointId], args, false));
20814
+ return (_b = $$.custom) === null || _b === undefined ? undefined : _b.create.bind(context).apply(undefined, __spreadArray([element, pointId], args, false));
20775
20815
  }
20776
20816
  else if (method === "update") {
20777
- return (_c = $$.custom) === null || _c === void 0 ? void 0 : _c.update.bind(context).apply(void 0, __spreadArray([element], args, false));
20817
+ return (_c = $$.custom) === null || _c === undefined ? undefined : _c.update.bind(context).apply(undefined, __spreadArray([element], args, false));
20778
20818
  }
20779
20819
  }
20780
- return (_d = point[method]) === null || _d === void 0 ? void 0 : _d.bind(context).apply(void 0, __spreadArray([element], args, false));
20820
+ return (_d = point[method]) === null || _d === undefined ? undefined : _d.bind(context).apply(undefined, __spreadArray([element], args, false));
20781
20821
  };
20782
20822
  };
20783
20823
  }
@@ -20830,7 +20870,7 @@ var shapePolar = {
20830
20870
  getPolarOuterRadius: function (d, outerRadius) {
20831
20871
  var _a;
20832
20872
  var dataMax = getDataMax(this);
20833
- return (((_a = d === null || d === void 0 ? void 0 : d.data.values[0].value) !== null && _a !== void 0 ? _a : 0) / dataMax) * outerRadius;
20873
+ return (((_a = d === null || d === undefined ? undefined : d.data.values[0].value) !== null && _a !== undefined ? _a : 0) / dataMax) * outerRadius;
20834
20874
  },
20835
20875
  /**
20836
20876
  * Update polar based on given data array
@@ -21094,7 +21134,7 @@ var shapeRadar = {
21094
21134
  }
21095
21135
  // axis text
21096
21136
  if (config.radar_axis_text_show) {
21097
- var _b = config.radar_axis_text_position, _c = _b.x, x_1 = _c === void 0 ? 0 : _c, _d = _b.y, y_1 = _d === void 0 ? 0 : _d;
21137
+ var _b = config.radar_axis_text_position, _c = _b.x, x_1 = _c === undefined ? 0 : _c, _d = _b.y, y_1 = _d === undefined ? 0 : _d;
21098
21138
  var textWidth = $$.cache.get(cacheKeyTextWidth) || 0;
21099
21139
  axis.select("text")
21100
21140
  .style("text-anchor", "middle")
@@ -21297,13 +21337,13 @@ var shapeTreemap = {
21297
21337
  var $el = $$.$el, config = $$.config, state = $$.state;
21298
21338
  var getTarget = function (event) {
21299
21339
  var _a;
21300
- var target = event.isTrusted ? event.target : (_a = state.eventReceiver.rect) === null || _a === void 0 ? void 0 : _a.node();
21340
+ var target = event.isTrusted ? event.target : (_a = state.eventReceiver.rect) === null || _a === undefined ? undefined : _a.node();
21301
21341
  var data;
21302
21342
  if (/^rect$/i.test(target.tagName)) {
21303
21343
  state.event = event;
21304
21344
  data = select(target).datum();
21305
21345
  }
21306
- return data === null || data === void 0 ? void 0 : data.data;
21346
+ return data === null || data === undefined ? undefined : data.data;
21307
21347
  };
21308
21348
  if (config.interaction_enabled) {
21309
21349
  var isTouch = state.inputType === "touch";
@@ -21340,7 +21380,7 @@ var shapeTreemap = {
21340
21380
  sliceDice: treemapSliceDice,
21341
21381
  squarify: treemapSquarify,
21342
21382
  resquarify: treemapResquarify
21343
- }[(_a = config.treemap_tile) !== null && _a !== void 0 ? _a : "binary"]) !== null && _b !== void 0 ? _b : treemapBinary;
21383
+ }[(_a = config.treemap_tile) !== null && _a !== undefined ? _a : "binary"]) !== null && _b !== undefined ? _b : treemapBinary;
21344
21384
  return function (node, x0, y0, x1, y1) {
21345
21385
  tile(node, 0, 0, width, height);
21346
21386
  for (var _i = 0, _a = node.children; _i < _a.length; _i++) {
@@ -21373,7 +21413,7 @@ var shapeTreemap = {
21373
21413
  updateTargetsForTreemap: function (targets) {
21374
21414
  var $$ = this;
21375
21415
  var treemap = $$.$el.treemap;
21376
- var treemapData = getHierachyData.call($$, $$.getTreemapData(targets !== null && targets !== void 0 ? targets : $$.data.targets));
21416
+ var treemapData = getHierachyData.call($$, $$.getTreemapData(targets !== null && targets !== undefined ? targets : $$.data.targets));
21377
21417
  // using $el.treemap reference can alter data, so select treemap <g> again
21378
21418
  treemap.data(treemapData);
21379
21419
  },
@@ -22383,8 +22423,9 @@ var optGauge = {
22383
22423
  * @property {number} [gauge.expand.rate=0.98] Set expand rate.
22384
22424
  * @property {number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.
22385
22425
  * @property {boolean} [gauge.enforceMinMax=false] Enforce to given min/max value.
22386
- * - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
22387
- * - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
22426
+ * - **Note:** Only works for single data series.
22427
+ * - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
22428
+ * - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
22388
22429
  * @property {number} [gauge.min=0] Set min value of the gauge.
22389
22430
  * @property {number} [gauge.max=100] Set max value of the gauge.
22390
22431
  * @property {number} [gauge.startingAngle=-1 * Math.PI / 2] Set starting angle where data draws.
@@ -22890,7 +22931,7 @@ var treemap = function () { return (extendAxis([shapeTreemap], [optTreemap]), (t
22890
22931
  * @private
22891
22932
  */
22892
22933
  function setSelection(isSelection, ids, indices, resetOther) {
22893
- if (isSelection === void 0) { isSelection = false; }
22934
+ if (isSelection === undefined) { isSelection = false; }
22894
22935
  var $$ = this;
22895
22936
  var config = $$.config, main = $$.$el.main;
22896
22937
  var selectionGrouped = config.data_selection_grouped;
@@ -23041,7 +23082,7 @@ var subchart$1 = function (domainValue) {
23041
23082
  }
23042
23083
  }
23043
23084
  else {
23044
- domain = (_a = state.domain) !== null && _a !== void 0 ? _a : x.orgDomain();
23085
+ domain = (_a = state.domain) !== null && _a !== undefined ? _a : x.orgDomain();
23045
23086
  }
23046
23087
  }
23047
23088
  return domain;
@@ -23085,10 +23126,10 @@ extend(subchart$1, {
23085
23126
  if ($$.data.targets.length !== $target.size()) {
23086
23127
  $$.updateSizes();
23087
23128
  $$.updateTargetsForSubchart($$.data.targets);
23088
- $target = (_a = subchart.main) === null || _a === void 0 ? void 0 : _a.selectAll(".".concat($COMMON.target));
23129
+ $target = (_a = subchart.main) === null || _a === undefined ? undefined : _a.selectAll(".".concat($COMMON.target));
23089
23130
  }
23090
- $target === null || $target === void 0 ? void 0 : $target.style("opacity", null);
23091
- (_b = subchart.main) === null || _b === void 0 ? void 0 : _b.style("display", null);
23131
+ $target === null || $target === undefined ? undefined : $target.style("opacity", null);
23132
+ (_b = subchart.main) === null || _b === undefined ? undefined : _b.style("display", null);
23092
23133
  this.resize();
23093
23134
  }
23094
23135
  },
@@ -23104,7 +23145,7 @@ extend(subchart$1, {
23104
23145
  hide: function () {
23105
23146
  var $$ = this.internal;
23106
23147
  var main = $$.$el.subchart.main, config = $$.config;
23107
- if (config.subchart_show && (main === null || main === void 0 ? void 0 : main.style("display")) !== "none") {
23148
+ if (config.subchart_show && (main === null || main === undefined ? undefined : main.style("display")) !== "none") {
23108
23149
  config.subchart_show = false;
23109
23150
  main.style("display", "none");
23110
23151
  this.resize();
@@ -23211,7 +23252,7 @@ var zoom$1 = function (domainValue) {
23211
23252
  domain = $$.zoom.getDomain();
23212
23253
  }
23213
23254
  }
23214
- return (_a = state.domain) !== null && _a !== void 0 ? _a : domain;
23255
+ return (_a = state.domain) !== null && _a !== undefined ? _a : domain;
23215
23256
  };
23216
23257
  extend(zoom$1, {
23217
23258
  /**
@@ -23335,7 +23376,7 @@ var apiZoom = {
23335
23376
  $$.brush.getSelection().call($$.brush.move, null) :
23336
23377
  $$.zoom.updateTransformScale(zoomIdentity);
23337
23378
  $$.updateZoom(true);
23338
- zoomResetBtn === null || zoomResetBtn === void 0 ? void 0 : zoomResetBtn.style("display", "none");
23379
+ zoomResetBtn === null || zoomResetBtn === undefined ? undefined : zoomResetBtn.style("display", "none");
23339
23380
  // reset transform
23340
23381
  if (zoomTransform(eventRect.node()) !== zoomIdentity) {
23341
23382
  $$.zoom.transform(eventRect, zoomIdentity);
@@ -23377,7 +23418,7 @@ var subchart = {
23377
23418
  // when brush selection updates happens on one edge, update only chainging edge and
23378
23419
  // is only for adjustment of given domain range to be used to return current domain range.
23379
23420
  type === "brush" && sourceEvent && state.domain &&
23380
- (lastSelection === null || lastSelection === void 0 ? void 0 : lastSelection.forEach(function (v, i) {
23421
+ (lastSelection === null || lastSelection === undefined ? undefined : lastSelection.forEach(function (v, i) {
23381
23422
  if (v !== selection[i]) {
23382
23423
  state.domain[i] = scale.x.orgDomain()[i];
23383
23424
  }
@@ -23388,7 +23429,7 @@ var subchart = {
23388
23429
  lastDomain = scale.x.orgDomain();
23389
23430
  }
23390
23431
  // handle brush's handle position & visibility
23391
- if (target === null || target === void 0 ? void 0 : target.handle) {
23432
+ if (target === null || target === undefined ? undefined : target.handle) {
23392
23433
  if (selection === null) {
23393
23434
  $$.brush.handle.attr("display", "none");
23394
23435
  }
@@ -23414,14 +23455,14 @@ var subchart = {
23414
23455
  var _a;
23415
23456
  var extent = this.extent()();
23416
23457
  if (extent[1].filter(function (v) { return isNaN(v); }).length === 0) {
23417
- (_a = subchart.main) === null || _a === void 0 ? void 0 : _a.select(".".concat(CLASS.brush)).call(this);
23458
+ (_a = subchart.main) === null || _a === undefined ? undefined : _a.select(".".concat(CLASS.brush)).call(this);
23418
23459
  }
23419
23460
  return this;
23420
23461
  };
23421
23462
  // set the brush extent
23422
23463
  $$.brush.scale = function (scale) {
23423
23464
  var h = config.subchart_size_height;
23424
- var extent = $$.getExtent();
23465
+ var extent = $$.axis.getExtent();
23425
23466
  if (!extent && scale.range) {
23426
23467
  extent = [[0, 0], [scale.range()[1], h]];
23427
23468
  }
@@ -23586,7 +23627,7 @@ var subchart = {
23586
23627
  // subchart
23587
23628
  if (config.subchart_show) {
23588
23629
  // reflect main chart to extent on subchart if zoomed
23589
- if (((_a = state.event) === null || _a === void 0 ? void 0 : _a.type) === "zoom") {
23630
+ if (((_a = state.event) === null || _a === undefined ? undefined : _a.type) === "zoom") {
23590
23631
  $$.brush.update();
23591
23632
  }
23592
23633
  // update subchart elements if needed
@@ -23621,7 +23662,7 @@ var subchart = {
23621
23662
  */
23622
23663
  redrawForBrush: function (callCallbck) {
23623
23664
  var _a;
23624
- if (callCallbck === void 0) { callCallbck = true; }
23665
+ if (callCallbck === undefined) { callCallbck = true; }
23625
23666
  var $$ = this;
23626
23667
  var _b = $$.config, onBrush = _b.subchart_onbrush, withY = _b.zoom_rescale, scale = $$.scale, state = $$.state;
23627
23668
  $$.redraw({
@@ -23632,7 +23673,7 @@ var subchart = {
23632
23673
  withDimension: false
23633
23674
  });
23634
23675
  callCallbck && state.rendered &&
23635
- onBrush.bind($$.api)((_a = state.domain) !== null && _a !== void 0 ? _a : scale.x.orgDomain());
23676
+ onBrush.bind($$.api)((_a = state.domain) !== null && _a !== undefined ? _a : scale.x.orgDomain());
23636
23677
  },
23637
23678
  /**
23638
23679
  * Transform context
@@ -23643,31 +23684,11 @@ var subchart = {
23643
23684
  transformContext: function (withTransition, transitions) {
23644
23685
  var $$ = this;
23645
23686
  var subchart = $$.$el.subchart, $T = $$.$T;
23646
- var subXAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisSubX) ?
23687
+ var subXAxis = (transitions === null || transitions === undefined ? undefined : transitions.axisSubX) ?
23647
23688
  transitions.axisSubX :
23648
23689
  $T(subchart.main.select(".".concat(CLASS.axisX)), withTransition);
23649
23690
  subchart.main.attr("transform", $$.getTranslate("context"));
23650
23691
  subXAxis.attr("transform", $$.getTranslate("subX"));
23651
- },
23652
- /**
23653
- * Get extent value
23654
- * @returns {Array} default extent
23655
- * @private
23656
- */
23657
- getExtent: function () {
23658
- var $$ = this;
23659
- var config = $$.config, scale = $$.scale;
23660
- var extent = config.axis_x_extent;
23661
- if (extent) {
23662
- if (isFunction(extent)) {
23663
- extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
23664
- }
23665
- else if ($$.axis.isTimeSeries() && extent.every(isNaN)) {
23666
- var fn_1 = parseDate.bind($$);
23667
- extent = extent.map(function (v) { return scale.subX(fn_1(v)); });
23668
- }
23669
- }
23670
- return extent;
23671
23692
  }
23672
23693
  };
23673
23694
 
@@ -23693,7 +23714,7 @@ var zoom = {
23693
23714
  * @private
23694
23715
  */
23695
23716
  bindZoomEvent: function (bind) {
23696
- if (bind === void 0) { bind = true; }
23717
+ if (bind === undefined) { bind = true; }
23697
23718
  var $$ = this;
23698
23719
  var config = $$.config;
23699
23720
  var zoomEnabled = config.zoom_enabled;
@@ -23743,7 +23764,7 @@ var zoom = {
23743
23764
  var _a;
23744
23765
  var isRotated = config.axis_rotated;
23745
23766
  // in case of resize, update range of orgXScale
23746
- (_a = org.xScale) === null || _a === void 0 ? void 0 : _a.range(scale.x.range());
23767
+ (_a = org.xScale) === null || _a === undefined ? undefined : _a.range(scale.x.range());
23747
23768
  // rescale from the original scale
23748
23769
  var newScale = transform[isRotated ? "rescaleY" : "rescaleX"](org.xScale || scale.x);
23749
23770
  // prevent drag zoom to be out of range
@@ -23816,19 +23837,19 @@ var zoom = {
23816
23837
  var $$ = this;
23817
23838
  var config = $$.config, scale = $$.scale, state = $$.state, org = $$.org;
23818
23839
  var sourceEvent = event.sourceEvent;
23819
- var isUnZoom = (event === null || event === void 0 ? void 0 : event.transform) === zoomIdentity;
23840
+ var isUnZoom = (event === null || event === undefined ? undefined : event.transform) === zoomIdentity;
23820
23841
  if (!config.zoom_enabled ||
23821
23842
  $$.filterTargetsToShow($$.data.targets).length === 0 ||
23822
- (!scale.zoom && (sourceEvent === null || sourceEvent === void 0 ? void 0 : sourceEvent.type.indexOf("touch")) > -1 &&
23823
- (sourceEvent === null || sourceEvent === void 0 ? void 0 : sourceEvent.touches.length) === 1)) {
23843
+ (!scale.zoom && (sourceEvent === null || sourceEvent === undefined ? undefined : sourceEvent.type.indexOf("touch")) > -1 &&
23844
+ (sourceEvent === null || sourceEvent === undefined ? undefined : sourceEvent.touches.length) === 1)) {
23824
23845
  return;
23825
23846
  }
23826
23847
  if (event.sourceEvent) {
23827
23848
  state.zooming = true;
23828
23849
  state.domain = undefined;
23829
23850
  }
23830
- var isMousemove = (sourceEvent === null || sourceEvent === void 0 ? void 0 : sourceEvent.type) === "mousemove";
23831
- var isZoomOut = (sourceEvent === null || sourceEvent === void 0 ? void 0 : sourceEvent.wheelDelta) < 0;
23851
+ var isMousemove = (sourceEvent === null || sourceEvent === undefined ? undefined : sourceEvent.type) === "mousemove";
23852
+ var isZoomOut = (sourceEvent === null || sourceEvent === undefined ? undefined : sourceEvent.wheelDelta) < 0;
23832
23853
  var transform = event.transform;
23833
23854
  if (!isMousemove && isZoomOut && scale.x.domain().every(function (v, i) { return v !== org.xDomain[i]; })) {
23834
23855
  scale.x.domain(org.xDomain);
@@ -23848,7 +23869,7 @@ var zoom = {
23848
23869
  });
23849
23870
  $$.state.cancelClick = isMousemove;
23850
23871
  // do not call event cb when is .unzoom() is called
23851
- !isUnZoom && callFn(config.zoom_onzoom, $$.api, (_a = $$.state.domain) !== null && _a !== void 0 ? _a : $$.zoom.getDomain());
23872
+ !isUnZoom && callFn(config.zoom_onzoom, $$.api, (_a = $$.state.domain) !== null && _a !== undefined ? _a : $$.zoom.getDomain());
23852
23873
  },
23853
23874
  /**
23854
23875
  * 'end' event listener
@@ -23860,11 +23881,11 @@ var zoom = {
23860
23881
  var $$ = this;
23861
23882
  var config = $$.config, state = $$.state;
23862
23883
  var startEvent = $$.zoom.startEvent;
23863
- var e = event === null || event === void 0 ? void 0 : event.sourceEvent;
23864
- var isUnZoom = (event === null || event === void 0 ? void 0 : event.transform) === zoomIdentity;
23865
- if ((startEvent === null || startEvent === void 0 ? void 0 : startEvent.type.indexOf("touch")) > -1) {
23884
+ var e = event === null || event === undefined ? undefined : event.sourceEvent;
23885
+ var isUnZoom = (event === null || event === undefined ? undefined : event.transform) === zoomIdentity;
23886
+ if ((startEvent === null || startEvent === undefined ? undefined : startEvent.type.indexOf("touch")) > -1) {
23866
23887
  startEvent = startEvent.changedTouches[0];
23867
- e = (_a = e === null || e === void 0 ? void 0 : e.changedTouches) === null || _a === void 0 ? void 0 : _a[0];
23888
+ e = (_a = e === null || e === undefined ? undefined : e.changedTouches) === null || _a === undefined ? undefined : _a[0];
23868
23889
  }
23869
23890
  // if click, do nothing. otherwise, click interaction will be canceled.
23870
23891
  if (config.zoom_type === "drag" && (e && startEvent.clientX === e.clientX && startEvent.clientY === e.clientY)) {
@@ -23874,7 +23895,7 @@ var zoom = {
23874
23895
  $$.redrawEventRect();
23875
23896
  $$.updateZoom();
23876
23897
  // do not call event cb when is .unzoom() is called
23877
- !isUnZoom && (e || state.dragging) && callFn(config.zoom_onzoomend, $$.api, (_b = $$.state.domain) !== null && _b !== void 0 ? _b : $$.zoom.getDomain());
23898
+ !isUnZoom && (e || state.dragging) && callFn(config.zoom_onzoomend, $$.api, (_b = $$.state.domain) !== null && _b !== undefined ? _b : $$.zoom.getDomain());
23878
23899
  },
23879
23900
  /**
23880
23901
  * Update zoom
@@ -23932,10 +23953,10 @@ var zoom = {
23932
23953
  // https://bugs.webkit.org/show_bug.cgi?id=226683#c3
23933
23954
  // https://stackoverflow.com/questions/67836886/wheel-event-is-not-fired-on-a-svg-group-element-in-safari
23934
23955
  if (win.GestureEvent &&
23935
- /^((?!chrome|android|mobile).)*safari/i.test((_a = win.navigator) === null || _a === void 0 ? void 0 : _a.userAgent)) {
23956
+ /^((?!chrome|android|mobile).)*safari/i.test((_a = win.navigator) === null || _a === undefined ? undefined : _a.userAgent)) {
23936
23957
  svg.on("wheel", function () { });
23937
23958
  }
23938
- eventRect === null || eventRect === void 0 ? void 0 : eventRect.call(behaviour).on("dblclick.zoom", null);
23959
+ eventRect === null || eventRect === undefined ? undefined : eventRect.call(behaviour).on("dblclick.zoom", null);
23939
23960
  },
23940
23961
  /**
23941
23962
  * Initialize the drag behaviour used for zooming.
@@ -23948,6 +23969,7 @@ var zoom = {
23948
23969
  var start = 0;
23949
23970
  var end = 0;
23950
23971
  var zoomRect;
23972
+ var extent;
23951
23973
  var prop = {
23952
23974
  axis: isRotated ? "y" : "x",
23953
23975
  attr: isRotated ? "height" : "width",
@@ -23956,6 +23978,8 @@ var zoom = {
23956
23978
  $$.zoomBehaviour = drag$1()
23957
23979
  .clickDistance(4)
23958
23980
  .on("start", function (event) {
23981
+ // get extent at first zooming, when is zoomed do not consider
23982
+ extent = $$.scale.zoom ? null : $$.axis.getExtent();
23959
23983
  state.event = event;
23960
23984
  $$.setDragStatus(true);
23961
23985
  $$.unselectRect();
@@ -23967,6 +23991,14 @@ var zoom = {
23967
23991
  .attr("height", isRotated ? 0 : state.height);
23968
23992
  }
23969
23993
  start = getPointer(event, this)[prop.index];
23994
+ if (extent) {
23995
+ if (start < extent[0]) {
23996
+ start = extent[0];
23997
+ }
23998
+ else if (start > extent[1]) {
23999
+ start = extent[1];
24000
+ }
24001
+ }
23970
24002
  end = start;
23971
24003
  zoomRect
23972
24004
  .attr(prop.axis, start)
@@ -23975,6 +24007,14 @@ var zoom = {
23975
24007
  })
23976
24008
  .on("drag", function (event) {
23977
24009
  end = getPointer(event, this)[prop.index];
24010
+ if (extent) {
24011
+ if (end > extent[1]) {
24012
+ end = extent[1];
24013
+ }
24014
+ else if (end < extent[0]) {
24015
+ end = extent[0];
24016
+ }
24017
+ }
23978
24018
  zoomRect
23979
24019
  .attr(prop.axis, Math.min(start, end))
23980
24020
  .attr(prop.attr, Math.abs(end - start));
@@ -24023,7 +24063,7 @@ var zoom = {
24023
24063
  getZoomTransform: function () {
24024
24064
  var $$ = this;
24025
24065
  var eventRect = $$.$el.eventRect;
24026
- return (eventRect === null || eventRect === void 0 ? void 0 : eventRect.node()) ? zoomTransform(eventRect.node()) : { k: 1 };
24066
+ return (eventRect === null || eventRect === undefined ? undefined : eventRect.node()) ? zoomTransform(eventRect.node()) : { k: 1 };
24027
24067
  }
24028
24068
  };
24029
24069
 
@@ -24067,7 +24107,7 @@ var drag = {
24067
24107
  // TODO: binary search when multiple xs
24068
24108
  main.selectAll(".".concat($SHAPE.shapes))
24069
24109
  .selectAll(".".concat($SHAPE.shape))
24070
- .filter(function (d) { return isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind($$.api)(d); })
24110
+ .filter(function (d) { return isSelectable === null || isSelectable === undefined ? undefined : isSelectable.bind($$.api)(d); })
24071
24111
  .each(function (d, i) {
24072
24112
  var shape = select(this);
24073
24113
  var isSelected = shape.classed($SELECT.SELECTED);
@@ -24175,7 +24215,7 @@ var selection = __assign(__assign({}, drag), {
24175
24215
  unselectPoint: function (target, d, i) {
24176
24216
  var $$ = this;
24177
24217
  var config = $$.config, main = $$.$el.main, $T = $$.$T;
24178
- callFn(config.data_onunselected, $$.api, d, target === null || target === void 0 ? void 0 : target.node());
24218
+ callFn(config.data_onunselected, $$.api, d, target === null || target === undefined ? undefined : target.node());
24179
24219
  // remove selected-circle from low layer g
24180
24220
  $T(main.select(".".concat($SELECT.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
24181
24221
  .selectAll(".".concat($SELECT.selectedCircle, "-").concat(i)))
@@ -24263,7 +24303,7 @@ var selection = __assign(__assign({}, drag), {
24263
24303
  var toggle_1 = $$.getToggle(that, d).bind($$);
24264
24304
  var toggledShape_1;
24265
24305
  if (!config.data_selection_multiple) {
24266
- var focusOnly = (_a = $$.isPointFocusOnly) === null || _a === void 0 ? void 0 : _a.call($$);
24306
+ var focusOnly = (_a = $$.isPointFocusOnly) === null || _a === undefined ? undefined : _a.call($$);
24267
24307
  var selector = ".".concat(focusOnly ? $SELECT.selectedCircles : $SHAPE.shapes);
24268
24308
  if (config.data_selection_grouped) {
24269
24309
  selector += $$.getTargetSelectorSuffix(d.id);
@@ -24607,7 +24647,7 @@ var zoomModule = function () {
24607
24647
  var defaults = {};
24608
24648
  /**
24609
24649
  * @namespace bb
24610
- * @version 3.14.1
24650
+ * @version 3.14.3
24611
24651
  */
24612
24652
  var bb = {
24613
24653
  /**
@@ -24617,7 +24657,7 @@ var bb = {
24617
24657
  * bb.version; // "1.0.0"
24618
24658
  * @memberof bb
24619
24659
  */
24620
- version: "3.14.1",
24660
+ version: "3.14.3",
24621
24661
  /**
24622
24662
  * Generate chart
24623
24663
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: