billboard.js 3.9.2 → 3.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +153 -123
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +159 -134
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +8 -13
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +8 -13
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +8 -13
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +8 -13
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +8 -13
  22. package/dist/theme/dark.css +1 -1
  23. package/dist/theme/dark.min.css +1 -1
  24. package/dist/theme/datalab.css +1 -1
  25. package/dist/theme/datalab.min.css +1 -1
  26. package/dist/theme/graph.css +1 -1
  27. package/dist/theme/graph.min.css +1 -1
  28. package/dist/theme/insight.css +1 -1
  29. package/dist/theme/insight.min.css +1 -1
  30. package/dist-esm/billboard.js +17 -9
  31. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  34. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  35. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  36. package/package.json +12 -12
  37. package/src/ChartInternal/shape/arc.ts +14 -4
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.9.2
8
+ * @version 3.9.3
9
9
  */
10
10
  /*-- Chart --*/
11
11
  .bb svg {
package/dist/billboard.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.9.2
8
+ * @version 3.9.3
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -9589,75 +9589,76 @@ function title_getTextPos(pos, width) {
9589
9589
  len = d.length;
9590
9590
  var text, row, param, value, i;
9591
9591
  var _loop = function () {
9592
- var _this3 = this;
9593
- row = d[i];
9594
- if (!row || !(getRowValue(row) || getRowValue(row) === 0)) {
9595
- return "continue";
9596
- }
9597
- if (isUndefined(text)) {
9598
- var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
9599
- text = tplProcess(tpl[0], {
9600
- CLASS_TOOLTIP: $TOOLTIP.tooltip,
9601
- TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
9602
- });
9603
- }
9604
- if (!row.ratio && $el.arcs) {
9605
- param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]];
9606
- row.ratio = $$.getRatio.apply($$, param);
9607
- }
9608
- param = [row.ratio, row.id, row.index, d];
9609
- value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param)));
9610
- if ($$.isAreaRangeType(row)) {
9611
- var _map2 = ["high", "low"].map(function (v) {
9612
- _newArrowCheck(this, _this3);
9613
- return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param)));
9614
- }.bind(this)),
9615
- high = _map2[0],
9616
- low = _map2[1];
9617
- value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
9618
- } else if ($$.isCandlestickType(row)) {
9619
- var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) {
9620
- _newArrowCheck(this, _this3);
9621
- return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param)));
9622
- }.bind(this)),
9623
- open = _map3[0],
9624
- _high = _map3[1],
9625
- _low = _map3[2],
9626
- close = _map3[3],
9627
- volume = _map3[4];
9628
- value = "<b>Open:</b> " + open + " <b>High:</b> " + _high + " <b>Low:</b> " + _low + " <b>Close:</b> " + close + (volume ? " <b>Volume:</b> " + volume : "");
9629
- } else if ($$.isBarRangeType(row)) {
9630
- var _row$value = row.value,
9631
- start = _row$value[0],
9632
- end = _row$value[1];
9633
- value = valueFormat(start) + " ~ " + valueFormat(end);
9634
- }
9635
- if (value !== undefined) {
9636
- // Skip elements when their name is set to null
9637
- if (row.name === null) {
9638
- return "continue";
9592
+ var _this3 = this;
9593
+ row = d[i];
9594
+ if (!row || !(getRowValue(row) || getRowValue(row) === 0)) {
9595
+ return 0; // continue
9639
9596
  }
9640
- var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
9641
- _color = getBgColor(row),
9642
- contentValue = {
9643
- CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
9644
- COLOR: tplStr || !$$.patterns ? _color : "<svg><rect style=\"fill:" + _color + "\" width=\"10\" height=\"10\"></rect></svg>",
9645
- NAME: name,
9646
- VALUE: value
9647
- };
9648
- if (tplStr && isObject(contents.text)) {
9649
- var index = targetIds.indexOf(row.id);
9650
- Object.keys(contents.text).forEach(function (key) {
9651
- _newArrowCheck(this, _this3);
9652
- contentValue[key] = contents.text[key][index];
9653
- }.bind(this));
9597
+ if (isUndefined(text)) {
9598
+ var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
9599
+ text = tplProcess(tpl[0], {
9600
+ CLASS_TOOLTIP: $TOOLTIP.tooltip,
9601
+ TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
9602
+ });
9654
9603
  }
9655
- text += tplProcess(tpl[1], contentValue);
9656
- }
9657
- };
9604
+ if (!row.ratio && $el.arcs) {
9605
+ param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]];
9606
+ row.ratio = $$.getRatio.apply($$, param);
9607
+ }
9608
+ param = [row.ratio, row.id, row.index, d];
9609
+ value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param)));
9610
+ if ($$.isAreaRangeType(row)) {
9611
+ var _map2 = ["high", "low"].map(function (v) {
9612
+ _newArrowCheck(this, _this3);
9613
+ return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param)));
9614
+ }.bind(this)),
9615
+ high = _map2[0],
9616
+ low = _map2[1];
9617
+ value = "<b>Mid:</b> " + value + " <b>High:</b> " + high + " <b>Low:</b> " + low;
9618
+ } else if ($$.isCandlestickType(row)) {
9619
+ var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) {
9620
+ _newArrowCheck(this, _this3);
9621
+ return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param)));
9622
+ }.bind(this)),
9623
+ open = _map3[0],
9624
+ _high = _map3[1],
9625
+ _low = _map3[2],
9626
+ close = _map3[3],
9627
+ volume = _map3[4];
9628
+ value = "<b>Open:</b> " + open + " <b>High:</b> " + _high + " <b>Low:</b> " + _low + " <b>Close:</b> " + close + (volume ? " <b>Volume:</b> " + volume : "");
9629
+ } else if ($$.isBarRangeType(row)) {
9630
+ var _row$value = row.value,
9631
+ start = _row$value[0],
9632
+ end = _row$value[1];
9633
+ value = valueFormat(start) + " ~ " + valueFormat(end);
9634
+ }
9635
+ if (value !== undefined) {
9636
+ // Skip elements when their name is set to null
9637
+ if (row.name === null) {
9638
+ return 0; // continue
9639
+ }
9640
+ var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
9641
+ _color = getBgColor(row),
9642
+ contentValue = {
9643
+ CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
9644
+ COLOR: tplStr || !$$.patterns ? _color : "<svg><rect style=\"fill:" + _color + "\" width=\"10\" height=\"10\"></rect></svg>",
9645
+ NAME: name,
9646
+ VALUE: value
9647
+ };
9648
+ if (tplStr && isObject(contents.text)) {
9649
+ var index = targetIds.indexOf(row.id);
9650
+ Object.keys(contents.text).forEach(function (key) {
9651
+ _newArrowCheck(this, _this3);
9652
+ contentValue[key] = contents.text[key][index];
9653
+ }.bind(this));
9654
+ }
9655
+ text += tplProcess(tpl[1], contentValue);
9656
+ }
9657
+ },
9658
+ _ret;
9658
9659
  for (i = 0; i < len; i++) {
9659
- var _ret = _loop();
9660
- if (_ret === "continue") continue;
9660
+ _ret = _loop();
9661
+ if (_ret === 0) continue;
9661
9662
  }
9662
9663
  return text + "</table>";
9663
9664
  },
@@ -18618,6 +18619,9 @@ var options = [data_axis, axis_axis, common_grid];
18618
18619
  var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_ = __webpack_require__(12);
18619
18620
  ;// CONCATENATED MODULE: ./src/ChartInternal/shape/arc.ts
18620
18621
 
18622
+
18623
+ function arc_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18624
+ function arc_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? arc_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : arc_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18621
18625
  /**
18622
18626
  * Copyright (c) 2017 ~ present NAVER Corp.
18623
18627
  * billboard.js project is licensed under the MIT license
@@ -18717,17 +18721,43 @@ function getRadiusFn(expandRate) {
18717
18721
  */
18718
18722
  function getAttrTweenFn(fn) {
18719
18723
  return function (d) {
18720
- var interpolate = (0,external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_.interpolate)(this._current, d);
18724
+ var _this2 = this,
18725
+ getAngleKeyValue = function (_ref) {
18726
+ var _ref$startAngle = _ref.startAngle,
18727
+ startAngle = _ref$startAngle === void 0 ? 0 : _ref$startAngle,
18728
+ _ref$endAngle = _ref.endAngle,
18729
+ endAngle = _ref$endAngle === void 0 ? 0 : _ref$endAngle,
18730
+ _ref$padAngle = _ref.padAngle,
18731
+ padAngle = _ref$padAngle === void 0 ? 0 : _ref$padAngle;
18732
+ _newArrowCheck(this, _this2);
18733
+ return {
18734
+ startAngle: startAngle,
18735
+ endAngle: endAngle,
18736
+ padAngle: padAngle
18737
+ };
18738
+ }.bind(this),
18739
+ interpolate = (0,external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_.interpolate)(getAngleKeyValue(this._current), getAngleKeyValue(d));
18740
+ // d3.interpolate interpolates id value, if id is given as color string(ex. gold, silver, etc)
18741
+ // to avoid unexpected behavior, interpolate only angle values
18742
+ // https://github.com/naver/billboard.js/issues/3321
18743
+
18721
18744
  this._current = d;
18722
18745
  return function (t) {
18723
- var interpolated = interpolate(t);
18724
- return fn(interpolated);
18746
+ var interpolated = interpolate(t),
18747
+ data = d.data,
18748
+ index = d.index,
18749
+ value = d.value;
18750
+ return fn(arc_objectSpread(arc_objectSpread({}, interpolated), {}, {
18751
+ data: data,
18752
+ index: index,
18753
+ value: value
18754
+ }));
18725
18755
  };
18726
18756
  };
18727
18757
  }
18728
18758
  /* harmony default export */ var arc = ({
18729
18759
  initPie: function initPie() {
18730
- var _this2 = this,
18760
+ var _this3 = this,
18731
18761
  $$ = this,
18732
18762
  config = $$.config,
18733
18763
  dataType = config.data_type,
@@ -18735,10 +18765,10 @@ function getAttrTweenFn(fn) {
18735
18765
  startingAngle = config[dataType + "_startingAngle"] || 0,
18736
18766
  padAngle = (padding ? padding * .01 : config[dataType + "_padAngle"]) || 0;
18737
18767
  $$.pie = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.pie)().startAngle(startingAngle).endAngle(startingAngle + 2 * Math.PI).padAngle(padAngle).value(function (d) {
18738
- var _this3 = this;
18739
- _newArrowCheck(this, _this2);
18768
+ var _this4 = this;
18769
+ _newArrowCheck(this, _this3);
18740
18770
  return d.values.reduce(function (a, b) {
18741
- _newArrowCheck(this, _this3);
18771
+ _newArrowCheck(this, _this4);
18742
18772
  return a + b.value;
18743
18773
  }.bind(this), 0);
18744
18774
  }.bind(this)).sort($$.getSortCompareFn.bind($$)(!0));
@@ -18822,7 +18852,7 @@ function getAttrTweenFn(fn) {
18822
18852
  return startAngle;
18823
18853
  },
18824
18854
  updateAngle: function updateAngle(dValue) {
18825
- var _this4 = this,
18855
+ var _this5 = this,
18826
18856
  $$ = this,
18827
18857
  config = $$.config,
18828
18858
  state = $$.state,
@@ -18843,7 +18873,7 @@ function getAttrTweenFn(fn) {
18843
18873
  }
18844
18874
  pie($$.filterTargetsToShow()).forEach(function (t, i) {
18845
18875
  var _d$data;
18846
- _newArrowCheck(this, _this4);
18876
+ _newArrowCheck(this, _this5);
18847
18877
  if (!found && t.data.id === ((_d$data = d.data) == null ? void 0 : _d$data.id)) {
18848
18878
  found = !0;
18849
18879
  d = t;
@@ -18894,7 +18924,7 @@ function getAttrTweenFn(fn) {
18894
18924
  * @private
18895
18925
  */
18896
18926
  getSvgArcExpanded: function getSvgArcExpanded(rate) {
18897
- var _this5 = this;
18927
+ var _this6 = this;
18898
18928
  if (rate === void 0) {
18899
18929
  rate = 1;
18900
18930
  }
@@ -18905,7 +18935,7 @@ function getAttrTweenFn(fn) {
18905
18935
  corner = _getRadiusFn$call2.corner,
18906
18936
  arc = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.arc)().innerRadius(inner).outerRadius(outer);
18907
18937
  return function (d) {
18908
- _newArrowCheck(this, _this5);
18938
+ _newArrowCheck(this, _this6);
18909
18939
  var updated = $$.updateAngle(d),
18910
18940
  outerR = outer(updated);
18911
18941
  var cornerR = 0;
@@ -18925,7 +18955,7 @@ function getAttrTweenFn(fn) {
18925
18955
  * @private
18926
18956
  */
18927
18957
  transformForArcLabel: function transformForArcLabel(d) {
18928
- var _this6 = this,
18958
+ var _this7 = this,
18929
18959
  $$ = this,
18930
18960
  config = $$.config,
18931
18961
  radiusExpanded = $$.state.radiusExpanded,
@@ -18946,14 +18976,14 @@ function getAttrTweenFn(fn) {
18946
18976
  }
18947
18977
  var c = this.svgArc.centroid(updated),
18948
18978
  _c$map = c.map(function (v) {
18949
- _newArrowCheck(this, _this6);
18979
+ _newArrowCheck(this, _this7);
18950
18980
  return isNaN(v) ? 0 : v;
18951
18981
  }.bind(this)),
18952
18982
  x = _c$map[0],
18953
18983
  y = _c$map[1],
18954
18984
  h = Math.sqrt(x * x + y * y);
18955
18985
  var ratio = (_filter$map = ["donut", "pie", "polar"].filter($$.hasType.bind($$)).map(function (v) {
18956
- _newArrowCheck(this, _this6);
18986
+ _newArrowCheck(this, _this7);
18957
18987
  return config[v + "_label_ratio"];
18958
18988
  }.bind(this))) == null ? void 0 : _filter$map[0];
18959
18989
  if (ratio) {
@@ -18995,14 +19025,14 @@ function getAttrTweenFn(fn) {
18995
19025
  }
18996
19026
  },
18997
19027
  expandArc: function expandArc(targetIds) {
18998
- var _this7 = this,
19028
+ var _this8 = this,
18999
19029
  $$ = this,
19000
19030
  transiting = $$.state.transiting,
19001
19031
  $el = $$.$el;
19002
19032
  // MEMO: avoid to cancel transition
19003
19033
  if (transiting) {
19004
19034
  var interval = setInterval(function () {
19005
- _newArrowCheck(this, _this7);
19035
+ _newArrowCheck(this, _this8);
19006
19036
  if (!transiting) {
19007
19037
  clearInterval(interval);
19008
19038
  $el.legend.selectAll("." + $FOCUS.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
@@ -19021,7 +19051,7 @@ function getAttrTweenFn(fn) {
19021
19051
  });
19022
19052
  },
19023
19053
  unexpandArc: function unexpandArc(targetIds) {
19024
- var _this8 = this,
19054
+ var _this9 = this,
19025
19055
  $$ = this,
19026
19056
  transiting = $$.state.transiting,
19027
19057
  svg = $$.$el.svg;
@@ -19030,7 +19060,7 @@ function getAttrTweenFn(fn) {
19030
19060
  }
19031
19061
  var newTargetIds = $$.mapToTargetIds(targetIds);
19032
19062
  svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).selectAll("path").transition().duration(function (d) {
19033
- _newArrowCheck(this, _this8);
19063
+ _newArrowCheck(this, _this9);
19034
19064
  return $$.getExpandConfig(d.data.id, "duration");
19035
19065
  }.bind(this)).attrTween("d", getAttrTweenFn($$.svgArc.bind($$)));
19036
19066
  svg.selectAll("" + $ARC.arc).style("opacity", null);
@@ -19064,30 +19094,30 @@ function getAttrTweenFn(fn) {
19064
19094
  return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;
19065
19095
  },
19066
19096
  shouldShowArcLabel: function shouldShowArcLabel() {
19067
- var _this9 = this,
19097
+ var _this10 = this,
19068
19098
  $$ = this,
19069
19099
  config = $$.config;
19070
19100
  return ["donut", "gauge", "pie", "polar"].some(function (v) {
19071
- _newArrowCheck(this, _this9);
19101
+ _newArrowCheck(this, _this10);
19072
19102
  return $$.hasType(v) && config[v + "_label_show"];
19073
19103
  }.bind(this));
19074
19104
  },
19075
19105
  getArcLabelFormat: function getArcLabelFormat() {
19076
- var _this10 = this,
19106
+ var _this11 = this,
19077
19107
  $$ = this,
19078
19108
  config = $$.config,
19079
19109
  format = function (v) {
19080
- _newArrowCheck(this, _this10);
19110
+ _newArrowCheck(this, _this11);
19081
19111
  return v;
19082
19112
  }.bind(this);
19083
19113
  ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$)).forEach(function (v) {
19084
- _newArrowCheck(this, _this10);
19114
+ _newArrowCheck(this, _this11);
19085
19115
  format = config[v + "_label_format"];
19086
19116
  }.bind(this));
19087
19117
  return isFunction(format) ? format.bind($$.api) : format;
19088
19118
  },
19089
19119
  updateTargetsForArc: function updateTargetsForArc(targets) {
19090
- var _this11 = this,
19120
+ var _this12 = this,
19091
19121
  $$ = this,
19092
19122
  $el = $$.$el,
19093
19123
  hasGauge = $$.hasType("gauge"),
@@ -19096,7 +19126,7 @@ function getAttrTweenFn(fn) {
19096
19126
  classFocus = $$.classFocus.bind($$),
19097
19127
  chartArcs = $el.main.select("." + $ARC.chartArcs),
19098
19128
  mainPieUpdate = chartArcs.selectAll("." + $ARC.chartArc).data($$.pie(targets)).attr("class", function (d) {
19099
- _newArrowCheck(this, _this11);
19129
+ _newArrowCheck(this, _this12);
19100
19130
  return classChartArc(d) + classFocus(d.data);
19101
19131
  }.bind(this)),
19102
19132
  mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc).call(this.setCssRule(!1, "." + $ARC.chartArcs + " text", ["pointer-events:none", "text-anchor:middle"]));
@@ -19163,7 +19193,7 @@ function getAttrTweenFn(fn) {
19163
19193
  return !1;
19164
19194
  },
19165
19195
  redrawArc: function redrawArc(duration, durationForExit, withTransform) {
19166
- var _this12 = this,
19196
+ var _this13 = this,
19167
19197
  $$ = this,
19168
19198
  config = $$.config,
19169
19199
  state = $$.state,
@@ -19173,10 +19203,10 @@ function getAttrTweenFn(fn) {
19173
19203
  mainArc = main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arc).data($$.arcData.bind($$));
19174
19204
  mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove();
19175
19205
  mainArc = mainArc.enter().append("path").attr("class", $$.getClass("arc", !0)).style("fill", function (d) {
19176
- _newArrowCheck(this, _this12);
19206
+ _newArrowCheck(this, _this13);
19177
19207
  return $$.color(d.data);
19178
19208
  }.bind(this)).style("cursor", function (d) {
19179
- _newArrowCheck(this, _this12);
19209
+ _newArrowCheck(this, _this13);
19180
19210
  return isSelectable != null && isSelectable.bind != null && isSelectable.bind($$.api)(d) ? "pointer" : null;
19181
19211
  }.bind(this)).style("opacity", "0").each(function (d) {
19182
19212
  if ($$.isGaugeType(d.data)) {
@@ -19190,19 +19220,19 @@ function getAttrTweenFn(fn) {
19190
19220
  $$.hasMultiArcGauge() && $$.redrawMultiArcGauge();
19191
19221
  }
19192
19222
  mainArc.attr("transform", function (d) {
19193
- _newArrowCheck(this, _this12);
19223
+ _newArrowCheck(this, _this13);
19194
19224
  return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : "";
19195
19225
  }.bind(this)).style("opacity", function (d) {
19196
19226
  return d === this._current ? "0" : null;
19197
19227
  }).each(function () {
19198
- _newArrowCheck(this, _this12);
19228
+ _newArrowCheck(this, _this13);
19199
19229
  state.transiting = !0;
19200
19230
  }.bind(this)).transition().duration(duration).attrTween("d", function (d) {
19201
- var _this13 = this,
19231
+ var _this14 = this,
19202
19232
  updated = $$.updateAngle(d);
19203
19233
  if (!updated) {
19204
19234
  return function () {
19205
- _newArrowCheck(this, _this13);
19235
+ _newArrowCheck(this, _this14);
19206
19236
  return "M 0 0";
19207
19237
  }.bind(this);
19208
19238
  }
@@ -19221,7 +19251,7 @@ function getAttrTweenFn(fn) {
19221
19251
  return $$.getArc(interpolated, !0);
19222
19252
  };
19223
19253
  }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) {
19224
- _newArrowCheck(this, _this12);
19254
+ _newArrowCheck(this, _this13);
19225
19255
  var color;
19226
19256
  if ($$.levelColor) {
19227
19257
  color = $$.levelColor(d.data.values[0].value);
@@ -19256,7 +19286,7 @@ function getAttrTweenFn(fn) {
19256
19286
  * @private
19257
19287
  */
19258
19288
  redrawNeedle: function redrawNeedle() {
19259
- var _this14 = this,
19289
+ var _this15 = this,
19260
19290
  $$ = this,
19261
19291
  $el = $$.$el,
19262
19292
  config = $$.config,
@@ -19276,7 +19306,7 @@ function getAttrTweenFn(fn) {
19276
19306
  bottomRy = config.arc_needle_bottom_ry,
19277
19307
  needleAngle = $$.getNeedleAngle(),
19278
19308
  updateNeedleValue = function () {
19279
- _newArrowCheck(this, _this14);
19309
+ _newArrowCheck(this, _this15);
19280
19310
  var title = $$.getArcTitleWithNeedleValue();
19281
19311
  title && $$.setArcTitle(title);
19282
19312
  }.bind(this); // needle options
@@ -19292,14 +19322,14 @@ function getAttrTweenFn(fn) {
19292
19322
  * @private
19293
19323
  */
19294
19324
  $el.needle.updateHelper = function (v, updateConfig) {
19295
- var _this15 = this;
19325
+ var _this16 = this;
19296
19326
  if (updateConfig === void 0) {
19297
19327
  updateConfig = !1;
19298
19328
  }
19299
- _newArrowCheck(this, _this14);
19329
+ _newArrowCheck(this, _this15);
19300
19330
  if ($el.needle.style("display") !== "none") {
19301
19331
  $$.$T($el.needle).style("transform", "rotate(" + $$.getNeedleAngle(v) + "deg)").call(endall, function () {
19302
- _newArrowCheck(this, _this15);
19332
+ _newArrowCheck(this, _this16);
19303
19333
  updateConfig && (config.arc_needle_value = v);
19304
19334
  updateNeedleValue();
19305
19335
  }.bind(this));
@@ -19345,7 +19375,7 @@ function getAttrTweenFn(fn) {
19345
19375
  return (startingAngle + radian) * (180 / Math.PI);
19346
19376
  },
19347
19377
  redrawBackgroundArcs: function redrawBackgroundArcs() {
19348
- var _this16 = this,
19378
+ var _this17 = this,
19349
19379
  $$ = this,
19350
19380
  config = $$.config,
19351
19381
  state = $$.state,
@@ -19359,11 +19389,11 @@ function getAttrTweenFn(fn) {
19359
19389
  var index = 0;
19360
19390
  backgroundArc = backgroundArc.selectAll("path." + $ARC.chartArcsBackground).data($$.data.targets);
19361
19391
  backgroundArc.enter().append("path").attr("class", function (d, i) {
19362
- _newArrowCheck(this, _this16);
19392
+ _newArrowCheck(this, _this17);
19363
19393
  return $ARC.chartArcsBackground + " " + $ARC.chartArcsBackground + "-" + i;
19364
- }.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
19365
- var id = _ref2.id;
19366
- _newArrowCheck(this, _this16);
19394
+ }.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref3) {
19395
+ var id = _ref3.id;
19396
+ _newArrowCheck(this, _this17);
19367
19397
  if (showEmptyTextLabel || state.hiddenTargetIds.indexOf(id) >= 0) {
19368
19398
  return "M 0 0";
19369
19399
  }
@@ -19380,7 +19410,7 @@ function getAttrTweenFn(fn) {
19380
19410
  backgroundArc.exit().remove();
19381
19411
  } else {
19382
19412
  backgroundArc.attr("d", showEmptyTextLabel ? "M 0 0" : function () {
19383
- _newArrowCheck(this, _this16);
19413
+ _newArrowCheck(this, _this17);
19384
19414
  var d = {
19385
19415
  data: [{
19386
19416
  value: config.gauge_max
@@ -19393,7 +19423,7 @@ function getAttrTweenFn(fn) {
19393
19423
  }
19394
19424
  },
19395
19425
  bindArcEvent: function bindArcEvent(arc) {
19396
- var _this17 = this,
19426
+ var _this18 = this,
19397
19427
  $$ = this,
19398
19428
  config = $$.config,
19399
19429
  state = $$.state,
@@ -19441,7 +19471,7 @@ function getAttrTweenFn(fn) {
19441
19471
  selectArc(this, arcData, id);
19442
19472
  $$.setOverOut(!0, arcData);
19443
19473
  }).on("mouseout", function (event, d) {
19444
- _newArrowCheck(this, _this17);
19474
+ _newArrowCheck(this, _this18);
19445
19475
  if (state.transiting) {
19446
19476
  // skip while transiting
19447
19477
  return;
@@ -19462,7 +19492,7 @@ function getAttrTweenFn(fn) {
19462
19492
  // touch events
19463
19493
  if (isTouch && $$.hasArcType() && !$$.radars) {
19464
19494
  var getEventArc = function (event) {
19465
- _newArrowCheck(this, _this17);
19495
+ _newArrowCheck(this, _this18);
19466
19496
  var touch = event.changedTouches[0],
19467
19497
  eventArc = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(browser_doc.elementFromPoint(touch.clientX, touch.clientY));
19468
19498
  return eventArc;
@@ -19485,7 +19515,7 @@ function getAttrTweenFn(fn) {
19485
19515
  }
19486
19516
  },
19487
19517
  redrawArcText: function redrawArcText(duration) {
19488
- var _this18 = this,
19518
+ var _this19 = this,
19489
19519
  $$ = this,
19490
19520
  config = $$.config,
19491
19521
  state = $$.state,
@@ -19498,13 +19528,13 @@ function getAttrTweenFn(fn) {
19498
19528
  // for gauge type, update text when has no title & multi data
19499
19529
  if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
19500
19530
  text = main.selectAll("." + $ARC.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
19501
- _newArrowCheck(this, _this18);
19531
+ _newArrowCheck(this, _this19);
19502
19532
  return $$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null;
19503
19533
  }.bind(this)).call($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
19504
- _newArrowCheck(this, _this18);
19534
+ _newArrowCheck(this, _this19);
19505
19535
  return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? Math.round(state.radius / 5) + "px" : null;
19506
19536
  }.bind(this)).transition().duration(duration).style("opacity", function (d) {
19507
- _newArrowCheck(this, _this18);
19537
+ _newArrowCheck(this, _this19);
19508
19538
  return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0";
19509
19539
  }.bind(this));
19510
19540
  hasMultiArcGauge && text.attr("dy", "-.1em");
@@ -19530,14 +19560,14 @@ function getAttrTweenFn(fn) {
19530
19560
  * @private
19531
19561
  */
19532
19562
  getArcElementByIdOrIndex: function getArcElementByIdOrIndex(value) {
19533
- var _this19 = this,
19563
+ var _this20 = this,
19534
19564
  $$ = this,
19535
19565
  arcs = $$.$el.arcs,
19536
19566
  filterFn = isNumber(value) ? function (d) {
19537
- _newArrowCheck(this, _this19);
19567
+ _newArrowCheck(this, _this20);
19538
19568
  return d.index === value;
19539
19569
  }.bind(this) : function (d) {
19540
- _newArrowCheck(this, _this19);
19570
+ _newArrowCheck(this, _this20);
19541
19571
  return d.data.id === value;
19542
19572
  }.bind(this),
19543
19573
  _arcs;
@@ -25195,7 +25225,7 @@ var _defaults = {};
25195
25225
 
25196
25226
  /**
25197
25227
  * @namespace bb
25198
- * @version 3.9.2
25228
+ * @version 3.9.3
25199
25229
  */
25200
25230
  var bb = {
25201
25231
  /**
@@ -25205,7 +25235,7 @@ var bb = {
25205
25235
  * bb.version; // "1.0.0"
25206
25236
  * @memberof bb
25207
25237
  */
25208
- version: "3.9.2",
25238
+ version: "3.9.3",
25209
25239
  /**
25210
25240
  * Generate chart
25211
25241
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.9.2
8
+ * @version 3.9.3
9
9
  */.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px}