billboard.js 2.2.5 → 2.2.7

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.
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 2.2.5
8
+ * @version 2.2.7
9
9
  */
10
10
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
11
11
  import { event, select, mouse, namespaces, selectAll } from 'd3-selection';
@@ -347,7 +347,7 @@ var Store = /** @class */ (function () {
347
347
  return Store;
348
348
  }());
349
349
 
350
- /*! *****************************************************************************
350
+ /******************************************************************************
351
351
  Copyright (c) Microsoft Corporation.
352
352
 
353
353
  Permission to use, copy, modify, and/or distribute this software for any
@@ -361,18 +361,15 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
361
361
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
362
362
  PERFORMANCE OF THIS SOFTWARE.
363
363
  ***************************************************************************** */
364
-
365
364
  var _assign = function __assign() {
366
365
  return _assign = Object.assign || function (t) {
367
366
  for (var s, i = 1, n = arguments.length; i < n; i++) for (var p in s = arguments[i], s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
368
-
369
367
  return t;
370
368
  }, _assign.apply(this, arguments);
371
369
  };
372
- function __spreadArray(to, from) {
373
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
374
-
375
- return to;
370
+ function __spreadArray(to, from, pack) {
371
+ if (pack || arguments.length === 2) for (var ar, i = 0, l = from.length; i < l; i++) (ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]);
372
+ return to.concat(ar || Array.prototype.slice.call(from));
376
373
  }
377
374
 
378
375
  /**
@@ -1995,7 +1992,7 @@ function endall(transition, cb) {
1995
1992
  for (var _i = 0; _i < arguments.length; _i++) {
1996
1993
  args[_i] = arguments[_i];
1997
1994
  }
1998
- !--n && cb.apply.apply(cb, __spreadArray([this], args));
1995
+ !--n && cb.apply.apply(cb, __spreadArray([this], args, false));
1999
1996
  });
2000
1997
  }
2001
1998
  /**
@@ -2035,7 +2032,7 @@ function setTextValue(node, text, dy, toMiddle) {
2035
2032
  multiline.forEach(function (v, i) {
2036
2033
  node.append("tspan")
2037
2034
  .attr("x", 0)
2038
- .attr("dy", (i === 0 ? dy[0] * len_1 : dy[1]) + "em")
2035
+ .attr("dy", "".concat(i === 0 ? dy[0] * len_1 : dy[1], "em"))
2039
2036
  .text(v);
2040
2037
  });
2041
2038
  }
@@ -2075,7 +2072,10 @@ function getPathBox(path) {
2075
2072
  var x = items[0].x;
2076
2073
  var y = Math.min(items[0].y, items[1].y);
2077
2074
  return {
2078
- x: x, y: y, width: width, height: height
2075
+ x: x,
2076
+ y: y,
2077
+ width: width,
2078
+ height: height
2079
2079
  };
2080
2080
  }
2081
2081
  /**
@@ -2095,7 +2095,7 @@ function getBrushSelection(_a) {
2095
2095
  selection = event$1.selection;
2096
2096
  // check from brush area selection
2097
2097
  }
2098
- else if (main && (selection = main.select("." + CLASS.brush).node())) {
2098
+ else if (main && (selection = main.select(".".concat(CLASS.brush)).node())) {
2099
2099
  selection = brushSelection(selection);
2100
2100
  }
2101
2101
  return selection;
@@ -2240,7 +2240,7 @@ function getCssRules(styleSheets) {
2240
2240
  }
2241
2241
  }
2242
2242
  catch (e) {
2243
- console.error("Error while reading rules from " + sheet.href + ": " + e.toString());
2243
+ console.error("Error while reading rules from ".concat(sheet.href, ": ").concat(e.toString()));
2244
2244
  }
2245
2245
  });
2246
2246
  return rules;
@@ -2308,7 +2308,7 @@ function mergeObj(target) {
2308
2308
  }
2309
2309
  });
2310
2310
  }
2311
- return mergeObj.apply(void 0, __spreadArray([target], objectN));
2311
+ return mergeObj.apply(void 0, __spreadArray([target], objectN, false));
2312
2312
  }
2313
2313
  /**
2314
2314
  * Sort value
@@ -2427,7 +2427,7 @@ var emulateEvent = {
2427
2427
  function tplProcess(tpl, data) {
2428
2428
  var res = tpl;
2429
2429
  for (var x in data) {
2430
- res = res.replace(new RegExp("{=" + x + "}", "g"), data[x]);
2430
+ res = res.replace(new RegExp("{=".concat(x, "}"), "g"), data[x]);
2431
2431
  }
2432
2432
  return res;
2433
2433
  }
@@ -2452,7 +2452,7 @@ function parseDate(date) {
2452
2452
  }
2453
2453
  if (!parsedDate || isNaN(+parsedDate)) {
2454
2454
  console && console.error &&
2455
- console.error("Failed to parse x '" + date + "' to Date object");
2455
+ console.error("Failed to parse x '".concat(date, "' to Date object"));
2456
2456
  }
2457
2457
  return parsedDate;
2458
2458
  }
@@ -2700,7 +2700,7 @@ var dataConvert = {
2700
2700
  data = {};
2701
2701
  ["url", "mimeType", "headers", "keys", "json", "keys", "rows", "columns"]
2702
2702
  .forEach(function (v) {
2703
- var key = "data_" + v;
2703
+ var key = "data_".concat(v);
2704
2704
  if (key in args) {
2705
2705
  data[v] = args[key];
2706
2706
  }
@@ -2749,10 +2749,10 @@ var dataConvert = {
2749
2749
  if (req.readyState === 4) {
2750
2750
  if (req.status === 200) {
2751
2751
  var response = req.responseText;
2752
- response && done.call(_this, _this["convert" + capitalize(mimeType) + "ToData"](mimeType === "json" ? JSON.parse(response) : response, keys));
2752
+ response && done.call(_this, _this["convert".concat(capitalize(mimeType), "ToData")](mimeType === "json" ? JSON.parse(response) : response, keys));
2753
2753
  }
2754
2754
  else {
2755
- throw new Error(url + ": Something went wrong loading!");
2755
+ throw new Error("".concat(url, ": Something went wrong loading!"));
2756
2756
  }
2757
2757
  }
2758
2758
  };
@@ -2849,7 +2849,7 @@ var dataConvert = {
2849
2849
  var newRow_1 = {};
2850
2850
  row.forEach(function (v, j) {
2851
2851
  if (isUndefined(v)) {
2852
- throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
2852
+ throw new Error("Source data is missing a component at (".concat(i, ", ").concat(j, ")!"));
2853
2853
  }
2854
2854
  newRow_1[keys[j]] = v;
2855
2855
  });
@@ -2868,7 +2868,7 @@ var dataConvert = {
2868
2868
  newRows[j - 1] = {};
2869
2869
  }
2870
2870
  if (isUndefined(v)) {
2871
- throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
2871
+ throw new Error("Source data is missing a component at (".concat(i, ", ").concat(j, ")!"));
2872
2872
  }
2873
2873
  newRows[j - 1][key] = v;
2874
2874
  }
@@ -2921,7 +2921,7 @@ var dataConvert = {
2921
2921
  // check x is defined
2922
2922
  ids.forEach(function (id) {
2923
2923
  if (!_this.data.xs[id]) {
2924
- throw new Error("x is not defined for id = \"" + id + "\".");
2924
+ throw new Error("x is not defined for id = \"".concat(id, "\"."));
2925
2925
  }
2926
2926
  });
2927
2927
  // convert to target
@@ -3177,8 +3177,8 @@ var data$1 = {
3177
3177
  (data || this.data.targets.map(function (t) { return t.values; }))
3178
3178
  .forEach(function (v, i) {
3179
3179
  var value = v.map(getBaseValue).filter(isNumber);
3180
- min = Math.min.apply(Math, __spreadArray([i ? min : Infinity], value));
3181
- max = Math.max.apply(Math, __spreadArray([i ? max : -Infinity], value));
3180
+ min = Math.min.apply(Math, __spreadArray([i ? min : Infinity], value, false));
3181
+ max = Math.max.apply(Math, __spreadArray([i ? max : -Infinity], value, false));
3182
3182
  });
3183
3183
  return { min: min, max: max };
3184
3184
  },
@@ -3245,8 +3245,8 @@ var data$1 = {
3245
3245
  var total = $$.cache.get(cacheKey);
3246
3246
  if (!isNumber(total)) {
3247
3247
  var sum = mergeArray($$.data.targets.map(function (t) { return t.values; }))
3248
- .map(function (v) { return v.value; })
3249
- .reduce(function (p, c) { return p + c; });
3248
+ .map(function (v) { return v.value; });
3249
+ total = sum.length ? sum.reduce(function (p, c) { return p + c; }) : 0;
3250
3250
  $$.cache.add(cacheKey, total = sum);
3251
3251
  }
3252
3252
  if (subtractHidden) {
@@ -3425,7 +3425,7 @@ var data$1 = {
3425
3425
  */
3426
3426
  orderTargets: function (targetsValue) {
3427
3427
  var $$ = this;
3428
- var targets = __spreadArray([], targetsValue);
3428
+ var targets = __spreadArray([], targetsValue, true);
3429
3429
  var fn = $$.getSortCompareFn();
3430
3430
  fn && targets.sort(fn);
3431
3431
  return targets;
@@ -3546,7 +3546,7 @@ var data$1 = {
3546
3546
  data
3547
3547
  .filter(function (v) { return $$.isBarType(v.id); })
3548
3548
  .forEach(function (v) {
3549
- var shape = main.select("." + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + " ." + CLASS.bar + "-" + v.index).node();
3549
+ var shape = main.select(".".concat(CLASS.bars).concat($$.getTargetSelectorSuffix(v.id), " .").concat(CLASS.bar, "-").concat(v.index)).node();
3550
3550
  if (!closest && $$.isWithinBar(shape)) {
3551
3551
  closest = v;
3552
3552
  }
@@ -3624,7 +3624,7 @@ var data$1 = {
3624
3624
  updateDataAttributes: function (name, attrs) {
3625
3625
  var $$ = this;
3626
3626
  var config = $$.config;
3627
- var current = config["data_" + name];
3627
+ var current = config["data_".concat(name)];
3628
3628
  if (isUndefined(attrs)) {
3629
3629
  return current;
3630
3630
  }
@@ -3821,7 +3821,7 @@ var dataLoad = {
3821
3821
  state.withoutFadeIn[id] = false;
3822
3822
  // Remove target's elements
3823
3823
  if ($el.legend) {
3824
- $el.legend.selectAll("." + CLASS.legendItem + $$.getTargetSelectorSuffix(id)).remove();
3824
+ $el.legend.selectAll(".".concat(CLASS.legendItem).concat($$.getTargetSelectorSuffix(id))).remove();
3825
3825
  }
3826
3826
  // Remove target
3827
3827
  $$.data.targets = $$.data.targets.filter(function (t) { return t.id !== id; });
@@ -3851,7 +3851,7 @@ var interaction = {
3851
3851
  return;
3852
3852
  }
3853
3853
  }
3854
- main.selectAll("." + CLASS.shape + "-" + index)
3854
+ main.selectAll(".".concat(CLASS.shape, "-").concat(index))
3855
3855
  .each(function () {
3856
3856
  select(this).classed(CLASS.EXPANDED, true);
3857
3857
  if (isSelectionEnabled) {
@@ -3902,11 +3902,11 @@ var interaction = {
3902
3902
  var callback_1 = config[isOver ? "data_onover" : "data_onout"].bind($$.api);
3903
3903
  config.color_onover && $$.setOverColor(isOver, d, isArc);
3904
3904
  if (isArc) {
3905
- callback_1(d, main.select("." + CLASS.arc + $$.getTargetSelectorSuffix(d.id)).node());
3905
+ callback_1(d, main.select(".".concat(CLASS.arc).concat($$.getTargetSelectorSuffix(d.id))).node());
3906
3906
  }
3907
3907
  else if (!config.tooltip_grouped) {
3908
3908
  var last_1 = $$.cache.get(KEY.setOverOut) || [];
3909
- var shape = main.selectAll("." + CLASS.shape + "-" + d)
3909
+ var shape = main.selectAll(".".concat(CLASS.shape, "-").concat(d))
3910
3910
  .filter(function (d) {
3911
3911
  return $$.isWithinShape(this, d);
3912
3912
  });
@@ -3931,7 +3931,7 @@ var interaction = {
3931
3931
  $$.showCircleFocus($$.getAllValuesOnIndex(d, true)) :
3932
3932
  $$.expandCirclesBars(d, null, true);
3933
3933
  }
3934
- !$$.isMultipleX() && main.selectAll("." + CLASS.shape + "-" + d)
3934
+ !$$.isMultipleX() && main.selectAll(".".concat(CLASS.shape, "-").concat(d))
3935
3935
  .each(function (d) {
3936
3936
  callback_1(d, this);
3937
3937
  });
@@ -3983,7 +3983,7 @@ var interaction = {
3983
3983
  var $$ = this;
3984
3984
  var config = $$.config, _a = $$.state, eventReceiver = _a.eventReceiver, hasAxis = _a.hasAxis, hasRadar = _a.hasRadar, _b = $$.$el, eventRect = _b.eventRect, arcs = _b.arcs, radar = _b.radar;
3985
3985
  var isMultipleX = $$.isMultipleX();
3986
- var element = (hasRadar ? radar.axes.select("." + CLASS.axis + "-" + index + " text") : (eventRect || arcs.selectAll("." + CLASS.target + " path").filter(function (d, i) { return i === index; }))).node();
3986
+ var element = (hasRadar ? radar.axes.select(".".concat(CLASS.axis, "-").concat(index, " text")) : (eventRect || arcs.selectAll(".".concat(CLASS.target, " path")).filter(function (d, i) { return i === index; }))).node();
3987
3987
  var _c = element.getBoundingClientRect(), width = _c.width, left = _c.left, top = _c.top;
3988
3988
  if (hasAxis && !hasRadar && !isMultipleX) {
3989
3989
  var coords = eventReceiver.coords[index];
@@ -4012,7 +4012,7 @@ var interaction = {
4012
4012
  */
4013
4013
  var classModule = {
4014
4014
  generateClass: function (prefix, targetId) {
4015
- return " " + prefix + " " + (prefix + this.getTargetSelectorSuffix(targetId));
4015
+ return " ".concat(prefix, " ").concat(prefix + this.getTargetSelectorSuffix(targetId));
4016
4016
  },
4017
4017
  /**
4018
4018
  * Get class string
@@ -4040,7 +4040,7 @@ var classModule = {
4040
4040
  */
4041
4041
  getChartClass: function (type) {
4042
4042
  var _this = this;
4043
- return function (d) { return CLASS["chart" + type] + _this.classTarget((d.data ? d.data : d).id); };
4043
+ return function (d) { return CLASS["chart".concat(type)] + _this.classTarget((d.data ? d.data : d).id); };
4044
4044
  },
4045
4045
  generateExtraLineClass: function () {
4046
4046
  var $$ = this;
@@ -4055,13 +4055,13 @@ var classModule = {
4055
4055
  };
4056
4056
  },
4057
4057
  classRegion: function (d, i) {
4058
- return this.generateClass(CLASS.region, i) + " " + ("class" in d ? d["class"] : "");
4058
+ return "".concat(this.generateClass(CLASS.region, i), " ").concat("class" in d ? d["class"] : "");
4059
4059
  },
4060
4060
  classTarget: function (id) {
4061
4061
  var additionalClassSuffix = this.config.data_classes[id];
4062
4062
  var additionalClass = "";
4063
4063
  if (additionalClassSuffix) {
4064
- additionalClass = " " + CLASS.target + "-" + additionalClassSuffix;
4064
+ additionalClass = " ".concat(CLASS.target, "-").concat(additionalClassSuffix);
4065
4065
  }
4066
4066
  return this.generateClass(CLASS.target, id) + additionalClass;
4067
4067
  },
@@ -4069,20 +4069,20 @@ var classModule = {
4069
4069
  return this.classFocused(d) + this.classDefocused(d);
4070
4070
  },
4071
4071
  classFocused: function (d) {
4072
- return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : "");
4072
+ return " ".concat(this.state.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : "");
4073
4073
  },
4074
4074
  classDefocused: function (d) {
4075
- return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : "");
4075
+ return " ".concat(this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : "");
4076
4076
  },
4077
4077
  getTargetSelectorSuffix: function (targetId) {
4078
4078
  return targetId || targetId === 0 ?
4079
- ("-" + targetId).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-") : "";
4079
+ "-".concat(targetId).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-") : "";
4080
4080
  },
4081
4081
  selectorTarget: function (id, prefix) {
4082
4082
  var pfx = prefix || "";
4083
4083
  var target = this.getTargetSelectorSuffix(id);
4084
4084
  // select target & circle
4085
- return pfx + "." + (CLASS.target + target) + ", " + pfx + "." + (CLASS.circles + target);
4085
+ return "".concat(pfx, ".").concat(CLASS.target + target, ", ").concat(pfx, ".").concat(CLASS.circles + target);
4086
4086
  },
4087
4087
  selectorTargets: function (idsValue, prefix) {
4088
4088
  var _this = this;
@@ -4091,7 +4091,7 @@ var classModule = {
4091
4091
  ids.map(function (id) { return _this.selectorTarget(id, prefix); }) : null;
4092
4092
  },
4093
4093
  selectorLegend: function (id) {
4094
- return "." + (CLASS.legendItem + this.getTargetSelectorSuffix(id));
4094
+ return ".".concat(CLASS.legendItem + this.getTargetSelectorSuffix(id));
4095
4095
  },
4096
4096
  selectorLegends: function (ids) {
4097
4097
  var _this = this;
@@ -4190,10 +4190,10 @@ var color = {
4190
4190
  // Add background color to patterns
4191
4191
  var colorizedPatterns = pattern.map(function (p, index) {
4192
4192
  var color = p.replace(/[#\(\)\s,]/g, "");
4193
- var id = $$.state.datetimeId + "-pattern-" + color + "-" + index;
4193
+ var id = "".concat($$.state.datetimeId, "-pattern-").concat(color, "-").concat(index);
4194
4194
  return colorizePattern(tiles_1[index % tiles_1.length], p, id);
4195
4195
  });
4196
- pattern = colorizedPatterns.map(function (p) { return "url(#" + p.id + ")"; });
4196
+ pattern = colorizedPatterns.map(function (p) { return "url(#".concat(p.id, ")"); });
4197
4197
  $$.patterns = colorizedPatterns;
4198
4198
  }
4199
4199
  return function (d) {
@@ -4268,8 +4268,8 @@ var color = {
4268
4268
  }
4269
4269
  main.selectAll(isObject(d) ?
4270
4270
  // when is Arc type
4271
- "." + CLASS.arc + $$.getTargetSelectorSuffix(d.id) :
4272
- "." + CLASS.shape + "-" + d).style("fill", color);
4271
+ ".".concat(CLASS.arc).concat($$.getTargetSelectorSuffix(d.id)) :
4272
+ ".".concat(CLASS.shape, "-").concat(d)).style("fill", color);
4273
4273
  }
4274
4274
  };
4275
4275
 
@@ -4350,7 +4350,7 @@ var domain = {
4350
4350
  var ids = $$.mapToIds(targets);
4351
4351
  var ys = $$.getValuesAsIdKeyed(targets);
4352
4352
  if (dataGroups.length > 0) {
4353
- var hasValue_1 = $$["has" + (isMin ? "Negative" : "Positive") + "ValueInTargets"](targets);
4353
+ var hasValue_1 = $$["has".concat(isMin ? "Negative" : "Positive", "ValueInTargets")](targets);
4354
4354
  var _loop_1 = function (j, idsInGroup) {
4355
4355
  // Determine baseId
4356
4356
  idsInGroup = idsInGroup.filter(function (v) { return ids.indexOf(v) >= 0; });
@@ -4409,7 +4409,7 @@ var domain = {
4409
4409
  getYDomain: function (targets, axisId, xDomain) {
4410
4410
  var $$ = this;
4411
4411
  var axis = $$.axis, config = $$.config, scale = $$.scale;
4412
- var pfx = "axis_" + axisId;
4412
+ var pfx = "axis_".concat(axisId);
4413
4413
  if ($$.isStackNormalized()) {
4414
4414
  return [0, 100];
4415
4415
  }
@@ -4428,16 +4428,16 @@ var domain = {
4428
4428
  $$.getYDomain(targets, "y2", xDomain);
4429
4429
  }
4430
4430
  }
4431
- var yMin = config[pfx + "_min"];
4432
- var yMax = config[pfx + "_max"];
4431
+ var yMin = config["".concat(pfx, "_min")];
4432
+ var yMax = config["".concat(pfx, "_max")];
4433
4433
  var yDomainMin = $$.getYDomainMin(yTargets);
4434
4434
  var yDomainMax = $$.getYDomainMax(yTargets);
4435
- var center = config[pfx + "_center"];
4436
- var isZeroBased = __spreadArray([TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER], TYPE_BY_CATEGORY.Line).some(function (v) {
4435
+ var center = config["".concat(pfx, "_center")];
4436
+ var isZeroBased = __spreadArray([TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER], TYPE_BY_CATEGORY.Line, true).some(function (v) {
4437
4437
  var type = v.indexOf("area") > -1 ? "area" : v;
4438
- return $$.hasType(v, yTargets) && config[type + "_zerobased"];
4438
+ return $$.hasType(v, yTargets) && config["".concat(type, "_zerobased")];
4439
4439
  });
4440
- var isInverted = config[pfx + "_inverted"];
4440
+ var isInverted = config["".concat(pfx, "_inverted")];
4441
4441
  var showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated;
4442
4442
  var showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;
4443
4443
  // MEMO: avoid inverting domain unexpectedly
@@ -4489,7 +4489,7 @@ var domain = {
4489
4489
  }
4490
4490
  // if padding is set, the domain will be updated relative the current domain value
4491
4491
  // ex) $$.height=300, padding.top=150, domainLength=4 --> domain=6
4492
- var p = config[pfx + "_padding"];
4492
+ var p = config["".concat(pfx, "_padding")];
4493
4493
  if (notEmpty(p)) {
4494
4494
  ["bottom", "top"].forEach(function (v) {
4495
4495
  padding[v] = axis.getPadding(p, v, padding[v], domainLength);
@@ -4506,7 +4506,7 @@ var domain = {
4506
4506
  },
4507
4507
  getXDomainMinMax: function (targets, type) {
4508
4508
  var $$ = this;
4509
- var configValue = $$.config["axis_x_" + type];
4509
+ var configValue = $$.config["axis_x_".concat(type)];
4510
4510
  var dataValue = getMinMax$1(type, targets.map(function (t) { return getMinMax$1(type, t.values.map(function (v) { return v.x; })); }));
4511
4511
  var value = isObject(configValue) ? configValue.value : configValue;
4512
4512
  value = isDefined(value) && $$.axis.isTimeSeries() ? parseDate(value) : value;
@@ -4652,7 +4652,7 @@ var domain = {
4652
4652
  */
4653
4653
  function getFormat($$, typeValue, v) {
4654
4654
  var config = $$.config;
4655
- var type = "axis_" + typeValue + "_tick_format";
4655
+ var type = "axis_".concat(typeValue, "_tick_format");
4656
4656
  var format = config[type] ?
4657
4657
  config[type] : $$.defaultValueFormat;
4658
4658
  return format(v);
@@ -4681,7 +4681,7 @@ var format = {
4681
4681
  return isValue(v) ? +v : "";
4682
4682
  },
4683
4683
  defaultArcValueFormat: function (v, ratio) {
4684
- return (ratio * 100).toFixed(1) + "%";
4684
+ return "".concat((ratio * 100).toFixed(1), "%");
4685
4685
  },
4686
4686
  dataLabelFormat: function (targetId) {
4687
4687
  var $$ = this;
@@ -4757,7 +4757,7 @@ var legend$1 = {
4757
4757
  $$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions);
4758
4758
  }
4759
4759
  // toggle legend state
4760
- $el.legend.selectAll("." + CLASS.legendItem)
4760
+ $el.legend.selectAll(".".concat(CLASS.legendItem))
4761
4761
  .classed(CLASS.legendItemHidden, function (id) {
4762
4762
  var hide = !$$.isTargetToShow(id);
4763
4763
  if (hide) {
@@ -4874,7 +4874,7 @@ var legend$1 = {
4874
4874
  updateLegendItemColor: function (id, color) {
4875
4875
  var legend = this.$el.legend;
4876
4876
  if (legend) {
4877
- legend.select("." + CLASS.legendItem + "-" + id + " line")
4877
+ legend.select(".".concat(CLASS.legendItem, "-").concat(id, " line"))
4878
4878
  .style("stroke", color);
4879
4879
  }
4880
4880
  },
@@ -4928,7 +4928,7 @@ var legend$1 = {
4928
4928
  var $$ = this;
4929
4929
  var legend = $$.$el.legend;
4930
4930
  var targetIdz = $$.mapToTargetIds(targetIds);
4931
- legend && legend.selectAll("." + CLASS.legendItem)
4931
+ legend && legend.selectAll(".".concat(CLASS.legendItem))
4932
4932
  .filter(function (id) { return targetIdz.indexOf(id) >= 0; })
4933
4933
  .classed(CLASS.legendItemFocused, focus)
4934
4934
  .transition()
@@ -4945,7 +4945,7 @@ var legend$1 = {
4945
4945
  revertLegend: function () {
4946
4946
  var $$ = this;
4947
4947
  var legend = $$.$el.legend;
4948
- legend && legend.selectAll("." + CLASS.legendItem)
4948
+ legend && legend.selectAll(".".concat(CLASS.legendItem))
4949
4949
  .classed(CLASS.legendItemFocused, false)
4950
4950
  .transition()
4951
4951
  .duration(100)
@@ -5056,7 +5056,7 @@ var legend$1 = {
5056
5056
  if (!callFn(config.legend_item_onout, api, id)) {
5057
5057
  select(this).classed(CLASS.legendItemFocused, false);
5058
5058
  if (hasGauge) {
5059
- $$.undoMarkOverlapped($$, "." + CLASS.gaugeValue);
5059
+ $$.undoMarkOverlapped($$, ".".concat(CLASS.gaugeValue));
5060
5060
  }
5061
5061
  $$.api.revert();
5062
5062
  }
@@ -5065,7 +5065,7 @@ var legend$1 = {
5065
5065
  if (!callFn(config.legend_item_onover, api, id)) {
5066
5066
  select(this).classed(CLASS.legendItemFocused, true);
5067
5067
  if (hasGauge) {
5068
- $$.markOverlapped(id, $$, "." + CLASS.gaugeValue);
5068
+ $$.markOverlapped(id, $$, ".".concat(CLASS.gaugeValue));
5069
5069
  }
5070
5070
  if (!state.transiting && $$.isTargetToShow(id)) {
5071
5071
  api.focus(id);
@@ -5193,7 +5193,7 @@ var legend$1 = {
5193
5193
  var yForLegendTile = function (id, i) { return yForLegend(id, i) + 4; };
5194
5194
  var pos = -200;
5195
5195
  // Define g for legend area
5196
- var l = legend.selectAll("." + CLASS.legendItem)
5196
+ var l = legend.selectAll(".".concat(CLASS.legendItem))
5197
5197
  .data(targetIdz)
5198
5198
  .enter()
5199
5199
  .append("g");
@@ -5236,7 +5236,7 @@ var legend$1 = {
5236
5236
  .attr("href", function (data, idx, selection) {
5237
5237
  var node = selection[idx];
5238
5238
  var nodeName = node.nodeName.toLowerCase();
5239
- return nodeName === "use" ? "#" + state.datetimeId + "-point-" + data : undefined;
5239
+ return nodeName === "use" ? "#".concat(state.datetimeId, "-point-").concat(data) : undefined;
5240
5240
  });
5241
5241
  }
5242
5242
  else {
@@ -5251,9 +5251,9 @@ var legend$1 = {
5251
5251
  .attr("stroke-width", config.legend_item_tile_height);
5252
5252
  }
5253
5253
  // Set background for inset legend
5254
- background = legend.select("." + CLASS.legendBackground + " rect");
5254
+ background = legend.select(".".concat(CLASS.legendBackground, " rect"));
5255
5255
  if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
5256
- background = legend.insert("g", "." + CLASS.legendItem)
5256
+ background = legend.insert("g", ".".concat(CLASS.legendItem))
5257
5257
  .attr("class", CLASS.legendBackground)
5258
5258
  .append("rect");
5259
5259
  }
@@ -5266,7 +5266,7 @@ var legend$1 = {
5266
5266
  (withTransition ? texts.transition() : texts)
5267
5267
  .attr("x", xForLegendText)
5268
5268
  .attr("y", yForLegendText);
5269
- var rects = legend.selectAll("rect." + CLASS.legendItemEvent)
5269
+ var rects = legend.selectAll("rect.".concat(CLASS.legendItemEvent))
5270
5270
  .data(targetIdz);
5271
5271
  (withTransition ? rects.transition() : rects)
5272
5272
  .attr("width", function (id) { return widths[id]; })
@@ -5274,7 +5274,7 @@ var legend$1 = {
5274
5274
  .attr("x", xForLegendRect)
5275
5275
  .attr("y", yForLegendRect);
5276
5276
  if (usePoint) {
5277
- var tiles = legend.selectAll("." + CLASS.legendItemPoint)
5277
+ var tiles = legend.selectAll(".".concat(CLASS.legendItemPoint))
5278
5278
  .data(targetIdz);
5279
5279
  (withTransition ? tiles.transition() : tiles)
5280
5280
  .each(function () {
@@ -5310,7 +5310,7 @@ var legend$1 = {
5310
5310
  });
5311
5311
  }
5312
5312
  else {
5313
- var tiles = legend.selectAll("line." + CLASS.legendItemTile)
5313
+ var tiles = legend.selectAll("line.".concat(CLASS.legendItemTile))
5314
5314
  .data(targetIdz);
5315
5315
  (withTransition ? tiles.transition() : tiles)
5316
5316
  .style("stroke", getColor)
@@ -5365,16 +5365,16 @@ var redraw = {
5365
5365
  if (!$$.hasArcType() || state.hasRadar) {
5366
5366
  $$.updateCircleY && $$.updateCircleY();
5367
5367
  }
5368
+ // Data empty label positioning and text.
5369
+ config.data_empty_label_text && main.select("text.".concat(CLASS.text, ".").concat(CLASS.empty))
5370
+ .attr("x", state.width / 2)
5371
+ .attr("y", state.height / 2)
5372
+ .text(config.data_empty_label_text)
5373
+ .style("display", targetsToShow.length ? "none" : null);
5368
5374
  // update axis
5369
5375
  if (state.hasAxis) {
5370
5376
  // @TODO: Make 'init' state to be accessible everywhere not passing as argument.
5371
5377
  $$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
5372
- // Data empty label positioning and text.
5373
- config.data_empty_label_text && main.select("text." + CLASS.text + "." + CLASS.empty)
5374
- .attr("x", state.width / 2)
5375
- .attr("y", state.height / 2)
5376
- .text(config.data_empty_label_text)
5377
- .style("display", targetsToShow.length ? "none" : null);
5378
5378
  // grid
5379
5379
  $$.hasGrid() && $$.updateGrid(duration);
5380
5380
  // rect for regions
@@ -5389,7 +5389,7 @@ var redraw = {
5389
5389
  $$.updateArea(durationForExit);
5390
5390
  }
5391
5391
  // circles for select
5392
- $el.text && main.selectAll("." + CLASS.selectedCircles)
5392
+ $el.text && main.selectAll(".".concat(CLASS.selectedCircles))
5393
5393
  .filter($$.isBarType.bind($$))
5394
5394
  .selectAll("circle")
5395
5395
  .remove();
@@ -6049,7 +6049,7 @@ var size = {
6049
6049
  var $$ = this;
6050
6050
  var config = $$.config, hasAxis = $$.state.hasAxis;
6051
6051
  var axisId = config.axis_rotated ? "y" : "x";
6052
- var axesLen = hasAxis ? config["axis_" + axisId + "_axes"].length : 0;
6052
+ var axesLen = hasAxis ? config["axis_".concat(axisId, "_axes")].length : 0;
6053
6053
  var padding = isValue(config.padding_bottom) ?
6054
6054
  config.padding_bottom : 0;
6055
6055
  return padding + (axesLen ? $$.getHorizontalAxisHeight(axisId) * axesLen : 0);
@@ -6059,7 +6059,7 @@ var size = {
6059
6059
  var config = $$.config, hasAxis = $$.state.hasAxis;
6060
6060
  var isRotated = config.axis_rotated;
6061
6061
  var axisId = isRotated ? "x" : "y";
6062
- var axesLen = hasAxis ? config["axis_" + axisId + "_axes"].length : 0;
6062
+ var axesLen = hasAxis ? config["axis_".concat(axisId, "_axes")].length : 0;
6063
6063
  var axisWidth = hasAxis ? $$.getAxisWidthByAxisId(axisId, withoutRecompute) : 0;
6064
6064
  var padding;
6065
6065
  if (isValue(config.padding_left)) {
@@ -6109,7 +6109,7 @@ var size = {
6109
6109
  * @private
6110
6110
  */
6111
6111
  getParentRectValue: function (key) {
6112
- var offsetName = "offset" + capitalize(key);
6112
+ var offsetName = "offset".concat(capitalize(key));
6113
6113
  var parent = this.$el.chart.node();
6114
6114
  var v;
6115
6115
  while (!v && parent && parent.tagName !== "BODY") {
@@ -6145,7 +6145,7 @@ var size = {
6145
6145
  var config = $$.config, $el = $$.$el;
6146
6146
  var hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner);
6147
6147
  var leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY;
6148
- var leftAxis = $el.main.select("." + leftAxisClass).node();
6148
+ var leftAxis = $el.main.select(".".concat(leftAxisClass)).node();
6149
6149
  var svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 };
6150
6150
  var chartRect = $el.chart.node().getBoundingClientRect();
6151
6151
  var hasArc = $$.hasArcType();
@@ -6178,23 +6178,23 @@ var size = {
6178
6178
  .attr("width", current.width)
6179
6179
  .attr("height", current.height);
6180
6180
  if (hasAxis) {
6181
- var brush = svg.select("." + CLASS.brush + " .overlay");
6181
+ var brush = svg.select(".".concat(CLASS.brush, " .overlay"));
6182
6182
  var brushSize = { width: 0, height: 0 };
6183
6183
  if (brush.size()) {
6184
6184
  brushSize.width = +brush.attr("width");
6185
6185
  brushSize.height = +brush.attr("height");
6186
6186
  }
6187
- svg.selectAll(["#" + clip.id, "#" + clip.idGrid])
6187
+ svg.selectAll(["#".concat(clip.id), "#".concat(clip.idGrid)])
6188
6188
  .select("rect")
6189
6189
  .attr("width", width)
6190
6190
  .attr("height", height);
6191
- svg.select("#" + clip.idXAxis)
6191
+ svg.select("#".concat(clip.idXAxis))
6192
6192
  .select("rect")
6193
6193
  .call($$.setXAxisClipPath.bind($$));
6194
- svg.select("#" + clip.idYAxis)
6194
+ svg.select("#".concat(clip.idYAxis))
6195
6195
  .select("rect")
6196
6196
  .call($$.setYAxisClipPath.bind($$));
6197
- clip.idSubchart && svg.select("#" + clip.idSubchart)
6197
+ clip.idSubchart && svg.select("#".concat(clip.idSubchart))
6198
6198
  .select("rect")
6199
6199
  .attr("width", width)
6200
6200
  .attr("height", brushSize.height);
@@ -6304,7 +6304,7 @@ var text = {
6304
6304
  */
6305
6305
  initText: function () {
6306
6306
  var $el = this.$el;
6307
- $el.main.select("." + CLASS.chart).append("g")
6307
+ $el.main.select(".".concat(CLASS.chart)).append("g")
6308
6308
  .attr("class", CLASS.chartTexts);
6309
6309
  },
6310
6310
  /**
@@ -6317,7 +6317,7 @@ var text = {
6317
6317
  var classChartText = $$.getChartClass("Text");
6318
6318
  var classTexts = $$.getClass("texts", "id");
6319
6319
  var classFocus = $$.classFocus.bind($$);
6320
- var mainTextUpdate = $$.$el.main.select("." + CLASS.chartTexts).selectAll("." + CLASS.chartText)
6320
+ var mainTextUpdate = $$.$el.main.select(".".concat(CLASS.chartTexts)).selectAll(".".concat(CLASS.chartText))
6321
6321
  .data(targets)
6322
6322
  .attr("class", function (d) { return classChartText(d) + classFocus(d); });
6323
6323
  var mainTextEnter = mainTextUpdate.enter().append("g")
@@ -6337,7 +6337,7 @@ var text = {
6337
6337
  var config = $$.config, $el = $$.$el;
6338
6338
  var dataFn = $$.labelishData.bind($$);
6339
6339
  var classText = $$.getClass("text", "index");
6340
- $el.text = $el.main.selectAll("." + CLASS.texts).selectAll("." + CLASS.text)
6340
+ $el.text = $el.main.selectAll(".".concat(CLASS.texts)).selectAll(".".concat(CLASS.text))
6341
6341
  .data(function (d) { return ($$.isRadarType(d) ? d.values : dataFn(d)); });
6342
6342
  $el.text.exit()
6343
6343
  .transition()
@@ -6407,7 +6407,7 @@ var text = {
6407
6407
  var posY = y.bind(this)(d, index);
6408
6408
  // when is multiline
6409
6409
  if (this.childElementCount) {
6410
- this.setAttribute("transform", "translate(" + posX + " " + posY + ")");
6410
+ this.setAttribute("transform", "translate(".concat(posX, " ").concat(posY, ")"));
6411
6411
  }
6412
6412
  else {
6413
6413
  this.setAttribute("x", posX);
@@ -6434,7 +6434,7 @@ var text = {
6434
6434
  base = base.querySelector("text");
6435
6435
  }
6436
6436
  var text = base.textContent;
6437
- var cacheKey = KEY.textRect + "-" + text.replace(/\W/g, "_");
6437
+ var cacheKey = "".concat(KEY.textRect, "-").concat(text.replace(/\W/g, "_"));
6438
6438
  var rect = $$.cache.get(cacheKey);
6439
6439
  if (!rect) {
6440
6440
  $$.$el.svg.append("text")
@@ -6464,7 +6464,7 @@ var text = {
6464
6464
  var getter = forX ? $$.getXForText : $$.getYForText;
6465
6465
  $$.hasType("radar") && types.push("radar");
6466
6466
  types.forEach(function (v) {
6467
- points[v] = $$["generateGet" + capitalize(v) + "Points"](indices[v], false);
6467
+ points[v] = $$["generateGet".concat(capitalize(v), "Points")](indices[v], false);
6468
6468
  });
6469
6469
  return function (d, i) {
6470
6470
  var type = ($$.isAreaType(d) && "area") ||
@@ -6655,7 +6655,7 @@ var text = {
6655
6655
  if (ratio === void 0) { ratio = 0; }
6656
6656
  var $$ = this;
6657
6657
  var config = $$.config;
6658
- var threshold = config[type + "_label_threshold"] || 0;
6658
+ var threshold = config["".concat(type, "_label_threshold")] || 0;
6659
6659
  return ratio >= threshold;
6660
6660
  }
6661
6661
  };
@@ -6713,7 +6713,7 @@ var title = {
6713
6713
  if (title) {
6714
6714
  var y = $$.yForTitle.call($$);
6715
6715
  if (/g/i.test(title.node().tagName)) {
6716
- title.attr("transform", "translate(" + getTextPos(config.title_position, current.width) + ", " + y + ")");
6716
+ title.attr("transform", "translate(".concat(getTextPos(config.title_position, current.width), ", ").concat(y, ")"));
6717
6717
  }
6718
6718
  else {
6719
6719
  title.attr("x", $$.xForTitle.call($$)).attr("y", y);
@@ -6847,12 +6847,12 @@ var tooltip$1 = {
6847
6847
  var $$ = this;
6848
6848
  var api = $$.api, config = $$.config, state = $$.state;
6849
6849
  var _a = ["title", "name", "value"].map(function (v) {
6850
- var fn = config["tooltip_format_" + v];
6850
+ var fn = config["tooltip_format_".concat(v)];
6851
6851
  return isFunction(fn) ? fn.bind(api) : fn;
6852
6852
  }), titleFormat = _a[0], nameFormat = _a[1], valueFormat = _a[2];
6853
6853
  titleFormat = titleFormat || defaultTitleFormat;
6854
6854
  nameFormat = nameFormat || (function (name) { return name; });
6855
- valueFormat = valueFormat || ($$.isStackNormalized() ? function (v, ratio) { return (ratio * 100).toFixed(2) + "%"; } : defaultValueFormat);
6855
+ valueFormat = valueFormat || ($$.isStackNormalized() ? function (v, ratio) { return "".concat((ratio * 100).toFixed(2), "%"); } : defaultValueFormat);
6856
6856
  var order = config.tooltip_order;
6857
6857
  var getRowValue = function (row) { return ($$.axis && $$.isBubbleZType(row) ? $$.getBubbleZData(row.value, "z") : $$.getBaseValue(row)); };
6858
6858
  var getBgColor = $$.levelColor ? function (row) { return $$.levelColor(row.value); } : function (row) { return color(row); };
@@ -6902,28 +6902,28 @@ var tooltip$1 = {
6902
6902
  sanitise(titleFormat ? titleFormat(row.x) : row.x);
6903
6903
  text = tplProcess(tpl[0], {
6904
6904
  CLASS_TOOLTIP: CLASS.tooltip,
6905
- TITLE: isValue(title) ? (tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>") : ""
6905
+ TITLE: isValue(title) ? (tplStr ? title : "<tr><th colspan=\"2\">".concat(title, "</th></tr>")) : ""
6906
6906
  });
6907
6907
  }
6908
6908
  if (!row.ratio && $$.$el.arcs) {
6909
- row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." + CLASS.arc + "-" + row.id).data()[0]);
6909
+ row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path.".concat(CLASS.arc, "-").concat(row.id)).data()[0]);
6910
6910
  }
6911
6911
  param = [row.ratio, row.id, row.index, d];
6912
- value = sanitise(valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param)));
6912
+ value = sanitise(valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param, false)));
6913
6913
  if ($$.isAreaRangeType(row)) {
6914
- var _b = ["high", "low"].map(function (v) { return sanitise(valueFormat.apply(void 0, __spreadArray([$$.getAreaRangeData(row, v)], param))); }), high = _b[0], low = _b[1];
6915
- value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
6914
+ var _b = ["high", "low"].map(function (v) { return sanitise(valueFormat.apply(void 0, __spreadArray([$$.getAreaRangeData(row, v)], param, false))); }), high = _b[0], low = _b[1];
6915
+ value = "<b>Mid:</b> ".concat(value, " <b>High:</b> ").concat(high, " <b>Low:</b> ").concat(low);
6916
6916
  }
6917
6917
  if (value !== undefined) {
6918
6918
  // Skip elements when their name is set to null
6919
6919
  if (row.name === null) {
6920
6920
  return "continue";
6921
6921
  }
6922
- var name_1 = sanitise(nameFormat.apply(void 0, __spreadArray([row.name], param)));
6922
+ var name_1 = sanitise(nameFormat.apply(void 0, __spreadArray([row.name], param, false)));
6923
6923
  var color_1 = getBgColor(row);
6924
6924
  var contentValue_1 = {
6925
6925
  CLASS_TOOLTIP_NAME: CLASS.tooltipName + $$.getTargetSelectorSuffix(row.id),
6926
- COLOR: (tplStr || !$$.patterns) ? color_1 : "<svg><rect style=\"fill:" + color_1 + "\" width=\"10\" height=\"10\"></rect></svg>",
6926
+ COLOR: (tplStr || !$$.patterns) ? color_1 : "<svg><rect style=\"fill:".concat(color_1, "\" width=\"10\" height=\"10\"></rect></svg>"),
6927
6927
  NAME: name_1,
6928
6928
  VALUE: value
6929
6929
  };
@@ -6939,7 +6939,7 @@ var tooltip$1 = {
6939
6939
  for (i = 0; i < len; i++) {
6940
6940
  _loop_1();
6941
6941
  }
6942
- return text + "</table>";
6942
+ return "".concat(text, "</table>");
6943
6943
  },
6944
6944
  /**
6945
6945
  * Get the content template string
@@ -6948,7 +6948,7 @@ var tooltip$1 = {
6948
6948
  * @private
6949
6949
  */
6950
6950
  getTooltipContentTemplate: function (tplStr) {
6951
- return (tplStr || "<table class=\"{=CLASS_TOOLTIP}\"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class=\"{=CLASS_TOOLTIP_NAME}\">\n\t\t\t\t\t<td class=\"name\">" + (this.patterns ? "{=COLOR}" : "<span style=\"background-color:{=COLOR}\"></span>") + "{=NAME}</td>\n\t\t\t\t\t<td class=\"value\">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>")
6951
+ return (tplStr || "<table class=\"{=CLASS_TOOLTIP}\"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class=\"{=CLASS_TOOLTIP_NAME}\">\n\t\t\t\t\t<td class=\"name\">".concat(this.patterns ? "{=COLOR}" : "<span style=\"background-color:{=COLOR}\"></span>", "{=NAME}</td>\n\t\t\t\t\t<td class=\"value\">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>"))
6952
6952
  .replace(/(\r?\n|\t)/g, "")
6953
6953
  .split(/{{(.*)}}/);
6954
6954
  },
@@ -7052,7 +7052,7 @@ var tooltip$1 = {
7052
7052
  var pos_1 = fnPos.call(this, dataToShow, width, height, element);
7053
7053
  ["top", "left"].forEach(function (v) {
7054
7054
  var value = pos_1[v];
7055
- tooltip.style(v, value + "px");
7055
+ tooltip.style(v, "".concat(value, "px"));
7056
7056
  // Remember left pos in percentage to be used on resize call
7057
7057
  if (v === "left" && !datum.xPosInPercent) {
7058
7058
  datum.xPosInPercent = value / state.current.width * 100;
@@ -7077,7 +7077,7 @@ var tooltip$1 = {
7077
7077
  if (diff < 0) {
7078
7078
  value += diff;
7079
7079
  }
7080
- tooltip.style("left", value + "px");
7080
+ tooltip.style("left", "".concat(value, "px"));
7081
7081
  }
7082
7082
  });
7083
7083
  },
@@ -7109,10 +7109,12 @@ var tooltip$1 = {
7109
7109
  _handleLinkedCharts: function (show, index) {
7110
7110
  var $$ = this;
7111
7111
  var charts = $$.charts, config = $$.config;
7112
- if (config.tooltip_linked && charts.length > 1) {
7112
+ // Prevent propagation among instances if isn't instantiated from the user's event
7113
+ // https://github.com/naver/billboard.js/issues/1979
7114
+ if (event && event.isTrusted && config.tooltip_linked && charts.length > 1) {
7113
7115
  var linkedName_1 = config.tooltip_linked_name;
7114
7116
  charts
7115
- .filter(function (v) { return v !== $$.api; })
7117
+ .filter(function (c) { return c !== $$.api; })
7116
7118
  .forEach(function (c) {
7117
7119
  var _a = c.internal, config = _a.config, $el = _a.$el;
7118
7120
  var isLinked = config.tooltip_linked;
@@ -7121,14 +7123,8 @@ var tooltip$1 = {
7121
7123
  if (isLinked && linkedName_1 === name && isInDom) {
7122
7124
  var data = $el.tooltip.data()[0];
7123
7125
  var isNotSameIndex = index !== (data && data.index);
7124
- // prevent throwing error for non-paired linked indexes
7125
7126
  try {
7126
- if (show && isNotSameIndex) {
7127
- c.tooltip.show({ index: index });
7128
- }
7129
- else if (!show) {
7130
- c.tooltip.hide();
7131
- }
7127
+ c.tooltip[show && isNotSameIndex ? "show" : "hide"]({ index: index });
7132
7128
  }
7133
7129
  catch (e) { }
7134
7130
  }
@@ -7190,7 +7186,7 @@ var transform = {
7190
7186
  x = state.width / 2 - width;
7191
7187
  y = asHalfPixel(state.margin.top);
7192
7188
  }
7193
- return "translate(" + x + ", " + y + ")";
7189
+ return "translate(".concat(x, ", ").concat(y, ")");
7194
7190
  },
7195
7191
  transformMain: function (withTransition, transitions) {
7196
7192
  var $$ = this;
@@ -7202,7 +7198,7 @@ var transform = {
7202
7198
  xAxis = transitions.axisX;
7203
7199
  }
7204
7200
  else {
7205
- xAxis = main.select("." + CLASS.axisX);
7201
+ xAxis = main.select(".".concat(CLASS.axisX));
7206
7202
  if (withTransition) {
7207
7203
  xAxis = xAxis.transition();
7208
7204
  }
@@ -7211,7 +7207,7 @@ var transform = {
7211
7207
  yAxis = transitions.axisY;
7212
7208
  }
7213
7209
  else {
7214
- yAxis = main.select("." + CLASS.axisY);
7210
+ yAxis = main.select(".".concat(CLASS.axisY));
7215
7211
  if (withTransition) {
7216
7212
  yAxis = yAxis.transition();
7217
7213
  }
@@ -7220,7 +7216,7 @@ var transform = {
7220
7216
  y2Axis = transitions.axisY2;
7221
7217
  }
7222
7218
  else {
7223
- y2Axis = main.select("." + CLASS.axisY2);
7219
+ y2Axis = main.select(".".concat(CLASS.axisY2));
7224
7220
  if (withTransition) {
7225
7221
  y2Axis = y2Axis.transition();
7226
7222
  }
@@ -7230,7 +7226,7 @@ var transform = {
7230
7226
  xAxis.attr("transform", $$.getTranslate("x"));
7231
7227
  yAxis.attr("transform", $$.getTranslate("y"));
7232
7228
  y2Axis.attr("transform", $$.getTranslate("y2"));
7233
- main.select("." + CLASS.chartArcs)
7229
+ main.select(".".concat(CLASS.chartArcs))
7234
7230
  .attr("transform", $$.getTranslate("arc"));
7235
7231
  },
7236
7232
  transformAll: function (withTransition, transitions) {
@@ -7588,7 +7584,7 @@ var ChartInternal = /** @class */ (function () {
7588
7584
  var _a = $$, config = _a.config, format = _a.format, state = _a.state;
7589
7585
  var isRotated = config.axis_rotated;
7590
7586
  // datetime to be used for uniqueness
7591
- state.datetimeId = "bb-" + +new Date();
7587
+ state.datetimeId = "bb-".concat(+new Date());
7592
7588
  $$.color = $$.generateColor();
7593
7589
  $$.levelColor = $$.generateLevelColor();
7594
7590
  if ($$.hasPointType()) {
@@ -7710,7 +7706,7 @@ var ChartInternal = /** @class */ (function () {
7710
7706
  // text when empty
7711
7707
  if (config.data_empty_label_text) {
7712
7708
  main.append("text")
7713
- .attr("class", CLASS.text + " " + CLASS.empty)
7709
+ .attr("class", "".concat(CLASS.text, " ").concat(CLASS.empty))
7714
7710
  .attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
7715
7711
  .attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
7716
7712
  }
@@ -7779,7 +7775,7 @@ var ChartInternal = /** @class */ (function () {
7779
7775
  }
7780
7776
  }
7781
7777
  types.forEach(function (v) {
7782
- $$["init" + v]();
7778
+ $$["init".concat(v)]();
7783
7779
  });
7784
7780
  notEmpty($$.config.data_labels) && !$$.hasArcType(null, ["radar"]) && $$.initText();
7785
7781
  };
@@ -7863,7 +7859,7 @@ var ChartInternal = /** @class */ (function () {
7863
7859
  ChartInternal.prototype.showTargets = function () {
7864
7860
  var $$ = this;
7865
7861
  var config = $$.config, svg = $$.$el.svg;
7866
- svg.selectAll("." + CLASS.target)
7862
+ svg.selectAll(".".concat(CLASS.target))
7867
7863
  .filter(function (d) { return $$.isTargetToShow(d.id); })
7868
7864
  .transition()
7869
7865
  .duration(config.transition_duration)
@@ -7890,7 +7886,7 @@ var ChartInternal = /** @class */ (function () {
7890
7886
  if (isString(defVal)) {
7891
7887
  defVal = withOptions[defVal];
7892
7888
  }
7893
- withOptions[key] = getOption(options, "with" + key, defVal);
7889
+ withOptions[key] = getOption(options, "with".concat(key), defVal);
7894
7890
  });
7895
7891
  return withOptions;
7896
7892
  };
@@ -8359,7 +8355,7 @@ var apiData = { data: data };
8359
8355
  * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
8360
8356
  */
8361
8357
  var b64EncodeUnicode = function (str) { return btoa(encodeURIComponent(str)
8362
- .replace(/%([0-9A-F]{2})/g, function (match, p) { return String.fromCharCode(Number("0x" + p)); })); };
8358
+ .replace(/%([0-9A-F]{2})/g, function (match, p) { return String.fromCharCode(Number("0x".concat(p))); })); };
8363
8359
  /**
8364
8360
  * Convert svg node to data url
8365
8361
  * @param {HTMLElement} node target node
@@ -8381,9 +8377,9 @@ function nodeToSvgDataUrl(node, size) {
8381
8377
  var styleXml = serializer.serializeToString(style);
8382
8378
  // foreignObject not supported in IE11 and below
8383
8379
  // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
8384
- var dataStr = ("<svg xmlns=\"" + namespaces.svg + "\" width=\"" + size.width + "\" height=\"" + size.height + "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t" + styleXml + "\n\t\t\t\t" + nodeXml.replace(/(url\()[^#]+/g, "$1") + "\n\t\t\t</foreignObject></svg>")
8380
+ var dataStr = "<svg xmlns=\"".concat(namespaces.svg, "\" width=\"").concat(size.width, "\" height=\"").concat(size.height, "\">\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>")
8385
8381
  .replace("/\n/g", "%0A");
8386
- return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr);
8382
+ return "data:image/svg+xml;base64,".concat(b64EncodeUnicode(dataStr));
8387
8383
  }
8388
8384
  var apiExport = {
8389
8385
  /**
@@ -8468,7 +8464,7 @@ var apiFocus = {
8468
8464
  if ($$.hasArcType() && !state.hasRadar) {
8469
8465
  $$.expandArc(targetIds);
8470
8466
  $$.hasType("gauge") &&
8471
- $$.markOverlapped(targetIdsValue, $$, "." + CLASS.gaugeValue);
8467
+ $$.markOverlapped(targetIdsValue, $$, ".".concat(CLASS.gaugeValue));
8472
8468
  }
8473
8469
  $$.toggleFocusLegend(targetIds, true);
8474
8470
  state.focusedTargetIds = targetIds;
@@ -8500,7 +8496,7 @@ var apiFocus = {
8500
8496
  if ($$.hasArcType()) {
8501
8497
  $$.unexpandArc(targetIds);
8502
8498
  $$.hasType("gauge") &&
8503
- $$.undoMarkOverlapped($$, "." + CLASS.gaugeValue);
8499
+ $$.undoMarkOverlapped($$, ".".concat(CLASS.gaugeValue));
8504
8500
  }
8505
8501
  $$.toggleFocusLegend(targetIds, false);
8506
8502
  state.focusedTargetIds = state.focusedTargetIds.filter(function (id) { return targetIds.indexOf(id) < 0; });
@@ -8782,7 +8778,7 @@ function showHide(show, targetIdsValue, options) {
8782
8778
  var $$ = this.internal;
8783
8779
  var targetIds = $$.mapToTargetIds(targetIdsValue);
8784
8780
  $$.state.toggling = true;
8785
- $$[(show ? "remove" : "add") + "HiddenTargetIds"](targetIds);
8781
+ $$["".concat(show ? "remove" : "add", "HiddenTargetIds")](targetIds);
8786
8782
  var targets = $$.$el.svg.selectAll($$.selectorTargets(targetIds));
8787
8783
  var opacity = show ? "1" : "0";
8788
8784
  show && targets.style("display", null);
@@ -8793,7 +8789,7 @@ function showHide(show, targetIdsValue, options) {
8793
8789
  !show && targets.style("display", "none");
8794
8790
  targets.style("opacity", opacity);
8795
8791
  });
8796
- options.withLegend && $$[(show ? "show" : "hide") + "Legend"](targetIds);
8792
+ options.withLegend && $$["".concat(show ? "show" : "hide", "Legend")](targetIds);
8797
8793
  $$.redraw({
8798
8794
  withUpdateOrgXDomain: true,
8799
8795
  withUpdateXDomain: true,
@@ -9118,9 +9114,9 @@ extend(Chart.prototype, [
9118
9114
  */
9119
9115
  function setMinMax($$, type, value) {
9120
9116
  var config = $$.config;
9121
- var axisX = "axis_x_" + type;
9122
- var axisY = "axis_y_" + type;
9123
- var axisY2 = "axis_y2_" + type;
9117
+ var axisX = "axis_x_".concat(type);
9118
+ var axisY = "axis_y_".concat(type);
9119
+ var axisY2 = "axis_y2_".concat(type);
9124
9120
  if (isDefined(value)) {
9125
9121
  if (isObjectType(value)) {
9126
9122
  isValue(value.x) && (config[axisX] = value.x);
@@ -9147,9 +9143,9 @@ function setMinMax($$, type, value) {
9147
9143
  function getMinMax($$, type) {
9148
9144
  var config = $$.config;
9149
9145
  return {
9150
- x: config["axis_x_" + type],
9151
- y: config["axis_y_" + type],
9152
- y2: config["axis_y2_" + type]
9146
+ x: config["axis_x_".concat(type)],
9147
+ y: config["axis_y_".concat(type)],
9148
+ y2: config["axis_y2_".concat(type)]
9153
9149
  };
9154
9150
  }
9155
9151
  /**
@@ -9608,8 +9604,8 @@ extend(regions, {
9608
9604
  var options = optionsValue || {};
9609
9605
  var duration = getOption(options, "duration", config.transition_duration);
9610
9606
  var classes = getOption(options, "classes", [CLASS.region]);
9611
- var regions = $$.$el.main.select("." + CLASS.regions)
9612
- .selectAll(classes.map(function (c) { return "." + c; }));
9607
+ var regions = $$.$el.main.select(".".concat(CLASS.regions))
9608
+ .selectAll(classes.map(function (c) { return ".".concat(c); }));
9613
9609
  (duration ? regions.transition().duration(duration) : regions)
9614
9610
  .style("opacity", "0")
9615
9611
  .remove();
@@ -9946,8 +9942,8 @@ var AxisRendererHelper = /** @class */ (function () {
9946
9942
  AxisRendererHelper.prototype.getTickTransformSetter = function (id) {
9947
9943
  var config = this.config;
9948
9944
  var fn = id === "x" ?
9949
- function (value) { return "translate(" + (value + config.tickOffset) + ",0)"; } :
9950
- function (value) { return "translate(0," + value + ")"; };
9945
+ function (value) { return "translate(".concat(value + config.tickOffset, ",0)"); } :
9946
+ function (value) { return "translate(0,".concat(value, ")"); };
9951
9947
  return function (selection, scale) {
9952
9948
  selection.attr("transform", function (d) { return fn(Math.ceil(scale(d))); });
9953
9949
  };
@@ -10082,13 +10078,13 @@ var AxisRenderer = /** @class */ (function () {
10082
10078
  // // get the axis' tick position configuration
10083
10079
  var id = params.id;
10084
10080
  var tickTextPos = id && /^(x|y|y2)$/.test(id) ?
10085
- params.config["axis_" + id + "_tick_text_position"] : { x: 0, y: 0 };
10081
+ params.config["axis_".concat(id, "_tick_text_position")] : { x: 0, y: 0 };
10086
10082
  // tick visiblity
10087
- var prefix = id === "subX" ? "subchart_axis_x" : "axis_" + id;
10088
- var axisShow = params.config[prefix + "_show"];
10083
+ var prefix = id === "subX" ? "subchart_axis_x" : "axis_".concat(id);
10084
+ var axisShow = params.config["".concat(prefix, "_show")];
10089
10085
  var tickShow = {
10090
- tick: axisShow ? params.config[prefix + "_tick_show"] : false,
10091
- text: axisShow ? params.config[prefix + "_tick_text_show"] : false
10086
+ tick: axisShow ? params.config["".concat(prefix, "_tick_show")] : false,
10087
+ text: axisShow ? params.config["".concat(prefix, "_tick_text_show")] : false
10092
10088
  };
10093
10089
  var $g;
10094
10090
  g.each(function () {
@@ -10108,8 +10104,8 @@ var AxisRenderer = /** @class */ (function () {
10108
10104
  .attr("d", function () {
10109
10105
  var outerTickSized = config.outerTickSize * sign;
10110
10106
  return isTopBottom ?
10111
- "M" + range[0] + "," + outerTickSized + "V0H" + range[1] + "V" + outerTickSized :
10112
- "M" + outerTickSized + "," + range[0] + "H0V" + range[1] + "H" + outerTickSized;
10107
+ "M".concat(range[0], ",").concat(outerTickSized, "V0H").concat(range[1], "V").concat(outerTickSized) :
10108
+ "M".concat(outerTickSized, ",").concat(range[0], "H0V").concat(range[1], "H").concat(outerTickSized);
10113
10109
  });
10114
10110
  if (tickShow.tick || tickShow.text) {
10115
10111
  // count of tick data in array
@@ -10171,7 +10167,7 @@ var AxisRenderer = /** @class */ (function () {
10171
10167
  });
10172
10168
  var lineUpdate = tick.select("line");
10173
10169
  var textUpdate = tick.select("text");
10174
- tickEnter.select("line").attr(axisPx + "2", innerTickSize * sign);
10170
+ tickEnter.select("line").attr("".concat(axisPx, "2"), innerTickSize * sign);
10175
10171
  tickEnter.select("text").attr(axisPx, tickLength * sign);
10176
10172
  ctx.setTickLineTextPosition(lineUpdate, textUpdate);
10177
10173
  // Append <title> for tooltip display
@@ -10241,7 +10237,7 @@ var AxisRenderer = /** @class */ (function () {
10241
10237
  orient === "top" && value.reverse();
10242
10238
  return !r ? "middle" : (r > 0 ? value[0] : value[1]);
10243
10239
  };
10244
- var textTransform = function (r) { return (r ? "rotate(" + r + ")" : null); };
10240
+ var textTransform = function (r) { return (r ? "rotate(".concat(r, ")") : null); };
10245
10241
  var yForText = function (r) {
10246
10242
  var r2 = r / (orient === "bottom" ? 15 : 23);
10247
10243
  return r ? 11.5 - 2.5 * r2 * (r > 0 ? 1 : -1) : tickLength;
@@ -10394,7 +10390,7 @@ var AxisRenderer = /** @class */ (function () {
10394
10390
  return next < arr.length ?
10395
10391
  _this.helper.scale(arr[next]) - _this.helper.scale(v) : null;
10396
10392
  }).filter(Boolean);
10397
- interval = Math.min.apply(Math, __spreadArray(__spreadArray([], intervalByValue), [interval]));
10393
+ interval = Math.min.apply(Math, __spreadArray(__spreadArray([], intervalByValue, false), [interval], false));
10398
10394
  }
10399
10395
  return interval === Infinity ? 0 : interval;
10400
10396
  };
@@ -10465,7 +10461,7 @@ var Axis = /** @class */ (function () {
10465
10461
  this.setOrient();
10466
10462
  }
10467
10463
  Axis.prototype.getAxisClassName = function (id) {
10468
- return CLASS.axis + " " + CLASS["axis" + capitalize(id)];
10464
+ return "".concat(CLASS.axis, " ").concat(CLASS["axis".concat(capitalize(id))]);
10469
10465
  };
10470
10466
  Axis.prototype.isHorizontal = function ($$, forHorizontal) {
10471
10467
  var isRotated = $$.config.axis_rotated;
@@ -10481,11 +10477,11 @@ var Axis = /** @class */ (function () {
10481
10477
  };
10482
10478
  Axis.prototype.isTimeSeries = function (id) {
10483
10479
  if (id === void 0) { id = "x"; }
10484
- return this.owner.config["axis_" + id + "_type"] === "timeseries";
10480
+ return this.owner.config["axis_".concat(id, "_type")] === "timeseries";
10485
10481
  };
10486
10482
  Axis.prototype.isLog = function (id) {
10487
10483
  if (id === void 0) { id = "x"; }
10488
- return this.owner.config["axis_" + id + "_type"] === "log";
10484
+ return this.owner.config["axis_".concat(id, "_type")] === "log";
10489
10485
  };
10490
10486
  Axis.prototype.isTimeSeriesY = function () {
10491
10487
  return this.isTimeSeries("y");
@@ -10510,7 +10506,7 @@ var Axis = /** @class */ (function () {
10510
10506
  config.axis_y2_show && target.push("y2");
10511
10507
  target.forEach(function (v) {
10512
10508
  var classAxis = _this.getAxisClassName(v);
10513
- var classLabel = CLASS["axis" + v.toUpperCase() + "Label"];
10509
+ var classLabel = CLASS["axis".concat(v.toUpperCase(), "Label")];
10514
10510
  axis[v] = main.append("g")
10515
10511
  .attr("class", classAxis)
10516
10512
  .attr("clip-path", function () {
@@ -10524,7 +10520,7 @@ var Axis = /** @class */ (function () {
10524
10520
  return res;
10525
10521
  })
10526
10522
  .attr("transform", $$.getTranslate(v))
10527
- .style("visibility", config["axis_" + v + "_show"] ? "visible" : "hidden");
10523
+ .style("visibility", config["axis_".concat(v, "_show")] ? "visible" : "hidden");
10528
10524
  axis[v].append("text")
10529
10525
  .attr("class", classLabel)
10530
10526
  .attr("transform", ["rotate(-90)", null][v === "x" ? +!isRotated : +isRotated])
@@ -10556,7 +10552,7 @@ var Axis = /** @class */ (function () {
10556
10552
  var $$ = this.owner;
10557
10553
  var config = $$.config;
10558
10554
  var axes = [];
10559
- var axesConfig = config["axis_" + id + "_axes"];
10555
+ var axesConfig = config["axis_".concat(id, "_axes")];
10560
10556
  var isRotated = config.axis_rotated;
10561
10557
  var d3Axis;
10562
10558
  if (id === "x") {
@@ -10591,7 +10587,7 @@ var Axis = /** @class */ (function () {
10591
10587
  var $$ = this.owner;
10592
10588
  var config = $$.config, main = $$.$el.main;
10593
10589
  Object.keys(this.axesList).forEach(function (id) {
10594
- var axesConfig = config["axis_" + id + "_axes"];
10590
+ var axesConfig = config["axis_".concat(id, "_axes")];
10595
10591
  var scale = $$.scale[id].copy();
10596
10592
  var range = scale.range();
10597
10593
  _this.axesList[id].forEach(function (v, i) {
@@ -10601,12 +10597,12 @@ var Axis = /** @class */ (function () {
10601
10597
  if (!range.every(function (v, i) { return v === axisRange[i]; })) {
10602
10598
  v.scale().range(range);
10603
10599
  }
10604
- var className = _this.getAxisClassName(id) + "-" + (i + 1);
10605
- var g = main.select("." + className.replace(/\s/, "."));
10600
+ var className = "".concat(_this.getAxisClassName(id), "-").concat(i + 1);
10601
+ var g = main.select(".".concat(className.replace(/\s/, ".")));
10606
10602
  if (g.empty()) {
10607
10603
  g = main.append("g")
10608
10604
  .attr("class", className)
10609
- .style("visibility", config["axis_" + id + "_show"] ? "visible" : "hidden")
10605
+ .style("visibility", config["axis_".concat(id, "_show")] ? "visible" : "hidden")
10610
10606
  .call(v);
10611
10607
  }
10612
10608
  else {
@@ -10652,7 +10648,7 @@ var Axis = /** @class */ (function () {
10652
10648
  tickFormat = $$.format.xAxisTick;
10653
10649
  }
10654
10650
  else {
10655
- var fn = config["axis_" + id + "_tick_format"];
10651
+ var fn = config["axis_".concat(id, "_tick_format")];
10656
10652
  if (isFunction(fn)) {
10657
10653
  tickFormat = fn.bind($$.api);
10658
10654
  }
@@ -10672,7 +10668,7 @@ var Axis = /** @class */ (function () {
10672
10668
  orgXScale: $$.scale.x
10673
10669
  });
10674
10670
  if (!isX) {
10675
- axisParams.tickStepSize = config["axis_" + type + "_tick_stepSize"];
10671
+ axisParams.tickStepSize = config["axis_".concat(type, "_tick_stepSize")];
10676
10672
  }
10677
10673
  var axis = new AxisRenderer(axisParams)
10678
10674
  .scale((isX && $$.scale.zoom) || scale)
@@ -10688,14 +10684,14 @@ var Axis = /** @class */ (function () {
10688
10684
  }
10689
10685
  tickValues && axis.tickValues(tickValues);
10690
10686
  // Set tick
10691
- axis.tickFormat(tickFormat || (!isX && ($$.isStackNormalized() && (function (x) { return x + "%"; }))));
10687
+ axis.tickFormat(tickFormat || (!isX && ($$.isStackNormalized() && (function (x) { return "".concat(x, "%"); }))));
10692
10688
  if (isCategory) {
10693
10689
  axis.tickCentered(config.axis_x_tick_centered);
10694
10690
  if (isEmpty(config.axis_x_tick_culling)) {
10695
10691
  config.axis_x_tick_culling = false;
10696
10692
  }
10697
10693
  }
10698
- var tickCount = config["axis_" + type + "_tick_count"];
10694
+ var tickCount = config["axis_".concat(type, "_tick_count")];
10699
10695
  tickCount && axis.ticks(tickCount);
10700
10696
  return axis;
10701
10697
  };
@@ -10757,13 +10753,13 @@ var Axis = /** @class */ (function () {
10757
10753
  };
10758
10754
  Axis.prototype.getTickValues = function (id) {
10759
10755
  var $$ = this.owner;
10760
- var tickValues = $$.config["axis_" + id + "_tick_values"];
10761
- var axis = $$[id + "Axis"];
10756
+ var tickValues = $$.config["axis_".concat(id, "_tick_values")];
10757
+ var axis = $$["".concat(id, "Axis")];
10762
10758
  return (isFunction(tickValues) ? tickValues.call($$.api) : tickValues) ||
10763
10759
  (axis ? axis.tickValues() : undefined);
10764
10760
  };
10765
10761
  Axis.prototype.getLabelOptionByAxisId = function (id) {
10766
- return this.owner.config["axis_" + id + "_label"];
10762
+ return this.owner.config["axis_".concat(id, "_label")];
10767
10763
  };
10768
10764
  Axis.prototype.getLabelText = function (id) {
10769
10765
  var option = this.getLabelOptionByAxisId(id);
@@ -10774,7 +10770,7 @@ var Axis = /** @class */ (function () {
10774
10770
  var config = $$.config;
10775
10771
  var option = this.getLabelOptionByAxisId(id);
10776
10772
  if (isString(option)) {
10777
- config["axis_" + id + "_label"] = text;
10773
+ config["axis_".concat(id, "_label")] = text;
10778
10774
  }
10779
10775
  else if (option) {
10780
10776
  option.text = text;
@@ -10845,7 +10841,7 @@ var Axis = /** @class */ (function () {
10845
10841
  var config = $$.config;
10846
10842
  var isRotated = config.axis_rotated;
10847
10843
  var isInner = this.getAxisLabelPosition(id).isInner;
10848
- var tickRotate = config["axis_" + id + "_tick_rotate"] ? $$.getHorizontalAxisHeight(id) : 0;
10844
+ var tickRotate = config["axis_".concat(id, "_tick_rotate")] ? $$.getHorizontalAxisHeight(id) : 0;
10849
10845
  var maxTickWidth = this.getMaxTickWidth(id);
10850
10846
  var dy;
10851
10847
  if (id === "x") {
@@ -10884,7 +10880,7 @@ var Axis = /** @class */ (function () {
10884
10880
  }
10885
10881
  else {
10886
10882
  dy = isInner ?
10887
- dy[3] : (dy[4] + (config["axis_" + id + "_inner"] ? 0 : (maxTickWidth + dy[4]))) * (id === "y" ? -1 : 1);
10883
+ dy[3] : (dy[4] + (config["axis_".concat(id, "_inner")] ? 0 : (maxTickWidth + dy[4]))) * (id === "y" ? -1 : 1);
10888
10884
  }
10889
10885
  }
10890
10886
  return dy;
@@ -10894,13 +10890,13 @@ var Axis = /** @class */ (function () {
10894
10890
  var config = $$.config, current = $$.state.current, _a = $$.$el, svg = _a.svg, chart = _a.chart;
10895
10891
  var currentTickMax = current.maxTickWidths[id];
10896
10892
  var maxWidth = 0;
10897
- if (withoutRecompute || !config["axis_" + id + "_show"] || $$.filterTargetsToShow().length === 0) {
10893
+ if (withoutRecompute || !config["axis_".concat(id, "_show")] || $$.filterTargetsToShow().length === 0) {
10898
10894
  return currentTickMax.size;
10899
10895
  }
10900
10896
  if (svg) {
10901
10897
  var isYAxis_1 = /^y2?$/.test(id);
10902
10898
  var targetsToShow = $$.filterTargetsToShow($$.data.targets);
10903
- var scale = $$.scale[id].copy().domain($$["get" + (isYAxis_1 ? "Y" : "X") + "Domain"](targetsToShow, id));
10899
+ var scale = $$.scale[id].copy().domain($$["get".concat(isYAxis_1 ? "Y" : "X", "Domain")](targetsToShow, id));
10904
10900
  var domain = scale.domain();
10905
10901
  var isDomainSame = domain[0] === domain[1] && domain.every(function (v) { return v > 0; });
10906
10902
  var isCurrentMaxTickDomainSame = isArray(currentTickMax.domain) &&
@@ -10918,8 +10914,8 @@ var Axis = /** @class */ (function () {
10918
10914
  currentTickMax.ticks.splice(0);
10919
10915
  }
10920
10916
  var axis = this.getAxis(id, scale, false, false, true);
10921
- var tickCount = config["axis_" + id + "_tick_count"];
10922
- var tickValues = config["axis_" + id + "_tick_values"];
10917
+ var tickCount = config["axis_".concat(id, "_tick_count")];
10918
+ var tickValues = config["axis_".concat(id, "_tick_values")];
10923
10919
  // Make to generate the final tick text to be rendered
10924
10920
  // https://github.com/naver/billboard.js/issues/920
10925
10921
  // Do not generate if 'tick values' option is given
@@ -11043,9 +11039,9 @@ var Axis = /** @class */ (function () {
11043
11039
  var $$ = this.owner;
11044
11040
  var main = $$.$el.main;
11045
11041
  var labels = {
11046
- x: main.select("." + CLASS.axisX + " ." + CLASS.axisXLabel),
11047
- y: main.select("." + CLASS.axisY + " ." + CLASS.axisYLabel),
11048
- y2: main.select("." + CLASS.axisY2 + " ." + CLASS.axisY2Label)
11042
+ x: main.select(".".concat(CLASS.axisX, " .").concat(CLASS.axisXLabel)),
11043
+ y: main.select(".".concat(CLASS.axisY, " .").concat(CLASS.axisYLabel)),
11044
+ y2: main.select(".".concat(CLASS.axisY2, " .").concat(CLASS.axisY2Label))
11049
11045
  };
11050
11046
  Object.keys(labels).filter(function (id) { return !labels[id].empty(); })
11051
11047
  .forEach(function (v) {
@@ -11128,7 +11124,7 @@ var Axis = /** @class */ (function () {
11128
11124
  axis.config.withoutTransition = true;
11129
11125
  }
11130
11126
  $axis.style("opacity", opacity);
11131
- axis.create(transitions["axis" + capitalize(id)]);
11127
+ axis.create(transitions["axis".concat(capitalize(id))]);
11132
11128
  }
11133
11129
  });
11134
11130
  this.updateAxes();
@@ -11168,8 +11164,8 @@ var Axis = /** @class */ (function () {
11168
11164
  ["y", "y2"].forEach(function (key) {
11169
11165
  var axisScale = scale[key];
11170
11166
  if (axisScale) {
11171
- var tickValues = config["axis_" + key + "_tick_values"];
11172
- var tickCount = config["axis_" + key + "_tick_count"];
11167
+ var tickValues = config["axis_".concat(key, "_tick_values")];
11168
+ var tickCount = config["axis_".concat(key, "_tick_count")];
11173
11169
  axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
11174
11170
  if (!tickValues && tickCount) {
11175
11171
  var axis = $$.axis[key];
@@ -11203,12 +11199,12 @@ var Axis = /** @class */ (function () {
11203
11199
  var axis = $el.axis[type];
11204
11200
  // subchart x axis should be aligned with x axis culling
11205
11201
  var id = type === "subX" ? "x" : type;
11206
- var toCull = config["axis_" + id + "_tick_culling"];
11202
+ var toCull = config["axis_".concat(id, "_tick_culling")];
11207
11203
  if (axis && toCull) {
11208
11204
  var tickText = axis.selectAll(".tick text");
11209
11205
  var tickValues_1 = sortValue(tickText.data());
11210
11206
  var tickSize = tickValues_1.length;
11211
- var cullingMax = config["axis_" + id + "_tick_culling_max"];
11207
+ var cullingMax = config["axis_".concat(id, "_tick_culling_max")];
11212
11208
  var intervalForCulling_1;
11213
11209
  if (tickSize) {
11214
11210
  for (var i = 1; i < tickSize; i++) {
@@ -11227,7 +11223,7 @@ var Axis = /** @class */ (function () {
11227
11223
  // set/unset x_axis_tick_clippath
11228
11224
  if (type === "x") {
11229
11225
  var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
11230
- $el.svg.selectAll("." + CLASS.axisX + " .tick text")
11226
+ $el.svg.selectAll(".".concat(CLASS.axisX, " .tick text"))
11231
11227
  .attr("clip-path", clipPath);
11232
11228
  }
11233
11229
  }
@@ -11248,7 +11244,7 @@ var eventrect = {
11248
11244
  */
11249
11245
  initEventRect: function () {
11250
11246
  var $$ = this;
11251
- $$.$el.main.select("." + CLASS.chart)
11247
+ $$.$el.main.select(".".concat(CLASS.chart))
11252
11248
  .append("g")
11253
11249
  .attr("class", CLASS.eventRects)
11254
11250
  .style("fill-opacity", "0");
@@ -11265,12 +11261,12 @@ var eventrect = {
11265
11261
  $$.updateEventRect($el.eventRect, true);
11266
11262
  }
11267
11263
  else {
11268
- var eventRects = $$.$el.main.select("." + CLASS.eventRects)
11264
+ var eventRects = $$.$el.main.select(".".concat(CLASS.eventRects))
11269
11265
  .style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? (config.axis_rotated ? "ns-resize" : "ew-resize") : null)
11270
11266
  .classed(CLASS.eventRectsMultiple, isMultipleX)
11271
11267
  .classed(CLASS.eventRectsSingle, !isMultipleX);
11272
11268
  // append event <rect>
11273
- var eventRectUpdate = eventRects.selectAll("." + CLASS.eventRect)
11269
+ var eventRectUpdate = eventRects.selectAll(".".concat(CLASS.eventRect))
11274
11270
  .data([0])
11275
11271
  .enter()
11276
11272
  .append("rect");
@@ -11325,7 +11321,7 @@ var eventrect = {
11325
11321
  var preventEvent = function (event) {
11326
11322
  var eventType = event.type;
11327
11323
  var touch = event.changedTouches[0];
11328
- var currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")];
11324
+ var currentXY = touch["client".concat(config.axis_rotated ? "Y" : "X")];
11329
11325
  // prevent document scrolling
11330
11326
  if (eventType === "touchstart") {
11331
11327
  if (isPrevented) {
@@ -11510,7 +11506,7 @@ var eventrect = {
11510
11506
  $$.showGridFocus(selectedData);
11511
11507
  // Show cursor as pointer if point is close to mouse position
11512
11508
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse$1) < config.point_sensitivity) {
11513
- $$.$el.svg.select("." + CLASS.eventRect).style("cursor", "pointer");
11509
+ $$.$el.svg.select(".".concat(CLASS.eventRect)).style("cursor", "pointer");
11514
11510
  if (!state.mouseover) {
11515
11511
  config.data_onover.call($$.api, closest);
11516
11512
  state.mouseover = closest;
@@ -11524,7 +11520,7 @@ var eventrect = {
11524
11520
  unselectRect: function () {
11525
11521
  var $$ = this;
11526
11522
  var config = $$.config, _a = $$.$el, bar = _a.bar, circle = _a.circle, tooltip = _a.tooltip;
11527
- $$.$el.svg.select("." + CLASS.eventRect).style("cursor", null);
11523
+ $$.$el.svg.select(".".concat(CLASS.eventRect)).style("cursor", null);
11528
11524
  $$.hideGridFocus();
11529
11525
  if (tooltip) {
11530
11526
  $$.hideTooltip();
@@ -11603,7 +11599,7 @@ var eventrect = {
11603
11599
  return;
11604
11600
  }
11605
11601
  var index = d.index;
11606
- main.selectAll("." + CLASS.shape + "-" + index)
11602
+ main.selectAll(".".concat(CLASS.shape, "-").concat(index))
11607
11603
  .each(function (d2) {
11608
11604
  if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
11609
11605
  $$.toggleShape && $$.toggleShape(this, d2, index);
@@ -11652,8 +11648,8 @@ var eventrect = {
11652
11648
  }
11653
11649
  // select if selection enabled
11654
11650
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse$1) < config.point_sensitivity) {
11655
- $$.$el.main.selectAll("." + CLASS.shapes + $$.getTargetSelectorSuffix(closest.id))
11656
- .selectAll("." + CLASS.shape + "-" + closest.index)
11651
+ $$.$el.main.selectAll(".".concat(CLASS.shapes).concat($$.getTargetSelectorSuffix(closest.id)))
11652
+ .selectAll(".".concat(CLASS.shape, "-").concat(closest.index))
11657
11653
  .each(function () {
11658
11654
  if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
11659
11655
  $$.toggleShape && $$.toggleShape(this, closest, closest.index);
@@ -11759,13 +11755,13 @@ var flow = {
11759
11755
  ["circle", "text", "shape", "eventRect"].forEach(function (v) {
11760
11756
  var target = [];
11761
11757
  for (var i = 0; i < flowLength; i++) {
11762
- target.push("." + CLASS[v] + "-" + i);
11758
+ target.push(".".concat(CLASS[v], "-").concat(i));
11763
11759
  }
11764
- svg.selectAll("." + CLASS[v + "s"]) // circles, shapes, texts, eventRects
11760
+ svg.selectAll(".".concat(CLASS["".concat(v, "s")])) // circles, shapes, texts, eventRects
11765
11761
  .selectAll(target)
11766
11762
  .remove();
11767
11763
  });
11768
- svg.select("." + CLASS.xgrid)
11764
+ svg.select(".".concat(CLASS.xgrid))
11769
11765
  .remove();
11770
11766
  }
11771
11767
  // draw again for removing flowed elements and reverting attr
@@ -11864,7 +11860,7 @@ var flow = {
11864
11860
  x(flowStart.x) - x(flowEnd.x);
11865
11861
  }
11866
11862
  var scaleX = (diffDomain(orgDomain) / diffDomain(domain));
11867
- return "translate(" + translateX + ",0) scale(" + scaleX + ",1)";
11863
+ return "translate(".concat(translateX, ",0) scale(").concat(scaleX, ",1)");
11868
11864
  }
11869
11865
  };
11870
11866
 
@@ -11877,10 +11873,10 @@ var clip = {
11877
11873
  var $$ = this;
11878
11874
  var clip = $$.state.clip;
11879
11875
  // MEMO: clipId needs to be unique because it conflicts when multiple charts exist
11880
- clip.id = $$.state.datetimeId + "-clip";
11881
- clip.idXAxis = clip.id + "-xaxis";
11882
- clip.idYAxis = clip.id + "-yaxis";
11883
- clip.idGrid = clip.id + "-grid";
11876
+ clip.id = "".concat($$.state.datetimeId, "-clip");
11877
+ clip.idXAxis = "".concat(clip.id, "-xaxis");
11878
+ clip.idYAxis = "".concat(clip.id, "-yaxis");
11879
+ clip.idGrid = "".concat(clip.id, "-grid");
11884
11880
  // Define 'clip-path' attribute values
11885
11881
  clip.path = $$.getClipPath(clip.id);
11886
11882
  clip.pathXAxis = $$.getClipPath(clip.idXAxis);
@@ -11898,7 +11894,7 @@ var clip = {
11898
11894
  var isIE9 = win.navigator ?
11899
11895
  win.navigator.appVersion
11900
11896
  .toLowerCase().indexOf("msie 9.") >= 0 : false;
11901
- return "url(" + (isIE9 ? "" : doc.URL.split("#")[0]) + "#" + id + ")";
11897
+ return "url(".concat((isIE9 ? "" : doc.URL.split("#")[0]), "#").concat(id, ")");
11902
11898
  },
11903
11899
  appendClip: function (parent, id) {
11904
11900
  id && parent.append("clipPath")
@@ -11952,7 +11948,7 @@ var clip = {
11952
11948
  var config = $$.config, _a = $$.state, clip = _a.clip, xAxisHeight = _a.xAxisHeight, defs = $$.$el.defs;
11953
11949
  var newXAxisHeight = $$.getHorizontalAxisHeight("x");
11954
11950
  if (defs && !clip.idXAxisTickTexts) {
11955
- var clipId = clip.id + "-xaxisticktexts";
11951
+ var clipId = "".concat(clip.id, "-xaxisticktexts");
11956
11952
  $$.appendClip(defs, clipId);
11957
11953
  clip.pathXAxisTickTexts = $$.getClipPath(clip.idXAxisTickTexts);
11958
11954
  clip.idXAxisTickTexts = clipId;
@@ -11981,7 +11977,7 @@ var clip = {
11981
11977
  var $$ = this;
11982
11978
  var _a = $$.state, clip = _a.clip, current = _a.current, svg = $$.$el.svg;
11983
11979
  if (svg) {
11984
- svg.select("#" + clip.idXAxisTickTexts + " rect")
11980
+ svg.select("#".concat(clip.idXAxisTickTexts, " rect"))
11985
11981
  .attr("width", current.maxTickWidths.x.clipPath)
11986
11982
  .attr("height", 30);
11987
11983
  }
@@ -12034,7 +12030,7 @@ var grid = {
12034
12030
  hasGrid: function () {
12035
12031
  var config = this.config;
12036
12032
  return ["x", "y"]
12037
- .some(function (v) { return config["grid_" + v + "_show"] || config["grid_" + v + "_lines"].length; });
12033
+ .some(function (v) { return config["grid_".concat(v, "_show")] || config["grid_".concat(v, "_lines")].length; });
12038
12034
  },
12039
12035
  initGrid: function () {
12040
12036
  var $$ = this;
@@ -12045,9 +12041,9 @@ var grid = {
12045
12041
  var $$ = this;
12046
12042
  var config = $$.config, clip = $$.state.clip, $el = $$.$el;
12047
12043
  if (config.grid_x_lines.length || config.grid_y_lines.length) {
12048
- $el.gridLines.main = $el.main.insert("g", "." + CLASS.chart + (config.grid_lines_front ? " + *" : ""))
12044
+ $el.gridLines.main = $el.main.insert("g", ".".concat(CLASS.chart).concat(config.grid_lines_front ? " + *" : ""))
12049
12045
  .attr("clip-path", clip.pathGrid)
12050
- .attr("class", CLASS.grid + " " + CLASS.gridLines);
12046
+ .attr("class", "".concat(CLASS.grid, " ").concat(CLASS.gridLines));
12051
12047
  $el.gridLines.main.append("g").attr("class", CLASS.xgridLines);
12052
12048
  $el.gridLines.main.append("g").attr("class", CLASS.ygridLines);
12053
12049
  $el.gridLines.x = selectAll([]);
@@ -12071,8 +12067,8 @@ var grid = {
12071
12067
  "y1": 0,
12072
12068
  "y2": state.height
12073
12069
  };
12074
- grid.x = main.select("." + CLASS.xgrids)
12075
- .selectAll("." + CLASS.xgrid)
12070
+ grid.x = main.select(".".concat(CLASS.xgrids))
12071
+ .selectAll(".".concat(CLASS.xgrid))
12076
12072
  .data(xgridData);
12077
12073
  grid.x.exit().remove();
12078
12074
  grid.x = grid.x.enter()
@@ -12096,8 +12092,8 @@ var grid = {
12096
12092
  var isRotated = config.axis_rotated;
12097
12093
  var gridValues = $$.axis.y.tickValues() || $$.scale.y.ticks(config.grid_y_ticks);
12098
12094
  var pos = function (d) { return Math.ceil($$.scale.y(d)); };
12099
- grid.y = main.select("." + CLASS.ygrids)
12100
- .selectAll("." + CLASS.ygrid)
12095
+ grid.y = main.select(".".concat(CLASS.ygrids))
12096
+ .selectAll(".".concat(CLASS.ygrid))
12101
12097
  .data(gridValues);
12102
12098
  grid.y.exit().remove();
12103
12099
  grid.y = grid.y
@@ -12131,8 +12127,8 @@ var grid = {
12131
12127
  var config = $$.config, _a = $$.$el, gridLines = _a.gridLines, main = _a.main;
12132
12128
  var isRotated = config.axis_rotated;
12133
12129
  config.grid_x_show && $$.updateXGrid();
12134
- var xLines = main.select("." + CLASS.xgridLines)
12135
- .selectAll("." + CLASS.xgridLine)
12130
+ var xLines = main.select(".".concat(CLASS.xgridLines))
12131
+ .selectAll(".".concat(CLASS.xgridLine))
12136
12132
  .data(config.grid_x_lines);
12137
12133
  // exit
12138
12134
  xLines.exit().transition()
@@ -12149,7 +12145,7 @@ var grid = {
12149
12145
  .style("opacity", "0");
12150
12146
  xLines = xgridLine.merge(xLines);
12151
12147
  xLines
12152
- .attr("class", function (d) { return (CLASS.xgridLine + " " + (d["class"] || "")).trim(); })
12148
+ .attr("class", function (d) { return "".concat(CLASS.xgridLine, " ").concat(d["class"] || "").trim(); })
12153
12149
  .select("text")
12154
12150
  .attr("text-anchor", getGridTextAnchor)
12155
12151
  .attr("dx", getGridTextDx)
@@ -12170,8 +12166,8 @@ var grid = {
12170
12166
  var config = $$.config, _a = $$.state, width = _a.width, height = _a.height, $el = $$.$el;
12171
12167
  var isRotated = config.axis_rotated;
12172
12168
  config.grid_y_show && $$.updateYGrid();
12173
- var ygridLines = $el.main.select("." + CLASS.ygridLines)
12174
- .selectAll("." + CLASS.ygridLine)
12169
+ var ygridLines = $el.main.select(".".concat(CLASS.ygridLines))
12170
+ .selectAll(".".concat(CLASS.ygridLine))
12175
12171
  .data(config.grid_y_lines);
12176
12172
  // exit
12177
12173
  ygridLines.exit()
@@ -12190,7 +12186,7 @@ var grid = {
12190
12186
  // update
12191
12187
  var yv = $$.yv.bind($$);
12192
12188
  ygridLines
12193
- .attr("class", function (d) { return (CLASS.ygridLine + " " + (d["class"] || "")).trim(); })
12189
+ .attr("class", function (d) { return "".concat(CLASS.ygridLine, " ").concat(d["class"] || "").trim(); })
12194
12190
  .select("line")
12195
12191
  .transition()
12196
12192
  .duration(duration)
@@ -12237,7 +12233,7 @@ var grid = {
12237
12233
  var $$ = this;
12238
12234
  var config = $$.config, clip = $$.state.clip, $el = $$.$el;
12239
12235
  var isFront = config.grid_front;
12240
- var className = "." + CLASS[isFront && $el.gridLines.main ? "gridLines" : "chart"] + (isFront ? " + *" : "");
12236
+ var className = ".".concat(CLASS[isFront && $el.gridLines.main ? "gridLines" : "chart"]).concat(isFront ? " + *" : "");
12241
12237
  var grid = $el.main.insert("g", className)
12242
12238
  .attr("clip-path", clip.pathGrid)
12243
12239
  .attr("class", CLASS.grid);
@@ -12269,7 +12265,7 @@ var grid = {
12269
12265
  var $$ = this;
12270
12266
  var config = $$.config, _a = $$.state, width = _a.width, height = _a.height;
12271
12267
  var isRotated = config.axis_rotated;
12272
- var focusEl = $$.$el.main.selectAll("line." + CLASS.xgridFocus + ", line." + CLASS.ygridFocus);
12268
+ var focusEl = $$.$el.main.selectAll("line.".concat(CLASS.xgridFocus, ", line.").concat(CLASS.ygridFocus));
12273
12269
  var dataToShow = (data || [focusEl.datum()]).filter(function (d) { return d && isValue($$.getBaseValue(d)); });
12274
12270
  // Hide when bubble/scatter/stanford plot exists
12275
12271
  if (!config.tooltip_show || dataToShow.length === 0 || $$.hasType("bubble") || $$.hasArcType()) {
@@ -12327,7 +12323,7 @@ var grid = {
12327
12323
  var $$ = this;
12328
12324
  var _a = $$.state, inputType = _a.inputType, resizing = _a.resizing, main = $$.$el.main;
12329
12325
  if (inputType === "mouse" || !resizing) {
12330
- main.selectAll("line." + CLASS.xgridFocus + ", line." + CLASS.ygridFocus)
12326
+ main.selectAll("line.".concat(CLASS.xgridFocus, ", line.").concat(CLASS.ygridFocus))
12331
12327
  .style("visibility", "hidden");
12332
12328
  $$.hideCircleFocus && $$.hideCircleFocus();
12333
12329
  }
@@ -12335,7 +12331,7 @@ var grid = {
12335
12331
  updateGridFocus: function () {
12336
12332
  var $$ = this;
12337
12333
  var _a = $$.state, inputType = _a.inputType, width = _a.width, height = _a.height, resizing = _a.resizing, grid = $$.$el.grid;
12338
- var xgridFocus = grid.main.select("line." + CLASS.xgridFocus);
12334
+ var xgridFocus = grid.main.select("line.".concat(CLASS.xgridFocus));
12339
12335
  if (inputType === "touch") {
12340
12336
  if (xgridFocus.empty()) {
12341
12337
  resizing && $$.showCircleFocus();
@@ -12358,7 +12354,7 @@ var grid = {
12358
12354
  },
12359
12355
  generateGridData: function (type, scale) {
12360
12356
  var $$ = this;
12361
- var tickNum = $$.$el.main.select("." + CLASS.axisX)
12357
+ var tickNum = $$.$el.main.select(".".concat(CLASS.axisX))
12362
12358
  .selectAll(".tick")
12363
12359
  .size();
12364
12360
  var gridData = [];
@@ -12367,7 +12363,7 @@ var grid = {
12367
12363
  var firstYear = xDomain[0].getFullYear();
12368
12364
  var lastYear = xDomain[1].getFullYear();
12369
12365
  for (var i = firstYear; i <= lastYear; i++) {
12370
- gridData.push(new Date(i + "-01-01 00:00:00"));
12366
+ gridData.push(new Date("".concat(i, "-01-01 00:00:00")));
12371
12367
  }
12372
12368
  }
12373
12369
  else {
@@ -12396,14 +12392,14 @@ var grid = {
12396
12392
  var toShow = function (line) { return !toRemove(line); };
12397
12393
  var classLines = forX ? CLASS.xgridLines : CLASS.ygridLines;
12398
12394
  var classLine = forX ? CLASS.xgridLine : CLASS.ygridLine;
12399
- $$.$el.main.select("." + classLines)
12400
- .selectAll("." + classLine)
12395
+ $$.$el.main.select(".".concat(classLines))
12396
+ .selectAll(".".concat(classLine))
12401
12397
  .filter(toRemove)
12402
12398
  .transition()
12403
12399
  .duration(config.transition_duration)
12404
12400
  .style("opacity", "0")
12405
12401
  .remove();
12406
- var gridLines = "grid_" + (forX ? "x" : "y") + "_lines";
12402
+ var gridLines = "grid_".concat(forX ? "x" : "y", "_lines");
12407
12403
  config[gridLines] = config[gridLines].filter(toShow);
12408
12404
  }
12409
12405
  };
@@ -12429,8 +12425,8 @@ var region = {
12429
12425
  // hide if arc type
12430
12426
  $el.region.main.style("visibility", $$.hasArcType() ? "hidden" : "visible");
12431
12427
  // select <g> element
12432
- var list = $el.main.select("." + CLASS.regions)
12433
- .selectAll("." + CLASS.region)
12428
+ var list = $el.main.select(".".concat(CLASS.regions))
12429
+ .selectAll(".".concat(CLASS.region))
12434
12430
  .data(config.regions);
12435
12431
  list.exit()
12436
12432
  .transition()
@@ -12602,7 +12598,7 @@ var sizeAxis = {
12602
12598
  getAxisTickRotate: function (id) {
12603
12599
  var $$ = this;
12604
12600
  var axis = $$.axis, config = $$.config, state = $$.state, $el = $$.$el;
12605
- var rotate = config["axis_" + id + "_tick_rotate"];
12601
+ var rotate = config["axis_".concat(id, "_tick_rotate")];
12606
12602
  if (id === "x") {
12607
12603
  var allowedXAxisTypes = axis.isCategorized() || axis.isTimeSeries();
12608
12604
  if (config.axis_x_tick_fit && allowedXAxisTypes) {
@@ -14439,9 +14435,9 @@ var shapeArc = {
14439
14435
  var config = $$.config;
14440
14436
  var dataType = config.data_type;
14441
14437
  var padding = config.pie_padding;
14442
- var startingAngle = config[dataType + "_startingAngle"] || 0;
14438
+ var startingAngle = config["".concat(dataType, "_startingAngle")] || 0;
14443
14439
  var padAngle = ($$.hasType("pie") && padding ? padding * 0.01 :
14444
- config[dataType + "_padAngle"]) || 0;
14440
+ config["".concat(dataType, "_padAngle")]) || 0;
14445
14441
  $$.pie = pie$1()
14446
14442
  .startAngle(startingAngle)
14447
14443
  .endAngle(startingAngle + (2 * Math.PI))
@@ -14646,7 +14642,7 @@ var shapeArc = {
14646
14642
  var y1 = Math.sin(updated.endAngle - Math.PI / 2);
14647
14643
  var x = Math.cos(updated.endAngle - Math.PI / 2) * (radiusExpanded + 25);
14648
14644
  var y = y1 * (radiusExpanded + 15 - Math.abs(y1 * 10)) + 3;
14649
- translate = "translate(" + x + "," + y + ")";
14645
+ translate = "translate(".concat(x, ",").concat(y, ")");
14650
14646
  }
14651
14647
  else if (!$$.hasType("gauge") || $$.data.targets.length > 1) {
14652
14648
  var outerRadius = $$.getRadius(d).outerRadius;
@@ -14662,7 +14658,7 @@ var shapeArc = {
14662
14658
  else {
14663
14659
  ratio = outerRadius && (h ? (36 / outerRadius > 0.375 ? 1.175 - 36 / outerRadius : 0.8) * outerRadius / h : 0);
14664
14660
  }
14665
- translate = "translate(" + x * ratio + "," + y * ratio + ")";
14661
+ translate = "translate(".concat(x * ratio, ",").concat(y * ratio, ")");
14666
14662
  }
14667
14663
  }
14668
14664
  return translate;
@@ -14705,14 +14701,14 @@ var shapeArc = {
14705
14701
  var interval_1 = setInterval(function () {
14706
14702
  if (!transiting) {
14707
14703
  clearInterval(interval_1);
14708
- $el.legend.selectAll("." + CLASS.legendItemFocused).size() > 0 &&
14704
+ $el.legend.selectAll(".".concat(CLASS.legendItemFocused)).size() > 0 &&
14709
14705
  $$.expandArc(targetIds);
14710
14706
  }
14711
14707
  }, 10);
14712
14708
  return;
14713
14709
  }
14714
14710
  var newTargetIds = $$.mapToTargetIds(targetIds);
14715
- $el.svg.selectAll($$.selectorTargets(newTargetIds, "." + CLASS.chartArc))
14711
+ $el.svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(CLASS.chartArc)))
14716
14712
  .each(function (d) {
14717
14713
  if (!$$.shouldExpand(d.data.id)) {
14718
14714
  return;
@@ -14735,12 +14731,12 @@ var shapeArc = {
14735
14731
  return;
14736
14732
  }
14737
14733
  var newTargetIds = $$.mapToTargetIds(targetIds);
14738
- svg.selectAll($$.selectorTargets(newTargetIds, "." + CLASS.chartArc))
14734
+ svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(CLASS.chartArc)))
14739
14735
  .selectAll("path")
14740
14736
  .transition()
14741
14737
  .duration(function (d) { return $$.getExpandConfig(d.data.id, "duration"); })
14742
14738
  .attr("d", $$.svgArc);
14743
- svg.selectAll("" + CLASS.arc)
14739
+ svg.selectAll("".concat(CLASS.arc))
14744
14740
  .style("opacity", "1");
14745
14741
  },
14746
14742
  /**
@@ -14767,7 +14763,7 @@ var shapeArc = {
14767
14763
  else if ($$.isPieType(id)) {
14768
14764
  type = "pie";
14769
14765
  }
14770
- return type ? config[type + "_expand_" + key] : def[key];
14766
+ return type ? config["".concat(type, "_expand_").concat(key)] : def[key];
14771
14767
  },
14772
14768
  shouldExpand: function (id) {
14773
14769
  var $$ = this;
@@ -14780,7 +14776,7 @@ var shapeArc = {
14780
14776
  var $$ = this;
14781
14777
  var config = $$.config;
14782
14778
  return ["pie", "donut", "gauge"]
14783
- .some(function (v) { return $$.hasType(v) && config[v + "_label_show"]; });
14779
+ .some(function (v) { return $$.hasType(v) && config["".concat(v, "_label_show")]; });
14784
14780
  },
14785
14781
  getArcLabelFormat: function () {
14786
14782
  var $$ = this;
@@ -14797,7 +14793,7 @@ var shapeArc = {
14797
14793
  getArcTitle: function () {
14798
14794
  var $$ = this;
14799
14795
  var type = ($$.hasType("donut") && "donut") || ($$.hasType("gauge") && "gauge");
14800
- return type ? $$.config[type + "_title"] : "";
14796
+ return type ? $$.config["".concat(type, "_title")] : "";
14801
14797
  },
14802
14798
  updateTargetsForArc: function (targets) {
14803
14799
  var $$ = this;
@@ -14806,9 +14802,9 @@ var shapeArc = {
14806
14802
  var classChartArc = $$.getChartClass("Arc");
14807
14803
  var classArcs = $$.getClass("arcs", true);
14808
14804
  var classFocus = $$.classFocus.bind($$);
14809
- var chartArcs = $el.main.select("." + CLASS.chartArcs);
14805
+ var chartArcs = $el.main.select(".".concat(CLASS.chartArcs));
14810
14806
  var mainPieUpdate = chartArcs
14811
- .selectAll("." + CLASS.chartArc)
14807
+ .selectAll(".".concat(CLASS.chartArc))
14812
14808
  .data($$.pie(targets))
14813
14809
  .attr("class", function (d) { return classChartArc(d) + classFocus(d.data); });
14814
14810
  var mainPieEnter = mainPieUpdate.enter().append("g")
@@ -14821,14 +14817,14 @@ var shapeArc = {
14821
14817
  .style("opacity", "0")
14822
14818
  .style("text-anchor", "middle")
14823
14819
  .style("pointer-events", "none");
14824
- $el.text = chartArcs.selectAll("." + CLASS.target + " text");
14820
+ $el.text = chartArcs.selectAll(".".concat(CLASS.target, " text"));
14825
14821
  // MEMO: can not keep same color..., but not bad to update color in redraw
14826
14822
  // mainPieUpdate.exit().remove();
14827
14823
  },
14828
14824
  initArc: function () {
14829
14825
  var $$ = this;
14830
14826
  var $el = $$.$el;
14831
- $el.arcs = $el.main.select("." + CLASS.chart)
14827
+ $el.arcs = $el.main.select(".".concat(CLASS.chart))
14832
14828
  .append("g")
14833
14829
  .attr("class", CLASS.chartArcs)
14834
14830
  .attr("transform", $$.getTranslate("arc"));
@@ -14859,8 +14855,8 @@ var shapeArc = {
14859
14855
  var config = $$.config, state = $$.state, main = $$.$el.main;
14860
14856
  var hasInteraction = config.interaction_enabled;
14861
14857
  var isSelectable = hasInteraction && config.data_selection_isselectable;
14862
- var mainArc = main.selectAll("." + CLASS.arcs)
14863
- .selectAll("." + CLASS.arc)
14858
+ var mainArc = main.selectAll(".".concat(CLASS.arcs))
14859
+ .selectAll(".".concat(CLASS.arc))
14864
14860
  .data($$.arcData.bind($$));
14865
14861
  mainArc.exit().transition()
14866
14862
  .duration(durationForExit)
@@ -14946,22 +14942,24 @@ var shapeArc = {
14946
14942
  var config = $$.config, state = $$.state;
14947
14943
  var hasMultiArcGauge = $$.hasMultiArcGauge();
14948
14944
  var isFullCircle = config.gauge_fullCircle;
14945
+ var showEmptyTextLabel = $$.filterTargetsToShow($$.data.targets).length === 0 &&
14946
+ !!config.data_empty_label_text;
14949
14947
  var startAngle = $$.getStartAngle();
14950
14948
  var endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
14951
- var backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + CLASS.chartArcsBackground);
14949
+ var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat(CLASS.chartArcsBackground));
14952
14950
  if (hasMultiArcGauge) {
14953
14951
  var index_1 = 0;
14954
14952
  backgroundArc = backgroundArc
14955
- .selectAll("path." + CLASS.chartArcsBackground)
14953
+ .selectAll("path.".concat(CLASS.chartArcsBackground))
14956
14954
  .data($$.data.targets);
14957
14955
  backgroundArc.enter()
14958
14956
  .append("path")
14959
- .attr("class", function (d, i) { return CLASS.chartArcsBackground + " " + CLASS.chartArcsBackground + "-" + i; })
14957
+ .attr("class", function (d, i) { return "".concat(CLASS.chartArcsBackground, " ").concat(CLASS.chartArcsBackground, "-").concat(i); })
14960
14958
  .merge(backgroundArc)
14961
14959
  .style("fill", (config.gauge_background) || null)
14962
14960
  .attr("d", function (_a) {
14963
14961
  var id = _a.id;
14964
- if (state.hiddenTargetIds.indexOf(id) >= 0) {
14962
+ if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
14965
14963
  return "M 0 0";
14966
14964
  }
14967
14965
  var d = {
@@ -14975,7 +14973,7 @@ var shapeArc = {
14975
14973
  backgroundArc.exit().remove();
14976
14974
  }
14977
14975
  else {
14978
- backgroundArc.attr("d", function () {
14976
+ backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : function () {
14979
14977
  var d = {
14980
14978
  data: [{ value: config.gauge_max }],
14981
14979
  startAngle: startAngle,
@@ -15077,35 +15075,35 @@ var shapeArc = {
15077
15075
  var text;
15078
15076
  // for gauge type, update text when has no title & multi data
15079
15077
  if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
15080
- text = main.selectAll("." + CLASS.chartArc)
15078
+ text = main.selectAll(".".concat(CLASS.chartArc))
15081
15079
  .select("text")
15082
15080
  .style("opacity", "0")
15083
15081
  .attr("class", function (d) { return ($$.isGaugeType(d.data) ? CLASS.gaugeValue : null); })
15084
15082
  .call($$.textForArcLabel.bind($$))
15085
15083
  .attr("transform", $$.transformForArcLabel.bind($$))
15086
15084
  .style("font-size", function (d) { return ($$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ?
15087
- Math.round(state.radius / 5) + "px" : null); })
15085
+ "".concat(Math.round(state.radius / 5), "px") : null); })
15088
15086
  .transition()
15089
15087
  .duration(duration)
15090
15088
  .style("opacity", function (d) { return ($$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? "1" : "0"); });
15091
15089
  hasMultiArcGauge && text.attr("dy", "-.1em");
15092
15090
  }
15093
- main.select("." + CLASS.chartArcsTitle)
15091
+ main.select(".".concat(CLASS.chartArcsTitle))
15094
15092
  .style("opacity", $$.hasType("donut") || hasGauge ? "1" : "0");
15095
15093
  if (hasGauge) {
15096
15094
  var isFullCircle = config.gauge_fullCircle;
15097
- isFullCircle && text && text.attr("dy", "" + (hasMultiArcGauge ? 0 : Math.round(state.radius / 14)));
15095
+ isFullCircle && text && text.attr("dy", "".concat(hasMultiArcGauge ? 0 : Math.round(state.radius / 14)));
15098
15096
  if (config.gauge_label_show) {
15099
- arcs.select("." + CLASS.chartArcsGaugeUnit)
15100
- .attr("dy", (isFullCircle ? 1.5 : 0.75) + "em")
15097
+ arcs.select(".".concat(CLASS.chartArcsGaugeUnit))
15098
+ .attr("dy", "".concat(isFullCircle ? 1.5 : 0.75, "em"))
15101
15099
  .text(config.gauge_units);
15102
- arcs.select("." + CLASS.chartArcsGaugeMin)
15103
- .attr("dx", -1 * (state.innerRadius + ((state.radius - state.innerRadius) / (isFullCircle ? 1 : 2))) + "px")
15100
+ arcs.select(".".concat(CLASS.chartArcsGaugeMin))
15101
+ .attr("dx", "".concat(-1 * (state.innerRadius + ((state.radius - state.innerRadius) / (isFullCircle ? 1 : 2))), "px"))
15104
15102
  .attr("dy", "1.2em")
15105
15103
  .text($$.textForGaugeMinMax(config.gauge_min, false));
15106
15104
  // show max text when isn't fullCircle
15107
- !isFullCircle && arcs.select("." + CLASS.chartArcsGaugeMax)
15108
- .attr("dx", state.innerRadius + ((state.radius - state.innerRadius) / 2) + "px")
15105
+ !isFullCircle && arcs.select(".".concat(CLASS.chartArcsGaugeMax))
15106
+ .attr("dx", "".concat(state.innerRadius + ((state.radius - state.innerRadius) / 2), "px"))
15109
15107
  .attr("dy", "1.2em")
15110
15108
  .text($$.textForGaugeMinMax(config.gauge_max, true));
15111
15109
  }
@@ -15122,19 +15120,19 @@ var shapeArea = {
15122
15120
  var $$ = this;
15123
15121
  var config = $$.config;
15124
15122
  mainLine
15125
- .insert("g", "." + CLASS[config.area_front ? "circles" : "lines"])
15123
+ .insert("g", ".".concat(CLASS[config.area_front ? "circles" : "lines"]))
15126
15124
  .attr("class", $$.getClass("areas", true));
15127
15125
  },
15128
15126
  updateAreaGradient: function () {
15129
15127
  var $$ = this;
15130
15128
  var config = $$.config, datetimeId = $$.state.datetimeId, defs = $$.$el.defs;
15131
15129
  $$.data.targets.forEach(function (d) {
15132
- var id = datetimeId + "-areaGradient" + $$.getTargetSelectorSuffix(d.id);
15133
- if ($$.isAreaType(d) && defs.select("#" + id).empty()) {
15130
+ var id = "".concat(datetimeId, "-areaGradient").concat($$.getTargetSelectorSuffix(d.id));
15131
+ if ($$.isAreaType(d) && defs.select("#".concat(id)).empty()) {
15134
15132
  var color_1 = $$.color(d);
15135
15133
  var _a = config.area_linearGradient, _b = _a.x, x = _b === void 0 ? [0, 0] : _b, _c = _a.y, y = _c === void 0 ? [0, 1] : _c, _d = _a.stops, stops = _d === void 0 ? [[0, color_1, 1], [1, color_1, 0]] : _d;
15136
15134
  var linearGradient_1 = defs.append("linearGradient")
15137
- .attr("id", "" + id)
15135
+ .attr("id", "".concat(id))
15138
15136
  .attr("x1", x[0])
15139
15137
  .attr("x2", x[1])
15140
15138
  .attr("y1", y[0])
@@ -15152,15 +15150,15 @@ var shapeArea = {
15152
15150
  updateAreaColor: function (d) {
15153
15151
  var $$ = this;
15154
15152
  return $$.config.area_linearGradient ?
15155
- "url(#" + $$.state.datetimeId + "-areaGradient" + $$.getTargetSelectorSuffix(d.id) + ")" :
15153
+ "url(#".concat($$.state.datetimeId, "-areaGradient").concat($$.getTargetSelectorSuffix(d.id), ")") :
15156
15154
  $$.color(d);
15157
15155
  },
15158
15156
  updateArea: function (durationForExit) {
15159
15157
  var $$ = this;
15160
15158
  var config = $$.config, state = $$.state, $el = $$.$el;
15161
15159
  config.area_linearGradient && $$.updateAreaGradient();
15162
- $el.area = $el.main.selectAll("." + CLASS.areas)
15163
- .selectAll("." + CLASS.area)
15160
+ $el.area = $el.main.selectAll(".".concat(CLASS.areas))
15161
+ .selectAll(".".concat(CLASS.area))
15164
15162
  .data($$.lineData.bind($$));
15165
15163
  $el.area.exit().transition()
15166
15164
  .duration(durationForExit)
@@ -15238,7 +15236,7 @@ var shapeArea = {
15238
15236
  x0 = $$.scale.x(values[0].x);
15239
15237
  y0 = $$.getYScaleById(d.id)(values[0].value);
15240
15238
  }
15241
- path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
15239
+ path = isRotated ? "M ".concat(y0, " ").concat(x0) : "M ".concat(x0, " ").concat(y0);
15242
15240
  }
15243
15241
  return path || "M 0 0";
15244
15242
  };
@@ -15278,7 +15276,7 @@ var shapeArea = {
15278
15276
  var shapeBar = {
15279
15277
  initBar: function () {
15280
15278
  var $el = this.$el;
15281
- $el.bar = $el.main.select("." + CLASS.chart)
15279
+ $el.bar = $el.main.select(".".concat(CLASS.chart))
15282
15280
  // should positioned at the beginning of the shape node to not overlap others
15283
15281
  .insert("g", ":first-child")
15284
15282
  .attr("class", CLASS.chartBars);
@@ -15293,8 +15291,8 @@ var shapeBar = {
15293
15291
  if (!$el.bar) {
15294
15292
  $$.initBar();
15295
15293
  }
15296
- var mainBarUpdate = $$.$el.main.select("." + CLASS.chartBars)
15297
- .selectAll("." + CLASS.chartBar)
15294
+ var mainBarUpdate = $$.$el.main.select(".".concat(CLASS.chartBars))
15295
+ .selectAll(".".concat(CLASS.chartBar))
15298
15296
  .data(targets)
15299
15297
  .attr("class", function (d) { return classChartBar(d) + classFocus(d); });
15300
15298
  var mainBarEnter = mainBarUpdate.enter().append("g")
@@ -15312,7 +15310,7 @@ var shapeBar = {
15312
15310
  var barData = $$.barData.bind($$);
15313
15311
  var classBar = $$.getClass("bar", true);
15314
15312
  var initialOpacity = $$.initialOpacity.bind($$);
15315
- $el.bar = $el.main.selectAll("." + CLASS.bars).selectAll("." + CLASS.bar)
15313
+ $el.bar = $el.main.selectAll(".".concat(CLASS.bars)).selectAll(".".concat(CLASS.bar))
15316
15314
  .data(barData);
15317
15315
  $el.bar.exit().transition()
15318
15316
  .duration(durationForExit)
@@ -15364,10 +15362,10 @@ var shapeBar = {
15364
15362
  getBars: function (i, id) {
15365
15363
  var $$ = this;
15366
15364
  var main = $$.$el.main;
15367
- var suffix = (isValue(i) ? "-" + i : "");
15365
+ var suffix = (isValue(i) ? "-".concat(i) : "");
15368
15366
  return (id ? main
15369
- .selectAll("." + CLASS.bars + $$.getTargetSelectorSuffix(id)) : main)
15370
- .selectAll("." + CLASS.bar + suffix);
15367
+ .selectAll(".".concat(CLASS.bars).concat($$.getTargetSelectorSuffix(id))) : main)
15368
+ .selectAll(".".concat(CLASS.bar).concat(suffix));
15371
15369
  },
15372
15370
  expandBars: function (i, id, reset) {
15373
15371
  var $$ = this;
@@ -15401,17 +15399,17 @@ var shapeBar = {
15401
15399
  var index = isRotated ? indexY : indexX;
15402
15400
  var barW = points[2][index] - points[0][index];
15403
15401
  radius = getRadius(barW);
15404
- var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " ";
15405
- pathRadius[+!isRotated] = "" + arc + radius + "," + radius;
15406
- pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"]();
15402
+ var arc = "a".concat(radius, ",").concat(radius, " ").concat(isNegative ? "1 0 0" : "0 0 1", " ");
15403
+ pathRadius[+!isRotated] = "".concat(arc).concat(radius, ",").concat(radius);
15404
+ pathRadius[+isRotated] = "".concat(arc).concat([-radius, radius][isRotated ? "sort" : "reverse"]());
15407
15405
  isNegative && pathRadius.reverse();
15408
15406
  }
15409
15407
  // path string data shouldn't be containing new line chars
15410
15408
  // https://github.com/naver/billboard.js/issues/530
15411
15409
  var path = isRotated ?
15412
- "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] :
15413
- "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY];
15414
- return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z";
15410
+ "H".concat(points[1][indexX] - radius, " ").concat(pathRadius[0], "V").concat(points[2][indexY] - radius, " ").concat(pathRadius[1], "H").concat(points[3][indexX]) :
15411
+ "V".concat(points[1][indexY] + (isNegative ? -radius : radius), " ").concat(pathRadius[0], "H").concat(points[2][indexX] - radius, " ").concat(pathRadius[1], "V").concat(points[3][indexY]);
15412
+ return "M".concat(points[0][indexX], ",").concat(points[0][indexY]).concat(path, "z");
15415
15413
  };
15416
15414
  },
15417
15415
  generateGetBarPoints: function (barIndices, isSub) {
@@ -15506,12 +15504,12 @@ var shapeGauge = {
15506
15504
  var $$ = this;
15507
15505
  var config = $$.config, state = $$.state, $el = $$.$el;
15508
15506
  var hiddenTargetIds = $$.state.hiddenTargetIds;
15509
- var arcLabelLines = $el.main.selectAll("." + CLASS.arcs)
15510
- .selectAll("." + CLASS.arcLabelLine)
15507
+ var arcLabelLines = $el.main.selectAll(".".concat(CLASS.arcs))
15508
+ .selectAll(".".concat(CLASS.arcLabelLine))
15511
15509
  .data($$.arcData.bind($$));
15512
15510
  var mainArcLabelLine = arcLabelLines.enter()
15513
15511
  .append("rect")
15514
- .attr("class", function (d) { return CLASS.arcLabelLine + " " + CLASS.target + " " + CLASS.target + "-" + d.data.id; })
15512
+ .attr("class", function (d) { return "".concat(CLASS.arcLabelLine, " ").concat(CLASS.target, " ").concat(CLASS.target, "-").concat(d.data.id); })
15515
15513
  .merge(arcLabelLines);
15516
15514
  mainArcLabelLine
15517
15515
  .style("fill", function (d) { return ($$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data)); })
@@ -15532,7 +15530,7 @@ var shapeGauge = {
15532
15530
  lineLength = state.radiusExpanded - state.radius + innerLineLength;
15533
15531
  x = Math.cos(linePositioningAngle) * arcInnerRadius;
15534
15532
  y = Math.sin(linePositioningAngle) * arcInnerRadius;
15535
- transform = "rotate(" + lineAngle * 180 / Math.PI + ", " + x + ", " + y + ")";
15533
+ transform = "rotate(".concat(lineAngle * 180 / Math.PI, ", ").concat(x, ", ").concat(y, ")");
15536
15534
  }
15537
15535
  select(this)
15538
15536
  .attr("x", x)
@@ -15540,7 +15538,7 @@ var shapeGauge = {
15540
15538
  .attr("width", lineLength)
15541
15539
  .attr("height", lineThickness)
15542
15540
  .attr("transform", transform)
15543
- .style("stroke-dasharray", "0, " + (lineLength + lineThickness) + ", 0");
15541
+ .style("stroke-dasharray", "0, ".concat(lineLength + lineThickness, ", 0"));
15544
15542
  });
15545
15543
  },
15546
15544
  textForGaugeMinMax: function (value, isMax) {
@@ -15632,7 +15630,7 @@ var shapeBubble = {
15632
15630
  var shapeLine = {
15633
15631
  initLine: function () {
15634
15632
  var $el = this.$el;
15635
- $el.line = $el.main.select("." + CLASS.chart).append("g")
15633
+ $el.line = $el.main.select(".".concat(CLASS.chart)).append("g")
15636
15634
  .attr("class", CLASS.chartLines);
15637
15635
  },
15638
15636
  updateTargetsForLine: function (t) {
@@ -15645,8 +15643,8 @@ var shapeLine = {
15645
15643
  $$.initLine();
15646
15644
  }
15647
15645
  var targets = t.filter(function (d) { return !($$.isScatterType(d) || $$.isBubbleType(d)); });
15648
- var mainLineUpdate = main.select("." + CLASS.chartLines)
15649
- .selectAll("." + CLASS.chartLine)
15646
+ var mainLineUpdate = main.select(".".concat(CLASS.chartLines))
15647
+ .selectAll(".".concat(CLASS.chartLine))
15650
15648
  .data(targets)
15651
15649
  .attr("class", function (d) { return classChartLine(d) + classFocus(d); });
15652
15650
  var mainLineEnter = mainLineUpdate.enter().append("g")
@@ -15666,8 +15664,8 @@ var shapeLine = {
15666
15664
  var $$ = this;
15667
15665
  var extraLineClasses = $$.format.extraLineClasses, $el = $$.$el;
15668
15666
  $el.line = $el.main
15669
- .selectAll("." + CLASS.lines)
15670
- .selectAll("." + CLASS.line)
15667
+ .selectAll(".".concat(CLASS.lines))
15668
+ .selectAll(".".concat(CLASS.line))
15671
15669
  .data($$.lineData.bind($$));
15672
15670
  $el.line.exit().transition()
15673
15671
  .duration(durationForExit)
@@ -15675,7 +15673,7 @@ var shapeLine = {
15675
15673
  .remove();
15676
15674
  $el.line = $el.line.enter()
15677
15675
  .append("path")
15678
- .attr("class", function (d) { return $$.getClass("line", true)(d) + " " + (extraLineClasses(d) || ""); })
15676
+ .attr("class", function (d) { return "".concat($$.getClass("line", true)(d), " ").concat(extraLineClasses(d) || ""); })
15679
15677
  .style("stroke", $$.color)
15680
15678
  .merge($el.line)
15681
15679
  .style("opacity", $$.initialOpacity.bind($$))
@@ -15762,7 +15760,7 @@ var shapeLine = {
15762
15760
  x0 = x(values[0].x);
15763
15761
  y0 = y(values[0].value);
15764
15762
  }
15765
- path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
15763
+ path = isRotated ? "M ".concat(y0, " ").concat(x0) : "M ".concat(x0, " ").concat(y0);
15766
15764
  }
15767
15765
  return path || "M 0 0";
15768
15766
  };
@@ -15802,7 +15800,7 @@ var shapeLine = {
15802
15800
  var xValue = isRotated ? function (dt) { return y(dt.value); } : function (dt) { return x(dt.x); };
15803
15801
  var yValue = isRotated ? function (dt) { return x(dt.x); } : function (dt) { return y(dt.value); };
15804
15802
  // Define svg generator function for region
15805
- var generateM = function (points) { return "M" + points[0][0] + "," + points[0][1] + "L" + points[1][0] + "," + points[1][1]; };
15803
+ var generateM = function (points) { return "M".concat(points[0][0], ",").concat(points[0][1], "L").concat(points[1][0], ",").concat(points[1][1]); };
15806
15804
  var sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) {
15807
15805
  var x0 = d0.x.getTime();
15808
15806
  var xDiff = d1.x - d0.x;
@@ -15831,7 +15829,7 @@ var shapeLine = {
15831
15829
  }
15832
15830
  // Draw as normal
15833
15831
  if (isUndefined(regions) || !style || !hasPrevData) {
15834
- path += "" + (i && hasPrevData ? "L" : "M") + xValue(data) + "," + yValue(data);
15832
+ path += "".concat(i && hasPrevData ? "L" : "M").concat(xValue(data), ",").concat(yValue(data));
15835
15833
  }
15836
15834
  else if (hasPrevData) {
15837
15835
  try {
@@ -15903,8 +15901,8 @@ var shapePoint = {
15903
15901
  var $$ = this;
15904
15902
  var main = $$.$el.main;
15905
15903
  $$.point = $$.generatePoint();
15906
- if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." + CLASS.chartCircles).empty()) {
15907
- main.select("." + CLASS.chart)
15904
+ if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select(".".concat(CLASS.chartCircles)).empty()) {
15905
+ main.select(".".concat(CLASS.chart))
15908
15906
  .append("g")
15909
15907
  .attr("class", CLASS.chartCircles);
15910
15908
  }
@@ -15926,9 +15924,9 @@ var shapePoint = {
15926
15924
  if (!targets) {
15927
15925
  targets = (data.targets)
15928
15926
  .filter(function (d) { return _this.isScatterType(d) || _this.isBubbleType(d); });
15929
- var mainCircle = $el.main.select("." + CLASS.chartCircles)
15927
+ var mainCircle = $el.main.select(".".concat(CLASS.chartCircles))
15930
15928
  .style("pointer-events", "none")
15931
- .selectAll("." + CLASS.circles)
15929
+ .selectAll(".".concat(CLASS.circles))
15932
15930
  .data(targets)
15933
15931
  .attr("class", classCircles);
15934
15932
  mainCircle.exit().remove();
@@ -15942,8 +15940,8 @@ var shapePoint = {
15942
15940
  .style("cursor", function (d) { return (isSelectable && isSelectable(d) ? "pointer" : null); });
15943
15941
  // Update date for selected circles
15944
15942
  selectionEnabled && targets.forEach(function (t) {
15945
- $el.main.selectAll("." + CLASS.selectedCircles + $$.getTargetSelectorSuffix(t.id))
15946
- .selectAll("" + CLASS.selectedCircle)
15943
+ $el.main.selectAll(".".concat(CLASS.selectedCircles).concat($$.getTargetSelectorSuffix(t.id)))
15944
+ .selectAll("".concat(CLASS.selectedCircle))
15947
15945
  .each(function (d) {
15948
15946
  d.value = t.values[d.index].value;
15949
15947
  });
@@ -15954,8 +15952,8 @@ var shapePoint = {
15954
15952
  var config = $$.config, state = $$.state, $el = $$.$el;
15955
15953
  var focusOnly = config.point_focus_only;
15956
15954
  if (config.point_show && !state.toggling) {
15957
- var circles = $el.main.selectAll("." + CLASS.circles)
15958
- .selectAll("." + CLASS.circle)
15955
+ var circles = $el.main.selectAll(".".concat(CLASS.circles))
15956
+ .selectAll(".".concat(CLASS.circle))
15959
15957
  .data(function (d) { return (($$.isLineType(d) && $$.shouldDrawPointsForLine(d)) ||
15960
15958
  $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ?
15961
15959
  (focusOnly ? [d.values[0]] : d.values) : []); });
@@ -15963,7 +15961,7 @@ var shapePoint = {
15963
15961
  circles.enter()
15964
15962
  .filter(Boolean)
15965
15963
  .append($$.point("create", this, $$.pointR.bind($$), $$.color));
15966
- $el.circle = $el.main.selectAll("." + CLASS.circles + " ." + CLASS.circle)
15964
+ $el.circle = $el.main.selectAll(".".concat(CLASS.circles, " .").concat(CLASS.circle))
15967
15965
  .style("stroke", $$.color)
15968
15966
  .style("opacity", $$.initialOpacityForCircle.bind($$));
15969
15967
  }
@@ -15971,7 +15969,7 @@ var shapePoint = {
15971
15969
  redrawCircle: function (cx, cy, withTransition, flow) {
15972
15970
  var $$ = this;
15973
15971
  var rendered = $$.state.rendered, _a = $$.$el, circle = _a.circle, main = _a.main;
15974
- var selectedCircles = main.selectAll("." + CLASS.selectedCircle);
15972
+ var selectedCircles = main.selectAll(".".concat(CLASS.selectedCircle));
15975
15973
  if (!$$.config.point_show) {
15976
15974
  return [];
15977
15975
  }
@@ -15989,8 +15987,8 @@ var shapePoint = {
15989
15987
  return [
15990
15988
  mainCircles,
15991
15989
  (withTransition ? selectedCircles.transition() : selectedCircles)
15992
- .attr(posAttr + "x", cx)
15993
- .attr(posAttr + "y", cy)
15990
+ .attr("".concat(posAttr, "x"), cx)
15991
+ .attr("".concat(posAttr, "y"), cy)
15994
15992
  ];
15995
15993
  },
15996
15994
  /**
@@ -16057,9 +16055,9 @@ var shapePoint = {
16057
16055
  },
16058
16056
  getCircles: function (i, id) {
16059
16057
  var $$ = this;
16060
- var suffix = (isValue(i) ? "-" + i : "");
16061
- return (id ? $$.$el.main.selectAll("." + CLASS.circles + $$.getTargetSelectorSuffix(id)) : $$.$el.main)
16062
- .selectAll("." + CLASS.circle + suffix);
16058
+ var suffix = (isValue(i) ? "-".concat(i) : "");
16059
+ return (id ? $$.$el.main.selectAll(".".concat(CLASS.circles).concat($$.getTargetSelectorSuffix(id))) : $$.$el.main)
16060
+ .selectAll(".".concat(CLASS.circle).concat(suffix));
16063
16061
  },
16064
16062
  expandCircles: function (i, id, reset) {
16065
16063
  var $$ = this;
@@ -16082,7 +16080,7 @@ var shapePoint = {
16082
16080
  var _a = this.getBBox(), width = _a.width, height = _a.height;
16083
16081
  var x = ratio * (+point.attr("x") + width / 2);
16084
16082
  var y = ratio * (+point.attr("y") + height / 2);
16085
- point.attr("transform", "translate(" + x + " " + y + ") scale(" + scale + ")");
16083
+ point.attr("transform", "translate(".concat(x, " ").concat(y, ") scale(").concat(scale, ")"));
16086
16084
  }
16087
16085
  });
16088
16086
  }
@@ -16097,7 +16095,7 @@ var shapePoint = {
16097
16095
  .classed(CLASS.EXPANDED, false);
16098
16096
  circles.attr("r", r);
16099
16097
  !$$.isCirclePoint() &&
16100
- circles.attr("transform", "scale(" + r(circles) / $$.config.point_r + ")");
16098
+ circles.attr("transform", "scale(".concat(r(circles) / $$.config.point_r, ")"));
16101
16099
  },
16102
16100
  pointR: function (d) {
16103
16101
  var $$ = this;
@@ -16129,8 +16127,8 @@ var shapePoint = {
16129
16127
  var mouse$1 = mouse(node);
16130
16128
  var element = select(node);
16131
16129
  var prefix = this.isCirclePoint(node) ? "c" : "";
16132
- var cx = +element.attr(prefix + "x");
16133
- var cy = +element.attr(prefix + "y");
16130
+ var cx = +element.attr("".concat(prefix, "x"));
16131
+ var cy = +element.attr("".concat(prefix, "y"));
16134
16132
  // if node don't have cx/y or x/y attribute value
16135
16133
  if (!(cx || cy) && node.nodeType === 1) {
16136
16134
  var _a = getBoundingRect(node), x = _a.x, y = _a.y;
@@ -16169,7 +16167,7 @@ var shapePoint = {
16169
16167
  $$.$el.defs.node().appendChild(clone);
16170
16168
  },
16171
16169
  pointFromDefs: function (id) {
16172
- return this.$el.defs.select("#" + id);
16170
+ return this.$el.defs.select("#".concat(id));
16173
16171
  },
16174
16172
  updatePointClass: function (d) {
16175
16173
  var $$ = this;
@@ -16180,7 +16178,7 @@ var shapePoint = {
16180
16178
  circle.each(function (d) {
16181
16179
  var className = $$.getClass("circle", true)(d);
16182
16180
  if (this.getAttribute("class").indexOf(CLASS.EXPANDED) > -1) {
16183
- className += " " + CLASS.EXPANDED;
16181
+ className += " ".concat(CLASS.EXPANDED);
16184
16182
  }
16185
16183
  this.setAttribute("class", className);
16186
16184
  }) : $$.getClass("circle", true)(d);
@@ -16232,26 +16230,26 @@ var shapePoint = {
16232
16230
  point = $$[point];
16233
16231
  }
16234
16232
  else if (!$$.hasValidPointDrawMethods(point)) {
16235
- var pointId = datetimeId + "-point" + id;
16233
+ var pointId = "".concat(datetimeId, "-point").concat(id);
16236
16234
  var pointFromDefs = $$.pointFromDefs(pointId);
16237
16235
  if (pointFromDefs.size() < 1) {
16238
16236
  $$.insertPointInfoDefs(point, pointId);
16239
16237
  }
16240
16238
  if (method === "create") {
16241
- return $$.custom.create.bind(context).apply(void 0, __spreadArray([element, pointId], args));
16239
+ return $$.custom.create.bind(context).apply(void 0, __spreadArray([element, pointId], args, false));
16242
16240
  }
16243
16241
  else if (method === "update") {
16244
- return $$.custom.update.bind(context).apply(void 0, __spreadArray([element], args));
16242
+ return $$.custom.update.bind(context).apply(void 0, __spreadArray([element], args, false));
16245
16243
  }
16246
16244
  }
16247
- return point[method].bind(context).apply(void 0, __spreadArray([element], args));
16245
+ return point[method].bind(context).apply(void 0, __spreadArray([element], args, false));
16248
16246
  };
16249
16247
  };
16250
16248
  },
16251
16249
  custom: {
16252
16250
  create: function (element, id, sizeFn, fillStyleFn) {
16253
16251
  return element.append("use")
16254
- .attr("xlink:href", "#" + id)
16252
+ .attr("xlink:href", "#".concat(id))
16255
16253
  .attr("class", this.updatePointClass.bind(this))
16256
16254
  .style("fill", fillStyleFn)
16257
16255
  .node();
@@ -16362,7 +16360,7 @@ var shapeRadar = {
16362
16360
  var $$ = this;
16363
16361
  var config = $$.config, current = $$.state.current, $el = $$.$el;
16364
16362
  if ($$.hasType("radar")) {
16365
- $el.radar = $el.main.select("." + CLASS.chart).append("g")
16363
+ $el.radar = $el.main.select(".".concat(CLASS.chart)).append("g")
16366
16364
  .attr("class", CLASS.chartRadars);
16367
16365
  // level
16368
16366
  $el.radar.levels = $el.radar.append("g")
@@ -16426,7 +16424,7 @@ var shapeRadar = {
16426
16424
  // Adjust radar, circles and texts' position
16427
16425
  if (translate) {
16428
16426
  radar.attr("transform", translate);
16429
- main.select("." + CLASS.chartTexts).attr("transform", translate);
16427
+ main.select(".".concat(CLASS.chartTexts)).attr("transform", translate);
16430
16428
  $$.generateRadarPoints();
16431
16429
  $$.updateRadarLevel();
16432
16430
  $$.updateRadarAxes();
@@ -16464,11 +16462,11 @@ var shapeRadar = {
16464
16462
  return pos.join(" ");
16465
16463
  });
16466
16464
  var level = radarLevels
16467
- .selectAll("." + CLASS.level)
16465
+ .selectAll(".".concat(CLASS.level))
16468
16466
  .data(levelData);
16469
16467
  level.exit().remove();
16470
16468
  var levelEnter = level.enter().append("g")
16471
- .attr("class", function (d, i) { return CLASS.level + " " + CLASS.level + "-" + i; });
16469
+ .attr("class", function (d, i) { return "".concat(CLASS.level, " ").concat(CLASS.level, "-").concat(i); });
16472
16470
  levelEnter.append("polygon")
16473
16471
  .style("visibility", config.radar_level_show ? null : "hidden");
16474
16472
  if (showText) {
@@ -16487,7 +16485,7 @@ var shapeRadar = {
16487
16485
  }
16488
16486
  levelEnter
16489
16487
  .merge(level)
16490
- .attr("transform", function (d) { return "translate(" + (width - levelRatio[d]) + ", " + (height - levelRatio[d]) + ")"; })
16488
+ .attr("transform", function (d) { return "translate(".concat(width - levelRatio[d], ", ").concat(height - levelRatio[d], ")"); })
16491
16489
  .selectAll("polygon")
16492
16490
  .attr("points", function (d) { return points[d]; });
16493
16491
  // update level text position
@@ -16506,7 +16504,7 @@ var shapeRadar = {
16506
16504
  .data(categories);
16507
16505
  axis.exit().remove();
16508
16506
  var axisEnter = axis.enter().append("g")
16509
- .attr("class", function (d, i) { return CLASS.axis + "-" + i; });
16507
+ .attr("class", function (d, i) { return "".concat(CLASS.axis, "-").concat(i); });
16510
16508
  config.radar_axis_line_show && axisEnter.append("line");
16511
16509
  config.radar_axis_text_show && axisEnter.append("text");
16512
16510
  axis = axisEnter.merge(axis);
@@ -16553,7 +16551,7 @@ var shapeRadar = {
16553
16551
  else if (posY < height) {
16554
16552
  posY -= y_1;
16555
16553
  }
16556
- return "translate(" + posX + " " + posY + ")";
16554
+ return "translate(".concat(posX, " ").concat(posY, ")");
16557
16555
  });
16558
16556
  }
16559
16557
  $$.bindEvent();
@@ -17521,8 +17519,8 @@ var apiSelection = {
17521
17519
  selected: function (targetId) {
17522
17520
  var $$ = this.internal;
17523
17521
  var dataPoint = [];
17524
- $$.$el.main.selectAll("." + (CLASS.shapes + $$.getTargetSelectorSuffix(targetId)))
17525
- .selectAll("." + CLASS.shape)
17522
+ $$.$el.main.selectAll(".".concat(CLASS.shapes + $$.getTargetSelectorSuffix(targetId)))
17523
+ .selectAll(".".concat(CLASS.shape))
17526
17524
  .filter(function () {
17527
17525
  return select(this).classed(CLASS.SELECTED);
17528
17526
  })
@@ -17559,8 +17557,8 @@ var apiSelection = {
17559
17557
  if (!config.data_selection_enabled) {
17560
17558
  return;
17561
17559
  }
17562
- $el.main.selectAll("." + CLASS.shapes)
17563
- .selectAll("." + CLASS.shape)
17560
+ $el.main.selectAll(".".concat(CLASS.shapes))
17561
+ .selectAll(".".concat(CLASS.shape))
17564
17562
  .each(function (d, i) {
17565
17563
  var shape = select(this);
17566
17564
  var id = d.data ? d.data.id : d.id;
@@ -17605,8 +17603,8 @@ var apiSelection = {
17605
17603
  if (!config.data_selection_enabled) {
17606
17604
  return;
17607
17605
  }
17608
- $el.main.selectAll("." + CLASS.shapes)
17609
- .selectAll("." + CLASS.shape)
17606
+ $el.main.selectAll(".".concat(CLASS.shapes))
17607
+ .selectAll(".".concat(CLASS.shape))
17610
17608
  .each(function (d, i) {
17611
17609
  var shape = select(this);
17612
17610
  var id = d.data ? d.data.id : d.id;
@@ -17821,7 +17819,7 @@ var apiZoom = {
17821
17819
  $$.updateZoom(true);
17822
17820
  $$.zoom.resetBtn && $$.zoom.resetBtn.style("display", "none");
17823
17821
  // reset transform
17824
- var eventRects = $$.$el.main.select("." + CLASS.eventRects);
17822
+ var eventRects = $$.$el.main.select(".".concat(CLASS.eventRects));
17825
17823
  if (zoomTransform(eventRects.node()) !== zoomIdentity) {
17826
17824
  $$.zoom.transform(eventRects, zoomIdentity);
17827
17825
  }
@@ -17867,14 +17865,14 @@ var drag = {
17867
17865
  var maxX = Math.max(sx, mx);
17868
17866
  var minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my);
17869
17867
  var maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
17870
- main.select("." + CLASS.dragarea)
17868
+ main.select(".".concat(CLASS.dragarea))
17871
17869
  .attr("x", minX)
17872
17870
  .attr("y", minY)
17873
17871
  .attr("width", maxX - minX)
17874
17872
  .attr("height", maxY - minY);
17875
17873
  // TODO: binary search when multiple xs
17876
- main.selectAll("." + CLASS.shapes)
17877
- .selectAll("." + CLASS.shape)
17874
+ main.selectAll(".".concat(CLASS.shapes))
17875
+ .selectAll(".".concat(CLASS.shape))
17878
17876
  .filter(function (d) { return isSelectable && isSelectable.bind($$.api)(d); })
17879
17877
  .each(function (d, i) {
17880
17878
  var shape = select(this);
@@ -17919,7 +17917,7 @@ var drag = {
17919
17917
  return;
17920
17918
  }
17921
17919
  state.dragStart = mouse;
17922
- main.select("." + CLASS.chart)
17920
+ main.select(".".concat(CLASS.chart))
17923
17921
  .append("rect")
17924
17922
  .attr("class", CLASS.dragarea)
17925
17923
  .style("opacity", "0.1");
@@ -17936,12 +17934,12 @@ var drag = {
17936
17934
  if ($$.hasArcType() || !config.data_selection_enabled) { // do nothing if not selectable
17937
17935
  return;
17938
17936
  }
17939
- main.select("." + CLASS.dragarea)
17937
+ main.select(".".concat(CLASS.dragarea))
17940
17938
  .transition()
17941
17939
  .duration(100)
17942
17940
  .style("opacity", "0")
17943
17941
  .remove();
17944
- main.selectAll("." + CLASS.shape)
17942
+ main.selectAll(".".concat(CLASS.shape))
17945
17943
  .classed(CLASS.INCLUDED, false);
17946
17944
  $$.setDragStatus(false);
17947
17945
  }
@@ -17964,8 +17962,8 @@ var selection = _assign(_assign({}, drag), {
17964
17962
  var r = $$.pointSelectR.bind($$);
17965
17963
  callFn(config.data_onselected, $$.api, d, target.node());
17966
17964
  // add selected-circle on low layer g
17967
- main.select("." + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id))
17968
- .selectAll("." + CLASS.selectedCircle + "-" + i)
17965
+ main.select(".".concat(CLASS.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
17966
+ .selectAll(".".concat(CLASS.selectedCircle, "-").concat(i))
17969
17967
  .data([d])
17970
17968
  .enter()
17971
17969
  .append("circle")
@@ -17977,7 +17975,7 @@ var selection = _assign(_assign({}, drag), {
17977
17975
  .transition()
17978
17976
  .duration(100)
17979
17977
  .attr("r", r);
17980
- },
17978
+ },
17981
17979
  /**
17982
17980
  * Unelect a point
17983
17981
  * @param {object} target Target point
@@ -17990,13 +17988,13 @@ var selection = _assign(_assign({}, drag), {
17990
17988
  var config = $$.config, $el = $$.$el;
17991
17989
  callFn(config.data_onunselected, $$.api, d, target.node());
17992
17990
  // remove selected-circle from low layer g
17993
- $el.main.select("." + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id))
17994
- .selectAll("." + CLASS.selectedCircle + "-" + i)
17991
+ $el.main.select(".".concat(CLASS.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
17992
+ .selectAll(".".concat(CLASS.selectedCircle, "-").concat(i))
17995
17993
  .transition()
17996
17994
  .duration(100)
17997
17995
  .attr("r", 0)
17998
17996
  .remove();
17999
- },
17997
+ },
18000
17998
  /**
18001
17999
  * Toggles the selection of points
18002
18000
  * @param {boolean} selected whether or not to select.
@@ -18006,9 +18004,9 @@ var selection = _assign(_assign({}, drag), {
18006
18004
  * @private
18007
18005
  */
18008
18006
  togglePoint: function (selected, target, d, i) {
18009
- var method = (selected ? "" : "un") + "selectPoint";
18007
+ var method = "".concat(selected ? "" : "un", "selectPoint");
18010
18008
  this[method](target, d, i);
18011
- },
18009
+ },
18012
18010
  /**
18013
18011
  * Select a path
18014
18012
  * @param {object} target Target path
@@ -18023,7 +18021,7 @@ var selection = _assign(_assign({}, drag), {
18023
18021
  target.transition().duration(100)
18024
18022
  .style("fill", function () { return rgb($$.color(d)).brighter(0.75); });
18025
18023
  }
18026
- },
18024
+ },
18027
18025
  /**
18028
18026
  * Unelect a path
18029
18027
  * @private
@@ -18038,7 +18036,7 @@ var selection = _assign(_assign({}, drag), {
18038
18036
  target.transition().duration(100)
18039
18037
  .style("fill", function () { return $$.color(d); });
18040
18038
  }
18041
- },
18039
+ },
18042
18040
  /**
18043
18041
  * Toggles the selection of lines
18044
18042
  * @param {boolean} selected whether or not to select.
@@ -18048,8 +18046,8 @@ var selection = _assign(_assign({}, drag), {
18048
18046
  * @private
18049
18047
  */
18050
18048
  togglePath: function (selected, target, d, i) {
18051
- this[(selected ? "" : "un") + "selectPath"](target, d, i);
18052
- },
18049
+ this["".concat(selected ? "" : "un", "selectPath")](target, d, i);
18050
+ },
18053
18051
  /**
18054
18052
  * Returns the toggle method of the target
18055
18053
  * @param {object} that shape
@@ -18063,7 +18061,7 @@ var selection = _assign(_assign({}, drag), {
18063
18061
  $$.togglePath : ($$.isStepType(d) ?
18064
18062
  function () { } : // circle is hidden in step chart, so treat as within the click area
18065
18063
  $$.togglePoint);
18066
- },
18064
+ },
18067
18065
  /**
18068
18066
  * Toggles the selection of shapes
18069
18067
  * @param {object} that shape
@@ -18080,12 +18078,12 @@ var selection = _assign(_assign({}, drag), {
18080
18078
  var toggledShape;
18081
18079
  if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
18082
18080
  if (!config.data_selection_multiple) {
18083
- var selector = "." + CLASS.shapes;
18081
+ var selector = ".".concat(CLASS.shapes);
18084
18082
  if (config.data_selection_grouped) {
18085
18083
  selector += $$.getTargetSelectorSuffix(d.id);
18086
18084
  }
18087
18085
  main.selectAll(selector)
18088
- .selectAll("." + CLASS.shape)
18086
+ .selectAll(".".concat(CLASS.shape))
18089
18087
  .each(function (d, i) {
18090
18088
  var shape = select(this);
18091
18089
  if (shape.classed(CLASS.SELECTED)) {
@@ -18121,7 +18119,7 @@ var subchart = {
18121
18119
  $$.redrawForBrush();
18122
18120
  };
18123
18121
  var getBrushSize = function () {
18124
- var brush = $$.$el.svg.select("." + CLASS.brush + " .overlay");
18122
+ var brush = $$.$el.svg.select(".".concat(CLASS.brush, " .overlay"));
18125
18123
  var brushSize = { width: 0, height: 0 };
18126
18124
  if (brush.size()) {
18127
18125
  brushSize.width = +brush.attr("width");
@@ -18152,7 +18150,7 @@ var subchart = {
18152
18150
  $$.brush.update = function () {
18153
18151
  var extent = this.extent()();
18154
18152
  if (extent[1].filter(function (v) { return isNaN(v); }).length === 0) {
18155
- subchart.main && subchart.main.select("." + CLASS.brush).call(this);
18153
+ subchart.main && subchart.main.select(".".concat(CLASS.brush)).call(this);
18156
18154
  }
18157
18155
  return this;
18158
18156
  };
@@ -18175,7 +18173,7 @@ var subchart = {
18175
18173
  };
18176
18174
  $$.brush.getSelection = function () { return (
18177
18175
  // @ts-ignore
18178
- subchart.main ? subchart.main.select("." + CLASS.brush) : select([])); };
18176
+ subchart.main ? subchart.main.select(".".concat(CLASS.brush)) : select([])); };
18179
18177
  },
18180
18178
  /**
18181
18179
  * Initialize the subchart.
@@ -18188,7 +18186,7 @@ var subchart = {
18188
18186
  return;
18189
18187
  }
18190
18188
  var visibility = config.subchart_show ? "visible" : "hidden";
18191
- var clipId = clip.id + "-subchart";
18189
+ var clipId = "".concat(clip.id, "-subchart");
18192
18190
  var clipPath = $$.getClipPath(clipId);
18193
18191
  clip.idSubchart = clipId;
18194
18192
  $$.appendClip(defs, clipId);
@@ -18203,11 +18201,11 @@ var subchart = {
18203
18201
  .attr("clip-path", clipPath)
18204
18202
  .attr("class", CLASS.chart);
18205
18203
  // Define g for bar chart area
18206
- $$.hasType("bar") && main.select("." + CLASS.chart)
18204
+ $$.hasType("bar") && main.select(".".concat(CLASS.chart))
18207
18205
  .append("g")
18208
18206
  .attr("class", CLASS.chartBars);
18209
18207
  // Define g for line chart area
18210
- main.select("." + CLASS.chart)
18208
+ main.select(".".concat(CLASS.chart))
18211
18209
  .append("g")
18212
18210
  .attr("class", CLASS.chartLines);
18213
18211
  // Add extent rect for Brush
@@ -18238,8 +18236,8 @@ var subchart = {
18238
18236
  var classAreas = $$.getClass("areas", true);
18239
18237
  if (config.subchart_show) {
18240
18238
  // -- Bar --//
18241
- var barUpdate = main.select("." + CLASS.chartBars)
18242
- .selectAll("." + CLASS.chartBar)
18239
+ var barUpdate = main.select(".".concat(CLASS.chartBars))
18240
+ .selectAll(".".concat(CLASS.chartBar))
18243
18241
  .data(targets)
18244
18242
  .attr("class", classChartBar);
18245
18243
  var barEnter = barUpdate.enter()
@@ -18251,8 +18249,8 @@ var subchart = {
18251
18249
  barEnter.append("g")
18252
18250
  .attr("class", classBars);
18253
18251
  // -- Line --//
18254
- var lineUpdate = main.select("." + CLASS.chartLines)
18255
- .selectAll("." + CLASS.chartLine)
18252
+ var lineUpdate = main.select(".".concat(CLASS.chartLines))
18253
+ .selectAll(".".concat(CLASS.chartLine))
18256
18254
  .data(targets)
18257
18255
  .attr("class", classChartLine);
18258
18256
  var lineEnter = lineUpdate.enter().append("g")
@@ -18266,7 +18264,7 @@ var subchart = {
18266
18264
  $$.hasTypeOf("Area") && lineEnter.append("g")
18267
18265
  .attr("class", classAreas);
18268
18266
  // -- Brush --//
18269
- main.selectAll("." + CLASS.brush + " rect")
18267
+ main.selectAll(".".concat(CLASS.brush, " rect"))
18270
18268
  .attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? state.width2 : state.height2);
18271
18269
  }
18272
18270
  },
@@ -18278,7 +18276,7 @@ var subchart = {
18278
18276
  updateBarForSubchart: function (durationForExit) {
18279
18277
  var $$ = this;
18280
18278
  var subchart = $$.$el.subchart;
18281
- subchart.bar = subchart.main.selectAll("." + CLASS.bars).selectAll("." + CLASS.bar)
18279
+ subchart.bar = subchart.main.selectAll(".".concat(CLASS.bars)).selectAll(".".concat(CLASS.bar))
18282
18280
  .data($$.barData.bind($$));
18283
18281
  subchart.bar
18284
18282
  .exit()
@@ -18316,8 +18314,8 @@ var subchart = {
18316
18314
  updateLineForSubchart: function (durationForExit) {
18317
18315
  var $$ = this;
18318
18316
  var subchart = $$.$el.subchart;
18319
- subchart.line = subchart.main.selectAll("." + CLASS.lines)
18320
- .selectAll("." + CLASS.line)
18317
+ subchart.line = subchart.main.selectAll(".".concat(CLASS.lines))
18318
+ .selectAll(".".concat(CLASS.line))
18321
18319
  .data($$.lineData.bind($$));
18322
18320
  subchart.line
18323
18321
  .exit()
@@ -18354,8 +18352,8 @@ var subchart = {
18354
18352
  updateAreaForSubchart: function (durationForExit) {
18355
18353
  var $$ = this;
18356
18354
  var subchart = $$.$el.subchart;
18357
- subchart.area = subchart.main.selectAll("." + CLASS.areas)
18358
- .selectAll("." + CLASS.area)
18355
+ subchart.area = subchart.main.selectAll(".".concat(CLASS.areas))
18356
+ .selectAll(".".concat(CLASS.area))
18359
18357
  .data($$.lineData.bind($$));
18360
18358
  subchart.area
18361
18359
  .exit()
@@ -18412,9 +18410,9 @@ var subchart = {
18412
18410
  !brushEmpty($$) && $$.brush.update();
18413
18411
  Object.keys(shape.type).forEach(function (v) {
18414
18412
  var name = capitalize(v);
18415
- var draw = $$["generateDraw" + name](shape.indices[v], true);
18416
- $$["update" + name + "ForSubchart"](duration);
18417
- $$["redraw" + name + "ForSubchart"](draw, duration, duration);
18413
+ var draw = $$["generateDraw".concat(name)](shape.indices[v], true);
18414
+ $$["update".concat(name, "ForSubchart")](duration);
18415
+ $$["redraw".concat(name, "ForSubchart")](draw, duration, duration);
18418
18416
  });
18419
18417
  }
18420
18418
  }
@@ -18449,7 +18447,7 @@ var subchart = {
18449
18447
  subXAxis = transitions.axisSubX;
18450
18448
  }
18451
18449
  else {
18452
- subXAxis = main.select("." + CLASS.axisX);
18450
+ subXAxis = main.select(".".concat(CLASS.axisX));
18453
18451
  if (withTransition) {
18454
18452
  subXAxis = subXAxis.transition();
18455
18453
  }
@@ -18504,7 +18502,7 @@ var zoom = {
18504
18502
  var $$ = this;
18505
18503
  var config = $$.config, main = $$.$el.main;
18506
18504
  var zoomEnabled = config.zoom_enabled;
18507
- var eventRects = main.select("." + CLASS.eventRects);
18505
+ var eventRects = main.select(".".concat(CLASS.eventRects));
18508
18506
  if (zoomEnabled && bind) {
18509
18507
  // Do not bind zoom event when subchart is shown
18510
18508
  !config.subchart_show &&
@@ -19094,7 +19092,7 @@ var zoomModule = function () {
19094
19092
  var defaults = {};
19095
19093
  /**
19096
19094
  * @namespace bb
19097
- * @version 2.2.5
19095
+ * @version 2.2.7
19098
19096
  */
19099
19097
  var bb = {
19100
19098
  /**
@@ -19104,7 +19102,7 @@ var bb = {
19104
19102
  * bb.version; // "1.0.0"
19105
19103
  * @memberof bb
19106
19104
  */
19107
- version: "2.2.5",
19105
+ version: "2.2.7",
19108
19106
  /**
19109
19107
  * Generate chart
19110
19108
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
@@ -19232,5 +19230,4 @@ var bb = {
19232
19230
  plugin: {}
19233
19231
  };
19234
19232
 
19235
- export default bb;
19236
- export { area, areaLineRange, areaSpline, areaSplineRange, areaStep, bar, bb, bubble, donut, gauge, line, pie, radar, scatter, selectionModule as selection, spline, step, subchartModule as subchart, zoomModule as zoom };
19233
+ export { area, areaLineRange, areaSpline, areaSplineRange, areaStep, bar, bb, bubble, bb as default, donut, gauge, line, pie, radar, scatter, selectionModule as selection, spline, step, subchartModule as subchart, zoomModule as zoom };