billboard.js 3.8.0-next.1 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +104 -51
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +147 -66
  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 +18 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +17 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +14 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +45 -17
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +62 -19
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +62 -20
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +59 -19
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +88 -43
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +13 -12
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +8 -4
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  34. package/package.json +21 -21
  35. package/src/ChartInternal/internals/region.ts +9 -9
  36. package/src/ChartInternal/shape/point.ts +3 -2
  37. package/src/Plugin/sparkline/index.ts +9 -1
  38. package/types/options.d.ts +1 -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.8.0-next.1
8
+ * @version 3.8.0
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.8.0-next.1
8
+ * @version 3.8.0
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -438,6 +438,18 @@ var isValue = function (v) {
438
438
  _newArrowCheck(this, util_this);
439
439
  return obj && !(obj != null && obj.nodeType) && isObjectType(obj) && !isArray(obj);
440
440
  }.bind(undefined);
441
+ /**
442
+ * Check if is array
443
+ * @param {Array} arr Data to be checked
444
+ * @returns {boolean}
445
+ * @private
446
+ */
447
+ /**
448
+ * Check if is object
449
+ * @param {object} obj Data to be checked
450
+ * @returns {boolean}
451
+ * @private
452
+ */
441
453
  /**
442
454
  * Get specified key value from object
443
455
  * If default value is given, will return if given key value not found
@@ -4240,7 +4252,8 @@ function getDataKeyForJson(keysParam, config) {
4240
4252
  return config.axis_x_categories.indexOf(v) > -1;
4241
4253
  }.bind(this)),
4242
4254
  isDataAppend = data.__append__,
4243
- xIndex = xKey === null && isDataAppend ? $$.api.data.values(id).length : 0;
4255
+ xIndex = xKey === null && isDataAppend ? $$.api.data.values(id).length : 0; // when .load() with 'append' option is used for indexed axis
4256
+ // @ts-ignore
4244
4257
  return {
4245
4258
  id: convertedId,
4246
4259
  id_org: id,
@@ -4997,6 +5010,9 @@ function getDataKeyForJson(keysParam, config) {
4997
5010
  isRotated = config.axis_rotated,
4998
5011
  e = inputType === "touch" && event.changedTouches ? event.changedTouches[0] : event,
4999
5012
  index = findIndex(coords, isRotated ? e.clientY - rect.top : e.clientX - rect.left, 0, coords.length - 1, isRotated);
5013
+
5014
+ // get data based on the mouse coords
5015
+
5000
5016
  return index;
5001
5017
  },
5002
5018
  getDataLabelLength: function getDataLabelLength(min, max, key) {
@@ -5043,7 +5059,6 @@ function getDataKeyForJson(keysParam, config) {
5043
5059
  return $$.findClosest(target.values, pos);
5044
5060
  }.bind(this));
5045
5061
  // map to array of closest points of each target
5046
-
5047
5062
  // decide closest point and return
5048
5063
  return $$.findClosest(candidates, pos);
5049
5064
  },
@@ -5647,6 +5662,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5647
5662
  return v !== this;
5648
5663
  }.bind(this));
5649
5664
  }); // select based on the index
5665
+ // filter if has new selection
5650
5666
  // call onout callback
5651
5667
  if (!isOver || shapesAtIndex.empty() || last.length === shape.size() && shape.nodes().every(function (v, i) {
5652
5668
  _newArrowCheck(this, _this5);
@@ -7082,7 +7098,7 @@ function getLegendColor(id) {
7082
7098
  return !isDefined(config.data_names[id]) || config.data_names[id] !== null;
7083
7099
  }.bind(this)),
7084
7100
  withTransition = options.withTransition,
7085
- updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes);
7101
+ updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes); // Skip elements when their name is set to null
7086
7102
  if (state.isLegendInset) {
7087
7103
  dimension.step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;
7088
7104
  $$.updateLegendStep(dimension.step);
@@ -7215,7 +7231,7 @@ function getLegendColor(id) {
7215
7231
  sizes.margins[dimension.step] = state.isLegendInset ? 10 : margin;
7216
7232
  sizes.offsets[id2] = dimension.totalLength;
7217
7233
  dimension.totalLength += itemLength;
7218
- };
7234
+ }; // MEMO: care about condifion of step, totalLength
7219
7235
  if (index === 0) {
7220
7236
  dimension.totalLength = 0;
7221
7237
  dimension.step = 0;
@@ -7283,6 +7299,8 @@ function getLegendColor(id) {
7283
7299
  isRectangle = legendType !== "circle",
7284
7300
  isLegendRightOrInset = state.isLegendRight || state.isLegendInset,
7285
7301
  l = legend.selectAll("." + $LEGEND.legendItem).data(targetIdz).enter().append("g");
7302
+ // Define g for legend area
7303
+
7286
7304
  $$.setLegendItem(l);
7287
7305
  l.append("text").text(function (id) {
7288
7306
  _newArrowCheck(this, _this6);
@@ -7531,7 +7549,8 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
7531
7549
  flowFn && flowFn();
7532
7550
  state.redrawing = !1;
7533
7551
  callFn(config.onrendered, $$.api);
7534
- }.bind(this);
7552
+ }.bind(this); // redraw list
7553
+ // callback function after redraw ends
7535
7554
  if (afterRedraw) {
7536
7555
  // Only use transition when current tab is visible.
7537
7556
  if (withTransition && redrawList.length) {
@@ -7814,6 +7833,11 @@ function getScale(type, min, max) {
7814
7833
  },
7815
7834
  xDomain = updateXDomain && ((_scale$x = scale.x) == null ? void 0 : _scale$x.orgDomain()),
7816
7835
  xSubDomain = updateXDomain && org.xDomain;
7836
+ // update edges
7837
+
7838
+ // update scales
7839
+ // x Axis
7840
+
7817
7841
  scale.x = $$.getXScale(min.x, max.x, xDomain, function () {
7818
7842
  _newArrowCheck(this, _this2);
7819
7843
  return axis.x.tickOffset();
@@ -8017,7 +8041,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8017
8041
  xs = _$$$config.data_xs,
8018
8042
  removeNull = _$$$config.bar_indices_removeNull,
8019
8043
  id = d.id,
8020
- index = d.index;
8044
+ index = d.index; // eslint-disable-line
8021
8045
  if ($$.isBarType(id) && removeNull) {
8022
8046
  var ind = {};
8023
8047
 
@@ -8062,6 +8086,8 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8062
8086
  return p + c;
8063
8087
  }.bind(this),
8064
8088
  halfWidth = isObjectType(offset) && (offset._$total.length ? offset._$total.reduce(sum) / 2 : 0);
8089
+ // total shapes half width
8090
+
8065
8091
  return function (d) {
8066
8092
  _newArrowCheck(this, _this5);
8067
8093
  var ind = $$.getIndices(indices, d, "getShapeX"),
@@ -9238,6 +9264,8 @@ function setRotatePos(d, pos, anchor, isRotated, isInverted) {
9238
9264
  _newArrowCheck(this, _this5);
9239
9265
  return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
9240
9266
  }.bind(this);
9267
+ // Calculates the length of the hypotenuse
9268
+
9241
9269
  textNode.node() && filteredTextNodes.each(function () {
9242
9270
  var coordinate = getTranslation(this),
9243
9271
  filteredTextNode = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
@@ -9750,6 +9778,8 @@ function getTextPos(pos, width) {
9750
9778
  y: y
9751
9779
  },
9752
9780
  data = (_selectedData$filter = selectedData.filter(Boolean)) == null ? void 0 : _selectedData$filter.shift();
9781
+ // get mouse event position
9782
+
9753
9783
  if (scale.x && data && "x" in data) {
9754
9784
  currPos.xAxis = scale.x(data.x);
9755
9785
  }
@@ -10228,38 +10258,28 @@ function getTextPos(pos, width) {
10228
10258
  * @private
10229
10259
  */
10230
10260
  var ChartInternal = /*#__PURE__*/function () {
10231
- // API interface
10232
- // config object
10233
- // cache instance
10234
- // elements
10235
- // state variables
10236
- // all Chart instances array within page (equivalent of 'bb.instances')
10237
-
10238
- // data object
10239
-
10240
- // Axis
10241
- // Axis
10242
-
10243
- // scales
10244
-
10245
- // original values
10246
-
10247
- // formatter function
10248
-
10249
- // format function
10250
-
10251
10261
  function ChartInternal(api) {
10252
10262
  this.api = void 0;
10263
+ // API interface
10253
10264
  this.config = void 0;
10265
+ // config object
10254
10266
  this.cache = void 0;
10267
+ // cache instance
10255
10268
  this.$el = void 0;
10269
+ // elements
10256
10270
  this.state = void 0;
10271
+ // state variables
10257
10272
  this.charts = void 0;
10273
+ // all Chart instances array within page (equivalent of 'bb.instances')
10274
+ // data object
10258
10275
  this.data = {
10259
10276
  xs: {},
10260
10277
  targets: []
10261
10278
  };
10279
+ // Axis
10262
10280
  this.axis = void 0;
10281
+ // Axis
10282
+ // scales
10263
10283
  this.scale = {
10264
10284
  x: null,
10265
10285
  y: null,
@@ -10269,15 +10289,18 @@ var ChartInternal = /*#__PURE__*/function () {
10269
10289
  subY2: null,
10270
10290
  zoom: null
10271
10291
  };
10292
+ // original values
10272
10293
  this.org = {
10273
10294
  xScale: null,
10274
10295
  xDomain: null
10275
10296
  };
10297
+ // formatter function
10276
10298
  this.color = void 0;
10277
10299
  this.patterns = void 0;
10278
10300
  this.levelColor = void 0;
10279
10301
  this.point = void 0;
10280
10302
  this.brush = void 0;
10303
+ // format function
10281
10304
  this.format = {
10282
10305
  extraLineClasses: null,
10283
10306
  xAxisTick: null,
@@ -10487,7 +10510,6 @@ var ChartInternal = /*#__PURE__*/function () {
10487
10510
  hasPolar = $$.hasType("polar");
10488
10511
  // for arc type, set axes to not be shown
10489
10512
  // $$.hasArcType() && ["x", "y", "y2"].forEach(id => (config[`axis_${id}_show`] = false));
10490
-
10491
10513
  if (hasAxis) {
10492
10514
  $$.axis = $$.getAxisInstance();
10493
10515
  config.zoom_enabled && $$.initZoom();
@@ -13485,7 +13507,7 @@ var AxisRendererHelper = /*#__PURE__*/function () {
13485
13507
  size = {
13486
13508
  w: 5.5,
13487
13509
  h: 11.5
13488
- };
13510
+ }; // default size for one character
13489
13511
  node.empty() || node.select("text").text("0").call(function (el) {
13490
13512
  _newArrowCheck(this, _this);
13491
13513
  try {
@@ -13680,6 +13702,11 @@ var AxisRenderer = /*#__PURE__*/function () {
13680
13702
  axisPx = tickTransform === helper.axisX ? "y" : "x",
13681
13703
  sign = /^(top|left)$/.test(orient) ? -1 : 1,
13682
13704
  rotate = params.tickTextRotate;
13705
+
13706
+ // line/text enter and path update
13707
+
13708
+ // tick text helpers
13709
+
13683
13710
  this.config.range = scale.rangeExtent ? scale.rangeExtent() : helper.scaleExtent((params.orgXScale || scale).range());
13684
13711
  var innerTickSize = config.innerTickSize,
13685
13712
  tickLength = config.tickLength,
@@ -13695,6 +13722,7 @@ var AxisRenderer = /*#__PURE__*/function () {
13695
13722
  tick: axisShow ? params.config[prefix + "_tick_show"] : !1,
13696
13723
  text: axisShow ? params.config[prefix + "_tick_text_show"] : !1
13697
13724
  }; // // get the axis' tick position configuration
13725
+ // tick visiblity
13698
13726
  var $g;
13699
13727
  g.each(function () {
13700
13728
  var _this = this,
@@ -14422,7 +14450,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14422
14450
  tickFormat = forSubchart ? config.subchart_axis_x_tick_format || config.axis_x_tick_format : config.axis_x_tick_format,
14423
14451
  isTimeSeries = this.isTimeSeries(),
14424
14452
  isCategorized = this.isCategorized(),
14425
- currFormat;
14453
+ currFormat; // enable different tick format for x and subX - subX format defaults to x format if not defined
14426
14454
  if (tickFormat) {
14427
14455
  if (isFunction(tickFormat)) {
14428
14456
  currFormat = tickFormat.bind($$.api);
@@ -15048,7 +15076,8 @@ var Axis_Axis = /*#__PURE__*/function () {
15048
15076
  event.preventDefault();
15049
15077
  }
15050
15078
  }
15051
- }.bind(this);
15079
+ }.bind(this); // call event.preventDefault()
15080
+ // according 'interaction.inputType.touch.preventDefault' option
15052
15081
  // bind touch events
15053
15082
  eventRect.on("touchstart", function (event) {
15054
15083
  _newArrowCheck(this, _this2);
@@ -15640,7 +15669,7 @@ var external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_ = __webpack
15640
15669
  flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength),
15641
15670
  translateX,
15642
15671
  orgDomain = x.domain(),
15643
- domain = $$.updateXDomain(targets, !0, !0);
15672
+ domain = $$.updateXDomain(targets, !0, !0); // update x domain to generate axis elements for flow
15644
15673
  // generate transform to flow
15645
15674
  if (!orgDataCount) {
15646
15675
  // if empty
@@ -15719,6 +15748,9 @@ var external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_ = __webpack
15719
15748
  y = -Math.max(15, margin.top),
15720
15749
  w = isRotated ? margin.left + 20 : width + 10 + left,
15721
15750
  h = (isRotated ? margin.top + height + 10 : margin.bottom) + 20;
15751
+
15752
+ // less than 20 is not enough to show the axis label 'outer' without legend
15753
+
15722
15754
  node.attr("x", x).attr("y", y).attr("width", w).attr("height", h);
15723
15755
  },
15724
15756
  /**
@@ -16247,13 +16279,13 @@ function smoothLines(el, type) {
16247
16279
 
16248
16280
  // hide if arc type
16249
16281
  region.main.style("visibility", $$.hasArcType() ? "hidden" : null);
16250
- // select <g> element
16251
16282
 
16252
- var list = region.main.selectAll("." + $REGION.region).data(config.regions);
16253
- $T(list.exit()).style("opacity", "0").remove();
16254
- list = list.enter().append("g").merge(list).attr("class", $$.classRegion.bind($$));
16255
- list.append("rect").style("fill-opacity", "0");
16256
- region.list = list;
16283
+ // select <g> element
16284
+ var regions = region.main.selectAll("." + $REGION.region).data(config.regions);
16285
+ $T(regions.exit()).style("opacity", "0").remove();
16286
+ var regionsEnter = regions.enter().append("g");
16287
+ regionsEnter.append("rect").style("fill-opacity", "0");
16288
+ region.list = regionsEnter.merge(regions).attr("class", $$.classRegion.bind($$));
16257
16289
  },
16258
16290
  redrawRegion: function redrawRegion(withTransition) {
16259
16291
  var _this = this,
@@ -18599,6 +18631,7 @@ function getAttrTweenFn(fn) {
18599
18631
  var min = config.gauge_min,
18600
18632
  max = config.gauge_max,
18601
18633
  totalSum = $$.getTotalDataSum(state.rendered); // to prevent excluding total data sum during the init(when data.hide option is used), use $$.rendered state value
18634
+ // https://github.com/naver/billboard.js/issues/2123
18602
18635
  pie = pie.startAngle(gStart).endAngle(radius * ((totalSum - min) / (max - min)) + gStart);
18603
18636
  }
18604
18637
  pie($$.filterTargetsToShow()).forEach(function (t, i) {
@@ -19302,7 +19335,7 @@ function getAttrTweenFn(fn) {
19302
19335
  var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
19303
19336
  offset = areaOffset(d, i) || y0,
19304
19337
  posX = x(d),
19305
- value = d.value;
19338
+ value = d.value; // offset is for stacked area chart
19306
19339
  var posY = y(d);
19307
19340
 
19308
19341
  // fix posY not to overflow opposite quadrant
@@ -19466,6 +19499,8 @@ function getAttrTweenFn(fn) {
19466
19499
  _newArrowCheck(this, _this4);
19467
19500
  return w * barRadiusRatio;
19468
19501
  }.bind(this) : null;
19502
+ // get the bar radius
19503
+
19469
19504
  return function (d, i) {
19470
19505
  _newArrowCheck(this, _this4);
19471
19506
  // 4 points that make a bar
@@ -19539,6 +19574,7 @@ function getAttrTweenFn(fn) {
19539
19574
  _newArrowCheck(this, _this5);
19540
19575
  return v.id;
19541
19576
  }.bind(this)); // Get sorted list
19577
+ // Get sorted Ids. Filter positive or negative values Ids from given value
19542
19578
  // If the given id stays in the last position, then radius should be applied.
19543
19579
  return value !== 0 && sortedIds.indexOf(id) === sortedIds.length - 1;
19544
19580
  },
@@ -19569,6 +19605,9 @@ function getAttrTweenFn(fn) {
19569
19605
  isInverted = config["axis_" + $$.axis.getId(id) + "_inverted"],
19570
19606
  value = d.value,
19571
19607
  posX = barX(d);
19608
+
19609
+ // offset is for stacked bar chart
19610
+
19572
19611
  var posY = barY(d);
19573
19612
 
19574
19613
  // fix posY not to overflow opposite quadrant
@@ -19676,7 +19715,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19676
19715
  var points = getPoints(d, i),
19677
19716
  value = $$.getCandlestickData(d),
19678
19717
  isUp = (_value = value) == null ? void 0 : _value._isUp,
19679
- indexX = +isRotated;
19718
+ indexX = +isRotated; // switch points if axis is rotated, not applicable for sub chart
19680
19719
  if (g.classed) {
19681
19720
  g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], !0);
19682
19721
  }
@@ -19730,7 +19769,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19730
19769
  var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
19731
19770
  offset = shapeOffset(d, i) || y0,
19732
19771
  width = isNumber(barW) ? barW : barW[d.id] || barW._$width,
19733
- value = $$.getCandlestickData(d);
19772
+ value = $$.getCandlestickData(d); // offset is for stacked bar chart
19734
19773
  var points;
19735
19774
  if (value) {
19736
19775
  var posX = {
@@ -19851,6 +19890,9 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19851
19890
  state = $$.state,
19852
19891
  hasMultiGauge = $$.hasMultiArcGauge(),
19853
19892
  max = hasMultiGauge ? $$.getMinMaxData().max[0].value : $$.getTotalDataSum(state.rendered);
19893
+
19894
+ // to prevent excluding total data sum during the init(when data.hide option is used), use $$.rendered state value
19895
+
19854
19896
  // if gauge_max less than max, make max to max value
19855
19897
  if (max + config.gauge_min * (config.gauge_min > 0 ? -1 : 1) > config.gauge_max) {
19856
19898
  config.gauge_max = max - config.gauge_min;
@@ -20166,7 +20208,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
20166
20208
  xp,
20167
20209
  yp,
20168
20210
  diff,
20169
- diffx2;
20211
+ diffx2; // default value
20170
20212
  // Check start/end of regions
20171
20213
  if (isDefined(_regions)) {
20172
20214
  var getValue = function (v, def) {
@@ -20222,7 +20264,8 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
20222
20264
  axisType = {
20223
20265
  x: $$.axis.getAxisType("x"),
20224
20266
  y: $$.axis.getAxisType("y")
20225
- };
20267
+ }; // Define svg generator function for region
20268
+ // Generate
20226
20269
  var path = "";
20227
20270
  for (var _i = 0, data; data = d[_i]; _i++) {
20228
20271
  var prevData = d[_i - 1],
@@ -20450,7 +20493,7 @@ var getTransitionName = function () {
20450
20493
  if (d) {
20451
20494
  circle = circle.filter(function (t) {
20452
20495
  var _this5 = this,
20453
- data = d.filter(function (v) {
20496
+ data = d.filter == null ? void 0 : d.filter(function (v) {
20454
20497
  _newArrowCheck(this, _this5);
20455
20498
  return v.id === t.id;
20456
20499
  }.bind(this));
@@ -20633,12 +20676,12 @@ var getTransitionName = function () {
20633
20676
  x = $$.getShapeX(0, lineIndices, isSub),
20634
20677
  y = $$.getShapeY(isSub),
20635
20678
  lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),
20636
- yScale = $$.getYScaleById.bind($$);
20679
+ yScale = $$.getYScaleById.bind($$); // partial duplication of generateGetBarPoints
20637
20680
  return function (d, i) {
20638
20681
  _newArrowCheck(this, _this8);
20639
20682
  var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
20640
20683
  offset = lineOffset(d, i) || y0,
20641
- posX = x(d);
20684
+ posX = x(d); // offset is for stacked area chart
20642
20685
  var posY = y(d);
20643
20686
 
20644
20687
  // fix posY not to overflow opposite quadrant
@@ -21062,6 +21105,8 @@ var cacheKey = KEY.radarPoints;
21062
21105
  return pos.join(" ");
21063
21106
  }.bind(this)),
21064
21107
  level = radarLevels.selectAll("." + $LEVEL.level).data(levelData);
21108
+ // Generate points
21109
+
21065
21110
  level.exit().remove();
21066
21111
  var levelEnter = level.enter().append("g").attr("class", function (d, i) {
21067
21112
  _newArrowCheck(this, _this6);
@@ -22865,7 +22910,10 @@ var _area = function area() {
22865
22910
  _newArrowCheck(this, _this19);
22866
22911
  return TYPE.TREEMAP;
22867
22912
  }.bind(this))();
22868
- }.bind(undefined);
22913
+ }.bind(undefined); // Line types
22914
+ // Arc types
22915
+ // Axis based types
22916
+ // Non Axis based types
22869
22917
  ;// CONCATENATED MODULE: ./src/Chart/api/selection.ts
22870
22918
 
22871
22919
  /**
@@ -23188,7 +23236,10 @@ var zoom = function (domainValue) {
23188
23236
  var _d3ZoomIdentity$scale,
23189
23237
  _x = isCategorized ? scale.x.orgScale() : org.xScale || scale.x,
23190
23238
  translate = [-_x(domain[0]), 0],
23191
- transform = (_d3ZoomIdentity$scale = external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_.zoomIdentity.scale(_x.range()[1] / (_x(domain[1]) - _x(domain[0])))).translate.apply(_d3ZoomIdentity$scale, isRotated ? translate.reverse() : translate);
23239
+ transform = (_d3ZoomIdentity$scale = external_commonjs_d3_zoom_commonjs2_d3_zoom_amd_d3_zoom_root_d3_.zoomIdentity.scale(_x.range()[1] / (_x(domain[1]) - _x(domain[0])))).translate.apply(_d3ZoomIdentity$scale, isRotated ? translate.reverse() : translate); // in case of 'config.zoom_rescale=true', use org.xScale
23240
+ // Get transform from given domain value
23241
+ // https://github.com/d3/d3-zoom/issues/57#issuecomment-246434951
23242
+
23192
23243
  $el.eventRect.call($$.zoom.transform, transform);
23193
23244
  }
23194
23245
  $$.setZoomResetButton();
@@ -23802,6 +23853,8 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
23802
23853
  isRotated = config.axis_rotated,
23803
23854
  initRange = config.subchart_init_range,
23804
23855
  path = isRotated ? ["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z", "M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"] : ["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", "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"];
23856
+ // brush handle shape's path
23857
+
23805
23858
  $$.brush.handle = brush.selectAll(".handle--custom").data(isRotated ? [{
23806
23859
  type: "n"
23807
23860
  }, {
@@ -24193,7 +24246,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
24193
24246
  var zoomDomain = zoom.domain(),
24194
24247
  xDomain = subX.domain(),
24195
24248
  delta = .015,
24196
- isfullyShown = $$.config.axis_x_inverted ? (zoomDomain[0] >= xDomain[0] || zoomDomain[0] + delta >= xDomain[0]) && (xDomain[1] >= zoomDomain[1] || xDomain[1] >= zoomDomain[1] + delta) : (zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta);
24249
+ isfullyShown = $$.config.axis_x_inverted ? (zoomDomain[0] >= xDomain[0] || zoomDomain[0] + delta >= xDomain[0]) && (xDomain[1] >= zoomDomain[1] || xDomain[1] >= zoomDomain[1] + delta) : (zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta); // arbitrary value
24197
24250
  // check if the zoomed chart is fully shown, then reset scale when zoom is out as initial
24198
24251
  if (force || isfullyShown) {
24199
24252
  $$.axis.x.scale(subX);
@@ -24670,7 +24723,7 @@ var _defaults = {};
24670
24723
 
24671
24724
  /**
24672
24725
  * @namespace bb
24673
- * @version 3.8.0-next.1
24726
+ * @version 3.8.0
24674
24727
  */
24675
24728
  var bb = {
24676
24729
  /**
@@ -24680,7 +24733,7 @@ var bb = {
24680
24733
  * bb.version; // "1.0.0"
24681
24734
  * @memberof bb
24682
24735
  */
24683
- version: "3.8.0-next.1",
24736
+ version: "3.8.0",
24684
24737
  /**
24685
24738
  * Generate chart
24686
24739
  * - **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.8.0-next.1
8
+ * @version 3.8.0
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-bars path,.bb-event-rect,.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{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;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9}.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}