billboard.js 3.6.2 → 3.7.0-next.1

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 +1 -1
  2. package/dist/billboard.js +529 -167
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +1723 -1277
  6. package/dist/billboard.pkgd.min.js +4 -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 +35 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +35 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +35 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +35 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +933 -923
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +966 -924
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +966 -924
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +966 -924
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +966 -924
  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 +375 -108
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  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 +40 -35
  35. package/src/Chart/api/chart.ts +13 -4
  36. package/src/Chart/api/export.ts +159 -14
  37. package/src/ChartInternal/Axis/Axis.ts +1 -1
  38. package/src/ChartInternal/Axis/AxisRendererHelper.ts +4 -2
  39. package/src/ChartInternal/data/IData.ts +1 -0
  40. package/src/ChartInternal/data/data.ts +21 -2
  41. package/src/ChartInternal/interactions/interaction.ts +6 -7
  42. package/src/ChartInternal/internals/domain.ts +11 -4
  43. package/src/ChartInternal/internals/format.ts +1 -1
  44. package/src/ChartInternal/internals/grid.ts +1 -1
  45. package/src/ChartInternal/shape/arc.ts +145 -68
  46. package/src/ChartInternal/shape/area.ts +3 -0
  47. package/src/ChartInternal/shape/bar.ts +3 -0
  48. package/src/ChartInternal/shape/line.ts +12 -15
  49. package/src/config/Options/common/tooltip.ts +11 -8
  50. package/src/config/Options/shape/arc.ts +47 -0
  51. package/src/config/Options/shape/gauge.ts +2 -2
  52. package/src/config/resolver/shape.ts +13 -4
  53. package/src/module/util.ts +1 -1
  54. package/types/chart.d.ts +7 -0
  55. package/types/options.d.ts +39 -624
  56. package/types/options.shape.d.ts +633 -0
  57. package/types/types.d.ts +2 -2
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.6.2
8
+ * @version 3.7.0-next.1
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -305,8 +305,39 @@ var TYPE_BY_CATEGORY = {
305
305
  Step: [TYPE.STEP, TYPE.AREA_STEP],
306
306
  Spline: [TYPE.SPLINE, TYPE.AREA_SPLINE, TYPE.AREA_SPLINE_RANGE]
307
307
  };
308
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
309
+ function _typeof(obj) {
310
+ "@babel/helpers - typeof";
311
+
312
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
313
+ return typeof obj;
314
+ } : function (obj) {
315
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
316
+ }, _typeof(obj);
317
+ }
318
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
319
+
320
+ function _toPrimitive(input, hint) {
321
+ if (_typeof(input) !== "object" || input === null) return input;
322
+ var prim = input[Symbol.toPrimitive];
323
+ if (prim !== undefined) {
324
+ var res = prim.call(input, hint || "default");
325
+ if (_typeof(res) !== "object") return res;
326
+ throw new TypeError("@@toPrimitive must return a primitive value.");
327
+ }
328
+ return (hint === "string" ? String : Number)(input);
329
+ }
330
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
331
+
332
+
333
+ function _toPropertyKey(arg) {
334
+ var key = _toPrimitive(arg, "string");
335
+ return _typeof(key) === "symbol" ? key : String(key);
336
+ }
308
337
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
338
+
309
339
  function _defineProperty(obj, key, value) {
340
+ key = _toPropertyKey(key);
310
341
  if (key in obj) {
311
342
  Object.defineProperty(obj, key, {
312
343
  value: value,
@@ -833,7 +864,8 @@ function getCssRules(styleSheets) {
833
864
  rules = rules.concat(toArray(sheet.cssRules));
834
865
  }
835
866
  } catch (e) {
836
- console.error("Error while reading rules from " + sheet.href + ": " + e.toString());
867
+ var _window$console;
868
+ (_window$console = win.console) == null ? void 0 : _window$console.warn("Error while reading rules from " + sheet.href + ": " + e.toString());
837
869
  }
838
870
  }.bind(this));
839
871
  return rules;
@@ -3247,17 +3279,20 @@ var tooltip_this = undefined;
3247
3279
  * Specified function receives x of the data point to show.
3248
3280
  * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>
3249
3281
  * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
3250
- * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br>
3251
- * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
3252
- * If undefined returned, the row of that value will be skipped.
3282
+ * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip. If undefined returned, the row of that value will be skipped to be called.
3283
+ * - Will pass following arguments to the given function:
3284
+ * - `value {string}`: Value of the data point
3285
+ * - `ratio {number}`: Ratio of the data point in the `pie/donut/gauge` and `area/bar` when contains grouped data. Otherwise is `undefined`.
3286
+ * - `id {string}`: id of the data point
3287
+ * - `index {number}`: Index of the data point
3253
3288
  * @property {Function} [tooltip.position] Set custom position function for the tooltip.<br>
3254
3289
  * This option can be used to modify the tooltip position by returning object that has top and left.
3255
3290
  * - Will pass following arguments to the given function:
3256
- * - `data {Array}`: Current selected data array object.
3257
- * - `width {number}`: Width of tooltip.
3258
- * - `height {number}`: Height of tooltip.
3259
- * - `element {SVGElement}`: Tooltip event bound element
3260
- * - `pos {object}`: Current position of the tooltip.
3291
+ * - `data {Array}`: Current selected data array object.
3292
+ * - `width {number}`: Width of tooltip.
3293
+ * - `height {number}`: Height of tooltip.
3294
+ * - `element {SVGElement}`: Tooltip event bound element
3295
+ * - `pos {object}`: Current position of the tooltip.
3261
3296
  * @property {Function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>
3262
3297
  * If tooltip.grouped is true, data includes multiple data points.<br><br>
3263
3298
  * Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.
@@ -4513,7 +4548,7 @@ function getDataKeyForJson(keysParam, config) {
4513
4548
  $$ = this,
4514
4549
  cacheKey = KEY.dataTotalPerIndex,
4515
4550
  sum = $$.cache.get(cacheKey);
4516
- if ($$.isStackNormalized() && !sum) {
4551
+ if (($$.config.data_groups.length || $$.isStackNormalized()) && !sum) {
4517
4552
  sum = [];
4518
4553
  $$.data.targets.forEach(function (row) {
4519
4554
  var _this13 = this;
@@ -5105,6 +5140,30 @@ function getDataKeyForJson(keysParam, config) {
5105
5140
  }
5106
5141
  return value;
5107
5142
  },
5143
+ /**
5144
+ * Set ratio for grouped data
5145
+ * @param {Array} data Data array
5146
+ * @private
5147
+ */
5148
+ setRatioForGroupedData: function setRatioForGroupedData(data) {
5149
+ var _this39 = this,
5150
+ $$ = this,
5151
+ config = $$.config;
5152
+ // calculate ratio if grouped data exists
5153
+ if (config.data_groups.length && data.some(function (d) {
5154
+ _newArrowCheck(this, _this39);
5155
+ return $$.isGrouped(d.id);
5156
+ }.bind(this))) {
5157
+ var setter = function (d) {
5158
+ _newArrowCheck(this, _this39);
5159
+ return $$.getRatio("index", d, !0);
5160
+ }.bind(this);
5161
+ data.forEach(function (v) {
5162
+ _newArrowCheck(this, _this39);
5163
+ "values" in v ? v.values.forEach(setter) : setter(v);
5164
+ }.bind(this));
5165
+ }
5166
+ },
5108
5167
  /**
5109
5168
  * Get ratio value
5110
5169
  * @param {string} type Ratio for given type
@@ -5114,7 +5173,7 @@ function getDataKeyForJson(keysParam, config) {
5114
5173
  * @private
5115
5174
  */
5116
5175
  getRatio: function getRatio(type, d, asPercent) {
5117
- var _this39 = this;
5176
+ var _this40 = this;
5118
5177
  if (asPercent === void 0) {
5119
5178
  asPercent = !1;
5120
5179
  }
@@ -5143,27 +5202,27 @@ function getDataKeyForJson(keysParam, config) {
5143
5202
  var hiddenSum = dataValues(state.hiddenTargetIds, !1);
5144
5203
  if (hiddenSum.length) {
5145
5204
  hiddenSum = hiddenSum.reduce(function (acc, curr) {
5146
- var _this40 = this;
5147
- _newArrowCheck(this, _this39);
5205
+ var _this41 = this;
5206
+ _newArrowCheck(this, _this40);
5148
5207
  return acc.map(function (v, i) {
5149
- _newArrowCheck(this, _this40);
5208
+ _newArrowCheck(this, _this41);
5150
5209
  return (isNumber(v) ? v : 0) + curr[i];
5151
5210
  }.bind(this));
5152
5211
  }.bind(this));
5153
5212
  total = total.map(function (v, i) {
5154
- _newArrowCheck(this, _this39);
5213
+ _newArrowCheck(this, _this40);
5155
5214
  return v - hiddenSum[i];
5156
5215
  }.bind(this));
5157
5216
  }
5158
5217
  }
5159
- d.ratio = isNumber(d.value) && total && total[d.index] > 0 ? d.value / total[d.index] : 0;
5218
+ d.ratio = isNumber(d.value) && total ? d.value / total[d.index] : 0;
5160
5219
  ratio = d.ratio;
5161
5220
  } else if (type === "radar") {
5162
5221
  ratio = parseFloat(Math.max(d.value, 0) + "") / state.current.dataMax * config.radar_size_ratio;
5163
5222
  } else if (type === "bar") {
5164
5223
  var yScale = $$.getYScaleById.bind($$)(d.id),
5165
5224
  _max2 = yScale.domain().reduce(function (a, c) {
5166
- _newArrowCheck(this, _this39);
5225
+ _newArrowCheck(this, _this40);
5167
5226
  return c - a;
5168
5227
  }.bind(this));
5169
5228
  // when all data are 0, return 0
@@ -5178,18 +5237,18 @@ function getDataKeyForJson(keysParam, config) {
5178
5237
  * @private
5179
5238
  */
5180
5239
  updateDataIndexByX: function updateDataIndexByX(tickValues) {
5181
- var _this41 = this,
5240
+ var _this42 = this,
5182
5241
  $$ = this,
5183
5242
  tickValueMap = tickValues.reduce(function (out, tick, index) {
5184
- _newArrowCheck(this, _this41);
5243
+ _newArrowCheck(this, _this42);
5185
5244
  out[+tick.x] = index;
5186
5245
  return out;
5187
5246
  }.bind(this), {});
5188
5247
  $$.data.targets.forEach(function (t) {
5189
- var _this42 = this;
5190
- _newArrowCheck(this, _this41);
5248
+ var _this43 = this;
5249
+ _newArrowCheck(this, _this42);
5191
5250
  t.values.forEach(function (value, valueIndex) {
5192
- _newArrowCheck(this, _this42);
5251
+ _newArrowCheck(this, _this43);
5193
5252
  var index = tickValueMap[+value.x];
5194
5253
  if (index === undefined) {
5195
5254
  index = valueIndex;
@@ -5215,11 +5274,11 @@ function getDataKeyForJson(keysParam, config) {
5215
5274
  * @private
5216
5275
  */
5217
5276
  isBarRangeType: function isBarRangeType(d) {
5218
- var _this43 = this,
5277
+ var _this44 = this,
5219
5278
  $$ = this,
5220
5279
  value = d.value;
5221
5280
  return $$.isBarType(d) && isArray(value) && value.length === 2 && value.every(function (v) {
5222
- _newArrowCheck(this, _this43);
5281
+ _newArrowCheck(this, _this44);
5223
5282
  return isNumber(v);
5224
5283
  }.bind(this));
5225
5284
  },
@@ -5396,12 +5455,10 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5396
5455
  return;
5397
5456
  }
5398
5457
  }
5399
- var shapeAtIndex = main.selectAll("." + $SHAPE.shape + "-" + index).each(function () {
5400
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($COMMON.EXPANDED, !0);
5401
- if (isSelectionEnabled) {
5402
- eventRect.style("cursor", isSelectionGrouped ? "pointer" : null);
5403
- }
5404
- }).filter(function (d) {
5458
+
5459
+ // remove possible previous focused state
5460
+ main.selectAll("." + $COMMON.EXPANDED + ":not(." + $SHAPE.shape + "-" + index + ")").classed($COMMON.EXPANDED, !1);
5461
+ var shapeAtIndex = main.selectAll("." + $SHAPE.shape + "-" + index).classed($COMMON.EXPANDED, !0).style("cursor", isSelectable ? "pointer" : null).filter(function (d) {
5405
5462
  return $$.isWithinShape(this, d);
5406
5463
  });
5407
5464
  if (shapeAtIndex.empty() && !isTooltipGrouped) {
@@ -6119,8 +6176,8 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
6119
6176
  return $$.hasType(v, yTargets, !0) && config[type + "_zerobased"];
6120
6177
  }.bind(this));
6121
6178
  // MEMO: avoid inverting domain unexpectedly
6122
- yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin;
6123
- yDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax;
6179
+ yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin <= yMax ? yDomainMin : yMax - 10 : yDomainMin;
6180
+ yDomainMax = isValue(yMax) ? yMax : isValue(yMin) ? yMin <= yDomainMax ? yDomainMax : yMin + 10 : yDomainMax;
6124
6181
  if (isNaN(yDomainMin)) {
6125
6182
  // set minimum to zero when not number
6126
6183
  yDomainMin = 0;
@@ -6409,7 +6466,7 @@ function getFormat($$, typeValue, v) {
6409
6466
  var config = $$.config,
6410
6467
  type = "axis_" + typeValue + "_tick_format",
6411
6468
  format = config[type] ? config[type] : $$.defaultValueFormat;
6412
- return format(v);
6469
+ return format.call($$.api, v);
6413
6470
  }
6414
6471
  /* harmony default export */ var format = ({
6415
6472
  yFormat: function yFormat(v) {
@@ -10852,8 +10909,9 @@ function loadConfig(config) {
10852
10909
  },
10853
10910
  /**
10854
10911
  * Get or set config option value.
10855
- * - **NOTE:** for without parameter occasion
10856
- * - will return all specified generation options object only. (will exclude any other options not specified at the initialization)
10912
+ * - **NOTE**
10913
+ * - The option key name must be specified as the last level.
10914
+ * - when no argument is given, will return all specified generation options object only. (will exclude any other options not specified at the initialization)
10857
10915
  * @function config
10858
10916
  * @instance
10859
10917
  * @memberof Chart
@@ -10867,12 +10925,20 @@ function loadConfig(config) {
10867
10925
  * // Getter
10868
10926
  * chart.config("gauge.max");
10869
10927
  *
10928
+ * // Getter specified with top level key name will not work.
10929
+ * // The option key name must be specified as the last level.
10930
+ * // chart.config("gauge"); // will not work
10931
+ *
10870
10932
  * // without any arguments, it returns generation config object
10871
10933
  * chart.config(); // {data: { ... }, axis: { ... }, ...}
10872
10934
  *
10873
10935
  * // Setter
10874
10936
  * chart.config("gauge.max", 100);
10875
10937
  *
10938
+ * // Setter specified with top level key name will not work.
10939
+ * // The option key name must be specified as the last level.
10940
+ * // chart.config("gauge", {min: 10, max: 20}); // will not work
10941
+ *
10876
10942
  * // Setter & redraw with the new option
10877
10943
  * chart.config("gauge.max", 100, true);
10878
10944
  */
@@ -10890,7 +10956,7 @@ function loadConfig(config) {
10890
10956
  } else {
10891
10957
  res = config[key];
10892
10958
  }
10893
- } else {
10959
+ } else if (arguments.length === 0 || isEmpty(name)) {
10894
10960
  res = state.orgConfig;
10895
10961
  }
10896
10962
  return res;
@@ -11133,7 +11199,7 @@ var export_this = undefined;
11133
11199
  var b64EncodeUnicode = function (str) {
11134
11200
  var _this2 = this;
11135
11201
  _newArrowCheck(this, export_this);
11136
- return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) {
11202
+ return win.btoa == null ? void 0 : win.btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) {
11137
11203
  _newArrowCheck(this, _this2);
11138
11204
  return String.fromCharCode(+("0x" + p));
11139
11205
  }.bind(this)));
@@ -11162,6 +11228,18 @@ function nodeToSvgDataUrl(node, option, orgSize) {
11162
11228
  return r.cssText;
11163
11229
  }.bind(this));
11164
11230
  clone.setAttribute("xmlns", external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.namespaces.xhtml);
11231
+
11232
+ // remove padding & margin
11233
+ clone.style.margin = "0";
11234
+ clone.style.padding = "0";
11235
+
11236
+ // remove text nodes
11237
+ if (option.preserveFontStyle) {
11238
+ clone.querySelectorAll("text").forEach(function (t) {
11239
+ _newArrowCheck(this, _this3);
11240
+ t.innerHTML = "";
11241
+ }.bind(this));
11242
+ }
11165
11243
  var nodeXml = serializer.serializeToString(clone),
11166
11244
  style = browser_doc.createElement("style"); // escape css for XML
11167
11245
  style.appendChild(browser_doc.createTextNode(cssText.join("\n")));
@@ -11170,12 +11248,154 @@ function nodeToSvgDataUrl(node, option, orgSize) {
11170
11248
  // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
11171
11249
  return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr);
11172
11250
  }
11251
+
11252
+ /**
11253
+ * Get coordinate of the element
11254
+ * @param {SVGElement} elem Target element
11255
+ * @param {object} svgOffset SVG offset
11256
+ * @returns {object}
11257
+ * @private
11258
+ */
11259
+ function getCoords(elem, svgOffset) {
11260
+ var top = svgOffset.top,
11261
+ left = svgOffset.left,
11262
+ _elem$getBBox = elem.getBBox(),
11263
+ x = _elem$getBBox.x,
11264
+ y = _elem$getBBox.y,
11265
+ _elem$getScreenCTM = elem.getScreenCTM(),
11266
+ a = _elem$getScreenCTM.a,
11267
+ b = _elem$getScreenCTM.b,
11268
+ c = _elem$getScreenCTM.c,
11269
+ d = _elem$getScreenCTM.d,
11270
+ e = _elem$getScreenCTM.e,
11271
+ f = _elem$getScreenCTM.f,
11272
+ _elem$getBoundingClie = elem.getBoundingClientRect(),
11273
+ width = _elem$getBoundingClie.width,
11274
+ height = _elem$getBoundingClie.height;
11275
+ return {
11276
+ x: a * x + c * y + e - left,
11277
+ y: b * x + d * y + f - top + (height - Math.round(height / 4)),
11278
+ width: width,
11279
+ height: height
11280
+ };
11281
+ }
11282
+
11283
+ /**
11284
+ * Get text glyph
11285
+ * @param {SVGTextElement} svg Target svg node
11286
+ * @returns {Array}
11287
+ * @private
11288
+ */
11289
+ function getGlyph(svg) {
11290
+ var _this4 = this,
11291
+ _svg$getBoundingClien = svg.getBoundingClientRect(),
11292
+ left = _svg$getBoundingClien.left,
11293
+ top = _svg$getBoundingClien.top,
11294
+ filterFn = function (t) {
11295
+ _newArrowCheck(this, _this4);
11296
+ return t.textContent || t.childElementCount;
11297
+ }.bind(this),
11298
+ glyph = [];
11299
+ toArray(svg.querySelectorAll("text")).filter(filterFn).forEach(function (t) {
11300
+ var _this5 = this;
11301
+ _newArrowCheck(this, _this4);
11302
+ // eslint-disable-line
11303
+ var getStyleFn = function (ts) {
11304
+ var _ref2;
11305
+ _newArrowCheck(this, _this5);
11306
+ var _window$getComputedSt = win.getComputedStyle(ts),
11307
+ fill = _window$getComputedSt.fill,
11308
+ fontFamily = _window$getComputedSt.fontFamily,
11309
+ fontSize = _window$getComputedSt.fontSize,
11310
+ textAnchor = _window$getComputedSt.textAnchor,
11311
+ transform = _window$getComputedSt.transform,
11312
+ _getCoords = getCoords(ts, {
11313
+ left: left,
11314
+ top: top
11315
+ }),
11316
+ x = _getCoords.x,
11317
+ y = _getCoords.y,
11318
+ width = _getCoords.width,
11319
+ height = _getCoords.height;
11320
+ return _ref2 = {}, _ref2[ts.textContent] = {
11321
+ x: x,
11322
+ y: y,
11323
+ width: width,
11324
+ height: height,
11325
+ fill: fill,
11326
+ fontFamily: fontFamily,
11327
+ fontSize: fontSize,
11328
+ textAnchor: textAnchor,
11329
+ transform: transform
11330
+ }, _ref2;
11331
+ }.bind(this);
11332
+ if (t.childElementCount > 1) {
11333
+ toArray(t.querySelectorAll("tspan")).filter(filterFn).forEach(function (ts) {
11334
+ _newArrowCheck(this, _this5);
11335
+ glyph.push(getStyleFn(ts));
11336
+ }.bind(this));
11337
+ return [];
11338
+ } else {
11339
+ glyph.push(getStyleFn(t));
11340
+ }
11341
+ }.bind(this));
11342
+ return glyph;
11343
+ }
11344
+
11345
+ /**
11346
+ * Render text glyph
11347
+ * - NOTE: Called when the 'preserveFontStyle' option is true
11348
+ * @param {CanvasRenderingContext2D} ctx Canvas context
11349
+ * @param {Array} glyph Text glyph array
11350
+ * @private
11351
+ */
11352
+ function renderText(ctx, glyph) {
11353
+ var _this6 = this;
11354
+ glyph.forEach(function (g) {
11355
+ var _this7 = this;
11356
+ _newArrowCheck(this, _this6);
11357
+ Object.keys(g).forEach(function (key) {
11358
+ var _this8 = this;
11359
+ _newArrowCheck(this, _this7);
11360
+ var _g$key = g[key],
11361
+ x = _g$key.x,
11362
+ y = _g$key.y,
11363
+ width = _g$key.width,
11364
+ height = _g$key.height,
11365
+ fill = _g$key.fill,
11366
+ fontFamily = _g$key.fontFamily,
11367
+ fontSize = _g$key.fontSize,
11368
+ transform = _g$key.transform;
11369
+ ctx.save();
11370
+ ctx.font = fontSize + " " + fontFamily;
11371
+ ctx.fillStyle = fill;
11372
+ if (transform === "none") {
11373
+ ctx.fillText(key, x, y);
11374
+ } else {
11375
+ var args = transform.replace(/(matrix|\(|\))/g, "").split(",");
11376
+ if (args.splice(4).every(function (v) {
11377
+ _newArrowCheck(this, _this8);
11378
+ return +v === 0;
11379
+ }.bind(this))) {
11380
+ args.push(x + width - width / 4);
11381
+ args.push(y - height + height / 3);
11382
+ } else {
11383
+ args.push(x);
11384
+ args.push(y);
11385
+ }
11386
+ ctx.transform.apply(ctx, args);
11387
+ ctx.fillText(key, 0, 0);
11388
+ }
11389
+ ctx.restore();
11390
+ }.bind(this));
11391
+ }.bind(this));
11392
+ }
11173
11393
  /* harmony default export */ var api_export = ({
11174
11394
  /**
11175
11395
  * Export chart as an image.
11176
11396
  * - **NOTE:**
11177
11397
  * - IE11 and below not work properly due to the lack of the feature(<a href="https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx">foreignObject</a>) support
11178
- * - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.
11398
+ * - Every style applied to the chart & the basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.
11179
11399
  * @function export
11180
11400
  * @instance
11181
11401
  * @memberof Chart
@@ -11184,6 +11404,12 @@ function nodeToSvgDataUrl(node, option, orgSize) {
11184
11404
  * @param {number} [option.width={currentWidth}] width
11185
11405
  * @param {number} [option.height={currentHeigth}] height
11186
11406
  * @param {boolean} [option.preserveAspectRatio=true] Preserve aspect ratio on given size
11407
+ * @param {boolean} [option.preserveFontStyle=false] Preserve font style(font-family).<br>
11408
+ * **NOTE:**
11409
+ * - This option is useful when outlink web font style's `font-family` are applied to chart's text element.
11410
+ * - Text element's position(especially "transformed") can't be preserved correctly according the page's layout condition.
11411
+ * - If need to preserve accurate text position, embed the web font data within to the page and set `preserveFontStyle=false`.
11412
+ * - Checkout the embed example: <a href="https://stackblitz.com/edit/zfbya9-8nf9nn?file=index.html">https://stackblitz.com/edit/zfbya9-8nf9nn?file=index.html</a>
11187
11413
  * @param {Function} [callback] The callback to be invoked when export is ready.
11188
11414
  * @returns {string} dataURI
11189
11415
  * @example
@@ -11207,16 +11433,19 @@ function nodeToSvgDataUrl(node, option, orgSize) {
11207
11433
  * width: 800,
11208
11434
  * height: 600,
11209
11435
  * preserveAspectRatio: false,
11436
+ * preserveFontStyle: false,
11210
11437
  * mimeType: "image/png"
11211
11438
  * },
11212
11439
  * dataUrl => { ... }
11213
11440
  * );
11214
11441
  */
11215
11442
  export: function _export(option, callback) {
11216
- var _this4 = this,
11443
+ var _this9 = this,
11217
11444
  $$ = this.internal,
11218
11445
  state = $$.state,
11219
- chart = $$.$el.chart,
11446
+ _$$$$el = $$.$el,
11447
+ chart = _$$$$el.chart,
11448
+ svg = _$$$$el.svg,
11220
11449
  _state$current = state.current,
11221
11450
  width = _state$current.width,
11222
11451
  height = _state$current.height,
@@ -11224,22 +11453,30 @@ function nodeToSvgDataUrl(node, option, orgSize) {
11224
11453
  width: width,
11225
11454
  height: height,
11226
11455
  preserveAspectRatio: !0,
11456
+ preserveFontStyle: !1,
11227
11457
  mimeType: "image/png"
11228
11458
  }, option),
11229
11459
  svgDataUrl = nodeToSvgDataUrl(chart.node(), opt, {
11230
11460
  width: width,
11231
11461
  height: height
11232
- });
11462
+ }),
11463
+ glyph = opt.preserveFontStyle ? getGlyph(svg.node()) : [];
11233
11464
  if (callback && isFunction(callback)) {
11234
11465
  var img = new Image();
11235
11466
  img.crossOrigin = "Anonymous";
11236
11467
  img.onload = function () {
11237
- _newArrowCheck(this, _this4);
11468
+ _newArrowCheck(this, _this9);
11238
11469
  var canvas = browser_doc.createElement("canvas"),
11239
11470
  ctx = canvas.getContext("2d");
11240
11471
  canvas.width = opt.width || width;
11241
11472
  canvas.height = opt.height || height;
11242
11473
  ctx.drawImage(img, 0, 0);
11474
+ if (glyph.length) {
11475
+ renderText(ctx, glyph);
11476
+
11477
+ // release glyph array
11478
+ glyph.length = 0;
11479
+ }
11243
11480
  callback.bind(this)(canvas.toDataURL(opt.mimeType));
11244
11481
  }.bind(this);
11245
11482
  img.src = svgDataUrl;
@@ -13017,7 +13254,7 @@ var AxisRendererHelper = /*#__PURE__*/function () {
13017
13254
  _newArrowCheck(this, _this2);
13018
13255
  selection.attr("transform", function (d) {
13019
13256
  _newArrowCheck(this, _this3);
13020
- return fn(Math.ceil(scale(d)));
13257
+ return isValue(d) ? fn(Math.ceil(scale(d))) : null;
13021
13258
  }.bind(this));
13022
13259
  }.bind(this);
13023
13260
  };
@@ -14061,7 +14298,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14061
14298
  chart = _$$$$el2.chart,
14062
14299
  currentTickMax = current.maxTickWidths[id],
14063
14300
  maxWidth = 0;
14064
- if (withoutRecompute || !config["axis_" + id + "_show"] || $$.filterTargetsToShow().length === 0) {
14301
+ if (withoutRecompute || !config["axis_" + id + "_show"] || currentTickMax.size > 0 && $$.filterTargetsToShow().length === 0) {
14065
14302
  return currentTickMax.size;
14066
14303
  }
14067
14304
  if (svg) {
@@ -15442,7 +15679,7 @@ function smoothLines(el, type) {
15442
15679
  // enter
15443
15680
  var xgridLine = xLines.enter().append("g");
15444
15681
  xgridLine.append("line").style("opacity", "0");
15445
- xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0");
15682
+ xgridLine.append("text").attr("transform", isRotated ? null : "rotate(-90)").attr("dy", -5).style("opacity", "0");
15446
15683
  xLines = xgridLine.merge(xLines);
15447
15684
  $T(xLines.attr("class", function (d) {
15448
15685
  _newArrowCheck(this, _this9);
@@ -17820,6 +18057,103 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17820
18057
 
17821
18058
 
17822
18059
 
18060
+ /**
18061
+ * Get radius functions
18062
+ * @param {number} expandRate Expand rate number.
18063
+ * - If 0, means for "normal" radius.
18064
+ * - If > 0, means for "expanded" radius.
18065
+ * @returns {object} radius functions
18066
+ * @private
18067
+ */
18068
+ function getRadiusFn(expandRate) {
18069
+ if (expandRate === void 0) {
18070
+ expandRate = 0;
18071
+ }
18072
+ var $$ = this,
18073
+ config = $$.config,
18074
+ state = $$.state,
18075
+ hasMultiArcGauge = $$.hasMultiArcGauge(),
18076
+ singleArcWidth = state.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,
18077
+ expandWidth = expandRate ? Math.min(state.radiusExpanded * expandRate - state.radius, singleArcWidth * .8 - (1 - expandRate) * 100) : 0;
18078
+ return {
18079
+ /**
18080
+ * Getter of arc innerRadius value
18081
+ * @param {IArcData} d Data object
18082
+ * @returns {number} innerRadius value
18083
+ * @private
18084
+ */
18085
+ inner: function inner(d) {
18086
+ var _$$$getRadius = $$.getRadius(d),
18087
+ innerRadius = _$$$getRadius.innerRadius;
18088
+ return hasMultiArcGauge ? state.radius - singleArcWidth * (d.index + 1) : isNumber(innerRadius) ? innerRadius : 0;
18089
+ },
18090
+ /**
18091
+ * Getter of arc outerRadius value
18092
+ * @param {IArcData} d Data object
18093
+ * @returns {number} outerRadius value
18094
+ * @private
18095
+ */
18096
+ outer: function outer(d) {
18097
+ var _$$$getRadius2 = $$.getRadius(d),
18098
+ outerRadius = _$$$getRadius2.outerRadius,
18099
+ radius;
18100
+ if (hasMultiArcGauge) {
18101
+ radius = state.radius - singleArcWidth * d.index + expandWidth;
18102
+ } else if ($$.hasType("polar") && !expandRate) {
18103
+ radius = $$.getPolarOuterRadius(d, outerRadius);
18104
+ } else {
18105
+ radius = outerRadius;
18106
+ if (expandRate) {
18107
+ var radiusExpanded = state.radiusExpanded;
18108
+ if (state.radius !== outerRadius) {
18109
+ radiusExpanded -= Math.abs(state.radius - outerRadius);
18110
+ }
18111
+ radius = radiusExpanded * expandRate;
18112
+ }
18113
+ }
18114
+ return radius;
18115
+ },
18116
+ /**
18117
+ * Getter of arc cornerRadius value
18118
+ * @param {IArcData} d Data object
18119
+ * @param {number} outerRadius outer radius value
18120
+ * @returns {number} cornerRadius value
18121
+ * @private
18122
+ */
18123
+ corner: function (d, outerRadius) {
18124
+ var _config$arc_cornerRad = config.arc_cornerRadius_ratio,
18125
+ ratio = _config$arc_cornerRad === void 0 ? 0 : _config$arc_cornerRad,
18126
+ _config$arc_cornerRad2 = config.arc_cornerRadius,
18127
+ cornerRadius = _config$arc_cornerRad2 === void 0 ? 0 : _config$arc_cornerRad2,
18128
+ id = d.data.id,
18129
+ value = d.value,
18130
+ corner = 0;
18131
+ if (ratio) {
18132
+ corner = ratio * outerRadius;
18133
+ } else {
18134
+ corner = isNumber(cornerRadius) ? cornerRadius : cornerRadius.call($$.api, id, value, outerRadius);
18135
+ }
18136
+ return corner;
18137
+ }
18138
+ };
18139
+ }
18140
+
18141
+ /**
18142
+ * Get attrTween function to get interpolated value on transition
18143
+ * @param {Function} fn Arc function to execute
18144
+ * @returns {Function} attrTween function
18145
+ * @private
18146
+ */
18147
+ function getAttrTweenFn(fn) {
18148
+ return function (d) {
18149
+ var interpolate = (0,external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_.interpolate)(this._current, d);
18150
+ this._current = d;
18151
+ return function (t) {
18152
+ var interpolated = interpolate(t);
18153
+ return fn(interpolated);
18154
+ };
18155
+ };
18156
+ }
17823
18157
  /* harmony default export */ var arc = ({
17824
18158
  initPie: function initPie() {
17825
18159
  var _this2 = this,
@@ -17959,37 +18293,19 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17959
18293
  return found ? d : null;
17960
18294
  },
17961
18295
  getSvgArc: function getSvgArc() {
17962
- var _this5 = this,
17963
- $$ = this,
17964
- state = $$.state,
17965
- singleArcWidth = state.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,
17966
- hasMultiArcGauge = $$.hasMultiArcGauge(),
17967
- hasPolar = $$.hasType("polar"),
17968
- arc = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.arc)().innerRadius(function (d) {
17969
- _newArrowCheck(this, _this5);
17970
- var _$$$getRadius = $$.getRadius(d),
17971
- innerRadius = _$$$getRadius.innerRadius;
17972
- return hasMultiArcGauge ? state.radius - singleArcWidth * (d.index + 1) : isNumber(innerRadius) ? innerRadius : 0;
17973
- }.bind(this)).outerRadius(function (d) {
17974
- _newArrowCheck(this, _this5);
17975
- var _$$$getRadius2 = $$.getRadius(d),
17976
- outerRadius = _$$$getRadius2.outerRadius,
17977
- radius = outerRadius;
17978
- if (hasMultiArcGauge) {
17979
- radius = state.radius - singleArcWidth * d.index;
17980
- } else if (hasPolar) {
17981
- radius = $$.getPolarOuterRadius(d, outerRadius);
17982
- }
17983
- return radius;
17984
- }.bind(this)),
18296
+ var $$ = this,
18297
+ _getRadiusFn$call = getRadiusFn.call($$),
18298
+ inner = _getRadiusFn$call.inner,
18299
+ outer = _getRadiusFn$call.outer,
18300
+ corner = _getRadiusFn$call.corner,
18301
+ arc = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.arc)().innerRadius(inner).outerRadius(outer),
17985
18302
  newArc = function (d, withoutUpdate) {
17986
18303
  var path = "M 0 0";
17987
18304
  if (d.value || d.data) {
17988
- var updated = !withoutUpdate && $$.updateAngle(d);
17989
- if (withoutUpdate) {
17990
- path = arc(d);
17991
- } else if (updated) {
17992
- path = arc(updated);
18305
+ var _$$$updateAngle,
18306
+ data = withoutUpdate ? d : (_$$$updateAngle = $$.updateAngle(d)) != null ? _$$$updateAngle : null;
18307
+ if (data) {
18308
+ path = arc.cornerRadius(corner(data, outer(data)))(data);
17993
18309
  }
17994
18310
  }
17995
18311
  return path;
@@ -17998,37 +18314,33 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17998
18314
  newArc.centroid = arc.centroid;
17999
18315
  return newArc;
18000
18316
  },
18317
+ /**
18318
+ * Get expanded arc path function
18319
+ * @param {number} rate Expand rate
18320
+ * @returns {Function} Expanded arc path getter function
18321
+ * @private
18322
+ */
18001
18323
  getSvgArcExpanded: function getSvgArcExpanded(rate) {
18002
- var _this6 = this,
18003
- $$ = this,
18004
- state = $$.state,
18005
- newRate = rate || 1,
18006
- singleArcWidth = state.gaugeArcWidth / $$.filterTargetsToShow($$.data.targets).length,
18007
- hasMultiArcGauge = $$.hasMultiArcGauge(),
18008
- expandWidth = Math.min(state.radiusExpanded * newRate - state.radius, singleArcWidth * .8 - (1 - newRate) * 100),
18009
- arc = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.arc)().innerRadius(function (d) {
18010
- _newArrowCheck(this, _this6);
18011
- return hasMultiArcGauge ? state.radius - singleArcWidth * (d.index + 1) : $$.getRadius(d).innerRadius;
18012
- }.bind(this)).outerRadius(function (d) {
18013
- _newArrowCheck(this, _this6);
18014
- var radius;
18015
- if (hasMultiArcGauge) {
18016
- radius = state.radius - singleArcWidth * d.index + expandWidth;
18017
- } else {
18018
- var _$$$getRadius3 = $$.getRadius(d),
18019
- outerRadius = _$$$getRadius3.outerRadius,
18020
- radiusExpanded = state.radiusExpanded;
18021
- if (state.radius !== outerRadius) {
18022
- radiusExpanded -= Math.abs(state.radius - outerRadius);
18023
- }
18024
- radius = radiusExpanded * newRate;
18025
- }
18026
- return radius;
18027
- }.bind(this));
18324
+ var _this5 = this;
18325
+ if (rate === void 0) {
18326
+ rate = 1;
18327
+ }
18328
+ var $$ = this,
18329
+ _getRadiusFn$call2 = getRadiusFn.call($$, rate),
18330
+ inner = _getRadiusFn$call2.inner,
18331
+ outer = _getRadiusFn$call2.outer,
18332
+ corner = _getRadiusFn$call2.corner,
18333
+ arc = (0,external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_.arc)().innerRadius(inner).outerRadius(outer);
18028
18334
  return function (d) {
18029
- var updated = $$.updateAngle(d);
18030
- return updated ? arc(updated) : "M 0 0";
18031
- };
18335
+ _newArrowCheck(this, _this5);
18336
+ var updated = $$.updateAngle(d),
18337
+ outerR = outer(updated),
18338
+ cornerR = 0;
18339
+ if (updated) {
18340
+ cornerR = corner(updated, outerR);
18341
+ }
18342
+ return updated ? arc.cornerRadius(cornerR)(updated) : "M 0 0";
18343
+ }.bind(this);
18032
18344
  },
18033
18345
  getArc: function getArc(d, withoutUpdate, force) {
18034
18346
  return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : "M 0 0";
@@ -18040,7 +18352,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18040
18352
  * @private
18041
18353
  */
18042
18354
  transformForArcLabel: function transformForArcLabel(d) {
18043
- var _this7 = this,
18355
+ var _this6 = this,
18044
18356
  $$ = this,
18045
18357
  config = $$.config,
18046
18358
  radiusExpanded = $$.state.radiusExpanded,
@@ -18054,21 +18366,21 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18054
18366
  translate = "translate(" + x + "," + y + ")";
18055
18367
  } else if (!$$.hasType("gauge") || $$.data.targets.length > 1) {
18056
18368
  var _filter$map,
18057
- _$$$getRadius4 = $$.getRadius(d),
18058
- outerRadius = _$$$getRadius4.outerRadius;
18369
+ _$$$getRadius3 = $$.getRadius(d),
18370
+ outerRadius = _$$$getRadius3.outerRadius;
18059
18371
  if ($$.hasType("polar")) {
18060
18372
  outerRadius = $$.getPolarOuterRadius(d, outerRadius);
18061
18373
  }
18062
18374
  var c = this.svgArc.centroid(updated),
18063
18375
  _c$map = c.map(function (v) {
18064
- _newArrowCheck(this, _this7);
18376
+ _newArrowCheck(this, _this6);
18065
18377
  return isNaN(v) ? 0 : v;
18066
18378
  }.bind(this)),
18067
18379
  x = _c$map[0],
18068
18380
  y = _c$map[1],
18069
18381
  h = Math.sqrt(x * x + y * y),
18070
18382
  ratio = (_filter$map = ["donut", "pie", "polar"].filter($$.hasType.bind($$)).map(function (v) {
18071
- _newArrowCheck(this, _this7);
18383
+ _newArrowCheck(this, _this6);
18072
18384
  return config[v + "_label_ratio"];
18073
18385
  }.bind(this))) == null ? void 0 : _filter$map[0];
18074
18386
  if (ratio) {
@@ -18083,7 +18395,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18083
18395
  },
18084
18396
  convertToArcData: function convertToArcData(d) {
18085
18397
  return this.addName({
18086
- id: d.data ? d.data.id : d.id,
18398
+ id: "data" in d ? d.data.id : d.id,
18087
18399
  value: d.value,
18088
18400
  ratio: this.getRatio("arc", d),
18089
18401
  index: d.index
@@ -18110,14 +18422,14 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18110
18422
  }
18111
18423
  },
18112
18424
  expandArc: function expandArc(targetIds) {
18113
- var _this8 = this,
18425
+ var _this7 = this,
18114
18426
  $$ = this,
18115
18427
  transiting = $$.state.transiting,
18116
18428
  $el = $$.$el;
18117
18429
  // MEMO: avoid to cancel transition
18118
18430
  if (transiting) {
18119
18431
  var interval = setInterval(function () {
18120
- _newArrowCheck(this, _this8);
18432
+ _newArrowCheck(this, _this7);
18121
18433
  if (!transiting) {
18122
18434
  clearInterval(interval);
18123
18435
  $el.legend.selectAll("." + $FOCUS.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
@@ -18132,11 +18444,11 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18132
18444
  }
18133
18445
  var expandDuration = $$.getExpandConfig(d.data.id, "duration"),
18134
18446
  svgArcExpandedSub = $$.getSvgArcExpanded($$.getExpandConfig(d.data.id, "rate"));
18135
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).selectAll("path").transition().duration(expandDuration).attr("d", $$.svgArcExpanded).transition().duration(expandDuration * 2).attr("d", svgArcExpandedSub);
18447
+ (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).selectAll("path").transition().duration(expandDuration).attrTween("d", getAttrTweenFn($$.svgArcExpanded.bind($$))).transition().duration(expandDuration * 2).attrTween("d", getAttrTweenFn(svgArcExpandedSub.bind($$)));
18136
18448
  });
18137
18449
  },
18138
18450
  unexpandArc: function unexpandArc(targetIds) {
18139
- var _this9 = this,
18451
+ var _this8 = this,
18140
18452
  $$ = this,
18141
18453
  transiting = $$.state.transiting,
18142
18454
  svg = $$.$el.svg;
@@ -18145,9 +18457,9 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18145
18457
  }
18146
18458
  var newTargetIds = $$.mapToTargetIds(targetIds);
18147
18459
  svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).selectAll("path").transition().duration(function (d) {
18148
- _newArrowCheck(this, _this9);
18460
+ _newArrowCheck(this, _this8);
18149
18461
  return $$.getExpandConfig(d.data.id, "duration");
18150
- }.bind(this)).attr("d", $$.svgArc);
18462
+ }.bind(this)).attrTween("d", getAttrTweenFn($$.svgArc.bind($$)));
18151
18463
  svg.selectAll("" + $ARC.arc).style("opacity", null);
18152
18464
  },
18153
18465
  /**
@@ -18179,24 +18491,24 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18179
18491
  return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;
18180
18492
  },
18181
18493
  shouldShowArcLabel: function shouldShowArcLabel() {
18182
- var _this10 = this,
18494
+ var _this9 = this,
18183
18495
  $$ = this,
18184
18496
  config = $$.config;
18185
18497
  return ["donut", "gauge", "pie", "polar"].some(function (v) {
18186
- _newArrowCheck(this, _this10);
18498
+ _newArrowCheck(this, _this9);
18187
18499
  return $$.hasType(v) && config[v + "_label_show"];
18188
18500
  }.bind(this));
18189
18501
  },
18190
18502
  getArcLabelFormat: function getArcLabelFormat() {
18191
- var _this11 = this,
18503
+ var _this10 = this,
18192
18504
  $$ = this,
18193
18505
  config = $$.config,
18194
18506
  format = function (v) {
18195
- _newArrowCheck(this, _this11);
18507
+ _newArrowCheck(this, _this10);
18196
18508
  return v;
18197
18509
  }.bind(this);
18198
18510
  ["donut", "gauge", "pie", "polar"].filter($$.hasType.bind($$)).forEach(function (v) {
18199
- _newArrowCheck(this, _this11);
18511
+ _newArrowCheck(this, _this10);
18200
18512
  format = config[v + "_label_format"];
18201
18513
  }.bind(this));
18202
18514
  return isFunction(format) ? format.bind($$.api) : format;
@@ -18207,7 +18519,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18207
18519
  return type ? $$.config[type + "_title"] : "";
18208
18520
  },
18209
18521
  updateTargetsForArc: function updateTargetsForArc(targets) {
18210
- var _this12 = this,
18522
+ var _this11 = this,
18211
18523
  $$ = this,
18212
18524
  $el = $$.$el,
18213
18525
  hasGauge = $$.hasType("gauge"),
@@ -18216,7 +18528,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18216
18528
  classFocus = $$.classFocus.bind($$),
18217
18529
  chartArcs = $el.main.select("." + $ARC.chartArcs),
18218
18530
  mainPieUpdate = chartArcs.selectAll("." + $ARC.chartArc).data($$.pie(targets)).attr("class", function (d) {
18219
- _newArrowCheck(this, _this12);
18531
+ _newArrowCheck(this, _this11);
18220
18532
  return classChartArc(d) + classFocus(d.data);
18221
18533
  }.bind(this)),
18222
18534
  mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc).call(this.setCssRule(!1, "." + $ARC.chartArcs + " text", ["pointer-events:none", "text-anchor:middle"]));
@@ -18247,7 +18559,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18247
18559
  }
18248
18560
  },
18249
18561
  redrawArc: function redrawArc(duration, durationForExit, withTransform) {
18250
- var _this13 = this,
18562
+ var _this12 = this,
18251
18563
  $$ = this,
18252
18564
  config = $$.config,
18253
18565
  state = $$.state,
@@ -18257,10 +18569,10 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18257
18569
  mainArc = main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arc).data($$.arcData.bind($$));
18258
18570
  mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove();
18259
18571
  mainArc = mainArc.enter().append("path").attr("class", $$.getClass("arc", !0)).style("fill", function (d) {
18260
- _newArrowCheck(this, _this13);
18572
+ _newArrowCheck(this, _this12);
18261
18573
  return $$.color(d.data);
18262
18574
  }.bind(this)).style("cursor", function (d) {
18263
- _newArrowCheck(this, _this13);
18575
+ _newArrowCheck(this, _this12);
18264
18576
  return isSelectable != null && isSelectable.bind != null && isSelectable.bind($$.api)(d) ? "pointer" : null;
18265
18577
  }.bind(this)).style("opacity", "0").each(function (d) {
18266
18578
  if ($$.isGaugeType(d.data)) {
@@ -18274,19 +18586,19 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18274
18586
  $$.hasMultiArcGauge() && $$.redrawMultiArcGauge();
18275
18587
  }
18276
18588
  mainArc.attr("transform", function (d) {
18277
- _newArrowCheck(this, _this13);
18589
+ _newArrowCheck(this, _this12);
18278
18590
  return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : "";
18279
18591
  }.bind(this)).style("opacity", function (d) {
18280
18592
  return d === this._current ? "0" : null;
18281
18593
  }).each(function () {
18282
- _newArrowCheck(this, _this13);
18594
+ _newArrowCheck(this, _this12);
18283
18595
  state.transiting = !0;
18284
18596
  }.bind(this)).transition().duration(duration).attrTween("d", function (d) {
18285
- var _this14 = this,
18597
+ var _this13 = this,
18286
18598
  updated = $$.updateAngle(d);
18287
18599
  if (!updated) {
18288
18600
  return function () {
18289
- _newArrowCheck(this, _this14);
18601
+ _newArrowCheck(this, _this13);
18290
18602
  return "M 0 0";
18291
18603
  }.bind(this);
18292
18604
  }
@@ -18305,7 +18617,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18305
18617
  return $$.getArc(interpolated, !0);
18306
18618
  };
18307
18619
  }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) {
18308
- _newArrowCheck(this, _this13);
18620
+ _newArrowCheck(this, _this12);
18309
18621
  var color;
18310
18622
  if ($$.levelColor) {
18311
18623
  color = $$.levelColor(d.data.values[0].value);
@@ -18321,8 +18633,8 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18321
18633
  .style("opacity", null).call(endall, function () {
18322
18634
  if ($$.levelColor) {
18323
18635
  var path = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
18324
- d = path.datum();
18325
- $$.updateLegendItemColor(d.data.id, path.style("fill"));
18636
+ _d = path.datum();
18637
+ $$.updateLegendItemColor(_d.data.id, path.style("fill"));
18326
18638
  }
18327
18639
  state.transiting = !1;
18328
18640
  callFn(config.onrendered, $$.api);
@@ -18335,7 +18647,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18335
18647
  $$.redrawArcText(duration);
18336
18648
  },
18337
18649
  redrawBackgroundArcs: function redrawBackgroundArcs() {
18338
- var _this15 = this,
18650
+ var _this14 = this,
18339
18651
  $$ = this,
18340
18652
  config = $$.config,
18341
18653
  state = $$.state,
@@ -18348,11 +18660,11 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18348
18660
  var index = 0;
18349
18661
  backgroundArc = backgroundArc.selectAll("path." + $ARC.chartArcsBackground).data($$.data.targets);
18350
18662
  backgroundArc.enter().append("path").attr("class", function (d, i) {
18351
- _newArrowCheck(this, _this15);
18663
+ _newArrowCheck(this, _this14);
18352
18664
  return $ARC.chartArcsBackground + " " + $ARC.chartArcsBackground + "-" + i;
18353
18665
  }.bind(this)).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
18354
18666
  var id = _ref2.id;
18355
- _newArrowCheck(this, _this15);
18667
+ _newArrowCheck(this, _this14);
18356
18668
  if (state.hiddenTargetIds.indexOf(id) >= 0) {
18357
18669
  return "M 0 0";
18358
18670
  }
@@ -18369,7 +18681,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18369
18681
  backgroundArc.exit().remove();
18370
18682
  } else {
18371
18683
  backgroundArc.attr("d", function () {
18372
- _newArrowCheck(this, _this15);
18684
+ _newArrowCheck(this, _this14);
18373
18685
  var d = {
18374
18686
  data: [{
18375
18687
  value: config.gauge_max
@@ -18382,7 +18694,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18382
18694
  }
18383
18695
  },
18384
18696
  bindArcEvent: function bindArcEvent(arc) {
18385
- var _this16 = this,
18697
+ var _this15 = this,
18386
18698
  $$ = this,
18387
18699
  config = $$.config,
18388
18700
  state = $$.state,
@@ -18430,7 +18742,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18430
18742
  selectArc(this, arcData, id);
18431
18743
  $$.setOverOut(!0, arcData);
18432
18744
  }).on("mouseout", function (event, d) {
18433
- _newArrowCheck(this, _this16);
18745
+ _newArrowCheck(this, _this15);
18434
18746
  if (state.transiting) {
18435
18747
  // skip while transiting
18436
18748
  return;
@@ -18451,7 +18763,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18451
18763
  // touch events
18452
18764
  if (isTouch && $$.hasArcType() && !$$.radars) {
18453
18765
  var getEventArc = function (event) {
18454
- _newArrowCheck(this, _this16);
18766
+ _newArrowCheck(this, _this15);
18455
18767
  var touch = event.changedTouches[0],
18456
18768
  eventArc = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(browser_doc.elementFromPoint(touch.clientX, touch.clientY));
18457
18769
  return eventArc;
@@ -18474,7 +18786,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18474
18786
  }
18475
18787
  },
18476
18788
  redrawArcText: function redrawArcText(duration) {
18477
- var _this17 = this,
18789
+ var _this16 = this,
18478
18790
  $$ = this,
18479
18791
  config = $$.config,
18480
18792
  state = $$.state,
@@ -18487,13 +18799,13 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18487
18799
  // for gauge type, update text when has no title & multi data
18488
18800
  if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
18489
18801
  text = main.selectAll("." + $ARC.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
18490
- _newArrowCheck(this, _this17);
18802
+ _newArrowCheck(this, _this16);
18491
18803
  return $$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null;
18492
18804
  }.bind(this)).call($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
18493
- _newArrowCheck(this, _this17);
18805
+ _newArrowCheck(this, _this16);
18494
18806
  return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? Math.round(state.radius / 5) + "px" : null;
18495
18807
  }.bind(this)).transition().duration(duration).style("opacity", function (d) {
18496
- _newArrowCheck(this, _this17);
18808
+ _newArrowCheck(this, _this16);
18497
18809
  return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? null : "0";
18498
18810
  }.bind(this));
18499
18811
  hasMultiArcGauge && text.attr("dy", "-.1em");
@@ -18563,6 +18875,9 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18563
18875
  return "0";
18564
18876
  }).merge(area);
18565
18877
  area.style("opacity", state.orgAreaOpacity);
18878
+
18879
+ // calculate ratio if grouped data exists
18880
+ $$.setRatioForGroupedData($root.area.data());
18566
18881
  },
18567
18882
  /**
18568
18883
  * Redraw function
@@ -18746,6 +19061,9 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18746
19061
  var bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
18747
19062
  $T(bar.exit(), withTransition).style("opacity", "0").remove();
18748
19063
  $root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.updateBarColor.bind($$)).merge(bar).style("opacity", initialOpacity);
19064
+
19065
+ // calculate ratio if grouped data exists
19066
+ $$.setRatioForGroupedData($root.bar.data());
18749
19067
  },
18750
19068
  /**
18751
19069
  * Update bar color
@@ -19506,22 +19824,11 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19506
19824
  config = $$.config,
19507
19825
  isRotated = config.axis_rotated,
19508
19826
  isTimeSeries = $$.axis.isTimeSeries(),
19509
- xOffset = $$.axis.isCategorized() ? .5 : 0,
19510
19827
  regions = [],
19511
- dasharray = "2 2",
19512
19828
  xp,
19513
19829
  yp,
19514
19830
  diff,
19515
- diffx2,
19516
- isWithinRegions = function (withinX, withinRegions) {
19517
- _newArrowCheck(this, _this5);
19518
- for (var i = 0, reg; reg = withinRegions[i]; i++) {
19519
- if (reg.start < withinX && withinX <= reg.end) {
19520
- return reg.style;
19521
- }
19522
- }
19523
- return !1;
19524
- }.bind(this);
19831
+ diffx2;
19525
19832
  // Check start/end of regions
19526
19833
  if (isDefined(_regions)) {
19527
19834
  var getValue = function (v, def) {
@@ -19532,7 +19839,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19532
19839
  var start = getValue(reg.start, d[0].x),
19533
19840
  end = getValue(reg.end, d[d.length - 1].x),
19534
19841
  style = reg.style || {
19535
- dasharray: dasharray
19842
+ dasharray: "2 2"
19536
19843
  };
19537
19844
  regions[i] = {
19538
19845
  start: start,
@@ -19582,7 +19889,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19582
19889
  for (var _i = 0, data; data = d[_i]; _i++) {
19583
19890
  var prevData = d[_i - 1],
19584
19891
  hasPrevData = prevData && isValue(prevData.value),
19585
- style = isWithinRegions(data.x, regions);
19892
+ style = $$.isWithinRegions(data.x, regions);
19586
19893
  // https://github.com/naver/billboard.js/issues/1172
19587
19894
  if (!isValue(data.value)) {
19588
19895
  continue;
@@ -19595,11 +19902,11 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19595
19902
  try {
19596
19903
  style = style.dasharray.split(" ");
19597
19904
  } catch (e) {
19598
- style = dasharray.split(" ");
19905
+ style = "2 2".split(" ");
19599
19906
  }
19600
19907
 
19601
19908
  // Draw with region // TODO: Fix for horizotal charts
19602
- xp = getScale(axisType.x, prevData.x + xOffset, data.x + xOffset);
19909
+ xp = getScale(axisType.x, prevData.x, data.x);
19603
19910
  yp = getScale(axisType.y, prevData.value, data.value);
19604
19911
  var dx = x(data.x) - x(prevData.x),
19605
19912
  dy = y(data.value) - y(prevData.value),
@@ -19618,6 +19925,14 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
19618
19925
  }
19619
19926
  return path;
19620
19927
  },
19928
+ isWithinRegions: function isWithinRegions(withinX, withinRegions) {
19929
+ for (var i = 0, reg; reg = withinRegions[i]; i++) {
19930
+ if (reg.start < withinX && withinX <= reg.end) {
19931
+ return reg.style;
19932
+ }
19933
+ }
19934
+ return !1;
19935
+ },
19621
19936
  isWithinStep: function isWithinStep(that, y) {
19622
19937
  return Math.abs(y - getPointer(this.state.event, that)[1]) < 30;
19623
19938
  },
@@ -21142,6 +21457,52 @@ var cacheKey = KEY.radarPoints;
21142
21457
  */
21143
21458
  spline_interpolation_type: "cardinal"
21144
21459
  });
21460
+ ;// CONCATENATED MODULE: ./src/config/Options/shape/arc.ts
21461
+ /**
21462
+ * Copyright (c) 2017 ~ present NAVER Corp.
21463
+ * billboard.js project is licensed under the MIT license
21464
+ */
21465
+ /**
21466
+ * area config options
21467
+ */
21468
+ /* harmony default export */ var shape_arc = ({
21469
+ /**
21470
+ * Set arc options
21471
+ * @name arc
21472
+ * @memberof Options
21473
+ * @type {object}
21474
+ * @property {object} arc Arc object
21475
+ * @property {number|Function} [arc.cornerRadius=0] Set corner radius of Arc(donut/gauge/pie/polar) shape.
21476
+ * - **NOTE:**
21477
+ * - Corner radius can't surpass the `(outerRadius - innerRadius) /2` of indicated shape.
21478
+ * @property {number} [arc.cornerRadius.ratio=0] Set ratio relative of outer radius.
21479
+ * @see [Demo: Donut corner radius](https://naver.github.io/billboard.js/demo/#DonutChartOptions.DonutCornerRadius)
21480
+ * @see [Demo: Gauge corner radius](https://naver.github.io/billboard.js/demo/#GaugeChartOptions.GaugeCornerRadius)
21481
+ * @see [Demo: Donut corner radius](https://naver.github.io/billboard.js/demo/#PieChartOptions.CornerRadius)
21482
+ * @example
21483
+ * arc: {
21484
+ * cornerRadius: 12,
21485
+ *
21486
+ * // can customize corner radius for each data with function callback
21487
+ * //
21488
+ * // The function will receive:
21489
+ * // - id {string}: Data id
21490
+ * // - value {number}: Data value
21491
+ * // - outerRadius {number}: Outer radius value
21492
+ * cornerRadius: function(id, value, outerRadius) {
21493
+ * return (id === "data1" && value > 10) ?
21494
+ * 50 : outerRadius * 1.2;
21495
+ * },
21496
+ *
21497
+ * // set ratio relative of outer radius
21498
+ * cornerRadius: {
21499
+ * ratio: 0.5
21500
+ * }
21501
+ * }
21502
+ */
21503
+ arc_cornerRadius: 0,
21504
+ arc_cornerRadius_ratio: 0
21505
+ });
21145
21506
  ;// CONCATENATED MODULE: ./src/config/Options/shape/donut.ts
21146
21507
  /**
21147
21508
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -21266,7 +21627,7 @@ var cacheKey = KEY.radarPoints;
21266
21627
  * - `startingAngle < -1 * Math.PI` defaults to `Math.PI`
21267
21628
  * - `startingAngle > Math.PI` defaults to `Math.PI`
21268
21629
  * @property {number} [gauge.arcLength=100] Set the length of the arc to be drawn in percent from -100 to 100.<br>
21269
- * Negative value will draw the arc **counterclockwise**.
21630
+ * Negative value will draw the arc **counterclockwise**. Need to be used in conjunction with `gauge.fullCircle=true`.
21270
21631
  *
21271
21632
  * **Limitations:**
21272
21633
  * - -100 <= arcLength (in percent) <= 100
@@ -21279,7 +21640,7 @@ var cacheKey = KEY.radarPoints;
21279
21640
  * **Available Values:**
21280
21641
  * - single
21281
21642
  * - multi
21282
- * @property {string} [gauge.arcs.minWidth=5] Set minimal width of gauge arcs until the innerRadius disappears.
21643
+ * @property {number} [gauge.arcs.minWidth=5] Set minimal width of gauge arcs until the innerRadius disappears.
21283
21644
  * @see [Demo: archLength](https://naver.github.io/billboard.js/demo/#GaugeChartOptions.GaugeArcLength)
21284
21645
  * @see [Demo: startingAngle](https://naver.github.io/billboard.js/demo/#GaugeChartOptions.GaugeStartingAngle)
21285
21646
  * @example
@@ -21661,6 +22022,7 @@ var shape_this = undefined;
21661
22022
 
21662
22023
 
21663
22024
 
22025
+
21664
22026
  /**
21665
22027
  * Extend Axis
21666
22028
  * @param {Array} module Module to be extended
@@ -21763,7 +22125,7 @@ var _area = function area() {
21763
22125
  shape_donut = function () {
21764
22126
  var _this10 = this;
21765
22127
  _newArrowCheck(this, shape_this);
21766
- return extendArc(undefined, [donut]), (shape_donut = function () {
22128
+ return extendArc(undefined, [shape_arc, donut]), (shape_donut = function () {
21767
22129
  _newArrowCheck(this, _this10);
21768
22130
  return TYPE.DONUT;
21769
22131
  }.bind(this))();
@@ -21771,7 +22133,7 @@ var _area = function area() {
21771
22133
  resolver_shape_gauge = function () {
21772
22134
  var _this11 = this;
21773
22135
  _newArrowCheck(this, shape_this);
21774
- return extendArc([gauge], [shape_gauge]), (resolver_shape_gauge = function () {
22136
+ return extendArc([gauge], [shape_arc, shape_gauge]), (resolver_shape_gauge = function () {
21775
22137
  _newArrowCheck(this, _this11);
21776
22138
  return TYPE.GAUGE;
21777
22139
  }.bind(this))();
@@ -21779,7 +22141,7 @@ var _area = function area() {
21779
22141
  shape_pie = function () {
21780
22142
  var _this12 = this;
21781
22143
  _newArrowCheck(this, shape_this);
21782
- return extendArc(undefined, [pie]), (shape_pie = function () {
22144
+ return extendArc(undefined, [shape_arc, pie]), (shape_pie = function () {
21783
22145
  _newArrowCheck(this, _this12);
21784
22146
  return TYPE.PIE;
21785
22147
  }.bind(this))();
@@ -21787,7 +22149,7 @@ var _area = function area() {
21787
22149
  resolver_shape_polar = function () {
21788
22150
  var _this13 = this;
21789
22151
  _newArrowCheck(this, shape_this);
21790
- return extendArc([polar], [shape_polar]), (resolver_shape_polar = function () {
22152
+ return extendArc([polar], [shape_arc, shape_polar]), (resolver_shape_polar = function () {
21791
22153
  _newArrowCheck(this, _this13);
21792
22154
  return TYPE.POLAR;
21793
22155
  }.bind(this))();
@@ -23632,7 +23994,7 @@ var _defaults = {},
23632
23994
  * bb.version; // "1.0.0"
23633
23995
  * @memberof bb
23634
23996
  */
23635
- version: "3.6.2",
23997
+ version: "3.7.0-next.1",
23636
23998
  /**
23637
23999
  * Generate chart
23638
24000
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
@@ -23762,7 +24124,7 @@ var _defaults = {},
23762
24124
  };
23763
24125
  /**
23764
24126
  * @namespace bb
23765
- * @version 3.6.2
24127
+ * @version 3.7.0-next.1
23766
24128
  */
23767
24129
  ;// CONCATENATED MODULE: ./src/index.ts
23768
24130