billboard.js 3.2.0-next.5 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/billboard.css +8 -8
  2. package/dist/billboard.js +109 -68
  3. package/dist/billboard.min.css +2 -2
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +3794 -2736
  6. package/dist/billboard.pkgd.min.js +3 -3
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +9 -5
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +9 -5
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +9 -5
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +9 -5
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +3433 -2617
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +3451 -2631
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +3485 -2655
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +3453 -2633
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +3450 -2630
  22. package/dist/theme/datalab.css +6 -4
  23. package/dist/theme/datalab.min.css +2 -2
  24. package/dist/theme/graph.css +6 -4
  25. package/dist/theme/graph.min.css +2 -2
  26. package/dist/theme/insight.css +6 -4
  27. package/dist/theme/insight.min.css +2 -2
  28. package/dist-esm/billboard.js +446 -420
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +6 -6
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +15 -15
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +6 -6
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -4
  34. package/package.json +52 -53
  35. package/src/Chart/api/load.ts +7 -0
  36. package/src/Chart/api/zoom.ts +9 -6
  37. package/src/ChartInternal/Axis/Axis.ts +2 -2
  38. package/src/ChartInternal/ChartInternal.ts +1 -1
  39. package/src/ChartInternal/data/data.ts +1 -1
  40. package/src/ChartInternal/interactions/eventrect.ts +21 -3
  41. package/src/ChartInternal/interactions/zoom.ts +1 -1
  42. package/src/ChartInternal/internals/domain.ts +27 -29
  43. package/src/ChartInternal/internals/legend.ts +2 -1
  44. package/src/ChartInternal/internals/redraw.ts +2 -2
  45. package/src/ChartInternal/internals/text.ts +2 -2
  46. package/src/ChartInternal/shape/arc.ts +2 -6
  47. package/src/ChartInternal/shape/bar.ts +10 -2
  48. package/src/config/Options/data/data.ts +3 -3
  49. package/src/config/Options/shape/line.ts +6 -1
  50. package/src/module/util.ts +3 -5
  51. package/src/scss/billboard.scss +3 -13
  52. package/src/scss/theme/datalab.scss +3 -7
  53. package/src/scss/theme/graph.scss +3 -2
  54. package/src/scss/theme/insight.scss +3 -2
  55. package/types/chart.d.ts +2 -2
  56. package/types/options.d.ts +3 -3
  57. package/types/types.d.ts +5 -2
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.2.0-next.5
8
+ * @version 3.2.2
9
9
  */
10
10
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
11
11
  import { pointer, select, namespaces, selectAll } from 'd3-selection';
@@ -414,7 +414,7 @@ function setTextValue(node, text, dy, toMiddle) {
414
414
  multiline.forEach(function (v, i) {
415
415
  node.append("tspan")
416
416
  .attr("x", 0)
417
- .attr("dy", (i === 0 ? dy[0] * len_1 : dy[1]) + "em")
417
+ .attr("dy", "".concat(i === 0 ? dy[0] * len_1 : dy[1], "em"))
418
418
  .text(v);
419
419
  });
420
420
  }
@@ -468,11 +468,10 @@ function getPathBox(path) {
468
468
  * @private
469
469
  */
470
470
  function getPointer(event, element) {
471
- var touches = event && (event.touches || (event.sourceEvent && event.sourceEvent.touches));
472
- var pointer$1 = event ?
473
- pointer(touches ? touches[0] : event, element) :
474
- [0, 0];
475
- return pointer$1;
471
+ var _a;
472
+ var touches = event && ((_a = (event.touches || (event.sourceEvent && event.sourceEvent.touches))) === null || _a === void 0 ? void 0 : _a[0]);
473
+ var pointer$1 = pointer(touches || event, element);
474
+ return pointer$1.map(function (v) { return (isNaN(v) ? 0 : v); });
476
475
  }
477
476
  /**
478
477
  * Return brush selection array
@@ -489,7 +488,7 @@ function getBrushSelection(ctx) {
489
488
  selection = event.selection;
490
489
  // check from brush area selection
491
490
  }
492
- else if (main && (selection = main.select("." + CLASS.brush).node())) {
491
+ else if (main && (selection = main.select(".".concat(CLASS.brush)).node())) {
493
492
  selection = brushSelection(selection);
494
493
  }
495
494
  return selection;
@@ -647,7 +646,7 @@ function getCssRules(styleSheets) {
647
646
  }
648
647
  }
649
648
  catch (e) {
650
- console.error("Error while reading rules from " + sheet.href + ": " + e.toString());
649
+ console.error("Error while reading rules from ".concat(sheet.href, ": ").concat(e.toString()));
651
650
  }
652
651
  });
653
652
  return rules;
@@ -834,7 +833,7 @@ var emulateEvent = {
834
833
  function tplProcess(tpl, data) {
835
834
  var res = tpl;
836
835
  for (var x in data) {
837
- res = res.replace(new RegExp("{=" + x + "}", "g"), data[x]);
836
+ res = res.replace(new RegExp("{=".concat(x, "}"), "g"), data[x]);
838
837
  }
839
838
  return res;
840
839
  }
@@ -859,7 +858,7 @@ function parseDate(date) {
859
858
  }
860
859
  if (!parsedDate || isNaN(+parsedDate)) {
861
860
  console && console.error &&
862
- console.error("Failed to parse x '" + date + "' to Date object");
861
+ console.error("Failed to parse x '".concat(date, "' to Date object"));
863
862
  }
864
863
  return parsedDate;
865
864
  }
@@ -914,7 +913,7 @@ function checkModuleImport(ctx) {
914
913
  }
915
914
  }
916
915
  }
917
- type && logError("Please, make sure if %c" + camelize(type), "module has been imported and specified correctly.");
916
+ type && logError("Please, make sure if %c".concat(camelize(type)), "module has been imported and specified correctly.");
918
917
  }
919
918
  /**
920
919
  * Log error and throw error
@@ -928,10 +927,10 @@ function logError(head, tail) {
928
927
  var info = "https://github.com/naver/billboard.js/wiki/CHANGELOG-v2#modularization-by-its-functionality";
929
928
  var hasConsole = (_a = win.console) === null || _a === void 0 ? void 0 : _a.error;
930
929
  if (hasConsole) {
931
- console.error("\u274C " + prefix + " " + head, "background:red;color:white;display:block;font-size:15px", tail);
930
+ console.error("\u274C ".concat(prefix, " ").concat(head), "background:red;color:white;display:block;font-size:15px", tail);
932
931
  console.info("%cℹ️", "font-size:15px", info);
933
932
  }
934
- throw Error(prefix + " " + head.replace(/\%c([a-z-]+)/i, "'$1' ") + " " + tail);
933
+ throw Error("".concat(prefix, " ").concat(head.replace(/\%c([a-z-]+)/i, "'$1' "), " ").concat(tail));
935
934
  }
936
935
 
937
936
  /**
@@ -1776,8 +1775,8 @@ var data$2 = {
1776
1775
  * The arguments are:<br>
1777
1776
  * - `v` is the value of the data point where the label is shown.
1778
1777
  * - `id` is the id of the data where the label is shown.
1779
- * - `i` is the index of the data point where the label is shown.
1780
- * - `j` is the sub index of the data point where the label is shown.<br><br>
1778
+ * - `i` is the index of the data series point where the label is shown.
1779
+ * - `texts` is the array of whole corresponding data series' text labels.<br><br>
1781
1780
  * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))
1782
1781
  * @property {string|object} [data.labels.backgroundColors] Set label text background colors.
1783
1782
  * @property {string|object|Function} [data.labels.colors] Set label text colors.
@@ -1807,7 +1806,7 @@ var data$2 = {
1807
1806
  *
1808
1807
  * // it's possible to set for each data
1809
1808
  * format: {
1810
- * data1: function(v, id, i, j) { ... },
1809
+ * data1: function(v, id, i, texts) { ... },
1811
1810
  * ...
1812
1811
  * },
1813
1812
  *
@@ -2987,7 +2986,7 @@ var dataConvert = {
2987
2986
  data = {};
2988
2987
  ["url", "mimeType", "headers", "keys", "json", "keys", "rows", "columns"]
2989
2988
  .forEach(function (v) {
2990
- var key = "data_" + v;
2989
+ var key = "data_".concat(v);
2991
2990
  if (key in args) {
2992
2991
  data[v] = args[key];
2993
2992
  }
@@ -3036,10 +3035,10 @@ var dataConvert = {
3036
3035
  if (req.readyState === 4) {
3037
3036
  if (req.status === 200) {
3038
3037
  var response = req.responseText;
3039
- response && done.call(_this, _this["convert" + capitalize(mimeType) + "ToData"](mimeType === "json" ? JSON.parse(response) : response, keys));
3038
+ response && done.call(_this, _this["convert".concat(capitalize(mimeType), "ToData")](mimeType === "json" ? JSON.parse(response) : response, keys));
3040
3039
  }
3041
3040
  else {
3042
- throw new Error(url + ": Something went wrong loading!");
3041
+ throw new Error("".concat(url, ": Something went wrong loading!"));
3043
3042
  }
3044
3043
  }
3045
3044
  };
@@ -3136,7 +3135,7 @@ var dataConvert = {
3136
3135
  var newRow_1 = {};
3137
3136
  row.forEach(function (v, j) {
3138
3137
  if (isUndefined(v)) {
3139
- throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
3138
+ throw new Error("Source data is missing a component at (".concat(i, ", ").concat(j, ")!"));
3140
3139
  }
3141
3140
  newRow_1[keys[j]] = v;
3142
3141
  });
@@ -3155,7 +3154,7 @@ var dataConvert = {
3155
3154
  newRows[j - 1] = {};
3156
3155
  }
3157
3156
  if (isUndefined(v)) {
3158
- throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
3157
+ throw new Error("Source data is missing a component at (".concat(i, ", ").concat(j, ")!"));
3159
3158
  }
3160
3159
  newRows[j - 1][key] = v;
3161
3160
  }
@@ -3208,7 +3207,7 @@ var dataConvert = {
3208
3207
  // check x is defined
3209
3208
  ids.forEach(function (id) {
3210
3209
  if (!_this.data.xs[id]) {
3211
- throw new Error("x is not defined for id = \"" + id + "\".");
3210
+ throw new Error("x is not defined for id = \"".concat(id, "\"."));
3212
3211
  }
3213
3212
  });
3214
3213
  // convert to target
@@ -3864,7 +3863,7 @@ var data$1 = {
3864
3863
  data
3865
3864
  .filter(function (v) { return $$.isBarType(v.id); })
3866
3865
  .forEach(function (v) {
3867
- var shape = main.select("." + CLASS.bars + $$.getTargetSelectorSuffix(v.id) + " ." + CLASS.bar + "-" + v.index).node();
3866
+ var shape = main.select(".".concat(CLASS.bars).concat($$.getTargetSelectorSuffix(v.id), " .").concat(CLASS.bar, "-").concat(v.index)).node();
3868
3867
  if (!closest && $$.isWithinBar(shape)) {
3869
3868
  closest = v;
3870
3869
  }
@@ -3942,7 +3941,7 @@ var data$1 = {
3942
3941
  updateDataAttributes: function (name, attrs) {
3943
3942
  var $$ = this;
3944
3943
  var config = $$.config;
3945
- var current = config["data_" + name];
3944
+ var current = config["data_".concat(name)];
3946
3945
  if (isUndefined(attrs)) {
3947
3946
  return current;
3948
3947
  }
@@ -4156,7 +4155,7 @@ var dataLoad = {
4156
4155
  state.withoutFadeIn[id] = false;
4157
4156
  // Remove target's elements
4158
4157
  if ($el.legend) {
4159
- $el.legend.selectAll("." + CLASS.legendItem + $$.getTargetSelectorSuffix(id)).remove();
4158
+ $el.legend.selectAll(".".concat(CLASS.legendItem).concat($$.getTargetSelectorSuffix(id))).remove();
4160
4159
  }
4161
4160
  // Remove target
4162
4161
  $$.data.targets = $$.data.targets.filter(function (t) { return t.id !== id; });
@@ -4187,7 +4186,7 @@ var interaction = {
4187
4186
  return;
4188
4187
  }
4189
4188
  }
4190
- main.selectAll("." + CLASS.shape + "-" + index)
4189
+ main.selectAll(".".concat(CLASS.shape, "-").concat(index))
4191
4190
  .each(function () {
4192
4191
  var _a;
4193
4192
  select(this).classed(CLASS.EXPANDED, true);
@@ -4266,11 +4265,11 @@ var interaction = {
4266
4265
  var callback_1 = config[isOver ? "data_onover" : "data_onout"].bind($$.api);
4267
4266
  config.color_onover && $$.setOverColor(isOver, d, isArc);
4268
4267
  if (isArc) {
4269
- callback_1(d, main.select("." + CLASS.arc + $$.getTargetSelectorSuffix(d.id)).node());
4268
+ callback_1(d, main.select(".".concat(CLASS.arc).concat($$.getTargetSelectorSuffix(d.id))).node());
4270
4269
  }
4271
4270
  else if (!config.tooltip_grouped) {
4272
4271
  var last_1 = $$.cache.get(KEY.setOverOut) || [];
4273
- var shape = main.selectAll("." + CLASS.shape + "-" + d)
4272
+ var shape = main.selectAll(".".concat(CLASS.shape, "-").concat(d))
4274
4273
  .filter(function (d) {
4275
4274
  return $$.isWithinShape(this, d);
4276
4275
  });
@@ -4295,7 +4294,7 @@ var interaction = {
4295
4294
  $$.showCircleFocus($$.getAllValuesOnIndex(d, true)) :
4296
4295
  $$.setExpand(d, null, true);
4297
4296
  }
4298
- !$$.isMultipleX() && main.selectAll("." + CLASS.shape + "-" + d)
4297
+ !$$.isMultipleX() && main.selectAll(".".concat(CLASS.shape, "-").concat(d))
4299
4298
  .each(function (d) {
4300
4299
  callback_1(d, this);
4301
4300
  });
@@ -4350,7 +4349,7 @@ var interaction = {
4350
4349
  var $$ = this;
4351
4350
  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;
4352
4351
  var isMultipleX = $$.isMultipleX();
4353
- var element = (hasRadar ? radar.axes.select("." + CLASS.axis + "-" + index + " text") : (eventRect || arcs.selectAll("." + CLASS.target + " path").filter(function (d, i) { return i === index; }))).node();
4352
+ 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();
4354
4353
  var _c = element.getBoundingClientRect(), width = _c.width, left = _c.left, top = _c.top;
4355
4354
  if (hasAxis && !hasRadar && !isMultipleX) {
4356
4355
  var coords = eventReceiver.coords[index];
@@ -4391,7 +4390,7 @@ var interaction = {
4391
4390
  */
4392
4391
  var classModule = {
4393
4392
  generateClass: function (prefix, targetId) {
4394
- return " " + prefix + " " + (prefix + this.getTargetSelectorSuffix(targetId));
4393
+ return " ".concat(prefix, " ").concat(prefix + this.getTargetSelectorSuffix(targetId));
4395
4394
  },
4396
4395
  /**
4397
4396
  * Get class string
@@ -4419,7 +4418,7 @@ var classModule = {
4419
4418
  */
4420
4419
  getChartClass: function (type) {
4421
4420
  var _this = this;
4422
- return function (d) { return CLASS["chart" + type] + _this.classTarget((d.data ? d.data : d).id); };
4421
+ return function (d) { return CLASS["chart".concat(type)] + _this.classTarget((d.data ? d.data : d).id); };
4423
4422
  },
4424
4423
  generateExtraLineClass: function () {
4425
4424
  var $$ = this;
@@ -4435,13 +4434,13 @@ var classModule = {
4435
4434
  };
4436
4435
  },
4437
4436
  classRegion: function (d, i) {
4438
- return this.generateClass(CLASS.region, i) + " " + ("class" in d ? d["class"] : "");
4437
+ return "".concat(this.generateClass(CLASS.region, i), " ").concat("class" in d ? d["class"] : "");
4439
4438
  },
4440
4439
  classTarget: function (id) {
4441
4440
  var additionalClassSuffix = this.config.data_classes[id];
4442
4441
  var additionalClass = "";
4443
4442
  if (additionalClassSuffix) {
4444
- additionalClass = " " + CLASS.target + "-" + additionalClassSuffix;
4443
+ additionalClass = " ".concat(CLASS.target, "-").concat(additionalClassSuffix);
4445
4444
  }
4446
4445
  return this.generateClass(CLASS.target, id) + additionalClass;
4447
4446
  },
@@ -4449,20 +4448,20 @@ var classModule = {
4449
4448
  return this.classFocused(d) + this.classDefocused(d);
4450
4449
  },
4451
4450
  classFocused: function (d) {
4452
- return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : "");
4451
+ return " ".concat(this.state.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : "");
4453
4452
  },
4454
4453
  classDefocused: function (d) {
4455
- return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : "");
4454
+ return " ".concat(this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : "");
4456
4455
  },
4457
4456
  getTargetSelectorSuffix: function (targetId) {
4458
- var targetStr = targetId || targetId === 0 ? "-" + targetId : "";
4457
+ var targetStr = targetId || targetId === 0 ? "-".concat(targetId) : "";
4459
4458
  return targetStr.replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g, "-");
4460
4459
  },
4461
4460
  selectorTarget: function (id, prefix) {
4462
4461
  var pfx = prefix || "";
4463
4462
  var target = this.getTargetSelectorSuffix(id);
4464
4463
  // select target & circle
4465
- return pfx + "." + (CLASS.target + target) + ", " + pfx + "." + (CLASS.circles + target);
4464
+ return "".concat(pfx, ".").concat(CLASS.target + target, ", ").concat(pfx, ".").concat(CLASS.circles + target);
4466
4465
  },
4467
4466
  selectorTargets: function (idsValue, prefix) {
4468
4467
  var _this = this;
@@ -4471,7 +4470,7 @@ var classModule = {
4471
4470
  ids.map(function (id) { return _this.selectorTarget(id, prefix); }) : null;
4472
4471
  },
4473
4472
  selectorLegend: function (id) {
4474
- return "." + (CLASS.legendItem + this.getTargetSelectorSuffix(id));
4473
+ return ".".concat(CLASS.legendItem + this.getTargetSelectorSuffix(id));
4475
4474
  },
4476
4475
  selectorLegends: function (ids) {
4477
4476
  var _this = this;
@@ -4570,10 +4569,10 @@ var color = {
4570
4569
  // Add background color to patterns
4571
4570
  var colorizedPatterns = pattern.map(function (p, index) {
4572
4571
  var color = p.replace(/[#\(\)\s,]/g, "");
4573
- var id = $$.state.datetimeId + "-pattern-" + color + "-" + index;
4572
+ var id = "".concat($$.state.datetimeId, "-pattern-").concat(color, "-").concat(index);
4574
4573
  return colorizePattern(tiles_1[index % tiles_1.length], p, id);
4575
4574
  });
4576
- pattern = colorizedPatterns.map(function (p) { return "url(#" + p.id + ")"; });
4575
+ pattern = colorizedPatterns.map(function (p) { return "url(#".concat(p.id, ")"); });
4577
4576
  $$.patterns = colorizedPatterns;
4578
4577
  }
4579
4578
  return function (d) {
@@ -4640,14 +4639,14 @@ var color = {
4640
4639
  ids = Object.keys(backgroundColors);
4641
4640
  }
4642
4641
  ids.forEach(function (v) {
4643
- var id = state.datetimeId + "-labels-bg" + $$.getTargetSelectorSuffix(v);
4642
+ var id = "".concat(state.datetimeId, "-labels-bg").concat($$.getTargetSelectorSuffix(v));
4644
4643
  $el.defs.append("filter")
4645
4644
  .attr("x", "0")
4646
4645
  .attr("y", "0")
4647
4646
  .attr("width", "1")
4648
4647
  .attr("height", "1")
4649
4648
  .attr("id", id)
4650
- .html("<feFlood flood-color=\"" + (v === "" ? backgroundColors : backgroundColors[v]) + "\" /><feComposite in=\"SourceGraphic\"/>");
4649
+ .html("<feFlood flood-color=\"".concat(v === "" ? backgroundColors : backgroundColors[v], "\" /><feComposite in=\"SourceGraphic\"/>"));
4651
4650
  });
4652
4651
  }
4653
4652
  },
@@ -4677,8 +4676,8 @@ var color = {
4677
4676
  }
4678
4677
  main.selectAll(isObject(d) ?
4679
4678
  // when is Arc type
4680
- "." + CLASS.arc + $$.getTargetSelectorSuffix(d.id) :
4681
- "." + CLASS.shape + "-" + d).style("fill", color);
4679
+ ".".concat(CLASS.arc).concat($$.getTargetSelectorSuffix(d.id)) :
4680
+ ".".concat(CLASS.shape, "-").concat(d)).style("fill", color);
4682
4681
  }
4683
4682
  };
4684
4683
 
@@ -4691,42 +4690,35 @@ var domain = {
4691
4690
  var ids = $$.mapToIds(targets);
4692
4691
  var ys = $$.getValuesAsIdKeyed(targets);
4693
4692
  if (dataGroups.length > 0) {
4694
- var hasValue_1 = $$["has" + (isMin ? "Negative" : "Positive") + "ValueInTargets"](targets);
4695
- var _loop_1 = function (j, idsInGroup) {
4693
+ var hasValue_1 = $$["has".concat(isMin ? "Negative" : "Positive", "ValueInTargets")](targets);
4694
+ dataGroups.forEach(function (groupIds) {
4696
4695
  // Determine baseId
4697
- idsInGroup = idsInGroup.filter(function (v) { return ids.indexOf(v) >= 0; });
4698
- if (idsInGroup.length === 0) {
4699
- return out_idsInGroup_1 = idsInGroup, "continue";
4700
- }
4701
- var baseId = idsInGroup[0];
4702
- var baseAxisId = axis.getId(baseId);
4703
- // Initialize base value. Set to 0 if not match with the condition
4704
- if (hasValue_1 && ys[baseId]) {
4705
- ys[baseId] = ys[baseId].map(function (v) { return ((isMin ? v < 0 : v > 0) ? v : 0); });
4706
- }
4707
- var _loop_2 = function (k, id) {
4708
- if (!ys[id]) {
4709
- return "continue";
4696
+ var idsInGroup = groupIds
4697
+ .filter(function (v) { return ids.indexOf(v) >= 0; });
4698
+ if (idsInGroup.length) {
4699
+ var baseId_1 = idsInGroup[0];
4700
+ var baseAxisId_1 = axis.getId(baseId_1);
4701
+ // Initialize base value. Set to 0 if not match with the condition
4702
+ if (hasValue_1 && ys[baseId_1]) {
4703
+ ys[baseId_1] = ys[baseId_1]
4704
+ .map(function (v) { return ((isMin ? v < 0 : v > 0) ? v : 0); });
4710
4705
  }
4711
- var axisId = axis.getId(id);
4712
- ys[id].forEach(function (v, i) {
4713
- var val = +v;
4714
- var meetCondition = isMin ? val > 0 : val < 0;
4715
- if (axisId === baseAxisId && !(hasValue_1 && meetCondition)) {
4716
- ys[baseId][i] += val;
4706
+ idsInGroup
4707
+ .filter(function (v, i) { return i > 0; })
4708
+ .forEach(function (id) {
4709
+ if (ys[id]) {
4710
+ var axisId_1 = axis.getId(id);
4711
+ ys[id].forEach(function (v, i) {
4712
+ var val = +v;
4713
+ var meetCondition = isMin ? val > 0 : val < 0;
4714
+ if (axisId_1 === baseAxisId_1 && !(hasValue_1 && meetCondition)) {
4715
+ ys[baseId_1][i] += val;
4716
+ }
4717
+ });
4717
4718
  }
4718
4719
  });
4719
- };
4720
- for (var k = 1, id = void 0; (id = idsInGroup[k]); k++) {
4721
- _loop_2(k, id);
4722
4720
  }
4723
- out_idsInGroup_1 = idsInGroup;
4724
- };
4725
- var out_idsInGroup_1;
4726
- for (var j = 0, idsInGroup = void 0; (idsInGroup = dataGroups[j]); j++) {
4727
- _loop_1(j, idsInGroup);
4728
- idsInGroup = out_idsInGroup_1;
4729
- }
4721
+ });
4730
4722
  }
4731
4723
  return getMinMax$1(type, Object.keys(ys).map(function (key) { return getMinMax$1(type, ys[key]); }));
4732
4724
  },
@@ -4744,7 +4736,7 @@ var domain = {
4744
4736
  getYDomain: function (targets, axisId, xDomain) {
4745
4737
  var $$ = this;
4746
4738
  var axis = $$.axis, config = $$.config, scale = $$.scale;
4747
- var pfx = "axis_" + axisId;
4739
+ var pfx = "axis_".concat(axisId);
4748
4740
  if ($$.isStackNormalized()) {
4749
4741
  return [0, 100];
4750
4742
  }
@@ -4763,17 +4755,17 @@ var domain = {
4763
4755
  $$.getYDomain(targets, "y2", xDomain);
4764
4756
  }
4765
4757
  }
4766
- var yMin = config[pfx + "_min"];
4767
- var yMax = config[pfx + "_max"];
4768
- var center = config[pfx + "_center"];
4769
- var isInverted = config[pfx + "_inverted"];
4758
+ var yMin = config["".concat(pfx, "_min")];
4759
+ var yMax = config["".concat(pfx, "_max")];
4760
+ var center = config["".concat(pfx, "_center")];
4761
+ var isInverted = config["".concat(pfx, "_inverted")];
4770
4762
  var showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated;
4771
4763
  var showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;
4772
4764
  var yDomainMin = $$.getYDomainMinMax(yTargets, "min");
4773
4765
  var yDomainMax = $$.getYDomainMinMax(yTargets, "max");
4774
4766
  var isZeroBased = __spreadArray([TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER], TYPE_BY_CATEGORY.Line, true).some(function (v) {
4775
4767
  var type = v.indexOf("area") > -1 ? "area" : v;
4776
- return $$.hasType(v, yTargets) && config[type + "_zerobased"];
4768
+ return $$.hasType(v, yTargets) && config["".concat(type, "_zerobased")];
4777
4769
  });
4778
4770
  // MEMO: avoid inverting domain unexpectedly
4779
4771
  yDomainMin = isValue(yMin) ? yMin :
@@ -4824,7 +4816,7 @@ var domain = {
4824
4816
  }
4825
4817
  // if padding is set, the domain will be updated relative the current domain value
4826
4818
  // ex) $$.height=300, padding.top=150, domainLength=4 --> domain=6
4827
- var p = config[pfx + "_padding"];
4819
+ var p = config["".concat(pfx, "_padding")];
4828
4820
  if (notEmpty(p)) {
4829
4821
  ["bottom", "top"].forEach(function (v) {
4830
4822
  padding[v] = axis.getPadding(p, v, padding[v], domainLength);
@@ -4842,7 +4834,7 @@ var domain = {
4842
4834
  getXDomainMinMax: function (targets, type) {
4843
4835
  var _a;
4844
4836
  var $$ = this;
4845
- var configValue = $$.config["axis_x_" + type];
4837
+ var configValue = $$.config["axis_x_".concat(type)];
4846
4838
  var dataValue = getMinMax$1(type, targets.map(function (t) { return getMinMax$1(type, t.values.map(function (v) { return v.x; })); }));
4847
4839
  var value = isObject(configValue) ? configValue.value : configValue;
4848
4840
  value = isDefined(value) && ((_a = $$.axis) === null || _a === void 0 ? void 0 : _a.isTimeSeries()) ? parseDate.bind(this)(value) : value;
@@ -5022,7 +5014,7 @@ var domain = {
5022
5014
  */
5023
5015
  function getFormat($$, typeValue, v) {
5024
5016
  var config = $$.config;
5025
- var type = "axis_" + typeValue + "_tick_format";
5017
+ var type = "axis_".concat(typeValue, "_tick_format");
5026
5018
  var format = config[type] ?
5027
5019
  config[type] : $$.defaultValueFormat;
5028
5020
  return format(v);
@@ -5050,7 +5042,7 @@ var format = {
5050
5042
  return isValue(v) ? +v : "";
5051
5043
  },
5052
5044
  defaultArcValueFormat: function (v, ratio) {
5053
- return (ratio * 100).toFixed(1) + "%";
5045
+ return "".concat((ratio * 100).toFixed(1), "%");
5054
5046
  },
5055
5047
  dataLabelFormat: function (targetId) {
5056
5048
  var $$ = this;
@@ -5126,7 +5118,7 @@ var legend$1 = {
5126
5118
  $$.updateLegendElement(targetIds || $$.mapToIds($$.data.targets), optionz, transitions);
5127
5119
  }
5128
5120
  // toggle legend state
5129
- $el.legend.selectAll("." + CLASS.legendItem)
5121
+ $el.legend.selectAll(".".concat(CLASS.legendItem))
5130
5122
  .classed(CLASS.legendItemHidden, function (id) {
5131
5123
  var hide = !$$.isTargetToShow(id);
5132
5124
  if (hide) {
@@ -5243,7 +5235,7 @@ var legend$1 = {
5243
5235
  updateLegendItemColor: function (id, color) {
5244
5236
  var legend = this.$el.legend;
5245
5237
  if (legend) {
5246
- legend.select("." + CLASS.legendItem + "-" + id + " line")
5238
+ legend.select(".".concat(CLASS.legendItem, "-").concat(id, " line"))
5247
5239
  .style("stroke", color);
5248
5240
  }
5249
5241
  },
@@ -5288,7 +5280,7 @@ var legend$1 = {
5288
5280
  var $$ = this;
5289
5281
  var legend = $$.$el.legend, $T = $$.$T;
5290
5282
  var targetIdz = $$.mapToTargetIds(targetIds);
5291
- legend && $T(legend.selectAll("." + CLASS.legendItem)
5283
+ legend && $T(legend.selectAll(".".concat(CLASS.legendItem))
5292
5284
  .filter(function (id) { return targetIdz.indexOf(id) >= 0; })
5293
5285
  .classed(CLASS.legendItemFocused, focus))
5294
5286
  .style("opacity", function () {
@@ -5303,7 +5295,7 @@ var legend$1 = {
5303
5295
  revertLegend: function () {
5304
5296
  var $$ = this;
5305
5297
  var legend = $$.$el.legend, $T = $$.$T;
5306
- legend && $T(legend.selectAll("." + CLASS.legendItem)
5298
+ legend && $T(legend.selectAll(".".concat(CLASS.legendItem))
5307
5299
  .classed(CLASS.legendItemFocused, false))
5308
5300
  .style("opacity", null);
5309
5301
  },
@@ -5405,7 +5397,7 @@ var legend$1 = {
5405
5397
  if (!callFn(config.legend_item_onout, api, id)) {
5406
5398
  select(this).classed(CLASS.legendItemFocused, false);
5407
5399
  if (hasGauge) {
5408
- $$.undoMarkOverlapped($$, "." + CLASS.gaugeValue);
5400
+ $$.undoMarkOverlapped($$, ".".concat(CLASS.gaugeValue));
5409
5401
  }
5410
5402
  $$.api.revert();
5411
5403
  }
@@ -5414,7 +5406,7 @@ var legend$1 = {
5414
5406
  if (!callFn(config.legend_item_onover, api, id)) {
5415
5407
  select(this).classed(CLASS.legendItemFocused, true);
5416
5408
  if (hasGauge) {
5417
- $$.markOverlapped(id, $$, "." + CLASS.gaugeValue);
5409
+ $$.markOverlapped(id, $$, ".".concat(CLASS.gaugeValue));
5418
5410
  }
5419
5411
  if (!state.transiting && $$.isTargetToShow(id)) {
5420
5412
  api.focus(id);
@@ -5542,7 +5534,7 @@ var legend$1 = {
5542
5534
  var yForLegendTile = function (id, i) { return yForLegend(id, i) + 4; };
5543
5535
  var pos = -200;
5544
5536
  // Define g for legend area
5545
- var l = legend.selectAll("." + CLASS.legendItem)
5537
+ var l = legend.selectAll(".".concat(CLASS.legendItem))
5546
5538
  .data(targetIdz)
5547
5539
  .enter()
5548
5540
  .append("g");
@@ -5585,7 +5577,8 @@ var legend$1 = {
5585
5577
  .attr("href", function (data, idx, selection) {
5586
5578
  var node = selection[idx];
5587
5579
  var nodeName = node.nodeName.toLowerCase();
5588
- return nodeName === "use" ? "#" + state.datetimeId + "-point-" + data : undefined;
5580
+ var id = $$.getTargetSelectorSuffix(data);
5581
+ return nodeName === "use" ? "#".concat(state.datetimeId, "-point").concat(id) : undefined;
5589
5582
  });
5590
5583
  }
5591
5584
  else {
@@ -5600,9 +5593,9 @@ var legend$1 = {
5600
5593
  .attr("stroke-width", config.legend_item_tile_height);
5601
5594
  }
5602
5595
  // Set background for inset legend
5603
- background = legend.select("." + CLASS.legendBackground + " rect");
5596
+ background = legend.select(".".concat(CLASS.legendBackground, " rect"));
5604
5597
  if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
5605
- background = legend.insert("g", "." + CLASS.legendItem)
5598
+ background = legend.insert("g", ".".concat(CLASS.legendItem))
5606
5599
  .attr("class", CLASS.legendBackground)
5607
5600
  .append("rect");
5608
5601
  }
@@ -5615,7 +5608,7 @@ var legend$1 = {
5615
5608
  $T(texts, withTransition)
5616
5609
  .attr("x", xForLegendText)
5617
5610
  .attr("y", yForLegendText);
5618
- var rects = legend.selectAll("rect." + CLASS.legendItemEvent)
5611
+ var rects = legend.selectAll("rect.".concat(CLASS.legendItemEvent))
5619
5612
  .data(targetIdz);
5620
5613
  $T(rects, withTransition)
5621
5614
  .attr("width", function (id) { return widths[id]; })
@@ -5623,7 +5616,7 @@ var legend$1 = {
5623
5616
  .attr("x", xForLegendRect)
5624
5617
  .attr("y", yForLegendRect);
5625
5618
  if (usePoint) {
5626
- var tiles = legend.selectAll("." + CLASS.legendItemPoint)
5619
+ var tiles = legend.selectAll(".".concat(CLASS.legendItemPoint))
5627
5620
  .data(targetIdz);
5628
5621
  $T(tiles, withTransition)
5629
5622
  .each(function () {
@@ -5659,7 +5652,7 @@ var legend$1 = {
5659
5652
  });
5660
5653
  }
5661
5654
  else {
5662
- var tiles = legend.selectAll("line." + CLASS.legendItemTile)
5655
+ var tiles = legend.selectAll("line.".concat(CLASS.legendItemTile))
5663
5656
  .data(targetIdz);
5664
5657
  $T(tiles, withTransition)
5665
5658
  .style("stroke", getColor)
@@ -5693,8 +5686,7 @@ var redraw = {
5693
5686
  var main = $el.main;
5694
5687
  state.redrawing = true;
5695
5688
  var targetsToShow = $$.filterTargetsToShow($$.data.targets);
5696
- var initializing = options.initializing;
5697
- var flow = options.flow;
5689
+ var flow = options.flow, initializing = options.initializing;
5698
5690
  var wth = $$.getWithOption(options);
5699
5691
  var duration = wth.Transition ? config.transition_duration : 0;
5700
5692
  var durationForExit = wth.TransitionForExit ? duration : 0;
@@ -5720,7 +5712,7 @@ var redraw = {
5720
5712
  // @TODO: Make 'init' state to be accessible everywhere not passing as argument.
5721
5713
  $$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
5722
5714
  // Data empty label positioning and text.
5723
- config.data_empty_label_text && main.select("text." + CLASS.text + "." + CLASS.empty)
5715
+ config.data_empty_label_text && main.select("text.".concat(CLASS.text, ".").concat(CLASS.empty))
5724
5716
  .attr("x", state.width / 2)
5725
5717
  .attr("y", state.height / 2)
5726
5718
  .text(config.data_empty_label_text)
@@ -5732,11 +5724,11 @@ var redraw = {
5732
5724
  ["bar", "candlestick", "line", "area"].forEach(function (v) {
5733
5725
  var name = capitalize(v);
5734
5726
  if ((/^(line|area)$/.test(v) && $$.hasTypeOf(name)) || $$.hasType(v)) {
5735
- $$["update" + name](wth.TransitionForExit);
5727
+ $$["update".concat(name)](wth.TransitionForExit);
5736
5728
  }
5737
5729
  });
5738
5730
  // circles for select
5739
- $el.text && main.selectAll("." + CLASS.selectedCircles)
5731
+ $el.text && main.selectAll(".".concat(CLASS.selectedCircles))
5740
5732
  .filter($$.isBarType.bind($$))
5741
5733
  .selectAll("circle")
5742
5734
  .remove();
@@ -5836,7 +5828,7 @@ var redraw = {
5836
5828
  var name = capitalize(v);
5837
5829
  var drawFn = shape.type[v];
5838
5830
  if ((/^(area|line)$/.test(v) && $$.hasTypeOf(name)) || $$.hasType(v)) {
5839
- list.push($$["redraw" + name](drawFn, withTransition));
5831
+ list.push($$["redraw".concat(name)](drawFn, withTransition));
5840
5832
  }
5841
5833
  });
5842
5834
  !flow && grid.main && list.push($$.updateGridFocus());
@@ -5881,6 +5873,7 @@ var redraw = {
5881
5873
  redrawWithoutRescale: function () {
5882
5874
  this.redraw({
5883
5875
  withY: false,
5876
+ withLegend: true,
5884
5877
  withSubchart: false,
5885
5878
  withEventRect: false,
5886
5879
  withTransitionForAxis: false
@@ -6100,8 +6093,8 @@ var shape = {
6100
6093
  ["bar", "candlestick", "line", "area"].forEach(function (v) {
6101
6094
  var name = capitalize(/^(bubble|scatter)$/.test(v) ? "line" : v);
6102
6095
  if ($$.hasType(v) || $$.hasTypeOf(name) || (v === "line" && ($$.hasType("bubble") || $$.hasType("scatter")))) {
6103
- var indices = $$.getShapeIndices($$["is" + name + "Type"]);
6104
- var drawFn = $$["generateDraw" + name];
6096
+ var indices = $$.getShapeIndices($$["is".concat(name, "Type")]);
6097
+ var drawFn = $$["generateDraw".concat(name)];
6105
6098
  shape.indices[v] = indices;
6106
6099
  shape.type[v] = drawFn ? drawFn.bind($$)(indices, false) : undefined;
6107
6100
  }
@@ -6316,14 +6309,14 @@ var shape = {
6316
6309
  var config = $$.config, org = $$.org, scale = $$.scale;
6317
6310
  var maxDataCount = $$.getMaxDataCount();
6318
6311
  var isGrouped = type === "bar" && config.data_groups.length;
6319
- var configName = type + "_width";
6312
+ var configName = "".concat(type, "_width");
6320
6313
  var tickInterval = scale.zoom && !$$.axis.isCategorized() ?
6321
6314
  (org.xDomain.map(function (v) { return scale.zoom(v); })
6322
6315
  .reduce(function (a, c) { return Math.abs(a) + c; }) / maxDataCount) : axis.tickInterval(maxDataCount);
6323
6316
  var getWidth = function (id) {
6324
6317
  var width = id ? config[configName][id] : config[configName];
6325
- var ratio = id ? width.ratio : config[configName + "_ratio"];
6326
- var max = id ? width.max : config[configName + "_max"];
6318
+ var ratio = id ? width.ratio : config["".concat(configName, "_ratio")];
6319
+ var max = id ? width.max : config["".concat(configName, "_max")];
6327
6320
  var w = isNumber(width) ?
6328
6321
  width : targetsNum ? (tickInterval * ratio) / targetsNum : 0;
6329
6322
  return max && w > max ? max : w;
@@ -6351,7 +6344,7 @@ var shape = {
6351
6344
  getShapeByIndex: function (shapeName, i, id) {
6352
6345
  var $$ = this;
6353
6346
  var $el = $$.$el;
6354
- var suffix = (isValue(i) ? "-" + i : "");
6347
+ var suffix = (isValue(i) ? "-".concat(i) : "");
6355
6348
  var shape = $el[shapeName];
6356
6349
  // filter from shape reference if has
6357
6350
  if (shape && !shape.empty()) {
@@ -6361,8 +6354,8 @@ var shape = {
6361
6354
  }
6362
6355
  else {
6363
6356
  shape = (id ? $el.main
6364
- .selectAll("." + CLASS[shapeName + "s"] + $$.getTargetSelectorSuffix(id)) : $el.main)
6365
- .selectAll("." + CLASS[shapeName] + suffix);
6357
+ .selectAll(".".concat(CLASS["".concat(shapeName, "s")]).concat($$.getTargetSelectorSuffix(id))) : $el.main)
6358
+ .selectAll(".".concat(CLASS[shapeName]).concat(suffix));
6366
6359
  }
6367
6360
  return shape;
6368
6361
  },
@@ -6462,7 +6455,7 @@ var size = {
6462
6455
  var $$ = this;
6463
6456
  var config = $$.config, hasAxis = $$.state.hasAxis;
6464
6457
  var axisId = config.axis_rotated ? "y" : "x";
6465
- var axesLen = hasAxis ? config["axis_" + axisId + "_axes"].length : 0;
6458
+ var axesLen = hasAxis ? config["axis_".concat(axisId, "_axes")].length : 0;
6466
6459
  var padding = isValue(config.padding_bottom) ?
6467
6460
  config.padding_bottom : 0;
6468
6461
  return padding + (axesLen ? $$.getHorizontalAxisHeight(axisId) * axesLen : 0);
@@ -6472,7 +6465,7 @@ var size = {
6472
6465
  var config = $$.config, hasAxis = $$.state.hasAxis;
6473
6466
  var isRotated = config.axis_rotated;
6474
6467
  var axisId = isRotated ? "x" : "y";
6475
- var axesLen = hasAxis ? config["axis_" + axisId + "_axes"].length : 0;
6468
+ var axesLen = hasAxis ? config["axis_".concat(axisId, "_axes")].length : 0;
6476
6469
  var axisWidth = hasAxis ? $$.getAxisWidthByAxisId(axisId, withoutRecompute) : 0;
6477
6470
  var padding;
6478
6471
  if (isValue(config.padding_left)) {
@@ -6522,7 +6515,7 @@ var size = {
6522
6515
  * @private
6523
6516
  */
6524
6517
  getParentRectValue: function (key) {
6525
- var offsetName = "offset" + capitalize(key);
6518
+ var offsetName = "offset".concat(capitalize(key));
6526
6519
  var parent = this.$el.chart.node();
6527
6520
  var v = 0;
6528
6521
  while (v < 30 && parent && parent.tagName !== "BODY") {
@@ -6562,7 +6555,7 @@ var size = {
6562
6555
  var config = $$.config, $el = $$.$el;
6563
6556
  var hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner);
6564
6557
  var leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY;
6565
- var leftAxis = $el.main.select("." + leftAxisClass).node();
6558
+ var leftAxis = $el.main.select(".".concat(leftAxisClass)).node();
6566
6559
  var svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 };
6567
6560
  var chartRect = $el.chart.node().getBoundingClientRect();
6568
6561
  var hasArc = $$.hasArcType();
@@ -6589,23 +6582,23 @@ var size = {
6589
6582
  .attr("width", current.width)
6590
6583
  .attr("height", current.height);
6591
6584
  if (hasAxis) {
6592
- var brush = svg.select("." + CLASS.brush + " .overlay");
6585
+ var brush = svg.select(".".concat(CLASS.brush, " .overlay"));
6593
6586
  var brushSize = { width: 0, height: 0 };
6594
6587
  if (brush.size()) {
6595
6588
  brushSize.width = +brush.attr("width");
6596
6589
  brushSize.height = +brush.attr("height");
6597
6590
  }
6598
- svg.selectAll(["#" + clip.id, "#" + clip.idGrid])
6591
+ svg.selectAll(["#".concat(clip.id), "#".concat(clip.idGrid)])
6599
6592
  .select("rect")
6600
6593
  .attr("width", width)
6601
6594
  .attr("height", height);
6602
- svg.select("#" + clip.idXAxis)
6595
+ svg.select("#".concat(clip.idXAxis))
6603
6596
  .select("rect")
6604
6597
  .call($$.setXAxisClipPath.bind($$));
6605
- svg.select("#" + clip.idYAxis)
6598
+ svg.select("#".concat(clip.idYAxis))
6606
6599
  .select("rect")
6607
6600
  .call($$.setYAxisClipPath.bind($$));
6608
- clip.idSubchart && svg.select("#" + clip.idSubchart)
6601
+ clip.idSubchart && svg.select("#".concat(clip.idSubchart))
6609
6602
  .select("rect")
6610
6603
  .attr("width", width)
6611
6604
  .attr("height", brushSize.height);
@@ -6716,7 +6709,7 @@ var text = {
6716
6709
  */
6717
6710
  initText: function () {
6718
6711
  var $el = this.$el;
6719
- $el.main.select("." + CLASS.chart).append("g")
6712
+ $el.main.select(".".concat(CLASS.chart)).append("g")
6720
6713
  .attr("class", CLASS.chartTexts);
6721
6714
  },
6722
6715
  /**
@@ -6729,7 +6722,7 @@ var text = {
6729
6722
  var classChartText = $$.getChartClass("Text");
6730
6723
  var classTexts = $$.getClass("texts", "id");
6731
6724
  var classFocus = $$.classFocus.bind($$);
6732
- var mainTextUpdate = $$.$el.main.select("." + CLASS.chartTexts).selectAll("." + CLASS.chartText)
6725
+ var mainTextUpdate = $$.$el.main.select(".".concat(CLASS.chartTexts)).selectAll(".".concat(CLASS.chartText))
6733
6726
  .data(targets)
6734
6727
  .attr("class", function (d) { return classChartText(d) + classFocus(d); });
6735
6728
  var mainTextEnter = mainTextUpdate.enter().append("g")
@@ -6747,8 +6740,8 @@ var text = {
6747
6740
  var $$ = this;
6748
6741
  var $el = $$.$el, $T = $$.$T, config = $$.config;
6749
6742
  var classText = $$.getClass("text", "index");
6750
- var text = $el.main.selectAll("." + CLASS.texts)
6751
- .selectAll("." + CLASS.text)
6743
+ var text = $el.main.selectAll(".".concat(CLASS.texts))
6744
+ .selectAll(".".concat(CLASS.text))
6752
6745
  .data($$.labelishData.bind($$));
6753
6746
  $T(text.exit())
6754
6747
  .style("fill-opacity", "0")
@@ -6768,7 +6761,7 @@ var text = {
6768
6761
  })
6769
6762
  .style("fill", $$.updateTextColor.bind($$))
6770
6763
  .style("fill-opacity", "0")
6771
- .each(function (d, i, j) {
6764
+ .each(function (d, i, texts) {
6772
6765
  var node = select(this);
6773
6766
  var value = d.value;
6774
6767
  if ($$.isBubbleZType(d)) {
@@ -6780,7 +6773,7 @@ var text = {
6780
6773
  value = data.close;
6781
6774
  }
6782
6775
  }
6783
- value = $$.dataLabelFormat(d.id)(value, d.id, i, j);
6776
+ value = $$.dataLabelFormat(d.id)(value, d.id, i, texts);
6784
6777
  if (isNumber(value)) {
6785
6778
  this.textContent = value;
6786
6779
  }
@@ -6829,7 +6822,7 @@ var text = {
6829
6822
  var id = isString(backgroundColor) ? "" : $$.getTargetSelectorSuffix(("id" in d ? d.id : d.data.id));
6830
6823
  var filter = $el.defs.select(["filter[id*='labels-bg", "']"].join(id));
6831
6824
  if (filter.size()) {
6832
- color = "url(#" + filter.attr("id") + ")";
6825
+ color = "url(#".concat(filter.attr("id"), ")");
6833
6826
  }
6834
6827
  }
6835
6828
  return color || null;
@@ -6858,7 +6851,7 @@ var text = {
6858
6851
  var posY = y.bind(this)(d, i);
6859
6852
  // when is multiline
6860
6853
  if (this.childElementCount) {
6861
- node.attr("transform", "translate(" + posX + " " + posY + ")");
6854
+ node.attr("transform", "translate(".concat(posX, " ").concat(posY, ")"));
6862
6855
  }
6863
6856
  else {
6864
6857
  node.attr("x", posX).attr("y", posY);
@@ -6882,7 +6875,7 @@ var text = {
6882
6875
  base = base.querySelector("text");
6883
6876
  }
6884
6877
  var text = base.textContent;
6885
- var cacheKey = KEY.textRect + "-" + text.replace(/\W/g, "_");
6878
+ var cacheKey = "".concat(KEY.textRect, "-").concat(text.replace(/\W/g, "_"));
6886
6879
  var rect = $$.cache.get(cacheKey);
6887
6880
  if (!rect) {
6888
6881
  $$.$el.svg.append("text")
@@ -6912,7 +6905,7 @@ var text = {
6912
6905
  var getter = forX ? $$.getXForText : $$.getYForText;
6913
6906
  $$.hasType("radar") && types.push("radar");
6914
6907
  types.forEach(function (v) {
6915
- points[v] = $$["generateGet" + capitalize(v) + "Points"](indices[v], false);
6908
+ points[v] = $$["generateGet".concat(capitalize(v), "Points")](indices[v], false);
6916
6909
  });
6917
6910
  return function (d, i) {
6918
6911
  var type = ($$.isAreaType(d) && "area") ||
@@ -7129,7 +7122,7 @@ var text = {
7129
7122
  if (ratio === void 0) { ratio = 0; }
7130
7123
  var $$ = this;
7131
7124
  var config = $$.config;
7132
- var threshold = config[type + "_label_threshold"] || 0;
7125
+ var threshold = config["".concat(type, "_label_threshold")] || 0;
7133
7126
  return ratio >= threshold;
7134
7127
  }
7135
7128
  };
@@ -7187,7 +7180,7 @@ var title = {
7187
7180
  if (title) {
7188
7181
  var y = $$.yForTitle.call($$);
7189
7182
  if (/g/i.test(title.node().tagName)) {
7190
- title.attr("transform", "translate(" + getTextPos(config.title_position, current.width) + ", " + y + ")");
7183
+ title.attr("transform", "translate(".concat(getTextPos(config.title_position, current.width), ", ").concat(y, ")"));
7191
7184
  }
7192
7185
  else {
7193
7186
  title.attr("x", $$.xForTitle.call($$)).attr("y", y);
@@ -7322,12 +7315,12 @@ var tooltip$1 = {
7322
7315
  var $$ = this;
7323
7316
  var api = $$.api, config = $$.config, state = $$.state;
7324
7317
  var _a = ["title", "name", "value"].map(function (v) {
7325
- var fn = config["tooltip_format_" + v];
7318
+ var fn = config["tooltip_format_".concat(v)];
7326
7319
  return isFunction(fn) ? fn.bind(api) : fn;
7327
7320
  }), titleFormat = _a[0], nameFormat = _a[1], valueFormat = _a[2];
7328
7321
  titleFormat = titleFormat || defaultTitleFormat;
7329
7322
  nameFormat = nameFormat || (function (name) { return name; });
7330
- valueFormat = valueFormat || ($$.isStackNormalized() ? function (v, ratio) { return (ratio * 100).toFixed(2) + "%"; } : defaultValueFormat);
7323
+ valueFormat = valueFormat || ($$.isStackNormalized() ? function (v, ratio) { return "".concat((ratio * 100).toFixed(2), "%"); } : defaultValueFormat);
7331
7324
  var order = config.tooltip_order;
7332
7325
  var getRowValue = function (row) { return ($$.axis && $$.isBubbleZType(row) ? $$.getBubbleZData(row.value, "z") : $$.getBaseValue(row)); };
7333
7326
  var getBgColor = $$.levelColor ? function (row) { return $$.levelColor(row.value); } : function (row) { return color(row); };
@@ -7377,21 +7370,21 @@ var tooltip$1 = {
7377
7370
  sanitise(titleFormat ? titleFormat(row.x) : row.x);
7378
7371
  text = tplProcess(tpl[0], {
7379
7372
  CLASS_TOOLTIP: CLASS.tooltip,
7380
- TITLE: isValue(title) ? (tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>") : ""
7373
+ TITLE: isValue(title) ? (tplStr ? title : "<tr><th colspan=\"2\">".concat(title, "</th></tr>")) : ""
7381
7374
  });
7382
7375
  }
7383
7376
  if (!row.ratio && $$.$el.arcs) {
7384
- row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." + CLASS.arc + "-" + row.id).data()[0]);
7377
+ row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path.".concat(CLASS.arc, "-").concat(row.id)).data()[0]);
7385
7378
  }
7386
7379
  param = [row.ratio, row.id, row.index, d];
7387
7380
  value = sanitise(valueFormat.apply(void 0, __spreadArray([getRowValue(row)], param, false)));
7388
7381
  if ($$.isAreaRangeType(row)) {
7389
7382
  var _b = ["high", "low"].map(function (v) { return sanitise(valueFormat.apply(void 0, __spreadArray([$$.getRangedData(row, v)], param, false))); }), high = _b[0], low = _b[1];
7390
- value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
7383
+ value = "<b>Mid:</b> ".concat(value, " <b>High:</b> ").concat(high, " <b>Low:</b> ").concat(low);
7391
7384
  }
7392
7385
  else if ($$.isCandlestickType(row)) {
7393
7386
  var _c = ["open", "high", "low", "close", "volume"].map(function (v) { return sanitise(valueFormat.apply(void 0, __spreadArray([$$.getRangedData(row, v, "candlestick")], param, false))); }), open_1 = _c[0], high = _c[1], low = _c[2], close_1 = _c[3], volume = _c[4];
7394
- value = "<b>Open:</b> " + open_1 + " <b>High:</b> " + high + " <b>Low:</b> " + low + " <b>Close:</b> " + close_1 + (volume ? " <b>Volume:</b> " + volume : "");
7387
+ value = "<b>Open:</b> ".concat(open_1, " <b>High:</b> ").concat(high, " <b>Low:</b> ").concat(low, " <b>Close:</b> ").concat(close_1).concat(volume ? " <b>Volume:</b> ".concat(volume) : "");
7395
7388
  }
7396
7389
  if (value !== undefined) {
7397
7390
  // Skip elements when their name is set to null
@@ -7402,7 +7395,7 @@ var tooltip$1 = {
7402
7395
  var color_1 = getBgColor(row);
7403
7396
  var contentValue_1 = {
7404
7397
  CLASS_TOOLTIP_NAME: CLASS.tooltipName + $$.getTargetSelectorSuffix(row.id),
7405
- COLOR: (tplStr || !$$.patterns) ? color_1 : "<svg><rect style=\"fill:" + color_1 + "\" width=\"10\" height=\"10\"></rect></svg>",
7398
+ COLOR: (tplStr || !$$.patterns) ? color_1 : "<svg><rect style=\"fill:".concat(color_1, "\" width=\"10\" height=\"10\"></rect></svg>"),
7406
7399
  NAME: name_1,
7407
7400
  VALUE: value
7408
7401
  };
@@ -7418,7 +7411,7 @@ var tooltip$1 = {
7418
7411
  for (i = 0; i < len; i++) {
7419
7412
  _loop_1();
7420
7413
  }
7421
- return text + "</table>";
7414
+ return "".concat(text, "</table>");
7422
7415
  },
7423
7416
  /**
7424
7417
  * Get the content template string
@@ -7427,7 +7420,7 @@ var tooltip$1 = {
7427
7420
  * @private
7428
7421
  */
7429
7422
  getTooltipContentTemplate: function (tplStr) {
7430
- 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>")
7423
+ 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>"))
7431
7424
  .replace(/(\r?\n|\t)/g, "")
7432
7425
  .split(/{{(.*)}}/);
7433
7426
  },
@@ -7537,7 +7530,7 @@ var tooltip$1 = {
7537
7530
  var pos_1 = fnPos(dataToShow, width, height, eventRect, currPos);
7538
7531
  ["top", "left"].forEach(function (v) {
7539
7532
  var value = pos_1[v];
7540
- tooltip.style(v, value + "px");
7533
+ tooltip.style(v, "".concat(value, "px"));
7541
7534
  // Remember left pos in percentage to be used on resize call
7542
7535
  if (v === "left" && !datum.xPosInPercent) {
7543
7536
  datum.xPosInPercent = value / state.current.width * 100;
@@ -7562,7 +7555,7 @@ var tooltip$1 = {
7562
7555
  if (diff < 0) {
7563
7556
  value += diff;
7564
7557
  }
7565
- tooltip.style("left", value + "px");
7558
+ tooltip.style("left", "".concat(value, "px"));
7566
7559
  }
7567
7560
  });
7568
7561
  },
@@ -7671,26 +7664,26 @@ var transform = {
7671
7664
  x = state.width / 2 - width;
7672
7665
  y = asHalfPixel(state.margin.top);
7673
7666
  }
7674
- return "translate(" + x + ", " + y + ")";
7667
+ return "translate(".concat(x, ", ").concat(y, ")");
7675
7668
  },
7676
7669
  transformMain: function (withTransition, transitions) {
7677
7670
  var $$ = this;
7678
7671
  var main = $$.$el.main, $T = $$.$T;
7679
7672
  var xAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisX) ?
7680
7673
  transitions.axisX :
7681
- $T(main.select("." + CLASS.axisX), withTransition);
7674
+ $T(main.select(".".concat(CLASS.axisX)), withTransition);
7682
7675
  var yAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY) ?
7683
7676
  transitions.axisY :
7684
- $T(main.select("." + CLASS.axisY), withTransition);
7677
+ $T(main.select(".".concat(CLASS.axisY)), withTransition);
7685
7678
  var y2Axis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisY2) ?
7686
7679
  transitions.axisY2 :
7687
- $T(main.select("." + CLASS.axisY2), withTransition);
7680
+ $T(main.select(".".concat(CLASS.axisY2)), withTransition);
7688
7681
  $T(main, withTransition)
7689
7682
  .attr("transform", $$.getTranslate("main"));
7690
7683
  xAxis.attr("transform", $$.getTranslate("x"));
7691
7684
  yAxis.attr("transform", $$.getTranslate("y"));
7692
7685
  y2Axis.attr("transform", $$.getTranslate("y2"));
7693
- main.select("." + CLASS.chartArcs)
7686
+ main.select(".".concat(CLASS.chartArcs))
7694
7687
  .attr("transform", $$.getTranslate("arc"));
7695
7688
  },
7696
7689
  transformAll: function (withTransition, transitions) {
@@ -8086,7 +8079,7 @@ var ChartInternal = /** @class */ (function () {
8086
8079
  var _a = $$, config = _a.config, format = _a.format, state = _a.state;
8087
8080
  var isRotated = config.axis_rotated;
8088
8081
  // datetime to be used for uniqueness
8089
- state.datetimeId = "bb-" + +new Date();
8082
+ state.datetimeId = "bb-".concat(+new Date());
8090
8083
  $$.color = $$.generateColor();
8091
8084
  $$.levelColor = $$.generateLevelColor();
8092
8085
  if ($$.hasPointType()) {
@@ -8211,7 +8204,7 @@ var ChartInternal = /** @class */ (function () {
8211
8204
  // text when empty
8212
8205
  if (config.data_empty_label_text) {
8213
8206
  main.append("text")
8214
- .attr("class", CLASS.text + " " + CLASS.empty)
8207
+ .attr("class", "".concat(CLASS.text, " ").concat(CLASS.empty))
8215
8208
  .attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
8216
8209
  .attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
8217
8210
  }
@@ -8287,7 +8280,7 @@ var ChartInternal = /** @class */ (function () {
8287
8280
  }
8288
8281
  }
8289
8282
  types.forEach(function (v) {
8290
- $$["init" + v]();
8283
+ $$["init".concat(v)]();
8291
8284
  });
8292
8285
  notEmpty($$.config.data_labels) && !$$.hasArcType(null, ["radar"]) && $$.initText();
8293
8286
  };
@@ -8354,7 +8347,7 @@ var ChartInternal = /** @class */ (function () {
8354
8347
  ["bar", "candlestick", "line"].forEach(function (v) {
8355
8348
  var name = capitalize(v);
8356
8349
  if ((v === "line" && $$.hasTypeOf(name)) || $$.hasType(v)) {
8357
- $$["updateTargetsFor" + name](targets.filter($$["is" + name + "Type"].bind($$)));
8350
+ $$["updateTargetsFor".concat(name)](targets.filter($$["is".concat(name, "Type")].bind($$)));
8358
8351
  }
8359
8352
  });
8360
8353
  // Sub Chart
@@ -8381,7 +8374,7 @@ var ChartInternal = /** @class */ (function () {
8381
8374
  ChartInternal.prototype.showTargets = function () {
8382
8375
  var $$ = this;
8383
8376
  var svg = $$.$el.svg, $T = $$.$T;
8384
- $T(svg.selectAll("." + CLASS.target)
8377
+ $T(svg.selectAll(".".concat(CLASS.target))
8385
8378
  .filter(function (d) { return $$.isTargetToShow(d.id); })).style("opacity", null);
8386
8379
  };
8387
8380
  ChartInternal.prototype.getWithOption = function (options) {
@@ -8405,7 +8398,7 @@ var ChartInternal = /** @class */ (function () {
8405
8398
  if (isString(defVal)) {
8406
8399
  defVal = withOptions[defVal];
8407
8400
  }
8408
- withOptions[key] = getOption(options, "with" + key, defVal);
8401
+ withOptions[key] = getOption(options, "with".concat(key), defVal);
8409
8402
  });
8410
8403
  return withOptions;
8411
8404
  };
@@ -8878,7 +8871,7 @@ var apiData = { data: data };
8878
8871
  * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
8879
8872
  */
8880
8873
  var b64EncodeUnicode = function (str) { return btoa(encodeURIComponent(str)
8881
- .replace(/%([0-9A-F]{2})/g, function (match, p) { return String.fromCharCode(Number("0x" + p)); })); };
8874
+ .replace(/%([0-9A-F]{2})/g, function (match, p) { return String.fromCharCode(Number("0x".concat(p))); })); };
8882
8875
  /**
8883
8876
  * Convert svg node to data url
8884
8877
  * @param {HTMLElement} node target node
@@ -8902,9 +8895,9 @@ function nodeToSvgDataUrl(node, option, orgSize) {
8902
8895
  var styleXml = serializer.serializeToString(style);
8903
8896
  // foreignObject not supported in IE11 and below
8904
8897
  // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
8905
- var dataStr = ("<svg xmlns=\"" + namespaces.svg + "\" width=\"" + width + "\" height=\"" + height + "\" \n\t\tviewBox=\"0 0 " + orgSize.width + " " + orgSize.height + "\" \n\t\tpreserveAspectRatio=\"" + ((option === null || option === void 0 ? void 0 : option.preserveAspectRatio) === false ? "none" : "xMinYMid meet") + "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t" + styleXml + "\n\t\t\t\t" + nodeXml.replace(/(url\()[^#]+/g, "$1") + "\n\t\t\t</foreignObject></svg>")
8898
+ var dataStr = "<svg xmlns=\"".concat(namespaces.svg, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" \n\t\tviewBox=\"0 0 ").concat(orgSize.width, " ").concat(orgSize.height, "\" \n\t\tpreserveAspectRatio=\"").concat((option === null || option === void 0 ? void 0 : option.preserveAspectRatio) === false ? "none" : "xMinYMid meet", "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t").concat(styleXml, "\n\t\t\t\t").concat(nodeXml.replace(/(url\()[^#]+/g, "$1"), "\n\t\t\t</foreignObject></svg>")
8906
8899
  .replace("/\n/g", "%0A");
8907
- return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr);
8900
+ return "data:image/svg+xml;base64,".concat(b64EncodeUnicode(dataStr));
8908
8901
  }
8909
8902
  var apiExport = {
8910
8903
  /**
@@ -9010,7 +9003,7 @@ var apiFocus = {
9010
9003
  if ($$.hasArcType() && !state.hasRadar) {
9011
9004
  $$.expandArc(targetIds);
9012
9005
  $$.hasType("gauge") &&
9013
- $$.markOverlapped(targetIdsValue, $$, "." + CLASS.gaugeValue);
9006
+ $$.markOverlapped(targetIdsValue, $$, ".".concat(CLASS.gaugeValue));
9014
9007
  }
9015
9008
  $$.toggleFocusLegend(targetIds, true);
9016
9009
  state.focusedTargetIds = targetIds;
@@ -9042,7 +9035,7 @@ var apiFocus = {
9042
9035
  if ($$.hasArcType()) {
9043
9036
  $$.unexpandArc(targetIds);
9044
9037
  $$.hasType("gauge") &&
9045
- $$.undoMarkOverlapped($$, "." + CLASS.gaugeValue);
9038
+ $$.undoMarkOverlapped($$, ".".concat(CLASS.gaugeValue));
9046
9039
  }
9047
9040
  $$.toggleFocusLegend(targetIds, false);
9048
9041
  state.focusedTargetIds = state.focusedTargetIds.filter(function (id) { return targetIds.indexOf(id) < 0; });
@@ -9271,6 +9264,13 @@ var apiLoad = {
9271
9264
  * value: ["upload", "download"]
9272
9265
  * }
9273
9266
  * });
9267
+ * @example
9268
+ * chart.load({
9269
+ * json: {
9270
+ * data1:[30, 20, 50, 40, 60, 50],
9271
+ * data2:[200, 130, 90, 240, 130, 220],
9272
+ * }
9273
+ * });
9274
9274
  */
9275
9275
  load: function (args) {
9276
9276
  var $$ = this.internal;
@@ -9373,7 +9373,7 @@ function showHide(show, targetIdsValue, options) {
9373
9373
  .map(function (v) { return targetIds.indexOf(v) > -1 && v; })
9374
9374
  .filter(Boolean);
9375
9375
  $$.state.toggling = true;
9376
- $$[(show ? "remove" : "add") + "HiddenTargetIds"](targetIds);
9376
+ $$["".concat(show ? "remove" : "add", "HiddenTargetIds")](targetIds);
9377
9377
  var targets = $$.$el.svg.selectAll($$.selectorTargets(targetIds));
9378
9378
  var opacity = show ? null : "0";
9379
9379
  if (show && hiddenIds.length) {
@@ -9390,7 +9390,7 @@ function showHide(show, targetIdsValue, options) {
9390
9390
  }
9391
9391
  targets.style("opacity", opacity);
9392
9392
  });
9393
- options.withLegend && $$[(show ? "show" : "hide") + "Legend"](targetIds);
9393
+ options.withLegend && $$["".concat(show ? "show" : "hide", "Legend")](targetIds);
9394
9394
  $$.redraw({
9395
9395
  withUpdateOrgXDomain: true,
9396
9396
  withUpdateXDomain: true,
@@ -9721,9 +9721,9 @@ extend(Chart.prototype, [
9721
9721
  */
9722
9722
  function setMinMax($$, type, value) {
9723
9723
  var config = $$.config;
9724
- var axisX = "axis_x_" + type;
9725
- var axisY = "axis_y_" + type;
9726
- var axisY2 = "axis_y2_" + type;
9724
+ var axisX = "axis_x_".concat(type);
9725
+ var axisY = "axis_y_".concat(type);
9726
+ var axisY2 = "axis_y2_".concat(type);
9727
9727
  if (isDefined(value)) {
9728
9728
  if (isObjectType(value)) {
9729
9729
  isValue(value.x) && (config[axisX] = value.x);
@@ -9750,9 +9750,9 @@ function setMinMax($$, type, value) {
9750
9750
  function getMinMax($$, type) {
9751
9751
  var config = $$.config;
9752
9752
  return {
9753
- x: config["axis_x_" + type],
9754
- y: config["axis_y_" + type],
9755
- y2: config["axis_y2_" + type]
9753
+ x: config["axis_x_".concat(type)],
9754
+ y: config["axis_y_".concat(type)],
9755
+ y2: config["axis_y2_".concat(type)]
9756
9756
  };
9757
9757
  }
9758
9758
  /**
@@ -10210,8 +10210,8 @@ extend(regions, {
10210
10210
  var config = $$.config, $T = $$.$T;
10211
10211
  var options = optionsValue || {};
10212
10212
  var classes = getOption(options, "classes", [CLASS.region]);
10213
- var regions = $$.$el.main.select("." + CLASS.regions)
10214
- .selectAll(classes.map(function (c) { return "." + c; }));
10213
+ var regions = $$.$el.main.select(".".concat(CLASS.regions))
10214
+ .selectAll(classes.map(function (c) { return ".".concat(c); }));
10215
10215
  $T(regions)
10216
10216
  .style("opacity", "0")
10217
10217
  .remove();
@@ -10548,8 +10548,8 @@ var AxisRendererHelper = /** @class */ (function () {
10548
10548
  AxisRendererHelper.prototype.getTickTransformSetter = function (id) {
10549
10549
  var config = this.config;
10550
10550
  var fn = id === "x" ?
10551
- function (value) { return "translate(" + (value + config.tickOffset) + ",0)"; } :
10552
- function (value) { return "translate(0," + value + ")"; };
10551
+ function (value) { return "translate(".concat(value + config.tickOffset, ",0)"); } :
10552
+ function (value) { return "translate(0,".concat(value, ")"); };
10553
10553
  return function (selection, scale) {
10554
10554
  selection.attr("transform", function (d) { return fn(Math.ceil(scale(d))); });
10555
10555
  };
@@ -10695,13 +10695,13 @@ var AxisRenderer = /** @class */ (function () {
10695
10695
  // // get the axis' tick position configuration
10696
10696
  var id = params.id;
10697
10697
  var tickTextPos = id && /^(x|y|y2)$/.test(id) ?
10698
- params.config["axis_" + id + "_tick_text_position"] : { x: 0, y: 0 };
10698
+ params.config["axis_".concat(id, "_tick_text_position")] : { x: 0, y: 0 };
10699
10699
  // tick visiblity
10700
- var prefix = id === "subX" ? "subchart_axis_x" : "axis_" + id;
10701
- var axisShow = params.config[prefix + "_show"];
10700
+ var prefix = id === "subX" ? "subchart_axis_x" : "axis_".concat(id);
10701
+ var axisShow = params.config["".concat(prefix, "_show")];
10702
10702
  var tickShow = {
10703
- tick: axisShow ? params.config[prefix + "_tick_show"] : false,
10704
- text: axisShow ? params.config[prefix + "_tick_text_show"] : false
10703
+ tick: axisShow ? params.config["".concat(prefix, "_tick_show")] : false,
10704
+ text: axisShow ? params.config["".concat(prefix, "_tick_text_show")] : false
10705
10705
  };
10706
10706
  var $g;
10707
10707
  g.each(function () {
@@ -10722,8 +10722,8 @@ var AxisRenderer = /** @class */ (function () {
10722
10722
  .attr("d", function () {
10723
10723
  var outerTickSized = config.outerTickSize * sign;
10724
10724
  return isTopBottom ?
10725
- "M" + range[0] + "," + outerTickSized + "V0H" + range[1] + "V" + outerTickSized :
10726
- "M" + outerTickSized + "," + range[0] + "H0V" + range[1] + "H" + outerTickSized;
10725
+ "M".concat(range[0], ",").concat(outerTickSized, "V0H").concat(range[1], "V").concat(outerTickSized) :
10726
+ "M".concat(outerTickSized, ",").concat(range[0], "H0V").concat(range[1], "H").concat(outerTickSized);
10727
10727
  });
10728
10728
  if (tickShow.tick || tickShow.text) {
10729
10729
  // count of tick data in array
@@ -10784,7 +10784,7 @@ var AxisRenderer = /** @class */ (function () {
10784
10784
  });
10785
10785
  var lineUpdate = tick.select("line");
10786
10786
  var textUpdate = tick.select("text");
10787
- tickEnter.select("line").attr(axisPx + "2", innerTickSize * sign);
10787
+ tickEnter.select("line").attr("".concat(axisPx, "2"), innerTickSize * sign);
10788
10788
  tickEnter.select("text").attr(axisPx, tickLength * sign);
10789
10789
  ctx.setTickLineTextPosition(lineUpdate, textUpdate);
10790
10790
  // Append <title> for tooltip display
@@ -10859,7 +10859,7 @@ var AxisRenderer = /** @class */ (function () {
10859
10859
  orient === "top" && value.reverse();
10860
10860
  return !r ? "middle" : value[r > 0 ? 0 : 1];
10861
10861
  };
10862
- var textTransform = function (r) { return (r ? "rotate(" + r + ")" : null); };
10862
+ var textTransform = function (r) { return (r ? "rotate(".concat(r, ")") : null); };
10863
10863
  var yForText = function (r) {
10864
10864
  var r2 = r / (orient === "bottom" ? 15 : 23);
10865
10865
  return r ? 11.5 - 2.5 * r2 * (r > 0 ? 1 : -1) : tickLength;
@@ -11084,7 +11084,7 @@ var Axis = /** @class */ (function () {
11084
11084
  this.setOrient();
11085
11085
  }
11086
11086
  Axis.prototype.getAxisClassName = function (id) {
11087
- return CLASS.axis + " " + CLASS["axis" + capitalize(id)];
11087
+ return "".concat(CLASS.axis, " ").concat(CLASS["axis".concat(capitalize(id))]);
11088
11088
  };
11089
11089
  Axis.prototype.isHorizontal = function ($$, forHorizontal) {
11090
11090
  var isRotated = $$.config.axis_rotated;
@@ -11100,11 +11100,11 @@ var Axis = /** @class */ (function () {
11100
11100
  };
11101
11101
  Axis.prototype.isTimeSeries = function (id) {
11102
11102
  if (id === void 0) { id = "x"; }
11103
- return this.owner.config["axis_" + id + "_type"] === "timeseries";
11103
+ return this.owner.config["axis_".concat(id, "_type")] === "timeseries";
11104
11104
  };
11105
11105
  Axis.prototype.isLog = function (id) {
11106
11106
  if (id === void 0) { id = "x"; }
11107
- return this.owner.config["axis_" + id + "_type"] === "log";
11107
+ return this.owner.config["axis_".concat(id, "_type")] === "log";
11108
11108
  };
11109
11109
  Axis.prototype.isTimeSeriesY = function () {
11110
11110
  return this.isTimeSeries("y");
@@ -11129,7 +11129,7 @@ var Axis = /** @class */ (function () {
11129
11129
  config.axis_y2_show && target.push("y2");
11130
11130
  target.forEach(function (v) {
11131
11131
  var classAxis = _this.getAxisClassName(v);
11132
- var classLabel = CLASS["axis" + v.toUpperCase() + "Label"];
11132
+ var classLabel = CLASS["axis".concat(v.toUpperCase(), "Label")];
11133
11133
  axis[v] = main.append("g")
11134
11134
  .attr("class", classAxis)
11135
11135
  .attr("clip-path", function () {
@@ -11143,7 +11143,7 @@ var Axis = /** @class */ (function () {
11143
11143
  return res;
11144
11144
  })
11145
11145
  .attr("transform", $$.getTranslate(v))
11146
- .style("visibility", config["axis_" + v + "_show"] ? null : "hidden");
11146
+ .style("visibility", config["axis_".concat(v, "_show")] ? null : "hidden");
11147
11147
  axis[v].append("text")
11148
11148
  .attr("class", classLabel)
11149
11149
  .attr("transform", ["rotate(-90)", null][v === "x" ? +!isRotated : +isRotated])
@@ -11175,7 +11175,7 @@ var Axis = /** @class */ (function () {
11175
11175
  var $$ = this.owner;
11176
11176
  var config = $$.config;
11177
11177
  var axes = [];
11178
- var axesConfig = config["axis_" + id + "_axes"];
11178
+ var axesConfig = config["axis_".concat(id, "_axes")];
11179
11179
  var isRotated = config.axis_rotated;
11180
11180
  var d3Axis;
11181
11181
  if (id === "x") {
@@ -11210,7 +11210,7 @@ var Axis = /** @class */ (function () {
11210
11210
  var $$ = this.owner;
11211
11211
  var config = $$.config, main = $$.$el.main;
11212
11212
  Object.keys(this.axesList).forEach(function (id) {
11213
- var axesConfig = config["axis_" + id + "_axes"];
11213
+ var axesConfig = config["axis_".concat(id, "_axes")];
11214
11214
  var scale = $$.scale[id].copy();
11215
11215
  var range = scale.range();
11216
11216
  _this.axesList[id].forEach(function (v, i) {
@@ -11220,12 +11220,12 @@ var Axis = /** @class */ (function () {
11220
11220
  if (!range.every(function (v, i) { return v === axisRange[i]; })) {
11221
11221
  v.scale().range(range);
11222
11222
  }
11223
- var className = _this.getAxisClassName(id) + "-" + (i + 1);
11224
- var g = main.select("." + className.replace(/\s/, "."));
11223
+ var className = "".concat(_this.getAxisClassName(id), "-").concat(i + 1);
11224
+ var g = main.select(".".concat(className.replace(/\s/, ".")));
11225
11225
  if (g.empty()) {
11226
11226
  g = main.append("g")
11227
11227
  .attr("class", className)
11228
- .style("visibility", config["axis_" + id + "_show"] ? null : "hidden")
11228
+ .style("visibility", config["axis_".concat(id, "_show")] ? null : "hidden")
11229
11229
  .call(v);
11230
11230
  }
11231
11231
  else {
@@ -11270,7 +11270,7 @@ var Axis = /** @class */ (function () {
11270
11270
  tickFormat = (id === "subX") ? $$.format.subXAxisTick : $$.format.xAxisTick;
11271
11271
  }
11272
11272
  else {
11273
- var fn = config["axis_" + id + "_tick_format"];
11273
+ var fn = config["axis_".concat(id, "_tick_format")];
11274
11274
  if (isFunction(fn)) {
11275
11275
  tickFormat = fn.bind($$.api);
11276
11276
  }
@@ -11291,7 +11291,7 @@ var Axis = /** @class */ (function () {
11291
11291
  orgXScale: $$.scale.x
11292
11292
  });
11293
11293
  if (!isX) {
11294
- axisParams.tickStepSize = config["axis_" + type + "_tick_stepSize"];
11294
+ axisParams.tickStepSize = config["axis_".concat(type, "_tick_stepSize")];
11295
11295
  }
11296
11296
  var axis = new AxisRenderer(axisParams)
11297
11297
  .scale((isX && $$.scale.zoom) || scale)
@@ -11307,14 +11307,14 @@ var Axis = /** @class */ (function () {
11307
11307
  }
11308
11308
  tickValues && axis.tickValues(tickValues);
11309
11309
  // Set tick
11310
- axis.tickFormat(tickFormat || (!isX && ($$.isStackNormalized() && (function (x) { return x + "%"; }))));
11310
+ axis.tickFormat(tickFormat || (!isX && ($$.isStackNormalized() && (function (x) { return "".concat(x, "%"); }))));
11311
11311
  if (isCategory) {
11312
11312
  axis.tickCentered(config.axis_x_tick_centered);
11313
11313
  if (isEmpty(config.axis_x_tick_culling)) {
11314
11314
  config.axis_x_tick_culling = false;
11315
11315
  }
11316
11316
  }
11317
- var tickCount = config["axis_" + type + "_tick_count"];
11317
+ var tickCount = config["axis_".concat(type, "_tick_count")];
11318
11318
  tickCount && axis.ticks(tickCount);
11319
11319
  return axis;
11320
11320
  };
@@ -11380,13 +11380,13 @@ var Axis = /** @class */ (function () {
11380
11380
  };
11381
11381
  Axis.prototype.getTickValues = function (id) {
11382
11382
  var $$ = this.owner;
11383
- var tickValues = $$.config["axis_" + id + "_tick_values"];
11384
- var axis = $$[id + "Axis"];
11383
+ var tickValues = $$.config["axis_".concat(id, "_tick_values")];
11384
+ var axis = $$["".concat(id, "Axis")];
11385
11385
  return (isFunction(tickValues) ? tickValues.call($$.api) : tickValues) ||
11386
11386
  (axis ? axis.tickValues() : undefined);
11387
11387
  };
11388
11388
  Axis.prototype.getLabelOptionByAxisId = function (id) {
11389
- return this.owner.config["axis_" + id + "_label"];
11389
+ return this.owner.config["axis_".concat(id, "_label")];
11390
11390
  };
11391
11391
  Axis.prototype.getLabelText = function (id) {
11392
11392
  var option = this.getLabelOptionByAxisId(id);
@@ -11397,7 +11397,7 @@ var Axis = /** @class */ (function () {
11397
11397
  var config = $$.config;
11398
11398
  var option = this.getLabelOptionByAxisId(id);
11399
11399
  if (isString(option)) {
11400
- config["axis_" + id + "_label"] = text;
11400
+ config["axis_".concat(id, "_label")] = text;
11401
11401
  }
11402
11402
  else if (option) {
11403
11403
  option.text = text;
@@ -11468,7 +11468,7 @@ var Axis = /** @class */ (function () {
11468
11468
  var config = $$.config;
11469
11469
  var isRotated = config.axis_rotated;
11470
11470
  var isInner = this.getAxisLabelPosition(id).isInner;
11471
- var tickRotate = config["axis_" + id + "_tick_rotate"] ? $$.getHorizontalAxisHeight(id) : 0;
11471
+ var tickRotate = config["axis_".concat(id, "_tick_rotate")] ? $$.getHorizontalAxisHeight(id) : 0;
11472
11472
  var maxTickWidth = this.getMaxTickWidth(id);
11473
11473
  var dy;
11474
11474
  if (id === "x") {
@@ -11507,7 +11507,7 @@ var Axis = /** @class */ (function () {
11507
11507
  }
11508
11508
  else {
11509
11509
  dy = isInner ?
11510
- dy[3] : (dy[4] + (config["axis_" + id + "_inner"] ? 0 : (maxTickWidth + dy[4]))) * (id === "y" ? -1 : 1);
11510
+ dy[3] : (dy[4] + (config["axis_".concat(id, "_inner")] ? 0 : (maxTickWidth + dy[4]))) * (id === "y" ? -1 : 1);
11511
11511
  }
11512
11512
  }
11513
11513
  return dy;
@@ -11517,13 +11517,13 @@ var Axis = /** @class */ (function () {
11517
11517
  var config = $$.config, current = $$.state.current, _a = $$.$el, svg = _a.svg, chart = _a.chart;
11518
11518
  var currentTickMax = current.maxTickWidths[id];
11519
11519
  var maxWidth = 0;
11520
- if (withoutRecompute || !config["axis_" + id + "_show"] || $$.filterTargetsToShow().length === 0) {
11520
+ if (withoutRecompute || !config["axis_".concat(id, "_show")] || $$.filterTargetsToShow().length === 0) {
11521
11521
  return currentTickMax.size;
11522
11522
  }
11523
11523
  if (svg) {
11524
11524
  var isYAxis_1 = /^y2?$/.test(id);
11525
11525
  var targetsToShow = $$.filterTargetsToShow($$.data.targets);
11526
- var scale = $$.scale[id].copy().domain($$["get" + (isYAxis_1 ? "Y" : "X") + "Domain"](targetsToShow, id));
11526
+ var scale = $$.scale[id].copy().domain($$["get".concat(isYAxis_1 ? "Y" : "X", "Domain")](targetsToShow, id));
11527
11527
  var domain = scale.domain();
11528
11528
  var isDomainSame = domain[0] === domain[1] && domain.every(function (v) { return v > 0; });
11529
11529
  var isCurrentMaxTickDomainSame = isArray(currentTickMax.domain) &&
@@ -11541,8 +11541,8 @@ var Axis = /** @class */ (function () {
11541
11541
  currentTickMax.ticks.splice(0);
11542
11542
  }
11543
11543
  var axis = this.getAxis(id, scale, false, false, true);
11544
- var tickCount = config["axis_" + id + "_tick_count"];
11545
- var tickValues = config["axis_" + id + "_tick_values"];
11544
+ var tickCount = config["axis_".concat(id, "_tick_count")];
11545
+ var tickValues = config["axis_".concat(id, "_tick_values")];
11546
11546
  // Make to generate the final tick text to be rendered
11547
11547
  // https://github.com/naver/billboard.js/issues/920
11548
11548
  // Do not generate if 'tick values' option is given
@@ -11554,8 +11554,8 @@ var Axis = /** @class */ (function () {
11554
11554
  var dummy = chart.append("svg")
11555
11555
  .style("visibility", "hidden")
11556
11556
  .style("position", "fixed")
11557
- .style("top", "0px")
11558
- .style("left", "0px");
11557
+ .style("top", "0")
11558
+ .style("left", "0");
11559
11559
  axis.create(dummy);
11560
11560
  dummy.selectAll("text")
11561
11561
  .each(function (d, i) {
@@ -11634,9 +11634,9 @@ var Axis = /** @class */ (function () {
11634
11634
  var $$ = this.owner;
11635
11635
  var main = $$.$el.main, $T = $$.$T;
11636
11636
  var labels = {
11637
- x: main.select("." + CLASS.axisX + " ." + CLASS.axisXLabel),
11638
- y: main.select("." + CLASS.axisY + " ." + CLASS.axisYLabel),
11639
- y2: main.select("." + CLASS.axisY2 + " ." + CLASS.axisY2Label)
11637
+ x: main.select(".".concat(CLASS.axisX, " .").concat(CLASS.axisXLabel)),
11638
+ y: main.select(".".concat(CLASS.axisY, " .").concat(CLASS.axisYLabel)),
11639
+ y2: main.select(".".concat(CLASS.axisY2, " .").concat(CLASS.axisY2Label))
11640
11640
  };
11641
11641
  Object.keys(labels).filter(function (id) { return !labels[id].empty(); })
11642
11642
  .forEach(function (v) {
@@ -11717,7 +11717,7 @@ var Axis = /** @class */ (function () {
11717
11717
  axis.config.withoutTransition = true;
11718
11718
  }
11719
11719
  $axis.style("opacity", opacity);
11720
- axis.create(transitions["axis" + capitalize(id)]);
11720
+ axis.create(transitions["axis".concat(capitalize(id))]);
11721
11721
  }
11722
11722
  });
11723
11723
  this.updateAxes();
@@ -11758,8 +11758,8 @@ var Axis = /** @class */ (function () {
11758
11758
  ["y", "y2"].forEach(function (key) {
11759
11759
  var axisScale = scale[key];
11760
11760
  if (axisScale) {
11761
- var tickValues = config["axis_" + key + "_tick_values"];
11762
- var tickCount = config["axis_" + key + "_tick_count"];
11761
+ var tickValues = config["axis_".concat(key, "_tick_values")];
11762
+ var tickCount = config["axis_".concat(key, "_tick_count")];
11763
11763
  axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
11764
11764
  if (!tickValues && tickCount) {
11765
11765
  var axis = $$.axis[key];
@@ -11793,12 +11793,12 @@ var Axis = /** @class */ (function () {
11793
11793
  var axis = $el.axis[type];
11794
11794
  // subchart x axis should be aligned with x axis culling
11795
11795
  var id = type === "subX" ? "x" : type;
11796
- var toCull = config["axis_" + id + "_tick_culling"];
11796
+ var toCull = config["axis_".concat(id, "_tick_culling")];
11797
11797
  if (axis && toCull) {
11798
11798
  var tickText = axis.selectAll(".tick text");
11799
11799
  var tickValues_1 = sortValue(tickText.data());
11800
11800
  var tickSize = tickValues_1.length;
11801
- var cullingMax = config["axis_" + id + "_tick_culling_max"];
11801
+ var cullingMax = config["axis_".concat(id, "_tick_culling_max")];
11802
11802
  var intervalForCulling_1;
11803
11803
  if (tickSize) {
11804
11804
  for (var i = 1; i < tickSize; i++) {
@@ -11817,7 +11817,7 @@ var Axis = /** @class */ (function () {
11817
11817
  // set/unset x_axis_tick_clippath
11818
11818
  if (type === "x") {
11819
11819
  var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
11820
- $el.svg.selectAll("." + CLASS.axisX + " .tick text")
11820
+ $el.svg.selectAll(".".concat(CLASS.axisX, " .tick text"))
11821
11821
  .attr("clip-path", clipPath);
11822
11822
  }
11823
11823
  }
@@ -11838,7 +11838,7 @@ var eventrect = {
11838
11838
  */
11839
11839
  initEventRect: function () {
11840
11840
  var $$ = this;
11841
- $$.$el.main.select("." + CLASS.chart)
11841
+ $$.$el.main.select(".".concat(CLASS.chart))
11842
11842
  .append("g")
11843
11843
  .attr("class", CLASS.eventRects)
11844
11844
  .style("fill-opacity", "0");
@@ -11856,12 +11856,12 @@ var eventrect = {
11856
11856
  $$.updateEventRect($el.eventRect, true);
11857
11857
  }
11858
11858
  else {
11859
- var eventRects = $$.$el.main.select("." + CLASS.eventRects)
11859
+ var eventRects = $$.$el.main.select(".".concat(CLASS.eventRects))
11860
11860
  .style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? (config.axis_rotated ? "ns-resize" : "ew-resize") : null)
11861
11861
  .classed(CLASS.eventRectsMultiple, isMultipleX)
11862
11862
  .classed(CLASS.eventRectsSingle, !isMultipleX);
11863
11863
  // append event <rect>
11864
- var eventRectUpdate = eventRects.selectAll("." + CLASS.eventRect)
11864
+ var eventRectUpdate = eventRects.selectAll(".".concat(CLASS.eventRect))
11865
11865
  .data([0])
11866
11866
  .enter()
11867
11867
  .append("rect");
@@ -11916,7 +11916,7 @@ var eventrect = {
11916
11916
  var preventEvent = function (event) {
11917
11917
  var eventType = event.type;
11918
11918
  var touch = event.changedTouches[0];
11919
- var currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")];
11919
+ var currentXY = touch["client".concat(config.axis_rotated ? "Y" : "X")];
11920
11920
  // prevent document scrolling
11921
11921
  if (eventType === "touchstart") {
11922
11922
  if (isPrevented) {
@@ -12105,7 +12105,7 @@ var eventrect = {
12105
12105
  $$.showGridFocus(selectedData);
12106
12106
  // Show cursor as pointer if point is close to mouse position
12107
12107
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
12108
- $$.$el.svg.select("." + CLASS.eventRect).style("cursor", "pointer");
12108
+ $$.$el.svg.select(".".concat(CLASS.eventRect)).style("cursor", "pointer");
12109
12109
  if (!state.mouseover) {
12110
12110
  config.data_onover.call($$.api, closest);
12111
12111
  state.mouseover = closest;
@@ -12119,7 +12119,7 @@ var eventrect = {
12119
12119
  unselectRect: function () {
12120
12120
  var $$ = this;
12121
12121
  var config = $$.config, _a = $$.$el, circle = _a.circle, tooltip = _a.tooltip;
12122
- $$.$el.svg.select("." + CLASS.eventRect).style("cursor", null);
12122
+ $$.$el.svg.select(".".concat(CLASS.eventRect)).style("cursor", null);
12123
12123
  $$.hideGridFocus();
12124
12124
  if (tooltip) {
12125
12125
  $$.hideTooltip();
@@ -12161,12 +12161,28 @@ var eventrect = {
12161
12161
  .on("mousemove", function (event) {
12162
12162
  var d = getData_1(event);
12163
12163
  state.event = event;
12164
+ if (!d) {
12165
+ return;
12166
+ }
12167
+ var index = d.index;
12168
+ var stepType = config.line_step_type;
12169
+ // tooltip position match for step-before & step-after
12170
+ if (config.line_step_tooltipMatch && $$.hasType("step") && /^step\-(before|after)$/.test(stepType)) {
12171
+ var scale = $$.scale.zoom || $$.scale.x;
12172
+ var xs = $$.axis.xs[index];
12173
+ var inverted = scale.invert(getPointer(event, this)[0]);
12174
+ if (stepType === "step-after" && inverted < xs) {
12175
+ index -= 1;
12176
+ }
12177
+ else if (stepType === "step-before" && inverted > xs) {
12178
+ index += 1;
12179
+ }
12180
+ }
12164
12181
  // do nothing while dragging/flowing
12165
12182
  if (state.dragging || state.flowing || $$.hasArcType() ||
12166
- !d || (config.tooltip_grouped && d && d.index === eventReceiver.currentIdx)) {
12183
+ (config.tooltip_grouped && index === eventReceiver.currentIdx)) {
12167
12184
  return;
12168
12185
  }
12169
- var index = d.index;
12170
12186
  if (index !== eventReceiver.currentIdx) {
12171
12187
  $$.setOverOut(false, eventReceiver.currentIdx);
12172
12188
  eventReceiver.currentIdx = index;
@@ -12199,7 +12215,7 @@ var eventrect = {
12199
12215
  return;
12200
12216
  }
12201
12217
  var index = d.index;
12202
- main.selectAll("." + CLASS.shape + "-" + index)
12218
+ main.selectAll(".".concat(CLASS.shape, "-").concat(index))
12203
12219
  .each(function (d2) {
12204
12220
  var _a;
12205
12221
  if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
@@ -12252,8 +12268,8 @@ var eventrect = {
12252
12268
  }
12253
12269
  // select if selection enabled
12254
12270
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
12255
- $$.$el.main.selectAll("." + CLASS.shapes + $$.getTargetSelectorSuffix(closest.id))
12256
- .selectAll("." + CLASS.shape + "-" + closest.index)
12271
+ $$.$el.main.selectAll(".".concat(CLASS.shapes).concat($$.getTargetSelectorSuffix(closest.id)))
12272
+ .selectAll(".".concat(CLASS.shape, "-").concat(closest.index))
12257
12273
  .each(function () {
12258
12274
  var _a;
12259
12275
  if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
@@ -12362,13 +12378,13 @@ var flow = {
12362
12378
  ["circle", "text", "shape", "eventRect"].forEach(function (v) {
12363
12379
  var target = [];
12364
12380
  for (var i = 0; i < flowLength; i++) {
12365
- target.push("." + CLASS[v] + "-" + i);
12381
+ target.push(".".concat(CLASS[v], "-").concat(i));
12366
12382
  }
12367
- svg.selectAll("." + CLASS[v + "s"]) // circles, shapes, texts, eventRects
12383
+ svg.selectAll(".".concat(CLASS["".concat(v, "s")])) // circles, shapes, texts, eventRects
12368
12384
  .selectAll(target)
12369
12385
  .remove();
12370
12386
  });
12371
- svg.select("." + CLASS.xgrid)
12387
+ svg.select(".".concat(CLASS.xgrid))
12372
12388
  .remove();
12373
12389
  }
12374
12390
  // draw again for removing flowed elements and reverting attr
@@ -12467,7 +12483,7 @@ var flow = {
12467
12483
  x(flowStart.x) - x(flowEnd.x);
12468
12484
  }
12469
12485
  var scaleX = (diffDomain(orgDomain) / diffDomain(domain));
12470
- return "translate(" + translateX + ",0) scale(" + scaleX + ",1)";
12486
+ return "translate(".concat(translateX, ",0) scale(").concat(scaleX, ",1)");
12471
12487
  }
12472
12488
  };
12473
12489
 
@@ -12480,10 +12496,10 @@ var clip = {
12480
12496
  var $$ = this;
12481
12497
  var clip = $$.state.clip;
12482
12498
  // MEMO: clipId needs to be unique because it conflicts when multiple charts exist
12483
- clip.id = $$.state.datetimeId + "-clip";
12484
- clip.idXAxis = clip.id + "-xaxis";
12485
- clip.idYAxis = clip.id + "-yaxis";
12486
- clip.idGrid = clip.id + "-grid";
12499
+ clip.id = "".concat($$.state.datetimeId, "-clip");
12500
+ clip.idXAxis = "".concat(clip.id, "-xaxis");
12501
+ clip.idYAxis = "".concat(clip.id, "-yaxis");
12502
+ clip.idGrid = "".concat(clip.id, "-grid");
12487
12503
  // Define 'clip-path' attribute values
12488
12504
  clip.path = $$.getClipPath(clip.id);
12489
12505
  clip.pathXAxis = $$.getClipPath(clip.idXAxis);
@@ -12501,7 +12517,7 @@ var clip = {
12501
12517
  var isIE9 = win.navigator ?
12502
12518
  win.navigator.appVersion
12503
12519
  .toLowerCase().indexOf("msie 9.") >= 0 : false;
12504
- return "url(" + (isIE9 ? "" : doc.URL.split("#")[0]) + "#" + id + ")";
12520
+ return "url(".concat((isIE9 ? "" : doc.URL.split("#")[0]), "#").concat(id, ")");
12505
12521
  },
12506
12522
  appendClip: function (parent, id) {
12507
12523
  id && parent.append("clipPath")
@@ -12555,7 +12571,7 @@ var clip = {
12555
12571
  var config = $$.config, _a = $$.state, clip = _a.clip, xAxisHeight = _a.xAxisHeight, defs = $$.$el.defs;
12556
12572
  var newXAxisHeight = $$.getHorizontalAxisHeight("x");
12557
12573
  if (defs && !clip.idXAxisTickTexts) {
12558
- var clipId = clip.id + "-xaxisticktexts";
12574
+ var clipId = "".concat(clip.id, "-xaxisticktexts");
12559
12575
  $$.appendClip(defs, clipId);
12560
12576
  clip.pathXAxisTickTexts = $$.getClipPath(clip.idXAxisTickTexts);
12561
12577
  clip.idXAxisTickTexts = clipId;
@@ -12584,7 +12600,7 @@ var clip = {
12584
12600
  var $$ = this;
12585
12601
  var _a = $$.state, clip = _a.clip, current = _a.current, svg = $$.$el.svg;
12586
12602
  if (svg) {
12587
- svg.select("#" + clip.idXAxisTickTexts + " rect")
12603
+ svg.select("#".concat(clip.idXAxisTickTexts, " rect"))
12588
12604
  .attr("width", current.maxTickWidths.x.clipPath)
12589
12605
  .attr("height", 30);
12590
12606
  }
@@ -12637,7 +12653,7 @@ var grid = {
12637
12653
  hasGrid: function () {
12638
12654
  var config = this.config;
12639
12655
  return ["x", "y"]
12640
- .some(function (v) { return config["grid_" + v + "_show"] || config["grid_" + v + "_lines"].length; });
12656
+ .some(function (v) { return config["grid_".concat(v, "_show")] || config["grid_".concat(v, "_lines")].length; });
12641
12657
  },
12642
12658
  initGrid: function () {
12643
12659
  var $$ = this;
@@ -12648,9 +12664,9 @@ var grid = {
12648
12664
  var $$ = this;
12649
12665
  var config = $$.config, clip = $$.state.clip, $el = $$.$el;
12650
12666
  if (config.grid_x_lines.length || config.grid_y_lines.length) {
12651
- $el.gridLines.main = $el.main.insert("g", "." + CLASS.chart + (config.grid_lines_front ? " + *" : ""))
12667
+ $el.gridLines.main = $el.main.insert("g", ".".concat(CLASS.chart).concat(config.grid_lines_front ? " + *" : ""))
12652
12668
  .attr("clip-path", clip.pathGrid)
12653
- .attr("class", CLASS.grid + " " + CLASS.gridLines);
12669
+ .attr("class", "".concat(CLASS.grid, " ").concat(CLASS.gridLines));
12654
12670
  $el.gridLines.main.append("g").attr("class", CLASS.xgridLines);
12655
12671
  $el.gridLines.main.append("g").attr("class", CLASS.ygridLines);
12656
12672
  $el.gridLines.x = selectAll([]);
@@ -12674,8 +12690,8 @@ var grid = {
12674
12690
  "y1": 0,
12675
12691
  "y2": state.height
12676
12692
  };
12677
- grid.x = main.select("." + CLASS.xgrids)
12678
- .selectAll("." + CLASS.xgrid)
12693
+ grid.x = main.select(".".concat(CLASS.xgrids))
12694
+ .selectAll(".".concat(CLASS.xgrid))
12679
12695
  .data(xgridData);
12680
12696
  grid.x.exit().remove();
12681
12697
  grid.x = grid.x.enter()
@@ -12699,8 +12715,8 @@ var grid = {
12699
12715
  var isRotated = config.axis_rotated;
12700
12716
  var gridValues = $$.axis.y.tickValues() || $$.scale.y.ticks(config.grid_y_ticks);
12701
12717
  var pos = function (d) { return Math.ceil($$.scale.y(d)); };
12702
- grid.y = main.select("." + CLASS.ygrids)
12703
- .selectAll("." + CLASS.ygrid)
12718
+ grid.y = main.select(".".concat(CLASS.ygrids))
12719
+ .selectAll(".".concat(CLASS.ygrid))
12704
12720
  .data(gridValues);
12705
12721
  grid.y.exit().remove();
12706
12722
  grid.y = grid.y
@@ -12733,8 +12749,8 @@ var grid = {
12733
12749
  var config = $$.config, _a = $$.$el, gridLines = _a.gridLines, main = _a.main, $T = $$.$T;
12734
12750
  var isRotated = config.axis_rotated;
12735
12751
  config.grid_x_show && $$.updateXGrid();
12736
- var xLines = main.select("." + CLASS.xgridLines)
12737
- .selectAll("." + CLASS.xgridLine)
12752
+ var xLines = main.select(".".concat(CLASS.xgridLines))
12753
+ .selectAll(".".concat(CLASS.xgridLine))
12738
12754
  .data(config.grid_x_lines);
12739
12755
  // exit
12740
12756
  $T(xLines.exit())
@@ -12750,7 +12766,7 @@ var grid = {
12750
12766
  .style("opacity", "0");
12751
12767
  xLines = xgridLine.merge(xLines);
12752
12768
  $T(xLines
12753
- .attr("class", function (d) { return (CLASS.xgridLine + " " + (d["class"] || "")).trim(); })
12769
+ .attr("class", function (d) { return "".concat(CLASS.xgridLine, " ").concat(d["class"] || "").trim(); })
12754
12770
  .select("text")
12755
12771
  .attr("text-anchor", getGridTextAnchor)
12756
12772
  .attr("dx", getGridTextDx))
@@ -12767,8 +12783,8 @@ var grid = {
12767
12783
  var config = $$.config, _a = $$.state, width = _a.width, height = _a.height, $el = $$.$el, $T = $$.$T;
12768
12784
  var isRotated = config.axis_rotated;
12769
12785
  config.grid_y_show && $$.updateYGrid();
12770
- var ygridLines = $el.main.select("." + CLASS.ygridLines)
12771
- .selectAll("." + CLASS.ygridLine)
12786
+ var ygridLines = $el.main.select(".".concat(CLASS.ygridLines))
12787
+ .selectAll(".".concat(CLASS.ygridLine))
12772
12788
  .data(config.grid_y_lines);
12773
12789
  // exit
12774
12790
  $T(ygridLines.exit())
@@ -12785,7 +12801,7 @@ var grid = {
12785
12801
  // update
12786
12802
  var yv = $$.yv.bind($$);
12787
12803
  $T(ygridLines
12788
- .attr("class", function (d) { return (CLASS.ygridLine + " " + (d["class"] || "")).trim(); })
12804
+ .attr("class", function (d) { return "".concat(CLASS.ygridLine, " ").concat(d["class"] || "").trim(); })
12789
12805
  .select("line"))
12790
12806
  .attr("x1", isRotated ? yv : 0)
12791
12807
  .attr("x2", isRotated ? yv : width)
@@ -12826,7 +12842,7 @@ var grid = {
12826
12842
  var $$ = this;
12827
12843
  var config = $$.config, clip = $$.state.clip, $el = $$.$el;
12828
12844
  var isFront = config.grid_front;
12829
- var className = "." + CLASS[isFront && $el.gridLines.main ? "gridLines" : "chart"] + (isFront ? " + *" : "");
12845
+ var className = ".".concat(CLASS[isFront && $el.gridLines.main ? "gridLines" : "chart"]).concat(isFront ? " + *" : "");
12830
12846
  var grid = $el.main.insert("g", className)
12831
12847
  .attr("clip-path", clip.pathGrid)
12832
12848
  .attr("class", CLASS.grid);
@@ -12859,7 +12875,7 @@ var grid = {
12859
12875
  var $$ = this;
12860
12876
  var config = $$.config, _b = $$.state, width = _b.width, height = _b.height;
12861
12877
  var isRotated = config.axis_rotated;
12862
- var focusEl = $$.$el.main.selectAll("line." + CLASS.xgridFocus + ", line." + CLASS.ygridFocus);
12878
+ var focusEl = $$.$el.main.selectAll("line.".concat(CLASS.xgridFocus, ", line.").concat(CLASS.ygridFocus));
12863
12879
  var dataToShow = (data || [focusEl.datum()]).filter(function (d) { return d && isValue($$.getBaseValue(d)); });
12864
12880
  // Hide when bubble/scatter/stanford plot exists
12865
12881
  if (!config.tooltip_show || dataToShow.length === 0 || $$.hasType("bubble") || $$.hasArcType()) {
@@ -12918,7 +12934,7 @@ var grid = {
12918
12934
  var $$ = this;
12919
12935
  var _b = $$.state, inputType = _b.inputType, resizing = _b.resizing, main = $$.$el.main;
12920
12936
  if (inputType === "mouse" || !resizing) {
12921
- main.selectAll("line." + CLASS.xgridFocus + ", line." + CLASS.ygridFocus)
12937
+ main.selectAll("line.".concat(CLASS.xgridFocus, ", line.").concat(CLASS.ygridFocus))
12922
12938
  .style("visibility", "hidden");
12923
12939
  (_a = $$.hideCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$);
12924
12940
  }
@@ -12927,7 +12943,7 @@ var grid = {
12927
12943
  var _a;
12928
12944
  var $$ = this;
12929
12945
  var _b = $$.state, inputType = _b.inputType, width = _b.width, height = _b.height, resizing = _b.resizing, grid = $$.$el.grid;
12930
- var xgridFocus = grid.main.select("line." + CLASS.xgridFocus);
12946
+ var xgridFocus = grid.main.select("line.".concat(CLASS.xgridFocus));
12931
12947
  if (inputType === "touch") {
12932
12948
  if (xgridFocus.empty()) {
12933
12949
  resizing && ((_a = $$.showCircleFocus) === null || _a === void 0 ? void 0 : _a.call($$));
@@ -12950,7 +12966,7 @@ var grid = {
12950
12966
  },
12951
12967
  generateGridData: function (type, scale) {
12952
12968
  var $$ = this;
12953
- var tickNum = $$.$el.main.select("." + CLASS.axisX)
12969
+ var tickNum = $$.$el.main.select(".".concat(CLASS.axisX))
12954
12970
  .selectAll(".tick")
12955
12971
  .size();
12956
12972
  var gridData = [];
@@ -12958,7 +12974,7 @@ var grid = {
12958
12974
  var xDomain = $$.getXDomain();
12959
12975
  var _a = xDomain.map(function (v) { return v.getFullYear(); }), firstYear = _a[0], lastYear = _a[1];
12960
12976
  for (var i = firstYear; i <= lastYear; i++) {
12961
- gridData.push(new Date(i + "-01-01 00:00:00"));
12977
+ gridData.push(new Date("".concat(i, "-01-01 00:00:00")));
12962
12978
  }
12963
12979
  }
12964
12980
  else {
@@ -12987,12 +13003,12 @@ var grid = {
12987
13003
  var toShow = function (line) { return !toRemove(line); };
12988
13004
  var classLines = forX ? CLASS.xgridLines : CLASS.ygridLines;
12989
13005
  var classLine = forX ? CLASS.xgridLine : CLASS.ygridLine;
12990
- $T($$.$el.main.select("." + classLines)
12991
- .selectAll("." + classLine)
13006
+ $T($$.$el.main.select(".".concat(classLines))
13007
+ .selectAll(".".concat(classLine))
12992
13008
  .filter(toRemove))
12993
13009
  .style("opacity", "0")
12994
13010
  .remove();
12995
- var gridLines = "grid_" + (forX ? "x" : "y") + "_lines";
13011
+ var gridLines = "grid_".concat(forX ? "x" : "y", "_lines");
12996
13012
  config[gridLines] = config[gridLines].filter(toShow);
12997
13013
  }
12998
13014
  };
@@ -13020,7 +13036,7 @@ var region = {
13020
13036
  region.main.style("visibility", $$.hasArcType() ? "hidden" : null);
13021
13037
  // select <g> element
13022
13038
  var list = region.main
13023
- .selectAll("." + CLASS.region)
13039
+ .selectAll(".".concat(CLASS.region))
13024
13040
  .data(config.regions);
13025
13041
  $T(list.exit())
13026
13042
  .style("opacity", "0")
@@ -13192,7 +13208,7 @@ var sizeAxis = {
13192
13208
  getAxisTickRotate: function (id) {
13193
13209
  var $$ = this;
13194
13210
  var axis = $$.axis, config = $$.config, state = $$.state, $el = $$.$el;
13195
- var rotate = config["axis_" + id + "_tick_rotate"];
13211
+ var rotate = config["axis_".concat(id, "_tick_rotate")];
13196
13212
  if (id === "x") {
13197
13213
  var allowedXAxisTypes = axis.isCategorized() || axis.isTimeSeries();
13198
13214
  if (config.axis_x_tick_fit && allowedXAxisTypes) {
@@ -15043,9 +15059,9 @@ var shapeArc = {
15043
15059
  var config = $$.config;
15044
15060
  var dataType = config.data_type;
15045
15061
  var padding = config.pie_padding;
15046
- var startingAngle = config[dataType + "_startingAngle"] || 0;
15062
+ var startingAngle = config["".concat(dataType, "_startingAngle")] || 0;
15047
15063
  var padAngle = ($$.hasType("pie") && padding ? padding * 0.01 :
15048
- config[dataType + "_padAngle"]) || 0;
15064
+ config["".concat(dataType, "_padAngle")]) || 0;
15049
15065
  $$.pie = pie$1()
15050
15066
  .startAngle(startingAngle)
15051
15067
  .endAngle(startingAngle + (2 * Math.PI))
@@ -15252,7 +15268,7 @@ var shapeArc = {
15252
15268
  var y1 = Math.sin(updated.endAngle - Math.PI / 2);
15253
15269
  var x = Math.cos(updated.endAngle - Math.PI / 2) * (radiusExpanded + 25);
15254
15270
  var y = y1 * (radiusExpanded + 15 - Math.abs(y1 * 10)) + 3;
15255
- translate = "translate(" + x + "," + y + ")";
15271
+ translate = "translate(".concat(x, ",").concat(y, ")");
15256
15272
  }
15257
15273
  else if (!$$.hasType("gauge") || $$.data.targets.length > 1) {
15258
15274
  var outerRadius = $$.getRadius(d).outerRadius;
@@ -15267,7 +15283,7 @@ var shapeArc = {
15267
15283
  else {
15268
15284
  ratio = outerRadius && (h ? (36 / outerRadius > 0.375 ? 1.175 - 36 / outerRadius : 0.8) * outerRadius / h : 0);
15269
15285
  }
15270
- translate = "translate(" + x * ratio + "," + y * ratio + ")";
15286
+ translate = "translate(".concat(x * ratio, ",").concat(y * ratio, ")");
15271
15287
  }
15272
15288
  }
15273
15289
  return translate;
@@ -15311,14 +15327,14 @@ var shapeArc = {
15311
15327
  var interval_1 = setInterval(function () {
15312
15328
  if (!transiting) {
15313
15329
  clearInterval(interval_1);
15314
- $el.legend.selectAll("." + CLASS.legendItemFocused).size() > 0 &&
15330
+ $el.legend.selectAll(".".concat(CLASS.legendItemFocused)).size() > 0 &&
15315
15331
  $$.expandArc(targetIds);
15316
15332
  }
15317
15333
  }, 10);
15318
15334
  return;
15319
15335
  }
15320
15336
  var newTargetIds = $$.mapToTargetIds(targetIds);
15321
- $el.svg.selectAll($$.selectorTargets(newTargetIds, "." + CLASS.chartArc))
15337
+ $el.svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(CLASS.chartArc)))
15322
15338
  .each(function (d) {
15323
15339
  if (!$$.shouldExpand(d.data.id)) {
15324
15340
  return;
@@ -15341,12 +15357,12 @@ var shapeArc = {
15341
15357
  return;
15342
15358
  }
15343
15359
  var newTargetIds = $$.mapToTargetIds(targetIds);
15344
- svg.selectAll($$.selectorTargets(newTargetIds, "." + CLASS.chartArc))
15360
+ svg.selectAll($$.selectorTargets(newTargetIds, ".".concat(CLASS.chartArc)))
15345
15361
  .selectAll("path")
15346
15362
  .transition()
15347
15363
  .duration(function (d) { return $$.getExpandConfig(d.data.id, "duration"); })
15348
15364
  .attr("d", $$.svgArc);
15349
- svg.selectAll("" + CLASS.arc)
15365
+ svg.selectAll("".concat(CLASS.arc))
15350
15366
  .style("opacity", null);
15351
15367
  },
15352
15368
  /**
@@ -15373,7 +15389,7 @@ var shapeArc = {
15373
15389
  else if ($$.isPieType(id)) {
15374
15390
  type = "pie";
15375
15391
  }
15376
- return type ? config[type + "_expand_" + key] : def[key];
15392
+ return type ? config["".concat(type, "_expand_").concat(key)] : def[key];
15377
15393
  },
15378
15394
  shouldExpand: function (id) {
15379
15395
  var $$ = this;
@@ -15386,7 +15402,7 @@ var shapeArc = {
15386
15402
  var $$ = this;
15387
15403
  var config = $$.config;
15388
15404
  return ["pie", "donut", "gauge"]
15389
- .some(function (v) { return $$.hasType(v) && config[v + "_label_show"]; });
15405
+ .some(function (v) { return $$.hasType(v) && config["".concat(v, "_label_show")]; });
15390
15406
  },
15391
15407
  getArcLabelFormat: function () {
15392
15408
  var $$ = this;
@@ -15403,7 +15419,7 @@ var shapeArc = {
15403
15419
  getArcTitle: function () {
15404
15420
  var $$ = this;
15405
15421
  var type = ($$.hasType("donut") && "donut") || ($$.hasType("gauge") && "gauge");
15406
- return type ? $$.config[type + "_title"] : "";
15422
+ return type ? $$.config["".concat(type, "_title")] : "";
15407
15423
  },
15408
15424
  updateTargetsForArc: function (targets) {
15409
15425
  var $$ = this;
@@ -15412,9 +15428,9 @@ var shapeArc = {
15412
15428
  var classChartArc = $$.getChartClass("Arc");
15413
15429
  var classArcs = $$.getClass("arcs", true);
15414
15430
  var classFocus = $$.classFocus.bind($$);
15415
- var chartArcs = $el.main.select("." + CLASS.chartArcs);
15431
+ var chartArcs = $el.main.select(".".concat(CLASS.chartArcs));
15416
15432
  var mainPieUpdate = chartArcs
15417
- .selectAll("." + CLASS.chartArc)
15433
+ .selectAll(".".concat(CLASS.chartArc))
15418
15434
  .data($$.pie(targets))
15419
15435
  .attr("class", function (d) { return classChartArc(d) + classFocus(d.data); });
15420
15436
  var mainPieEnter = mainPieUpdate.enter().append("g")
@@ -15427,14 +15443,14 @@ var shapeArc = {
15427
15443
  .style("opacity", "0")
15428
15444
  .style("text-anchor", "middle")
15429
15445
  .style("pointer-events", "none");
15430
- $el.text = chartArcs.selectAll("." + CLASS.target + " text");
15446
+ $el.text = chartArcs.selectAll(".".concat(CLASS.target, " text"));
15431
15447
  // MEMO: can not keep same color..., but not bad to update color in redraw
15432
15448
  // mainPieUpdate.exit().remove();
15433
15449
  },
15434
15450
  initArc: function () {
15435
15451
  var $$ = this;
15436
15452
  var $el = $$.$el;
15437
- $el.arcs = $el.main.select("." + CLASS.chart)
15453
+ $el.arcs = $el.main.select(".".concat(CLASS.chart))
15438
15454
  .append("g")
15439
15455
  .attr("class", CLASS.chartArcs)
15440
15456
  .attr("transform", $$.getTranslate("arc"));
@@ -15452,11 +15468,7 @@ var shapeArc = {
15452
15468
  var text = $$.$el.arcs.append("text")
15453
15469
  .attr("class", CLASS[hasGauge ? "chartArcsGaugeTitle" : "chartArcsTitle"])
15454
15470
  .style("text-anchor", "middle");
15455
- if (hasGauge) {
15456
- text
15457
- .attr("dy", "-0.3em")
15458
- .style("font-size", "27px");
15459
- }
15471
+ hasGauge && text.attr("dy", "-0.3em");
15460
15472
  setTextValue(text, title, hasGauge ? undefined : [-0.6, 1.35], true);
15461
15473
  }
15462
15474
  },
@@ -15465,8 +15477,8 @@ var shapeArc = {
15465
15477
  var config = $$.config, state = $$.state, main = $$.$el.main;
15466
15478
  var hasInteraction = config.interaction_enabled;
15467
15479
  var isSelectable = hasInteraction && config.data_selection_isselectable;
15468
- var mainArc = main.selectAll("." + CLASS.arcs)
15469
- .selectAll("." + CLASS.arc)
15480
+ var mainArc = main.selectAll(".".concat(CLASS.arcs))
15481
+ .selectAll(".".concat(CLASS.arc))
15470
15482
  .data($$.arcData.bind($$));
15471
15483
  mainArc.exit()
15472
15484
  .transition()
@@ -15476,7 +15488,7 @@ var shapeArc = {
15476
15488
  mainArc = mainArc.enter().append("path")
15477
15489
  .attr("class", $$.getClass("arc", true))
15478
15490
  .style("fill", function (d) { return $$.color(d.data); })
15479
- .style("cursor", function (d) { return ((isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind($$.api)(d)) ? "pointer" : null); })
15491
+ .style("cursor", function (d) { var _a; return (((_a = isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind) === null || _a === void 0 ? void 0 : _a.call(isSelectable, $$.api)(d)) ? "pointer" : null); })
15480
15492
  .style("opacity", "0")
15481
15493
  .each(function (d) {
15482
15494
  if ($$.isGaugeType(d.data)) {
@@ -15555,15 +15567,15 @@ var shapeArc = {
15555
15567
  var isFullCircle = config.gauge_fullCircle;
15556
15568
  var startAngle = $$.getStartAngle();
15557
15569
  var endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1;
15558
- var backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + CLASS.chartArcsBackground);
15570
+ var backgroundArc = $$.$el.arcs.select("".concat(hasMultiArcGauge ? "g" : "", ".").concat(CLASS.chartArcsBackground));
15559
15571
  if (hasMultiArcGauge) {
15560
15572
  var index_1 = 0;
15561
15573
  backgroundArc = backgroundArc
15562
- .selectAll("path." + CLASS.chartArcsBackground)
15574
+ .selectAll("path.".concat(CLASS.chartArcsBackground))
15563
15575
  .data($$.data.targets);
15564
15576
  backgroundArc.enter()
15565
15577
  .append("path")
15566
- .attr("class", function (d, i) { return CLASS.chartArcsBackground + " " + CLASS.chartArcsBackground + "-" + i; })
15578
+ .attr("class", function (d, i) { return "".concat(CLASS.chartArcsBackground, " ").concat(CLASS.chartArcsBackground, "-").concat(i); })
15567
15579
  .merge(backgroundArc)
15568
15580
  .style("fill", (config.gauge_background) || null)
15569
15581
  .attr("d", function (_a) {
@@ -15686,35 +15698,35 @@ var shapeArc = {
15686
15698
  var text;
15687
15699
  // for gauge type, update text when has no title & multi data
15688
15700
  if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
15689
- text = main.selectAll("." + CLASS.chartArc)
15701
+ text = main.selectAll(".".concat(CLASS.chartArc))
15690
15702
  .select("text")
15691
15703
  .style("opacity", "0")
15692
15704
  .attr("class", function (d) { return ($$.isGaugeType(d.data) ? CLASS.gaugeValue : null); })
15693
15705
  .call($$.textForArcLabel.bind($$))
15694
15706
  .attr("transform", $$.transformForArcLabel.bind($$))
15695
15707
  .style("font-size", function (d) { return ($$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ?
15696
- Math.round(state.radius / 5) + "px" : null); })
15708
+ "".concat(Math.round(state.radius / 5), "px") : null); })
15697
15709
  .transition()
15698
15710
  .duration(duration)
15699
15711
  .style("opacity", function (d) { return ($$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0"); });
15700
15712
  hasMultiArcGauge && text.attr("dy", "-.1em");
15701
15713
  }
15702
- main.select("." + CLASS.chartArcsTitle)
15714
+ main.select(".".concat(CLASS.chartArcsTitle))
15703
15715
  .style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
15704
15716
  if (hasGauge) {
15705
15717
  var isFullCircle = config.gauge_fullCircle;
15706
- isFullCircle && (text === null || text === void 0 ? void 0 : text.attr("dy", "" + (hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
15718
+ isFullCircle && (text === null || text === void 0 ? void 0 : text.attr("dy", "".concat(hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
15707
15719
  if (config.gauge_label_show) {
15708
- arcs.select("." + CLASS.chartArcsGaugeUnit)
15709
- .attr("dy", (isFullCircle ? 1.5 : 0.75) + "em")
15720
+ arcs.select(".".concat(CLASS.chartArcsGaugeUnit))
15721
+ .attr("dy", "".concat(isFullCircle ? 1.5 : 0.75, "em"))
15710
15722
  .text(config.gauge_units);
15711
- arcs.select("." + CLASS.chartArcsGaugeMin)
15712
- .attr("dx", -1 * (state.innerRadius + ((state.radius - state.innerRadius) / (isFullCircle ? 1 : 2))) + "px")
15723
+ arcs.select(".".concat(CLASS.chartArcsGaugeMin))
15724
+ .attr("dx", "".concat(-1 * (state.innerRadius + ((state.radius - state.innerRadius) / (isFullCircle ? 1 : 2))), "px"))
15713
15725
  .attr("dy", "1.2em")
15714
15726
  .text($$.textForGaugeMinMax(config.gauge_min, false));
15715
15727
  // show max text when isn't fullCircle
15716
- !isFullCircle && arcs.select("." + CLASS.chartArcsGaugeMax)
15717
- .attr("dx", state.innerRadius + ((state.radius - state.innerRadius) / 2) + "px")
15728
+ !isFullCircle && arcs.select(".".concat(CLASS.chartArcsGaugeMax))
15729
+ .attr("dx", "".concat(state.innerRadius + ((state.radius - state.innerRadius) / 2), "px"))
15718
15730
  .attr("dy", "1.2em")
15719
15731
  .text($$.textForGaugeMinMax(config.gauge_max, true));
15720
15732
  }
@@ -15731,19 +15743,19 @@ var shapeArea = {
15731
15743
  var $$ = this;
15732
15744
  var config = $$.config;
15733
15745
  mainLine
15734
- .insert("g", "." + CLASS[config.area_front ? "circles" : "lines"])
15746
+ .insert("g", ".".concat(CLASS[config.area_front ? "circles" : "lines"]))
15735
15747
  .attr("class", $$.getClass("areas", true));
15736
15748
  },
15737
15749
  updateAreaGradient: function () {
15738
15750
  var $$ = this;
15739
15751
  var config = $$.config, datetimeId = $$.state.datetimeId, defs = $$.$el.defs;
15740
15752
  $$.data.targets.forEach(function (d) {
15741
- var id = datetimeId + "-areaGradient" + $$.getTargetSelectorSuffix(d.id);
15742
- if ($$.isAreaType(d) && defs.select("#" + id).empty()) {
15753
+ var id = "".concat(datetimeId, "-areaGradient").concat($$.getTargetSelectorSuffix(d.id));
15754
+ if ($$.isAreaType(d) && defs.select("#".concat(id)).empty()) {
15743
15755
  var color_1 = $$.color(d);
15744
15756
  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;
15745
15757
  var linearGradient_1 = defs.append("linearGradient")
15746
- .attr("id", "" + id)
15758
+ .attr("id", "".concat(id))
15747
15759
  .attr("x1", x[0])
15748
15760
  .attr("x2", x[1])
15749
15761
  .attr("y1", y[0])
@@ -15761,7 +15773,7 @@ var shapeArea = {
15761
15773
  updateAreaColor: function (d) {
15762
15774
  var $$ = this;
15763
15775
  return $$.config.area_linearGradient ?
15764
- "url(#" + $$.state.datetimeId + "-areaGradient" + $$.getTargetSelectorSuffix(d.id) + ")" :
15776
+ "url(#".concat($$.state.datetimeId, "-areaGradient").concat($$.getTargetSelectorSuffix(d.id), ")") :
15765
15777
  $$.color(d);
15766
15778
  },
15767
15779
  /**
@@ -15776,8 +15788,8 @@ var shapeArea = {
15776
15788
  var config = $$.config, state = $$.state, $el = $$.$el, $T = $$.$T;
15777
15789
  var $root = isSub ? $el.subchart : $el;
15778
15790
  config.area_linearGradient && $$.updateAreaGradient();
15779
- var area = $root.main.selectAll("." + CLASS.areas)
15780
- .selectAll("." + CLASS.area)
15791
+ var area = $root.main.selectAll(".".concat(CLASS.areas))
15792
+ .selectAll(".".concat(CLASS.area))
15781
15793
  .data($$.lineData.bind($$));
15782
15794
  $T(area.exit(), withTransition)
15783
15795
  .style("opacity", "0")
@@ -15862,7 +15874,7 @@ var shapeArea = {
15862
15874
  x0 = $$.scale.x(values[0].x);
15863
15875
  y0 = $$.getYScaleById(d.id)(values[0].value);
15864
15876
  }
15865
- path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
15877
+ path = isRotated ? "M ".concat(y0, " ").concat(x0) : "M ".concat(x0, " ").concat(y0);
15866
15878
  }
15867
15879
  return path || "M 0 0";
15868
15880
  };
@@ -15901,11 +15913,16 @@ var shapeArea = {
15901
15913
  */
15902
15914
  var shapeBar = {
15903
15915
  initBar: function () {
15904
- var $el = this.$el;
15905
- $el.bar = $el.main.select("." + CLASS.chart)
15916
+ var _a = this, $el = _a.$el, config = _a.config, clip = _a.state.clip;
15917
+ $el.bar = $el.main.select(".".concat(CLASS.chart))
15906
15918
  // should positioned at the beginning of the shape node to not overlap others
15907
15919
  .insert("g", ":first-child")
15908
15920
  .attr("class", CLASS.chartBars);
15921
+ // set clip-path attribute when condition meet
15922
+ // https://github.com/naver/billboard.js/issues/2421
15923
+ if (config.clipPath === false && (config.bar_radius || config.bar_radius_ratio)) {
15924
+ $el.bar.attr("clip-path", clip.pathXAxis.replace(/#[^)]*/, "#".concat(clip.id)));
15925
+ }
15909
15926
  },
15910
15927
  updateTargetsForBar: function (targets) {
15911
15928
  var $$ = this;
@@ -15917,8 +15934,8 @@ var shapeBar = {
15917
15934
  if (!$el.bar) {
15918
15935
  $$.initBar();
15919
15936
  }
15920
- var mainBarUpdate = $$.$el.main.select("." + CLASS.chartBars)
15921
- .selectAll("." + CLASS.chartBar)
15937
+ var mainBarUpdate = $$.$el.main.select(".".concat(CLASS.chartBars))
15938
+ .selectAll(".".concat(CLASS.chartBar))
15922
15939
  .data(
15923
15940
  // remove
15924
15941
  targets.filter(function (v) { return !v.values.every(function (d) { return !isNumber(d.value); }); }))
@@ -15945,8 +15962,8 @@ var shapeBar = {
15945
15962
  var $root = isSub ? $el.subchart : $el;
15946
15963
  var classBar = $$.getClass("bar", true);
15947
15964
  var initialOpacity = $$.initialOpacity.bind($$);
15948
- var bar = $root.main.selectAll("." + CLASS.bars)
15949
- .selectAll("." + CLASS.bar)
15965
+ var bar = $root.main.selectAll(".".concat(CLASS.bars))
15966
+ .selectAll(".".concat(CLASS.bar))
15950
15967
  .data($$.labelishData.bind($$));
15951
15968
  $T(bar.exit(), withTransition)
15952
15969
  .style("opacity", "0")
@@ -15995,21 +16012,21 @@ var shapeBar = {
15995
16012
  var isNegative = d.value < 0;
15996
16013
  var pathRadius = ["", ""];
15997
16014
  var radius = 0;
15998
- if (getRadius && !isGrouped) {
16015
+ if (d.value !== 0 && getRadius && !isGrouped) {
15999
16016
  var index = isRotated ? indexY : indexX;
16000
16017
  var barW = points[2][index] - points[0][index];
16001
16018
  radius = getRadius(barW);
16002
- var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " ";
16003
- pathRadius[+!isRotated] = "" + arc + radius + "," + radius;
16004
- pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"]();
16019
+ var arc = "a".concat(radius, ",").concat(radius, " ").concat(isNegative ? "1 0 0" : "0 0 1", " ");
16020
+ pathRadius[+!isRotated] = "".concat(arc).concat(radius, ",").concat(radius);
16021
+ pathRadius[+isRotated] = "".concat(arc).concat([-radius, radius][isRotated ? "sort" : "reverse"]());
16005
16022
  isNegative && pathRadius.reverse();
16006
16023
  }
16007
16024
  // path string data shouldn't be containing new line chars
16008
16025
  // https://github.com/naver/billboard.js/issues/530
16009
16026
  var path = isRotated ?
16010
- "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] :
16011
- "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY];
16012
- return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z";
16027
+ "H".concat(points[1][indexX] - radius, " ").concat(pathRadius[0], "V").concat(points[2][indexY] - radius, " ").concat(pathRadius[1], "H").concat(points[3][indexX]) :
16028
+ "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]);
16029
+ return "M".concat(points[0][indexX], ",").concat(points[0][indexY]).concat(path, "z");
16013
16030
  };
16014
16031
  },
16015
16032
  generateGetBarPoints: function (barIndices, isSub) {
@@ -16066,7 +16083,7 @@ var shapeBar = {
16066
16083
  var shapeCandlestick = {
16067
16084
  initCandlestick: function () {
16068
16085
  var $el = this.$el;
16069
- $el.candlestick = $el.main.select("." + CLASS.chart)
16086
+ $el.candlestick = $el.main.select(".".concat(CLASS.chart))
16070
16087
  // should positioned at the beginning of the shape node to not overlap others
16071
16088
  .append("g")
16072
16089
  .attr("class", CLASS.chartCandlesticks);
@@ -16085,8 +16102,8 @@ var shapeCandlestick = {
16085
16102
  if (!$el.candlestick) {
16086
16103
  $$.initCandlestick();
16087
16104
  }
16088
- var mainUpdate = $$.$el.main.select("." + CLASS.chartCandlesticks)
16089
- .selectAll("." + CLASS.chartCandlestick)
16105
+ var mainUpdate = $$.$el.main.select(".".concat(CLASS.chartCandlesticks))
16106
+ .selectAll(".".concat(CLASS.chartCandlestick))
16090
16107
  .data(targets)
16091
16108
  .attr("class", function (d) { return classChart(d) + classFocus(d); });
16092
16109
  mainUpdate.enter().append("g")
@@ -16106,8 +16123,8 @@ var shapeCandlestick = {
16106
16123
  var $root = isSub ? $el.subchart : $el;
16107
16124
  var classSetter = $$.getClass("candlestick", true);
16108
16125
  var initialOpacity = $$.initialOpacity.bind($$);
16109
- var candlestick = $root.main.selectAll("." + CLASS.chartCandlestick)
16110
- .selectAll("." + CLASS.candlestick)
16126
+ var candlestick = $root.main.selectAll(".".concat(CLASS.chartCandlestick))
16127
+ .selectAll(".".concat(CLASS.candlestick))
16111
16128
  .data($$.labelishData.bind($$));
16112
16129
  $T(candlestick.exit(), withTransition)
16113
16130
  .style("opacity", "0")
@@ -16148,10 +16165,10 @@ var shapeCandlestick = {
16148
16165
  g.classed(CLASS[isUp ? "valueUp" : "valueDown"], true);
16149
16166
  }
16150
16167
  var path = isRotated ?
16151
- "H" + points[1][1] + " V" + points[1][0] + " H" + points[0][1] :
16152
- "V" + points[1][1] + " H" + points[1][0] + " V" + points[0][1];
16168
+ "H".concat(points[1][1], " V").concat(points[1][0], " H").concat(points[0][1]) :
16169
+ "V".concat(points[1][1], " H").concat(points[1][0], " V").concat(points[0][1]);
16153
16170
  g.select("path")
16154
- .attr("d", "M" + points[0][indexX] + "," + points[0][indexY] + path + "z")
16171
+ .attr("d", "M".concat(points[0][indexX], ",").concat(points[0][indexY]).concat(path, "z"))
16155
16172
  .style("fill", function (d) {
16156
16173
  var color = isUp ? $$.color(d) : (isObject(downColor) ? downColor[d.id] : downColor);
16157
16174
  return color || $$.color(d);
@@ -16320,12 +16337,12 @@ var shapeGauge = {
16320
16337
  var $$ = this;
16321
16338
  var config = $$.config, state = $$.state, $el = $$.$el;
16322
16339
  var hiddenTargetIds = $$.state.hiddenTargetIds;
16323
- var arcLabelLines = $el.main.selectAll("." + CLASS.arcs)
16324
- .selectAll("." + CLASS.arcLabelLine)
16340
+ var arcLabelLines = $el.main.selectAll(".".concat(CLASS.arcs))
16341
+ .selectAll(".".concat(CLASS.arcLabelLine))
16325
16342
  .data($$.arcData.bind($$));
16326
16343
  var mainArcLabelLine = arcLabelLines.enter()
16327
16344
  .append("rect")
16328
- .attr("class", function (d) { return CLASS.arcLabelLine + " " + CLASS.target + " " + CLASS.target + "-" + d.data.id; })
16345
+ .attr("class", function (d) { return "".concat(CLASS.arcLabelLine, " ").concat(CLASS.target, " ").concat(CLASS.target, "-").concat(d.data.id); })
16329
16346
  .merge(arcLabelLines);
16330
16347
  mainArcLabelLine
16331
16348
  .style("fill", function (d) { return ($$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data)); })
@@ -16346,7 +16363,7 @@ var shapeGauge = {
16346
16363
  lineLength = state.radiusExpanded - state.radius + innerLineLength;
16347
16364
  x = Math.cos(linePositioningAngle) * arcInnerRadius;
16348
16365
  y = Math.sin(linePositioningAngle) * arcInnerRadius;
16349
- transform = "rotate(" + lineAngle * 180 / Math.PI + ", " + x + ", " + y + ")";
16366
+ transform = "rotate(".concat(lineAngle * 180 / Math.PI, ", ").concat(x, ", ").concat(y, ")");
16350
16367
  }
16351
16368
  select(this)
16352
16369
  .attr("x", x)
@@ -16354,7 +16371,7 @@ var shapeGauge = {
16354
16371
  .attr("width", lineLength)
16355
16372
  .attr("height", lineThickness)
16356
16373
  .attr("transform", transform)
16357
- .style("stroke-dasharray", "0, " + (lineLength + lineThickness) + ", 0");
16374
+ .style("stroke-dasharray", "0, ".concat(lineLength + lineThickness, ", 0"));
16358
16375
  });
16359
16376
  },
16360
16377
  textForGaugeMinMax: function (value, isMax) {
@@ -16446,7 +16463,7 @@ var shapeBubble = {
16446
16463
  var shapeLine = {
16447
16464
  initLine: function () {
16448
16465
  var $el = this.$el;
16449
- $el.line = $el.main.select("." + CLASS.chart).append("g")
16466
+ $el.line = $el.main.select(".".concat(CLASS.chart)).append("g")
16450
16467
  .attr("class", CLASS.chartLines);
16451
16468
  },
16452
16469
  updateTargetsForLine: function (t) {
@@ -16459,8 +16476,8 @@ var shapeLine = {
16459
16476
  $$.initLine();
16460
16477
  }
16461
16478
  var targets = t.filter(function (d) { return !($$.isScatterType(d) || $$.isBubbleType(d)); });
16462
- var mainLineUpdate = main.select("." + CLASS.chartLines)
16463
- .selectAll("." + CLASS.chartLine)
16479
+ var mainLineUpdate = main.select(".".concat(CLASS.chartLines))
16480
+ .selectAll(".".concat(CLASS.chartLine))
16464
16481
  .data(targets)
16465
16482
  .attr("class", function (d) { return classChartLine(d) + classFocus(d); });
16466
16483
  var mainLineEnter = mainLineUpdate.enter().append("g")
@@ -16488,15 +16505,15 @@ var shapeLine = {
16488
16505
  var extraLineClasses = $$.format.extraLineClasses, $el = $$.$el, $T = $$.$T;
16489
16506
  var $root = isSub ? $el.subchart : $el;
16490
16507
  var line = $root.main
16491
- .selectAll("." + CLASS.lines)
16492
- .selectAll("." + CLASS.line)
16508
+ .selectAll(".".concat(CLASS.lines))
16509
+ .selectAll(".".concat(CLASS.line))
16493
16510
  .data($$.lineData.bind($$));
16494
16511
  $T(line.exit(), withTransition)
16495
16512
  .style("opacity", "0")
16496
16513
  .remove();
16497
16514
  $root.line = line.enter()
16498
16515
  .append("path")
16499
- .attr("class", function (d) { return $$.getClass("line", true)(d) + " " + (extraLineClasses(d) || ""); })
16516
+ .attr("class", function (d) { return "".concat($$.getClass("line", true)(d), " ").concat(extraLineClasses(d) || ""); })
16500
16517
  .style("stroke", $$.color)
16501
16518
  .merge(line)
16502
16519
  .style("opacity", $$.initialOpacity.bind($$))
@@ -16593,7 +16610,7 @@ var shapeLine = {
16593
16610
  x0 = x(values[0].x);
16594
16611
  y0 = y(values[0].value);
16595
16612
  }
16596
- path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
16613
+ path = isRotated ? "M ".concat(y0, " ").concat(x0) : "M ".concat(x0, " ").concat(y0);
16597
16614
  }
16598
16615
  return path || "M 0 0";
16599
16616
  };
@@ -16633,7 +16650,7 @@ var shapeLine = {
16633
16650
  var xValue = isRotated ? function (dt) { return y(dt.value); } : function (dt) { return x(dt.x); };
16634
16651
  var yValue = isRotated ? function (dt) { return x(dt.x); } : function (dt) { return y(dt.value); };
16635
16652
  // Define svg generator function for region
16636
- var generateM = function (points) { return "M" + points[0][0] + "," + points[0][1] + "L" + points[1][0] + "," + points[1][1]; };
16653
+ var generateM = function (points) { return "M".concat(points[0][0], ",").concat(points[0][1], "L").concat(points[1][0], ",").concat(points[1][1]); };
16637
16654
  var sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) {
16638
16655
  var x0 = d0.x.getTime();
16639
16656
  var xDiff = d1.x - d0.x;
@@ -16662,7 +16679,7 @@ var shapeLine = {
16662
16679
  }
16663
16680
  // Draw as normal
16664
16681
  if (isUndefined(regions) || !style || !hasPrevData) {
16665
- path += "" + (i && hasPrevData ? "L" : "M") + xValue(data) + "," + yValue(data);
16682
+ path += "".concat(i && hasPrevData ? "L" : "M").concat(xValue(data), ",").concat(yValue(data));
16666
16683
  }
16667
16684
  else if (hasPrevData) {
16668
16685
  try {
@@ -16734,8 +16751,8 @@ var shapePoint = {
16734
16751
  var $$ = this;
16735
16752
  var main = $$.$el.main;
16736
16753
  $$.point = $$.generatePoint();
16737
- if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." + CLASS.chartCircles).empty()) {
16738
- main.select("." + CLASS.chart)
16754
+ if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select(".".concat(CLASS.chartCircles)).empty()) {
16755
+ main.select(".".concat(CLASS.chart))
16739
16756
  .append("g")
16740
16757
  .attr("class", CLASS.chartCircles);
16741
16758
  }
@@ -16757,9 +16774,9 @@ var shapePoint = {
16757
16774
  if (!targets) {
16758
16775
  targets = (data.targets)
16759
16776
  .filter(function (d) { return _this.isScatterType(d) || _this.isBubbleType(d); });
16760
- var mainCircle = $el.main.select("." + CLASS.chartCircles)
16777
+ var mainCircle = $el.main.select(".".concat(CLASS.chartCircles))
16761
16778
  .style("pointer-events", "none")
16762
- .selectAll("." + CLASS.circles)
16779
+ .selectAll(".".concat(CLASS.circles))
16763
16780
  .data(targets)
16764
16781
  .attr("class", classCircles);
16765
16782
  mainCircle.exit().remove();
@@ -16773,8 +16790,8 @@ var shapePoint = {
16773
16790
  .style("cursor", function (d) { return (isFunction(isSelectable) && isSelectable(d) ? "pointer" : null); });
16774
16791
  // Update date for selected circles
16775
16792
  selectionEnabled && targets.forEach(function (t) {
16776
- $el.main.selectAll("." + CLASS.selectedCircles + $$.getTargetSelectorSuffix(t.id))
16777
- .selectAll("" + CLASS.selectedCircle)
16793
+ $el.main.selectAll(".".concat(CLASS.selectedCircles).concat($$.getTargetSelectorSuffix(t.id)))
16794
+ .selectAll("".concat(CLASS.selectedCircle))
16778
16795
  .each(function (d) {
16779
16796
  d.value = t.values[d.index].value;
16780
16797
  });
@@ -16787,8 +16804,8 @@ var shapePoint = {
16787
16804
  var focusOnly = config.point_focus_only;
16788
16805
  var $root = isSub ? $el.subchart : $el;
16789
16806
  if (config.point_show && !state.toggling) {
16790
- var circles = $root.main.selectAll("." + CLASS.circles)
16791
- .selectAll("." + CLASS.circle)
16807
+ var circles = $root.main.selectAll(".".concat(CLASS.circles))
16808
+ .selectAll(".".concat(CLASS.circle))
16792
16809
  .data(function (d) { return (($$.isLineType(d) && $$.shouldDrawPointsForLine(d)) ||
16793
16810
  $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ?
16794
16811
  (focusOnly ? [d.values[0]] : d.values) : []); });
@@ -16796,7 +16813,7 @@ var shapePoint = {
16796
16813
  circles.enter()
16797
16814
  .filter(Boolean)
16798
16815
  .append($$.point("create", this, $$.pointR.bind($$), $$.color));
16799
- $root.circle = $root.main.selectAll("." + CLASS.circles + " ." + CLASS.circle)
16816
+ $root.circle = $root.main.selectAll(".".concat(CLASS.circles, " .").concat(CLASS.circle))
16800
16817
  .style("stroke", $$.color)
16801
16818
  .style("opacity", $$.initialOpacityForCircle.bind($$));
16802
16819
  }
@@ -16806,7 +16823,7 @@ var shapePoint = {
16806
16823
  var $$ = this;
16807
16824
  var rendered = $$.state.rendered, $el = $$.$el, $T = $$.$T;
16808
16825
  var $root = isSub ? $el.subchart : $el;
16809
- var selectedCircles = $root.main.selectAll("." + CLASS.selectedCircle);
16826
+ var selectedCircles = $root.main.selectAll(".".concat(CLASS.selectedCircle));
16810
16827
  if (!$$.config.point_show) {
16811
16828
  return [];
16812
16829
  }
@@ -16824,8 +16841,8 @@ var shapePoint = {
16824
16841
  return [
16825
16842
  mainCircles,
16826
16843
  $T(selectedCircles, withTransition)
16827
- .attr(posAttr + "x", cx)
16828
- .attr(posAttr + "y", cy)
16844
+ .attr("".concat(posAttr, "x"), cx)
16845
+ .attr("".concat(posAttr, "y"), cy)
16829
16846
  ];
16830
16847
  },
16831
16848
  /**
@@ -16912,7 +16929,7 @@ var shapePoint = {
16912
16929
  var _a = this.getBBox(), width = _a.width, height = _a.height;
16913
16930
  var x = ratio * (+point.attr("x") + width / 2);
16914
16931
  var y = ratio * (+point.attr("y") + height / 2);
16915
- point.attr("transform", "translate(" + x + " " + y + ") scale(" + scale + ")");
16932
+ point.attr("transform", "translate(".concat(x, " ").concat(y, ") scale(").concat(scale, ")"));
16916
16933
  }
16917
16934
  });
16918
16935
  }
@@ -16927,7 +16944,7 @@ var shapePoint = {
16927
16944
  .classed(CLASS.EXPANDED, false);
16928
16945
  circles.attr("r", r);
16929
16946
  !$$.isCirclePoint() &&
16930
- circles.attr("transform", "scale(" + r(circles) / $$.config.point_r + ")");
16947
+ circles.attr("transform", "scale(".concat(r(circles) / $$.config.point_r, ")"));
16931
16948
  },
16932
16949
  pointR: function (d) {
16933
16950
  var $$ = this;
@@ -16959,8 +16976,8 @@ var shapePoint = {
16959
16976
  var mouse = getPointer(this.state.event, node);
16960
16977
  var element = select(node);
16961
16978
  var prefix = this.isCirclePoint(node) ? "c" : "";
16962
- var cx = +element.attr(prefix + "x");
16963
- var cy = +element.attr(prefix + "y");
16979
+ var cx = +element.attr("".concat(prefix, "x"));
16980
+ var cy = +element.attr("".concat(prefix, "y"));
16964
16981
  // if node don't have cx/y or x/y attribute value
16965
16982
  if (!(cx || cy) && node.nodeType === 1) {
16966
16983
  var _a = getBoundingRect(node), x = _a.x, y = _a.y;
@@ -17000,7 +17017,7 @@ var shapePoint = {
17000
17017
  $$.$el.defs.node().appendChild(clone);
17001
17018
  },
17002
17019
  pointFromDefs: function (id) {
17003
- return this.$el.defs.select("#" + id);
17020
+ return this.$el.defs.select("#".concat(id));
17004
17021
  },
17005
17022
  updatePointClass: function (d) {
17006
17023
  var $$ = this;
@@ -17011,7 +17028,7 @@ var shapePoint = {
17011
17028
  circle.each(function (d) {
17012
17029
  var className = $$.getClass("circle", true)(d);
17013
17030
  if (this.getAttribute("class").indexOf(CLASS.EXPANDED) > -1) {
17014
- className += " " + CLASS.EXPANDED;
17031
+ className += " ".concat(CLASS.EXPANDED);
17015
17032
  }
17016
17033
  this.setAttribute("class", className);
17017
17034
  }) : $$.getClass("circle", true)(d);
@@ -17064,7 +17081,7 @@ var shapePoint = {
17064
17081
  point = $$[point];
17065
17082
  }
17066
17083
  else if (!$$.hasValidPointDrawMethods(point)) {
17067
- var pointId = datetimeId + "-point" + id;
17084
+ var pointId = "".concat(datetimeId, "-point").concat(id);
17068
17085
  var pointFromDefs = $$.pointFromDefs(pointId);
17069
17086
  if (pointFromDefs.size() < 1) {
17070
17087
  $$.insertPointInfoDefs(point, pointId);
@@ -17083,7 +17100,7 @@ var shapePoint = {
17083
17100
  custom: {
17084
17101
  create: function (element, id, sizeFn, fillStyleFn) {
17085
17102
  return element.append("use")
17086
- .attr("xlink:href", "#" + id)
17103
+ .attr("xlink:href", "#".concat(id))
17087
17104
  .attr("class", this.updatePointClass.bind(this))
17088
17105
  .style("fill", fillStyleFn)
17089
17106
  .node();
@@ -17192,7 +17209,7 @@ var shapeRadar = {
17192
17209
  var $$ = this;
17193
17210
  var config = $$.config, current = $$.state.current, $el = $$.$el;
17194
17211
  if ($$.hasType("radar")) {
17195
- $el.radar = $el.main.select("." + CLASS.chart).append("g")
17212
+ $el.radar = $el.main.select(".".concat(CLASS.chart)).append("g")
17196
17213
  .attr("class", CLASS.chartRadars);
17197
17214
  // level
17198
17215
  $el.radar.levels = $el.radar.append("g")
@@ -17256,7 +17273,7 @@ var shapeRadar = {
17256
17273
  // Adjust radar, circles and texts' position
17257
17274
  if (translate) {
17258
17275
  radar.attr("transform", translate);
17259
- main.select("." + CLASS.chartTexts).attr("transform", translate);
17276
+ main.select(".".concat(CLASS.chartTexts)).attr("transform", translate);
17260
17277
  $$.generateRadarPoints();
17261
17278
  $$.updateRadarLevel();
17262
17279
  $$.updateRadarAxes();
@@ -17294,11 +17311,11 @@ var shapeRadar = {
17294
17311
  return pos.join(" ");
17295
17312
  });
17296
17313
  var level = radarLevels
17297
- .selectAll("." + CLASS.level)
17314
+ .selectAll(".".concat(CLASS.level))
17298
17315
  .data(levelData);
17299
17316
  level.exit().remove();
17300
17317
  var levelEnter = level.enter().append("g")
17301
- .attr("class", function (d, i) { return CLASS.level + " " + CLASS.level + "-" + i; });
17318
+ .attr("class", function (d, i) { return "".concat(CLASS.level, " ").concat(CLASS.level, "-").concat(i); });
17302
17319
  levelEnter.append("polygon")
17303
17320
  .style("visibility", config.radar_level_show ? null : "hidden");
17304
17321
  if (showText) {
@@ -17317,7 +17334,7 @@ var shapeRadar = {
17317
17334
  }
17318
17335
  levelEnter
17319
17336
  .merge(level)
17320
- .attr("transform", function (d) { return "translate(" + (width - levelRatio[d]) + ", " + (height - levelRatio[d]) + ")"; })
17337
+ .attr("transform", function (d) { return "translate(".concat(width - levelRatio[d], ", ").concat(height - levelRatio[d], ")"); })
17321
17338
  .selectAll("polygon")
17322
17339
  .attr("points", function (d) { return points[d]; });
17323
17340
  // update level text position
@@ -17336,7 +17353,7 @@ var shapeRadar = {
17336
17353
  .data(categories);
17337
17354
  axis.exit().remove();
17338
17355
  var axisEnter = axis.enter().append("g")
17339
- .attr("class", function (d, i) { return CLASS.axis + "-" + i; });
17356
+ .attr("class", function (d, i) { return "".concat(CLASS.axis, "-").concat(i); });
17340
17357
  config.radar_axis_line_show && axisEnter.append("line");
17341
17358
  config.radar_axis_text_show && axisEnter.append("text");
17342
17359
  axis = axisEnter.merge(axis);
@@ -17383,7 +17400,7 @@ var shapeRadar = {
17383
17400
  else if (posY < height) {
17384
17401
  posY -= y_1;
17385
17402
  }
17386
- return "translate(" + posX + " " + posY + ")";
17403
+ return "translate(".concat(posX, " ").concat(posY, ")");
17387
17404
  });
17388
17405
  }
17389
17406
  $$.bindEvent();
@@ -17844,6 +17861,7 @@ var optLine = {
17844
17861
  * - step
17845
17862
  * - step-before
17846
17863
  * - step-after
17864
+ * @property {boolean} [line.step.tooltipMatch=false] Set to `true` for `step-before` and `step-after` types to have cursor/tooltip match to hovered step's point instead of nearest point.
17847
17865
  * @property {boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.
17848
17866
  * @property {boolean} [line.zerobased=false] Set if min or max value will be 0 on line chart.
17849
17867
  * @example
@@ -17854,7 +17872,10 @@ var optLine = {
17854
17872
  * "line-class2"
17855
17873
  * ],
17856
17874
  * step: {
17857
- * type: "step-after"
17875
+ * type: "step-after",
17876
+ *
17877
+ * // to have cursor/tooltip match to hovered step's point instead of nearest point.
17878
+ * tooltipMatch: true
17858
17879
  * },
17859
17880
  *
17860
17881
  * // hide all data points ('point.show=false' also has similar effect)
@@ -17870,6 +17891,7 @@ var optLine = {
17870
17891
  */
17871
17892
  line_connectNull: false,
17872
17893
  line_step_type: "step",
17894
+ line_step_tooltipMatch: false,
17873
17895
  line_zerobased: false,
17874
17896
  line_classes: undefined,
17875
17897
  line_point: true
@@ -18418,8 +18440,8 @@ var apiSelection = {
18418
18440
  selected: function (targetId) {
18419
18441
  var $$ = this.internal;
18420
18442
  var dataPoint = [];
18421
- $$.$el.main.selectAll("." + (CLASS.shapes + $$.getTargetSelectorSuffix(targetId)))
18422
- .selectAll("." + CLASS.shape)
18443
+ $$.$el.main.selectAll(".".concat(CLASS.shapes + $$.getTargetSelectorSuffix(targetId)))
18444
+ .selectAll(".".concat(CLASS.shape))
18423
18445
  .filter(function () {
18424
18446
  return select(this).classed(CLASS.SELECTED);
18425
18447
  })
@@ -18456,8 +18478,8 @@ var apiSelection = {
18456
18478
  if (!config.data_selection_enabled) {
18457
18479
  return;
18458
18480
  }
18459
- $el.main.selectAll("." + CLASS.shapes)
18460
- .selectAll("." + CLASS.shape)
18481
+ $el.main.selectAll(".".concat(CLASS.shapes))
18482
+ .selectAll(".".concat(CLASS.shape))
18461
18483
  .each(function (d, i) {
18462
18484
  var shape = select(this);
18463
18485
  var id = d.data ? d.data.id : d.id;
@@ -18502,8 +18524,8 @@ var apiSelection = {
18502
18524
  if (!config.data_selection_enabled) {
18503
18525
  return;
18504
18526
  }
18505
- $el.main.selectAll("." + CLASS.shapes)
18506
- .selectAll("." + CLASS.shape)
18527
+ $el.main.selectAll(".".concat(CLASS.shapes))
18528
+ .selectAll(".".concat(CLASS.shape))
18507
18529
  .each(function (d, i) {
18508
18530
  var shape = select(this);
18509
18531
  var id = d.data ? d.data.id : d.id;
@@ -18563,12 +18585,12 @@ var apiSubchart = {
18563
18585
  $$.unbindZoomEvent();
18564
18586
  config.subchart_show = !show;
18565
18587
  !subchart.main && $$.initSubchart();
18566
- var $target = subchart.main.selectAll("." + CLASS.target);
18588
+ var $target = subchart.main.selectAll(".".concat(CLASS.target));
18567
18589
  // need to cover when new data has been loaded
18568
18590
  if ($$.data.targets.length !== $target.size()) {
18569
18591
  $$.updateSizes();
18570
18592
  $$.updateTargetsForSubchart($$.data.targets);
18571
- $target = subchart.main.selectAll("." + CLASS.target);
18593
+ $target = subchart.main.selectAll(".".concat(CLASS.target));
18572
18594
  }
18573
18595
  $target.style("opacity", null);
18574
18596
  subchart.main.style("display", null);
@@ -18642,18 +18664,21 @@ function withinRange(domain, current, range) {
18642
18664
  * // Zoom to specified domain range
18643
18665
  * chart.zoom([10, 20]);
18644
18666
  *
18667
+ * // For timeseries, the domain value can be string, but the format should match with the 'data.xFormat' option.
18668
+ * chart.zoom(["2021-02-03", "2021-02-08"]);
18669
+ *
18645
18670
  * // Get the current zoomed domain range
18646
18671
  * chart.zoom();
18647
18672
  */
18648
18673
  var zoom$1 = function (domainValue) {
18649
18674
  var _a;
18650
18675
  var $$ = this.internal;
18651
- var $el = $$.$el, config = $$.config, org = $$.org, scale = $$.scale;
18676
+ var $el = $$.$el, axis = $$.axis, config = $$.config, org = $$.org, scale = $$.scale;
18652
18677
  var isRotated = config.axis_rotated;
18653
- var isCategorized = $$.axis.isCategorized();
18678
+ var isCategorized = axis.isCategorized();
18654
18679
  var domain = domainValue;
18655
18680
  if (config.zoom_enabled && domain) {
18656
- if ($$.axis.isTimeSeries()) {
18681
+ if (axis.isTimeSeries()) {
18657
18682
  domain = domain.map(function (x) { return parseDate.bind($$)(x); });
18658
18683
  }
18659
18684
  if (withinRange(domain, $$.getZoomDomain(true), $$.getZoomDomain())) {
@@ -18851,14 +18876,14 @@ var drag = {
18851
18876
  var maxX = Math.max(sx, mx);
18852
18877
  var minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my);
18853
18878
  var maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
18854
- main.select("." + CLASS.dragarea)
18879
+ main.select(".".concat(CLASS.dragarea))
18855
18880
  .attr("x", minX)
18856
18881
  .attr("y", minY)
18857
18882
  .attr("width", maxX - minX)
18858
18883
  .attr("height", maxY - minY);
18859
18884
  // TODO: binary search when multiple xs
18860
- main.selectAll("." + CLASS.shapes)
18861
- .selectAll("." + CLASS.shape)
18885
+ main.selectAll(".".concat(CLASS.shapes))
18886
+ .selectAll(".".concat(CLASS.shape))
18862
18887
  .filter(function (d) { return isSelectable === null || isSelectable === void 0 ? void 0 : isSelectable.bind($$.api)(d); })
18863
18888
  .each(function (d, i) {
18864
18889
  var shape = select(this);
@@ -18903,7 +18928,7 @@ var drag = {
18903
18928
  return;
18904
18929
  }
18905
18930
  state.dragStart = mouse;
18906
- main.select("." + CLASS.chart)
18931
+ main.select(".".concat(CLASS.chart))
18907
18932
  .append("rect")
18908
18933
  .attr("class", CLASS.dragarea)
18909
18934
  .style("opacity", "0.1");
@@ -18920,10 +18945,10 @@ var drag = {
18920
18945
  if ($$.hasArcType() || !config.data_selection_enabled) { // do nothing if not selectable
18921
18946
  return;
18922
18947
  }
18923
- $T(main.select("." + CLASS.dragarea))
18948
+ $T(main.select(".".concat(CLASS.dragarea)))
18924
18949
  .style("opacity", "0")
18925
18950
  .remove();
18926
- main.selectAll("." + CLASS.shape)
18951
+ main.selectAll(".".concat(CLASS.shape))
18927
18952
  .classed(CLASS.INCLUDED, false);
18928
18953
  $$.setDragStatus(false);
18929
18954
  }
@@ -18946,8 +18971,8 @@ var selection = _assign(_assign({}, drag), {
18946
18971
  var r = $$.pointSelectR.bind($$);
18947
18972
  callFn(config.data_onselected, $$.api, d, target.node());
18948
18973
  // add selected-circle on low layer g
18949
- $T(main.select("." + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id))
18950
- .selectAll("." + CLASS.selectedCircle + "-" + i)
18974
+ $T(main.select(".".concat(CLASS.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
18975
+ .selectAll(".".concat(CLASS.selectedCircle, "-").concat(i))
18951
18976
  .data([d])
18952
18977
  .enter()
18953
18978
  .append("circle")
@@ -18969,8 +18994,8 @@ var selection = _assign(_assign({}, drag), {
18969
18994
  var config = $$.config, main = $$.$el.main, $T = $$.$T;
18970
18995
  callFn(config.data_onunselected, $$.api, d, target.node());
18971
18996
  // remove selected-circle from low layer g
18972
- $T(main.select("." + CLASS.selectedCircles + $$.getTargetSelectorSuffix(d.id))
18973
- .selectAll("." + CLASS.selectedCircle + "-" + i))
18997
+ $T(main.select(".".concat(CLASS.selectedCircles).concat($$.getTargetSelectorSuffix(d.id)))
18998
+ .selectAll(".".concat(CLASS.selectedCircle, "-").concat(i)))
18974
18999
  .attr("r", 0)
18975
19000
  .remove();
18976
19001
  },
@@ -18983,7 +19008,7 @@ var selection = _assign(_assign({}, drag), {
18983
19008
  * @private
18984
19009
  */
18985
19010
  togglePoint: function (selected, target, d, i) {
18986
- var method = (selected ? "" : "un") + "selectPoint";
19011
+ var method = "".concat(selected ? "" : "un", "selectPoint");
18987
19012
  this[method](target, d, i);
18988
19013
  },
18989
19014
  /**
@@ -19023,7 +19048,7 @@ var selection = _assign(_assign({}, drag), {
19023
19048
  * @private
19024
19049
  */
19025
19050
  togglePath: function (selected, target, d, i) {
19026
- this[(selected ? "" : "un") + "selectPath"](target, d, i);
19051
+ this["".concat(selected ? "" : "un", "selectPath")](target, d, i);
19027
19052
  },
19028
19053
  /**
19029
19054
  * Returns the toggle method of the target
@@ -19055,12 +19080,12 @@ var selection = _assign(_assign({}, drag), {
19055
19080
  var toggledShape;
19056
19081
  if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
19057
19082
  if (!config.data_selection_multiple) {
19058
- var selector = "." + CLASS.shapes;
19083
+ var selector = ".".concat(CLASS.shapes);
19059
19084
  if (config.data_selection_grouped) {
19060
19085
  selector += $$.getTargetSelectorSuffix(d.id);
19061
19086
  }
19062
19087
  main.selectAll(selector)
19063
- .selectAll("." + CLASS.shape)
19088
+ .selectAll(".".concat(CLASS.shape))
19064
19089
  .each(function (d, i) {
19065
19090
  var shape = select(this);
19066
19091
  if (shape.classed(CLASS.SELECTED)) {
@@ -19094,7 +19119,7 @@ var subchart = {
19094
19119
  // set the brush
19095
19120
  $$.brush = (isRotated ? brushY() : brushX()).handleSize(5);
19096
19121
  var getBrushSize = function () {
19097
- var brush = $$.$el.svg.select("." + CLASS.brush + " .overlay");
19122
+ var brush = $$.$el.svg.select(".".concat(CLASS.brush, " .overlay"));
19098
19123
  var brushSize = { width: 0, height: 0 };
19099
19124
  if (brush.size()) {
19100
19125
  brushSize.width = +brush.attr("width");
@@ -19124,7 +19149,7 @@ var subchart = {
19124
19149
  .attr("transform", function (d, i) {
19125
19150
  var pos = isRotated ?
19126
19151
  [33, selection[i] - (i === 0 ? 30 : 24)] : [selection[i], 3];
19127
- return "translate(" + pos + ")";
19152
+ return "translate(".concat(pos, ")");
19128
19153
  });
19129
19154
  }
19130
19155
  }
@@ -19142,7 +19167,7 @@ var subchart = {
19142
19167
  var _a;
19143
19168
  var extent = this.extent()();
19144
19169
  if (extent[1].filter(function (v) { return isNaN(v); }).length === 0) {
19145
- (_a = subchart.main) === null || _a === void 0 ? void 0 : _a.select("." + CLASS.brush).call(this);
19170
+ (_a = subchart.main) === null || _a === void 0 ? void 0 : _a.select(".".concat(CLASS.brush)).call(this);
19146
19171
  }
19147
19172
  return this;
19148
19173
  };
@@ -19165,7 +19190,7 @@ var subchart = {
19165
19190
  };
19166
19191
  $$.brush.getSelection = function () { return (
19167
19192
  // @ts-ignore
19168
- subchart.main ? subchart.main.select("." + CLASS.brush) : select([])); };
19193
+ subchart.main ? subchart.main.select(".".concat(CLASS.brush)) : select([])); };
19169
19194
  },
19170
19195
  /**
19171
19196
  * Initialize the subchart.
@@ -19178,7 +19203,7 @@ var subchart = {
19178
19203
  return;
19179
19204
  }
19180
19205
  var visibility = config.subchart_show ? null : "hidden";
19181
- var clipId = clip.id + "-subchart";
19206
+ var clipId = "".concat(clip.id, "-subchart");
19182
19207
  var clipPath = $$.getClipPath(clipId);
19183
19208
  clip.idSubchart = clipId;
19184
19209
  $$.appendClip(defs, clipId);
@@ -19196,9 +19221,9 @@ var subchart = {
19196
19221
  ["bar", "line", "bubble", "candlestick", "scatter"].forEach(function (v) {
19197
19222
  var type = capitalize(/^(bubble|scatter)$/.test(v) ? "circle" : v);
19198
19223
  if ($$.hasType(v) || $$.hasTypeOf(type)) {
19199
- var chart = main.select("." + CLASS.chart);
19200
- var chartClassName = CLASS["chart" + type + "s"];
19201
- if (chart.select("." + chartClassName).empty()) {
19224
+ var chart = main.select(".".concat(CLASS.chart));
19225
+ var chartClassName = CLASS["chart".concat(type, "s")];
19226
+ if (chart.select(".".concat(chartClassName)).empty()) {
19202
19227
  chart
19203
19228
  .append("g")
19204
19229
  .attr("class", chartClassName);
@@ -19239,14 +19264,14 @@ var subchart = {
19239
19264
  "M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z",
19240
19265
  "M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"
19241
19266
  ];
19242
- $$.brush.handle = brush.selectAll("." + customHandleClass)
19267
+ $$.brush.handle = brush.selectAll(".".concat(customHandleClass))
19243
19268
  .data(isRotated ?
19244
19269
  [{ type: "n" }, { type: "s" }] :
19245
19270
  [{ type: "w" }, { type: "e" }])
19246
19271
  .enter()
19247
19272
  .append("path")
19248
19273
  .attr("class", customHandleClass)
19249
- .attr("cursor", (isRotated ? "ns" : "ew") + "-resize")
19274
+ .attr("cursor", "".concat(isRotated ? "ns" : "ew", "-resize"))
19250
19275
  .attr("d", function (d) { return path[+/[se]/.test(d.type)]; })
19251
19276
  .attr("display", initRange ? null : "none");
19252
19277
  },
@@ -19265,12 +19290,12 @@ var subchart = {
19265
19290
  var isPointType = /^(bubble|scatter)$/.test(v);
19266
19291
  var name = capitalize(isPointType ? "circle" : v);
19267
19292
  var chartClass = $$.getChartClass(name, true);
19268
- var shapeClass = $$.getClass(isPointType ? "circles" : v + "s", true);
19269
- var shapeChart = main.select("." + CLASS["chart" + (name + "s")]);
19293
+ var shapeClass = $$.getClass(isPointType ? "circles" : "".concat(v, "s"), true);
19294
+ var shapeChart = main.select(".".concat(CLASS["chart".concat("".concat(name, "s"))]));
19270
19295
  if (isPointType) {
19271
19296
  var circle = shapeChart
19272
- .selectAll("." + CLASS.circles)
19273
- .data(targets.filter($$["is" + capitalize(v) + "Type"].bind($$)))
19297
+ .selectAll(".".concat(CLASS.circles))
19298
+ .data(targets.filter($$["is".concat(capitalize(v), "Type")].bind($$)))
19274
19299
  .attr("class", shapeClass);
19275
19300
  circle.exit().remove();
19276
19301
  circle.enter().append("g")
@@ -19278,9 +19303,9 @@ var subchart = {
19278
19303
  }
19279
19304
  else {
19280
19305
  var shapeUpdate = shapeChart
19281
- .selectAll("." + CLASS["chart" + name])
19306
+ .selectAll(".".concat(CLASS["chart".concat(name)]))
19282
19307
  .attr("class", chartClass)
19283
- .data(targets.filter($$["is" + name + "Type"].bind($$)));
19308
+ .data(targets.filter($$["is".concat(name, "Type")].bind($$)));
19284
19309
  var shapeEnter = shapeUpdate.enter()
19285
19310
  .append("g")
19286
19311
  .style("opacity", "0")
@@ -19294,7 +19319,7 @@ var subchart = {
19294
19319
  }
19295
19320
  });
19296
19321
  // -- Brush --//
19297
- main.selectAll("." + CLASS.brush + " rect")
19322
+ main.selectAll(".".concat(CLASS.brush, " rect"))
19298
19323
  .attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? state.width2 : state.height2);
19299
19324
  }
19300
19325
  },
@@ -19324,10 +19349,10 @@ var subchart = {
19324
19349
  !brushEmpty($$) && $$.brush.update();
19325
19350
  Object.keys(shape.type).forEach(function (v) {
19326
19351
  var name = capitalize(v);
19327
- var drawFn = $$["generateDraw" + name](shape.indices[v], true);
19352
+ var drawFn = $$["generateDraw".concat(name)](shape.indices[v], true);
19328
19353
  // call shape's update & redraw method
19329
- $$["update" + name](withTransition, true);
19330
- $$["redraw" + name](drawFn, withTransition, true);
19354
+ $$["update".concat(name)](withTransition, true);
19355
+ $$["redraw".concat(name)](drawFn, withTransition, true);
19331
19356
  });
19332
19357
  if ($$.hasType("bubble") || $$.hasType("scatter")) {
19333
19358
  var cx = shape.pos.cx;
@@ -19366,7 +19391,7 @@ var subchart = {
19366
19391
  var subchart = $$.$el.subchart, $T = $$.$T;
19367
19392
  var subXAxis = (transitions === null || transitions === void 0 ? void 0 : transitions.axisSubX) ?
19368
19393
  transitions.axisSubX :
19369
- $T(subchart.main.select("." + CLASS.axisX), withTransition);
19394
+ $T(subchart.main.select(".".concat(CLASS.axisX)), withTransition);
19370
19395
  subchart.main.attr("transform", $$.getTranslate("context"));
19371
19396
  subXAxis.attr("transform", $$.getTranslate("subX"));
19372
19397
  },
@@ -19554,6 +19579,7 @@ var zoom = {
19554
19579
  * @private
19555
19580
  */
19556
19581
  onZoomEnd: function (event) {
19582
+ var _a;
19557
19583
  var $$ = this;
19558
19584
  var config = $$.config, state = $$.state;
19559
19585
  var startEvent = $$.zoom.startEvent;
@@ -19561,7 +19587,7 @@ var zoom = {
19561
19587
  var isUnZoom = (event === null || event === void 0 ? void 0 : event.transform) === zoomIdentity;
19562
19588
  if ((startEvent === null || startEvent === void 0 ? void 0 : startEvent.type.indexOf("touch")) > -1) {
19563
19589
  startEvent = startEvent.changedTouches[0];
19564
- e = e.changedTouches[0];
19590
+ e = (_a = e === null || e === void 0 ? void 0 : e.changedTouches) === null || _a === void 0 ? void 0 : _a[0];
19565
19591
  }
19566
19592
  // if click, do nothing. otherwise, click interaction will be canceled.
19567
19593
  if (config.zoom_type === "drag" && (e && startEvent.clientX === e.clientX && startEvent.clientY === e.clientY)) {
@@ -20016,7 +20042,7 @@ var zoomModule = function () {
20016
20042
  var defaults = {};
20017
20043
  /**
20018
20044
  * @namespace bb
20019
- * @version 3.2.0-next.5
20045
+ * @version 3.2.2
20020
20046
  */
20021
20047
  var bb = {
20022
20048
  /**
@@ -20026,7 +20052,7 @@ var bb = {
20026
20052
  * bb.version; // "1.0.0"
20027
20053
  * @memberof bb
20028
20054
  */
20029
- version: "3.2.0-next.5",
20055
+ version: "3.2.2",
20030
20056
  /**
20031
20057
  * Generate chart
20032
20058
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: