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.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +104 -51
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +147 -66
- package/dist/billboard.pkgd.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +18 -3
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +17 -3
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +14 -2
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +45 -17
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +62 -19
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +62 -20
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +59 -19
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +88 -43
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist-esm/billboard.js +13 -12
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +8 -4
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +21 -21
- package/src/ChartInternal/internals/region.ts +9 -9
- package/src/ChartInternal/shape/point.ts +3 -2
- package/src/Plugin/sparkline/index.ts +9 -1
- package/types/options.d.ts +1 -4
package/dist/billboard.pkgd.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
|
|
8
|
+
* @version 3.8.0
|
|
9
9
|
*
|
|
10
10
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - @types/d3-selection ^3.0.5
|
|
@@ -295,6 +295,7 @@ __webpack_require__(512);
|
|
|
295
295
|
__webpack_require__(517);
|
|
296
296
|
__webpack_require__(518);
|
|
297
297
|
__webpack_require__(519);
|
|
298
|
+
__webpack_require__(520);
|
|
298
299
|
|
|
299
300
|
/* unused reexport */ __webpack_require__(82);
|
|
300
301
|
|
|
@@ -1170,10 +1171,10 @@ var store = __webpack_require__(37);
|
|
|
1170
1171
|
(module.exports = function (key, value) {
|
|
1171
1172
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
1172
1173
|
})('versions', []).push({
|
|
1173
|
-
version: '3.
|
|
1174
|
+
version: '3.30.0',
|
|
1174
1175
|
mode: IS_PURE ? 'pure' : 'global',
|
|
1175
1176
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
1176
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
1177
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE',
|
|
1177
1178
|
source: 'https://github.com/zloirock/core-js'
|
|
1178
1179
|
});
|
|
1179
1180
|
|
|
@@ -3938,6 +3939,7 @@ var FIND = 'find';
|
|
|
3938
3939
|
var SKIPS_HOLES = true;
|
|
3939
3940
|
|
|
3940
3941
|
// Shouldn't skip holes
|
|
3942
|
+
// eslint-disable-next-line es/no-array-prototype-find -- testing
|
|
3941
3943
|
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
|
3942
3944
|
|
|
3943
3945
|
// `Array.prototype.find` method
|
|
@@ -3966,6 +3968,7 @@ var FIND_INDEX = 'findIndex';
|
|
|
3966
3968
|
var SKIPS_HOLES = true;
|
|
3967
3969
|
|
|
3968
3970
|
// Shouldn't skip holes
|
|
3971
|
+
// eslint-disable-next-line es/no-array-prototype-findindex -- testing
|
|
3969
3972
|
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
|
|
3970
3973
|
|
|
3971
3974
|
// `Array.prototype.findIndex` method
|
|
@@ -16080,9 +16083,7 @@ module.exports = {
|
|
|
16080
16083
|
add: uncurryThis(SetPrototype.add),
|
|
16081
16084
|
has: uncurryThis(SetPrototype.has),
|
|
16082
16085
|
remove: uncurryThis(SetPrototype['delete']),
|
|
16083
|
-
proto: SetPrototype
|
|
16084
|
-
$has: SetPrototype.has,
|
|
16085
|
-
$keys: SetPrototype.keys
|
|
16086
|
+
proto: SetPrototype
|
|
16086
16087
|
};
|
|
16087
16088
|
|
|
16088
16089
|
|
|
@@ -17857,6 +17858,33 @@ module.exports = {
|
|
|
17857
17858
|
/* 517 */
|
|
17858
17859
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
17859
17860
|
|
|
17861
|
+
var $ = __webpack_require__(3);
|
|
17862
|
+
var getBuiltIn = __webpack_require__(24);
|
|
17863
|
+
var validateArgumentsLength = __webpack_require__(328);
|
|
17864
|
+
var toString = __webpack_require__(69);
|
|
17865
|
+
|
|
17866
|
+
var URL = getBuiltIn('URL');
|
|
17867
|
+
|
|
17868
|
+
// `URL.canParse` method
|
|
17869
|
+
// https://url.spec.whatwg.org/#dom-url-canparse
|
|
17870
|
+
$({ target: 'URL', stat: true }, {
|
|
17871
|
+
canParse: function canParse(url) {
|
|
17872
|
+
var length = validateArgumentsLength(arguments.length, 1);
|
|
17873
|
+
var urlString = toString(url);
|
|
17874
|
+
var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]);
|
|
17875
|
+
try {
|
|
17876
|
+
return !!new URL(urlString, base);
|
|
17877
|
+
} catch (error) {
|
|
17878
|
+
return false;
|
|
17879
|
+
}
|
|
17880
|
+
}
|
|
17881
|
+
});
|
|
17882
|
+
|
|
17883
|
+
|
|
17884
|
+
/***/ }),
|
|
17885
|
+
/* 518 */
|
|
17886
|
+
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
17887
|
+
|
|
17860
17888
|
"use strict";
|
|
17861
17889
|
|
|
17862
17890
|
var $ = __webpack_require__(3);
|
|
@@ -17872,7 +17900,7 @@ $({ target: 'URL', proto: true, enumerable: true }, {
|
|
|
17872
17900
|
|
|
17873
17901
|
|
|
17874
17902
|
/***/ }),
|
|
17875
|
-
/*
|
|
17903
|
+
/* 519 */
|
|
17876
17904
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
17877
17905
|
|
|
17878
17906
|
// TODO: Remove this module from `core-js@4` since it's replaced to module below
|
|
@@ -17880,7 +17908,7 @@ __webpack_require__(516);
|
|
|
17880
17908
|
|
|
17881
17909
|
|
|
17882
17910
|
/***/ }),
|
|
17883
|
-
/*
|
|
17911
|
+
/* 520 */
|
|
17884
17912
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
17885
17913
|
|
|
17886
17914
|
"use strict";
|
|
@@ -17908,7 +17936,7 @@ if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
|
|
|
17908
17936
|
|
|
17909
17937
|
|
|
17910
17938
|
/***/ }),
|
|
17911
|
-
/*
|
|
17939
|
+
/* 521 */
|
|
17912
17940
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
17913
17941
|
|
|
17914
17942
|
"use strict";
|
|
@@ -19612,7 +19640,7 @@ function dispatchFunction(type, params) {
|
|
|
19612
19640
|
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
|
|
19613
19641
|
}
|
|
19614
19642
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
|
19615
|
-
var regenerator = __webpack_require__(
|
|
19643
|
+
var regenerator = __webpack_require__(522);
|
|
19616
19644
|
;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/iterator.js
|
|
19617
19645
|
|
|
19618
19646
|
var _marked = /*#__PURE__*/regenerator.mark(_callee);
|
|
@@ -22436,6 +22464,18 @@ var isValue = function (v) {
|
|
|
22436
22464
|
_newArrowCheck(this, util_this);
|
|
22437
22465
|
return obj && !(obj != null && obj.nodeType) && isObjectType(obj) && !isArray(obj);
|
|
22438
22466
|
}.bind(undefined);
|
|
22467
|
+
/**
|
|
22468
|
+
* Check if is array
|
|
22469
|
+
* @param {Array} arr Data to be checked
|
|
22470
|
+
* @returns {boolean}
|
|
22471
|
+
* @private
|
|
22472
|
+
*/
|
|
22473
|
+
/**
|
|
22474
|
+
* Check if is object
|
|
22475
|
+
* @param {object} obj Data to be checked
|
|
22476
|
+
* @returns {boolean}
|
|
22477
|
+
* @private
|
|
22478
|
+
*/
|
|
22439
22479
|
/**
|
|
22440
22480
|
* Get specified key value from object
|
|
22441
22481
|
* If default value is given, will return if given key value not found
|
|
@@ -26399,7 +26439,8 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
26399
26439
|
return config.axis_x_categories.indexOf(v) > -1;
|
|
26400
26440
|
}.bind(this)),
|
|
26401
26441
|
isDataAppend = data.__append__,
|
|
26402
|
-
xIndex = xKey === null && isDataAppend ? $$.api.data.values(id).length : 0;
|
|
26442
|
+
xIndex = xKey === null && isDataAppend ? $$.api.data.values(id).length : 0; // when .load() with 'append' option is used for indexed axis
|
|
26443
|
+
// @ts-ignore
|
|
26403
26444
|
return {
|
|
26404
26445
|
id: convertedId,
|
|
26405
26446
|
id_org: id,
|
|
@@ -27156,6 +27197,9 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
27156
27197
|
isRotated = config.axis_rotated,
|
|
27157
27198
|
e = inputType === "touch" && event.changedTouches ? event.changedTouches[0] : event,
|
|
27158
27199
|
index = findIndex(coords, isRotated ? e.clientY - rect.top : e.clientX - rect.left, 0, coords.length - 1, isRotated);
|
|
27200
|
+
|
|
27201
|
+
// get data based on the mouse coords
|
|
27202
|
+
|
|
27159
27203
|
return index;
|
|
27160
27204
|
},
|
|
27161
27205
|
getDataLabelLength: function getDataLabelLength(min, max, key) {
|
|
@@ -27202,7 +27246,6 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
27202
27246
|
return $$.findClosest(target.values, pos);
|
|
27203
27247
|
}.bind(this));
|
|
27204
27248
|
// map to array of closest points of each target
|
|
27205
|
-
|
|
27206
27249
|
// decide closest point and return
|
|
27207
27250
|
return $$.findClosest(candidates, pos);
|
|
27208
27251
|
},
|
|
@@ -28064,6 +28107,7 @@ function drag_defaultTouchable() {
|
|
|
28064
28107
|
return v !== this;
|
|
28065
28108
|
}.bind(this));
|
|
28066
28109
|
}); // select based on the index
|
|
28110
|
+
// filter if has new selection
|
|
28067
28111
|
// call onout callback
|
|
28068
28112
|
if (!isOver || shapesAtIndex.empty() || last.length === shape.size() && shape.nodes().every(function (v, i) {
|
|
28069
28113
|
_newArrowCheck(this, _this5);
|
|
@@ -29776,7 +29820,7 @@ function getLegendColor(id) {
|
|
|
29776
29820
|
return !isDefined(config.data_names[id]) || config.data_names[id] !== null;
|
|
29777
29821
|
}.bind(this)),
|
|
29778
29822
|
withTransition = options.withTransition,
|
|
29779
|
-
updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes);
|
|
29823
|
+
updatePositions = $$.getUpdateLegendPositions(targetIdz, dimension, sizes); // Skip elements when their name is set to null
|
|
29780
29824
|
if (state.isLegendInset) {
|
|
29781
29825
|
dimension.step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;
|
|
29782
29826
|
$$.updateLegendStep(dimension.step);
|
|
@@ -29909,7 +29953,7 @@ function getLegendColor(id) {
|
|
|
29909
29953
|
sizes.margins[dimension.step] = state.isLegendInset ? 10 : margin;
|
|
29910
29954
|
sizes.offsets[id2] = dimension.totalLength;
|
|
29911
29955
|
dimension.totalLength += itemLength;
|
|
29912
|
-
};
|
|
29956
|
+
}; // MEMO: care about condifion of step, totalLength
|
|
29913
29957
|
if (index === 0) {
|
|
29914
29958
|
dimension.totalLength = 0;
|
|
29915
29959
|
dimension.step = 0;
|
|
@@ -29977,6 +30021,8 @@ function getLegendColor(id) {
|
|
|
29977
30021
|
isRectangle = legendType !== "circle",
|
|
29978
30022
|
isLegendRightOrInset = state.isLegendRight || state.isLegendInset,
|
|
29979
30023
|
l = legend.selectAll("." + $LEGEND.legendItem).data(targetIdz).enter().append("g");
|
|
30024
|
+
// Define g for legend area
|
|
30025
|
+
|
|
29980
30026
|
$$.setLegendItem(l);
|
|
29981
30027
|
l.append("text").text(function (id) {
|
|
29982
30028
|
_newArrowCheck(this, _this6);
|
|
@@ -30223,7 +30269,8 @@ function getLegendColor(id) {
|
|
|
30223
30269
|
flowFn && flowFn();
|
|
30224
30270
|
state.redrawing = !1;
|
|
30225
30271
|
callFn(config.onrendered, $$.api);
|
|
30226
|
-
}.bind(this);
|
|
30272
|
+
}.bind(this); // redraw list
|
|
30273
|
+
// callback function after redraw ends
|
|
30227
30274
|
if (afterRedraw) {
|
|
30228
30275
|
// Only use transition when current tab is visible.
|
|
30229
30276
|
if (withTransition && redrawList.length) {
|
|
@@ -31745,6 +31792,11 @@ function getScale(type, min, max) {
|
|
|
31745
31792
|
},
|
|
31746
31793
|
xDomain = updateXDomain && ((_scale$x = scale.x) == null ? void 0 : _scale$x.orgDomain()),
|
|
31747
31794
|
xSubDomain = updateXDomain && org.xDomain;
|
|
31795
|
+
// update edges
|
|
31796
|
+
|
|
31797
|
+
// update scales
|
|
31798
|
+
// x Axis
|
|
31799
|
+
|
|
31748
31800
|
scale.x = $$.getXScale(min.x, max.x, xDomain, function () {
|
|
31749
31801
|
_newArrowCheck(this, _this2);
|
|
31750
31802
|
return axis.x.tickOffset();
|
|
@@ -32881,7 +32933,7 @@ function stepAfter(context) {
|
|
|
32881
32933
|
xs = _$$$config.data_xs,
|
|
32882
32934
|
removeNull = _$$$config.bar_indices_removeNull,
|
|
32883
32935
|
id = d.id,
|
|
32884
|
-
index = d.index;
|
|
32936
|
+
index = d.index; // eslint-disable-line
|
|
32885
32937
|
if ($$.isBarType(id) && removeNull) {
|
|
32886
32938
|
var ind = {};
|
|
32887
32939
|
|
|
@@ -32926,6 +32978,8 @@ function stepAfter(context) {
|
|
|
32926
32978
|
return p + c;
|
|
32927
32979
|
}.bind(this),
|
|
32928
32980
|
halfWidth = isObjectType(offset) && (offset._$total.length ? offset._$total.reduce(sum) / 2 : 0);
|
|
32981
|
+
// total shapes half width
|
|
32982
|
+
|
|
32929
32983
|
return function (d) {
|
|
32930
32984
|
_newArrowCheck(this, _this5);
|
|
32931
32985
|
var ind = $$.getIndices(indices, d, "getShapeX"),
|
|
@@ -34108,6 +34162,8 @@ function setRotatePos(d, pos, anchor, isRotated, isInverted) {
|
|
|
34108
34162
|
_newArrowCheck(this, _this5);
|
|
34109
34163
|
return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
34110
34164
|
}.bind(this);
|
|
34165
|
+
// Calculates the length of the hypotenuse
|
|
34166
|
+
|
|
34111
34167
|
textNode.node() && filteredTextNodes.each(function () {
|
|
34112
34168
|
var coordinate = getTranslation(this),
|
|
34113
34169
|
filteredTextNode = src_select(this),
|
|
@@ -34620,6 +34676,8 @@ function getTextPos(pos, width) {
|
|
|
34620
34676
|
y: y
|
|
34621
34677
|
},
|
|
34622
34678
|
data = (_selectedData$filter = selectedData.filter(Boolean)) == null ? void 0 : _selectedData$filter.shift();
|
|
34679
|
+
// get mouse event position
|
|
34680
|
+
|
|
34623
34681
|
if (scale.x && data && "x" in data) {
|
|
34624
34682
|
currPos.xAxis = scale.x(data.x);
|
|
34625
34683
|
}
|
|
@@ -35098,38 +35156,28 @@ function getTextPos(pos, width) {
|
|
|
35098
35156
|
* @private
|
|
35099
35157
|
*/
|
|
35100
35158
|
var ChartInternal = /*#__PURE__*/function () {
|
|
35101
|
-
// API interface
|
|
35102
|
-
// config object
|
|
35103
|
-
// cache instance
|
|
35104
|
-
// elements
|
|
35105
|
-
// state variables
|
|
35106
|
-
// all Chart instances array within page (equivalent of 'bb.instances')
|
|
35107
|
-
|
|
35108
|
-
// data object
|
|
35109
|
-
|
|
35110
|
-
// Axis
|
|
35111
|
-
// Axis
|
|
35112
|
-
|
|
35113
|
-
// scales
|
|
35114
|
-
|
|
35115
|
-
// original values
|
|
35116
|
-
|
|
35117
|
-
// formatter function
|
|
35118
|
-
|
|
35119
|
-
// format function
|
|
35120
|
-
|
|
35121
35159
|
function ChartInternal(api) {
|
|
35122
35160
|
this.api = void 0;
|
|
35161
|
+
// API interface
|
|
35123
35162
|
this.config = void 0;
|
|
35163
|
+
// config object
|
|
35124
35164
|
this.cache = void 0;
|
|
35165
|
+
// cache instance
|
|
35125
35166
|
this.$el = void 0;
|
|
35167
|
+
// elements
|
|
35126
35168
|
this.state = void 0;
|
|
35169
|
+
// state variables
|
|
35127
35170
|
this.charts = void 0;
|
|
35171
|
+
// all Chart instances array within page (equivalent of 'bb.instances')
|
|
35172
|
+
// data object
|
|
35128
35173
|
this.data = {
|
|
35129
35174
|
xs: {},
|
|
35130
35175
|
targets: []
|
|
35131
35176
|
};
|
|
35177
|
+
// Axis
|
|
35132
35178
|
this.axis = void 0;
|
|
35179
|
+
// Axis
|
|
35180
|
+
// scales
|
|
35133
35181
|
this.scale = {
|
|
35134
35182
|
x: null,
|
|
35135
35183
|
y: null,
|
|
@@ -35139,15 +35187,18 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
35139
35187
|
subY2: null,
|
|
35140
35188
|
zoom: null
|
|
35141
35189
|
};
|
|
35190
|
+
// original values
|
|
35142
35191
|
this.org = {
|
|
35143
35192
|
xScale: null,
|
|
35144
35193
|
xDomain: null
|
|
35145
35194
|
};
|
|
35195
|
+
// formatter function
|
|
35146
35196
|
this.color = void 0;
|
|
35147
35197
|
this.patterns = void 0;
|
|
35148
35198
|
this.levelColor = void 0;
|
|
35149
35199
|
this.point = void 0;
|
|
35150
35200
|
this.brush = void 0;
|
|
35201
|
+
// format function
|
|
35151
35202
|
this.format = {
|
|
35152
35203
|
extraLineClasses: null,
|
|
35153
35204
|
xAxisTick: null,
|
|
@@ -35357,7 +35408,6 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
35357
35408
|
hasPolar = $$.hasType("polar");
|
|
35358
35409
|
// for arc type, set axes to not be shown
|
|
35359
35410
|
// $$.hasArcType() && ["x", "y", "y2"].forEach(id => (config[`axis_${id}_show`] = false));
|
|
35360
|
-
|
|
35361
35411
|
if (hasAxis) {
|
|
35362
35412
|
$$.axis = $$.getAxisInstance();
|
|
35363
35413
|
config.zoom_enabled && $$.initZoom();
|
|
@@ -38489,7 +38539,7 @@ var AxisRendererHelper = /*#__PURE__*/function () {
|
|
|
38489
38539
|
size = {
|
|
38490
38540
|
w: 5.5,
|
|
38491
38541
|
h: 11.5
|
|
38492
|
-
};
|
|
38542
|
+
}; // default size for one character
|
|
38493
38543
|
node.empty() || node.select("text").text("0").call(function (el) {
|
|
38494
38544
|
_newArrowCheck(this, _this);
|
|
38495
38545
|
try {
|
|
@@ -38684,6 +38734,11 @@ var AxisRenderer = /*#__PURE__*/function () {
|
|
|
38684
38734
|
axisPx = tickTransform === helper.axisX ? "y" : "x",
|
|
38685
38735
|
sign = /^(top|left)$/.test(orient) ? -1 : 1,
|
|
38686
38736
|
rotate = params.tickTextRotate;
|
|
38737
|
+
|
|
38738
|
+
// line/text enter and path update
|
|
38739
|
+
|
|
38740
|
+
// tick text helpers
|
|
38741
|
+
|
|
38687
38742
|
this.config.range = scale.rangeExtent ? scale.rangeExtent() : helper.scaleExtent((params.orgXScale || scale).range());
|
|
38688
38743
|
var innerTickSize = config.innerTickSize,
|
|
38689
38744
|
tickLength = config.tickLength,
|
|
@@ -38699,6 +38754,7 @@ var AxisRenderer = /*#__PURE__*/function () {
|
|
|
38699
38754
|
tick: axisShow ? params.config[prefix + "_tick_show"] : !1,
|
|
38700
38755
|
text: axisShow ? params.config[prefix + "_tick_text_show"] : !1
|
|
38701
38756
|
}; // // get the axis' tick position configuration
|
|
38757
|
+
// tick visiblity
|
|
38702
38758
|
var $g;
|
|
38703
38759
|
g.each(function () {
|
|
38704
38760
|
var _this = this,
|
|
@@ -39426,7 +39482,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
39426
39482
|
tickFormat = forSubchart ? config.subchart_axis_x_tick_format || config.axis_x_tick_format : config.axis_x_tick_format,
|
|
39427
39483
|
isTimeSeries = this.isTimeSeries(),
|
|
39428
39484
|
isCategorized = this.isCategorized(),
|
|
39429
|
-
currFormat;
|
|
39485
|
+
currFormat; // enable different tick format for x and subX - subX format defaults to x format if not defined
|
|
39430
39486
|
if (tickFormat) {
|
|
39431
39487
|
if (isFunction(tickFormat)) {
|
|
39432
39488
|
currFormat = tickFormat.bind($$.api);
|
|
@@ -40052,7 +40108,8 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
40052
40108
|
event.preventDefault();
|
|
40053
40109
|
}
|
|
40054
40110
|
}
|
|
40055
|
-
}.bind(this);
|
|
40111
|
+
}.bind(this); // call event.preventDefault()
|
|
40112
|
+
// according 'interaction.inputType.touch.preventDefault' option
|
|
40056
40113
|
// bind touch events
|
|
40057
40114
|
eventRect.on("touchstart", function (event) {
|
|
40058
40115
|
_newArrowCheck(this, _this2);
|
|
@@ -40649,7 +40706,7 @@ var src_linear_linear = function (t) {
|
|
|
40649
40706
|
flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength),
|
|
40650
40707
|
translateX,
|
|
40651
40708
|
orgDomain = x.domain(),
|
|
40652
|
-
domain = $$.updateXDomain(targets, !0, !0);
|
|
40709
|
+
domain = $$.updateXDomain(targets, !0, !0); // update x domain to generate axis elements for flow
|
|
40653
40710
|
// generate transform to flow
|
|
40654
40711
|
if (!orgDataCount) {
|
|
40655
40712
|
// if empty
|
|
@@ -40728,6 +40785,9 @@ var src_linear_linear = function (t) {
|
|
|
40728
40785
|
y = -Math.max(15, margin.top),
|
|
40729
40786
|
w = isRotated ? margin.left + 20 : width + 10 + left,
|
|
40730
40787
|
h = (isRotated ? margin.top + height + 10 : margin.bottom) + 20;
|
|
40788
|
+
|
|
40789
|
+
// less than 20 is not enough to show the axis label 'outer' without legend
|
|
40790
|
+
|
|
40731
40791
|
node.attr("x", x).attr("y", y).attr("width", w).attr("height", h);
|
|
40732
40792
|
},
|
|
40733
40793
|
/**
|
|
@@ -41256,13 +41316,13 @@ function smoothLines(el, type) {
|
|
|
41256
41316
|
|
|
41257
41317
|
// hide if arc type
|
|
41258
41318
|
region.main.style("visibility", $$.hasArcType() ? "hidden" : null);
|
|
41259
|
-
// select <g> element
|
|
41260
41319
|
|
|
41261
|
-
|
|
41262
|
-
|
|
41263
|
-
|
|
41264
|
-
|
|
41265
|
-
|
|
41320
|
+
// select <g> element
|
|
41321
|
+
var regions = region.main.selectAll("." + $REGION.region).data(config.regions);
|
|
41322
|
+
$T(regions.exit()).style("opacity", "0").remove();
|
|
41323
|
+
var regionsEnter = regions.enter().append("g");
|
|
41324
|
+
regionsEnter.append("rect").style("fill-opacity", "0");
|
|
41325
|
+
region.list = regionsEnter.merge(regions).attr("class", $$.classRegion.bind($$));
|
|
41266
41326
|
},
|
|
41267
41327
|
redrawRegion: function redrawRegion(withTransition) {
|
|
41268
41328
|
var _this = this,
|
|
@@ -44143,6 +44203,7 @@ function getAttrTweenFn(fn) {
|
|
|
44143
44203
|
var min = config.gauge_min,
|
|
44144
44204
|
max = config.gauge_max,
|
|
44145
44205
|
totalSum = $$.getTotalDataSum(state.rendered); // to prevent excluding total data sum during the init(when data.hide option is used), use $$.rendered state value
|
|
44206
|
+
// https://github.com/naver/billboard.js/issues/2123
|
|
44146
44207
|
pie = pie.startAngle(gStart).endAngle(radius * ((totalSum - min) / (max - min)) + gStart);
|
|
44147
44208
|
}
|
|
44148
44209
|
pie($$.filterTargetsToShow()).forEach(function (t, i) {
|
|
@@ -44991,7 +45052,7 @@ function point_y(p) {
|
|
|
44991
45052
|
var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
|
|
44992
45053
|
offset = areaOffset(d, i) || y0,
|
|
44993
45054
|
posX = x(d),
|
|
44994
|
-
value = d.value;
|
|
45055
|
+
value = d.value; // offset is for stacked area chart
|
|
44995
45056
|
var posY = y(d);
|
|
44996
45057
|
|
|
44997
45058
|
// fix posY not to overflow opposite quadrant
|
|
@@ -45155,6 +45216,8 @@ function point_y(p) {
|
|
|
45155
45216
|
_newArrowCheck(this, _this4);
|
|
45156
45217
|
return w * barRadiusRatio;
|
|
45157
45218
|
}.bind(this) : null;
|
|
45219
|
+
// get the bar radius
|
|
45220
|
+
|
|
45158
45221
|
return function (d, i) {
|
|
45159
45222
|
_newArrowCheck(this, _this4);
|
|
45160
45223
|
// 4 points that make a bar
|
|
@@ -45228,6 +45291,7 @@ function point_y(p) {
|
|
|
45228
45291
|
_newArrowCheck(this, _this5);
|
|
45229
45292
|
return v.id;
|
|
45230
45293
|
}.bind(this)); // Get sorted list
|
|
45294
|
+
// Get sorted Ids. Filter positive or negative values Ids from given value
|
|
45231
45295
|
// If the given id stays in the last position, then radius should be applied.
|
|
45232
45296
|
return value !== 0 && sortedIds.indexOf(id) === sortedIds.length - 1;
|
|
45233
45297
|
},
|
|
@@ -45258,6 +45322,9 @@ function point_y(p) {
|
|
|
45258
45322
|
isInverted = config["axis_" + $$.axis.getId(id) + "_inverted"],
|
|
45259
45323
|
value = d.value,
|
|
45260
45324
|
posX = barX(d);
|
|
45325
|
+
|
|
45326
|
+
// offset is for stacked bar chart
|
|
45327
|
+
|
|
45261
45328
|
var posY = barY(d);
|
|
45262
45329
|
|
|
45263
45330
|
// fix posY not to overflow opposite quadrant
|
|
@@ -45365,7 +45432,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
45365
45432
|
var points = getPoints(d, i),
|
|
45366
45433
|
value = $$.getCandlestickData(d),
|
|
45367
45434
|
isUp = (_value = value) == null ? void 0 : _value._isUp,
|
|
45368
|
-
indexX = +isRotated;
|
|
45435
|
+
indexX = +isRotated; // switch points if axis is rotated, not applicable for sub chart
|
|
45369
45436
|
if (g.classed) {
|
|
45370
45437
|
g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], !0);
|
|
45371
45438
|
}
|
|
@@ -45419,7 +45486,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
45419
45486
|
var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
|
|
45420
45487
|
offset = shapeOffset(d, i) || y0,
|
|
45421
45488
|
width = isNumber(barW) ? barW : barW[d.id] || barW._$width,
|
|
45422
|
-
value = $$.getCandlestickData(d);
|
|
45489
|
+
value = $$.getCandlestickData(d); // offset is for stacked bar chart
|
|
45423
45490
|
var points;
|
|
45424
45491
|
if (value) {
|
|
45425
45492
|
var posX = {
|
|
@@ -45540,6 +45607,9 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
45540
45607
|
state = $$.state,
|
|
45541
45608
|
hasMultiGauge = $$.hasMultiArcGauge(),
|
|
45542
45609
|
max = hasMultiGauge ? $$.getMinMaxData().max[0].value : $$.getTotalDataSum(state.rendered);
|
|
45610
|
+
|
|
45611
|
+
// to prevent excluding total data sum during the init(when data.hide option is used), use $$.rendered state value
|
|
45612
|
+
|
|
45543
45613
|
// if gauge_max less than max, make max to max value
|
|
45544
45614
|
if (max + config.gauge_min * (config.gauge_min > 0 ? -1 : 1) > config.gauge_max) {
|
|
45545
45615
|
config.gauge_max = max - config.gauge_min;
|
|
@@ -45855,7 +45925,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
45855
45925
|
xp,
|
|
45856
45926
|
yp,
|
|
45857
45927
|
diff,
|
|
45858
|
-
diffx2;
|
|
45928
|
+
diffx2; // default value
|
|
45859
45929
|
// Check start/end of regions
|
|
45860
45930
|
if (isDefined(_regions)) {
|
|
45861
45931
|
var getValue = function (v, def) {
|
|
@@ -45911,7 +45981,8 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
45911
45981
|
axisType = {
|
|
45912
45982
|
x: $$.axis.getAxisType("x"),
|
|
45913
45983
|
y: $$.axis.getAxisType("y")
|
|
45914
|
-
};
|
|
45984
|
+
}; // Define svg generator function for region
|
|
45985
|
+
// Generate
|
|
45915
45986
|
var path = "";
|
|
45916
45987
|
for (var _i = 0, data; data = d[_i]; _i++) {
|
|
45917
45988
|
var prevData = d[_i - 1],
|
|
@@ -46139,7 +46210,7 @@ var getTransitionName = function () {
|
|
|
46139
46210
|
if (d) {
|
|
46140
46211
|
circle = circle.filter(function (t) {
|
|
46141
46212
|
var _this5 = this,
|
|
46142
|
-
data = d.filter(function (v) {
|
|
46213
|
+
data = d.filter == null ? void 0 : d.filter(function (v) {
|
|
46143
46214
|
_newArrowCheck(this, _this5);
|
|
46144
46215
|
return v.id === t.id;
|
|
46145
46216
|
}.bind(this));
|
|
@@ -46322,12 +46393,12 @@ var getTransitionName = function () {
|
|
|
46322
46393
|
x = $$.getShapeX(0, lineIndices, isSub),
|
|
46323
46394
|
y = $$.getShapeY(isSub),
|
|
46324
46395
|
lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),
|
|
46325
|
-
yScale = $$.getYScaleById.bind($$);
|
|
46396
|
+
yScale = $$.getYScaleById.bind($$); // partial duplication of generateGetBarPoints
|
|
46326
46397
|
return function (d, i) {
|
|
46327
46398
|
_newArrowCheck(this, _this8);
|
|
46328
46399
|
var y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
|
|
46329
46400
|
offset = lineOffset(d, i) || y0,
|
|
46330
|
-
posX = x(d);
|
|
46401
|
+
posX = x(d); // offset is for stacked area chart
|
|
46331
46402
|
var posY = y(d);
|
|
46332
46403
|
|
|
46333
46404
|
// fix posY not to overflow opposite quadrant
|
|
@@ -46751,6 +46822,8 @@ var cacheKey = KEY.radarPoints;
|
|
|
46751
46822
|
return pos.join(" ");
|
|
46752
46823
|
}.bind(this)),
|
|
46753
46824
|
level = radarLevels.selectAll("." + $LEVEL.level).data(levelData);
|
|
46825
|
+
// Generate points
|
|
46826
|
+
|
|
46754
46827
|
level.exit().remove();
|
|
46755
46828
|
var levelEnter = level.enter().append("g").attr("class", function (d, i) {
|
|
46756
46829
|
_newArrowCheck(this, _this6);
|
|
@@ -49100,7 +49173,10 @@ var _area = function area() {
|
|
|
49100
49173
|
_newArrowCheck(this, _this19);
|
|
49101
49174
|
return TYPE.TREEMAP;
|
|
49102
49175
|
}.bind(this))();
|
|
49103
|
-
}.bind(undefined);
|
|
49176
|
+
}.bind(undefined); // Line types
|
|
49177
|
+
// Arc types
|
|
49178
|
+
// Axis based types
|
|
49179
|
+
// Non Axis based types
|
|
49104
49180
|
;// CONCATENATED MODULE: ./src/Chart/api/selection.ts
|
|
49105
49181
|
|
|
49106
49182
|
/**
|
|
@@ -49986,7 +50062,10 @@ var zoom = function (domainValue) {
|
|
|
49986
50062
|
var _d3ZoomIdentity$scale,
|
|
49987
50063
|
_x = isCategorized ? scale.x.orgScale() : org.xScale || scale.x,
|
|
49988
50064
|
translate = [-_x(domain[0]), 0],
|
|
49989
|
-
transform = (_d3ZoomIdentity$scale = transform_identity.scale(_x.range()[1] / (_x(domain[1]) - _x(domain[0])))).translate.apply(_d3ZoomIdentity$scale, isRotated ? translate.reverse() : translate);
|
|
50065
|
+
transform = (_d3ZoomIdentity$scale = transform_identity.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
|
|
50066
|
+
// Get transform from given domain value
|
|
50067
|
+
// https://github.com/d3/d3-zoom/issues/57#issuecomment-246434951
|
|
50068
|
+
|
|
49990
50069
|
$el.eventRect.call($$.zoom.transform, transform);
|
|
49991
50070
|
}
|
|
49992
50071
|
$$.setZoomResetButton();
|
|
@@ -50600,6 +50679,8 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
50600
50679
|
isRotated = config.axis_rotated,
|
|
50601
50680
|
initRange = config.subchart_init_range,
|
|
50602
50681
|
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"];
|
|
50682
|
+
// brush handle shape's path
|
|
50683
|
+
|
|
50603
50684
|
$$.brush.handle = brush.selectAll(".handle--custom").data(isRotated ? [{
|
|
50604
50685
|
type: "n"
|
|
50605
50686
|
}, {
|
|
@@ -50991,7 +51072,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
|
|
|
50991
51072
|
var zoomDomain = zoom.domain(),
|
|
50992
51073
|
xDomain = subX.domain(),
|
|
50993
51074
|
delta = .015,
|
|
50994
|
-
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);
|
|
51075
|
+
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
|
|
50995
51076
|
// check if the zoomed chart is fully shown, then reset scale when zoom is out as initial
|
|
50996
51077
|
if (force || isfullyShown) {
|
|
50997
51078
|
$$.axis.x.scale(subX);
|
|
@@ -51468,7 +51549,7 @@ var _defaults = {};
|
|
|
51468
51549
|
|
|
51469
51550
|
/**
|
|
51470
51551
|
* @namespace bb
|
|
51471
|
-
* @version 3.8.0
|
|
51552
|
+
* @version 3.8.0
|
|
51472
51553
|
*/
|
|
51473
51554
|
var bb = {
|
|
51474
51555
|
/**
|
|
@@ -51478,7 +51559,7 @@ var bb = {
|
|
|
51478
51559
|
* bb.version; // "1.0.0"
|
|
51479
51560
|
* @memberof bb
|
|
51480
51561
|
*/
|
|
51481
|
-
version: "3.8.0
|
|
51562
|
+
version: "3.8.0",
|
|
51482
51563
|
/**
|
|
51483
51564
|
* Generate chart
|
|
51484
51565
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
|
@@ -51630,12 +51711,12 @@ Object.keys(resolver_interaction_namespaceObject).forEach(function (v) {
|
|
|
51630
51711
|
|
|
51631
51712
|
|
|
51632
51713
|
/***/ }),
|
|
51633
|
-
/*
|
|
51714
|
+
/* 522 */
|
|
51634
51715
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
51635
51716
|
|
|
51636
51717
|
// TODO(Babel 8): Remove this file.
|
|
51637
51718
|
|
|
51638
|
-
var runtime = __webpack_require__(
|
|
51719
|
+
var runtime = __webpack_require__(523)();
|
|
51639
51720
|
module.exports = runtime;
|
|
51640
51721
|
|
|
51641
51722
|
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
@@ -51651,10 +51732,10 @@ try {
|
|
|
51651
51732
|
|
|
51652
51733
|
|
|
51653
51734
|
/***/ }),
|
|
51654
|
-
/*
|
|
51735
|
+
/* 523 */
|
|
51655
51736
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
51656
51737
|
|
|
51657
|
-
var _typeof = (__webpack_require__(
|
|
51738
|
+
var _typeof = (__webpack_require__(524)["default"]);
|
|
51658
51739
|
function _regeneratorRuntime() {
|
|
51659
51740
|
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
51660
51741
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
@@ -51960,7 +52041,7 @@ function _regeneratorRuntime() {
|
|
|
51960
52041
|
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
51961
52042
|
|
|
51962
52043
|
/***/ }),
|
|
51963
|
-
/*
|
|
52044
|
+
/* 524 */
|
|
51964
52045
|
/***/ (function(module) {
|
|
51965
52046
|
|
|
51966
52047
|
function _typeof(obj) {
|
|
@@ -52036,7 +52117,7 @@ module.exports = _typeof, module.exports.__esModule = true, module.exports["defa
|
|
|
52036
52117
|
/******/ // Load entry module and return exports
|
|
52037
52118
|
/******/ // This entry module used 'module' so it can't be inlined
|
|
52038
52119
|
/******/ __webpack_require__(0);
|
|
52039
|
-
/******/ var __webpack_exports__ = __webpack_require__(
|
|
52120
|
+
/******/ var __webpack_exports__ = __webpack_require__(521);
|
|
52040
52121
|
/******/
|
|
52041
52122
|
/******/ return __webpack_exports__;
|
|
52042
52123
|
/******/ })()
|