billboard.js 3.11.1 → 3.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +183 -111
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +183 -111
- 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 +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- 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/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/billboard.js +164 -115
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- 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 +1 -1
- package/src/ChartInternal/ChartInternal.ts +2 -2
- package/src/ChartInternal/data/data.ts +1 -1
- package/src/ChartInternal/data/load.ts +7 -1
- package/src/ChartInternal/internals/redraw.ts +2 -1
- package/src/ChartInternal/shape/point.common.ts +134 -0
- package/src/ChartInternal/shape/point.ts +3 -95
- package/src/ChartInternal/shape/shape.ts +1 -1
- package/src/config/Store/State.ts +1 -1
- package/src/config/resolver/axis.ts +4 -4
- package/src/config/resolver/shape.ts +22 -10
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.11.
|
|
8
|
+
* @version 3.11.2
|
|
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.0
|
|
@@ -29149,7 +29149,8 @@ function callDone(fn, resizeAfter) {
|
|
|
29149
29149
|
const $$ = this,
|
|
29150
29150
|
state = $$.state,
|
|
29151
29151
|
$el = $$.$el,
|
|
29152
|
-
$T = $$.$T
|
|
29152
|
+
$T = $$.$T,
|
|
29153
|
+
hasLegendDefsPoint = !!($$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint());
|
|
29153
29154
|
let done = customDoneCb,
|
|
29154
29155
|
targetIds = rawTargetIds;
|
|
29155
29156
|
// reset internally cached data
|
|
@@ -29177,14 +29178,17 @@ function callDone(fn, resizeAfter) {
|
|
|
29177
29178
|
}.bind(this)));
|
|
29178
29179
|
$T(targets).style("opacity", "0").remove().call(endall, done);
|
|
29179
29180
|
targetIds.forEach(function (id) {
|
|
29180
|
-
var _this4 = this
|
|
29181
|
+
var _this4 = this,
|
|
29182
|
+
_$el$defs;
|
|
29181
29183
|
_newArrowCheck(this, _this3);
|
|
29184
|
+
const suffixId = $$.getTargetSelectorSuffix(id);
|
|
29185
|
+
|
|
29182
29186
|
// Reset fadein for future load
|
|
29183
29187
|
state.withoutFadeIn[id] = !1;
|
|
29184
29188
|
|
|
29185
29189
|
// Remove target's elements
|
|
29186
29190
|
if ($el.legend) {
|
|
29187
|
-
$el.legend.selectAll("." + $LEGEND.legendItem +
|
|
29191
|
+
$el.legend.selectAll("." + $LEGEND.legendItem + suffixId).remove();
|
|
29188
29192
|
}
|
|
29189
29193
|
|
|
29190
29194
|
// Remove target
|
|
@@ -29192,6 +29196,9 @@ function callDone(fn, resizeAfter) {
|
|
|
29192
29196
|
_newArrowCheck(this, _this4);
|
|
29193
29197
|
return t.id !== id;
|
|
29194
29198
|
}.bind(this));
|
|
29199
|
+
|
|
29200
|
+
// Remove custom point def element
|
|
29201
|
+
hasLegendDefsPoint && ((_$el$defs = $el.defs) == null ? void 0 : _$el$defs.select("#" + $$.getDefsPointId(suffixId)).remove());
|
|
29195
29202
|
}.bind(this));
|
|
29196
29203
|
|
|
29197
29204
|
// since treemap uses different data types, it needs to be transformed
|
|
@@ -31793,10 +31800,10 @@ function getFormattedText(id) {
|
|
|
31793
31800
|
// treemap
|
|
31794
31801
|
treemap && $$.updateTreemap(durationForExit);
|
|
31795
31802
|
}
|
|
31796
|
-
|
|
31797
|
-
// @TODO: Axis & Radar type
|
|
31798
31803
|
if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
|
|
31799
31804
|
$$.updateCircle();
|
|
31805
|
+
} else if ($$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint()) {
|
|
31806
|
+
$$.data.targets.forEach($$.point("create", this));
|
|
31800
31807
|
}
|
|
31801
31808
|
|
|
31802
31809
|
// text
|
|
@@ -34757,6 +34764,7 @@ function getGroupedDataPointsFn(d) {
|
|
|
34757
34764
|
},
|
|
34758
34765
|
getBarW: function getBarW(type, axis, targetsNum) {
|
|
34759
34766
|
var _config$data_groups,
|
|
34767
|
+
_$$$getZoomTransform,
|
|
34760
34768
|
_config$axis_x_min,
|
|
34761
34769
|
_config$axis_x_max,
|
|
34762
34770
|
_this11 = this;
|
|
@@ -34767,8 +34775,10 @@ function getGroupedDataPointsFn(d) {
|
|
|
34767
34775
|
maxDataCount = $$.getMaxDataCount(),
|
|
34768
34776
|
isGrouped = type === "bar" && ((_config$data_groups = config.data_groups) == null ? void 0 : _config$data_groups.length),
|
|
34769
34777
|
configName = type + "_width",
|
|
34770
|
-
_$$$getZoomTransform = $$.getZoomTransform()
|
|
34771
|
-
|
|
34778
|
+
_ref2 = (_$$$getZoomTransform = $$.getZoomTransform == null ? void 0 : $$.getZoomTransform()) != null ? _$$$getZoomTransform : {
|
|
34779
|
+
k: 1
|
|
34780
|
+
},
|
|
34781
|
+
k = _ref2.k,
|
|
34772
34782
|
xMinMax = [(_config$axis_x_min = config.axis_x_min) != null ? _config$axis_x_min : org.xDomain[0], (_config$axis_x_max = config.axis_x_max) != null ? _config$axis_x_max : org.xDomain[1]].map($$.axis.isTimeSeries() ? parseDate.bind($$) : Number);
|
|
34773
34783
|
let tickInterval = axis.tickInterval(maxDataCount);
|
|
34774
34784
|
if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
|
|
@@ -37079,7 +37089,7 @@ let ChartInternal = /*#__PURE__*/function () {
|
|
|
37079
37089
|
config.axis_y2_show = !1;
|
|
37080
37090
|
config.subchart_show = !1;
|
|
37081
37091
|
}
|
|
37082
|
-
if ($$.hasPointType()) {
|
|
37092
|
+
if ($$.hasPointType() || $$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint()) {
|
|
37083
37093
|
$$.point = $$.generatePoint();
|
|
37084
37094
|
}
|
|
37085
37095
|
if (state.hasAxis) {
|
|
@@ -37186,7 +37196,7 @@ let ChartInternal = /*#__PURE__*/function () {
|
|
|
37186
37196
|
|
|
37187
37197
|
// Define defs
|
|
37188
37198
|
const hasColorPatterns = isFunction(config.color_tiles) && $$.patterns;
|
|
37189
|
-
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || config.data_labels_backgroundColors) {
|
|
37199
|
+
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || config.data_labels_backgroundColors || $$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint()) {
|
|
37190
37200
|
$el.defs = $el.svg.append("defs");
|
|
37191
37201
|
if (hasAxis) {
|
|
37192
37202
|
["id", "idXAxis", "idYAxis", "idGrid"].forEach(function (v) {
|
|
@@ -45335,8 +45345,20 @@ function axis_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) {
|
|
|
45335
45345
|
|
|
45336
45346
|
|
|
45337
45347
|
const api = [api_axis, api_category, flow, api_grid, group, api_regions, x];
|
|
45338
|
-
const internal =
|
|
45339
|
-
|
|
45348
|
+
const internal = {
|
|
45349
|
+
axis: Axis,
|
|
45350
|
+
clip: clip,
|
|
45351
|
+
eventrect: eventrect,
|
|
45352
|
+
flow: interactions_flow,
|
|
45353
|
+
grid: internals_grid,
|
|
45354
|
+
region: region,
|
|
45355
|
+
sizeAxis: size_axis
|
|
45356
|
+
};
|
|
45357
|
+
const options = {
|
|
45358
|
+
optDataAxis: data_axis,
|
|
45359
|
+
optAxis: Options_axis_axis,
|
|
45360
|
+
optGrid: common_grid
|
|
45361
|
+
};
|
|
45340
45362
|
;// CONCATENATED MODULE: ./node_modules/d3-shape/src/array.js
|
|
45341
45363
|
var slice = Array.prototype.slice;
|
|
45342
45364
|
/* harmony default export */ function d3_shape_src_array(x) {
|
|
@@ -48175,6 +48197,130 @@ function candlestick_objectSpread(e) { for (var r = 1, t; r < arguments.length;
|
|
|
48175
48197
|
return linePoint === !0 || isArray(linePoint) && linePoint.indexOf(d.id) !== -1;
|
|
48176
48198
|
}
|
|
48177
48199
|
});
|
|
48200
|
+
;// CONCATENATED MODULE: ./src/ChartInternal/shape/point.common.ts
|
|
48201
|
+
|
|
48202
|
+
/**
|
|
48203
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
48204
|
+
* billboard.js project is licensed under the MIT license
|
|
48205
|
+
*/
|
|
48206
|
+
|
|
48207
|
+
|
|
48208
|
+
|
|
48209
|
+
|
|
48210
|
+
/**
|
|
48211
|
+
* Check if point draw methods are valid
|
|
48212
|
+
* @param {string} point point type
|
|
48213
|
+
* @returns {boolean}
|
|
48214
|
+
* @private
|
|
48215
|
+
*/
|
|
48216
|
+
function hasValidPointDrawMethods(point) {
|
|
48217
|
+
return isObjectType(point) && isFunction(point.create) && isFunction(point.update);
|
|
48218
|
+
}
|
|
48219
|
+
|
|
48220
|
+
/**
|
|
48221
|
+
* Insert point info defs element
|
|
48222
|
+
* @param {string} point Point element
|
|
48223
|
+
* @param {string} id Point id
|
|
48224
|
+
* @private
|
|
48225
|
+
*/
|
|
48226
|
+
function insertPointInfoDefs(point, id) {
|
|
48227
|
+
var _this = this,
|
|
48228
|
+
_node$childNodes;
|
|
48229
|
+
const $$ = this,
|
|
48230
|
+
copyAttr = function (from, target) {
|
|
48231
|
+
_newArrowCheck(this, _this);
|
|
48232
|
+
const attribs = from.attributes;
|
|
48233
|
+
for (let i = 0, name; name = attribs[i]; i++) {
|
|
48234
|
+
name = name.name;
|
|
48235
|
+
target.setAttribute(name, from.getAttribute(name));
|
|
48236
|
+
}
|
|
48237
|
+
}.bind(this),
|
|
48238
|
+
doc = new DOMParser().parseFromString(point, "image/svg+xml"),
|
|
48239
|
+
node = doc.documentElement,
|
|
48240
|
+
clone = browser_doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase());
|
|
48241
|
+
clone.id = id;
|
|
48242
|
+
clone.style.fill = "inherit";
|
|
48243
|
+
clone.style.stroke = "inherit";
|
|
48244
|
+
copyAttr(node, clone);
|
|
48245
|
+
if ((_node$childNodes = node.childNodes) != null && _node$childNodes.length) {
|
|
48246
|
+
const parent = src_select(clone);
|
|
48247
|
+
if ("innerHTML" in clone) {
|
|
48248
|
+
parent.html(node.innerHTML);
|
|
48249
|
+
} else {
|
|
48250
|
+
toArray(node.childNodes).forEach(function (v) {
|
|
48251
|
+
_newArrowCheck(this, _this);
|
|
48252
|
+
copyAttr(v, parent.append(v.tagName).node());
|
|
48253
|
+
}.bind(this));
|
|
48254
|
+
}
|
|
48255
|
+
}
|
|
48256
|
+
$$.$el.defs.node().appendChild(clone);
|
|
48257
|
+
}
|
|
48258
|
+
/* harmony default export */ var point_common = ({
|
|
48259
|
+
/**
|
|
48260
|
+
* Check if point type option is valid
|
|
48261
|
+
* @param {string} type point type
|
|
48262
|
+
* @returns {boolean}
|
|
48263
|
+
* @private
|
|
48264
|
+
*/
|
|
48265
|
+
hasValidPointType: function hasValidPointType(type) {
|
|
48266
|
+
return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);
|
|
48267
|
+
},
|
|
48268
|
+
/**
|
|
48269
|
+
* Check if pattern point is set to be used on legend
|
|
48270
|
+
* @returns {boolean}
|
|
48271
|
+
* @private
|
|
48272
|
+
*/
|
|
48273
|
+
hasLegendDefsPoint: function hasLegendDefsPoint() {
|
|
48274
|
+
var _config$point_pattern;
|
|
48275
|
+
const config = this.config;
|
|
48276
|
+
return config.legend_show && ((_config$point_pattern = config.point_pattern) == null ? void 0 : _config$point_pattern.length) && config.legend_usePoint;
|
|
48277
|
+
},
|
|
48278
|
+
getDefsPointId: function getDefsPointId(id) {
|
|
48279
|
+
const datetimeId = this.state.datetimeId;
|
|
48280
|
+
return datetimeId + "-point" + id;
|
|
48281
|
+
},
|
|
48282
|
+
/**
|
|
48283
|
+
* Get generate point function
|
|
48284
|
+
* @returns {Function}
|
|
48285
|
+
* @private
|
|
48286
|
+
*/
|
|
48287
|
+
generatePoint: function generatePoint() {
|
|
48288
|
+
const $$ = this,
|
|
48289
|
+
$el = $$.$el,
|
|
48290
|
+
config = $$.config,
|
|
48291
|
+
ids = [],
|
|
48292
|
+
pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
|
|
48293
|
+
return function (method, context) {
|
|
48294
|
+
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
48295
|
+
args[_key - 2] = arguments[_key];
|
|
48296
|
+
}
|
|
48297
|
+
return function (d) {
|
|
48298
|
+
var _d$data, _point$method;
|
|
48299
|
+
const id = $$.getTargetSelectorSuffix(d.id || ((_d$data = d.data) == null ? void 0 : _d$data.id) || d),
|
|
48300
|
+
element = src_select(this);
|
|
48301
|
+
ids.indexOf(id) < 0 && ids.push(id);
|
|
48302
|
+
let point = pattern[ids.indexOf(id) % pattern.length];
|
|
48303
|
+
if ($$.hasValidPointType(point)) {
|
|
48304
|
+
point = $$[point];
|
|
48305
|
+
} else if (!hasValidPointDrawMethods(point || config.point_type)) {
|
|
48306
|
+
const pointId = $$.getDefsPointId(id),
|
|
48307
|
+
defsPoint = $el.defs.select("#" + pointId);
|
|
48308
|
+
if (defsPoint.size() < 1) {
|
|
48309
|
+
insertPointInfoDefs.bind($$)(point, pointId);
|
|
48310
|
+
}
|
|
48311
|
+
if (method === "create") {
|
|
48312
|
+
var _$$$custom;
|
|
48313
|
+
return (_$$$custom = $$.custom) == null ? void 0 : _$$$custom.create.bind(context).apply(void 0, [element, pointId].concat(args));
|
|
48314
|
+
} else if (method === "update") {
|
|
48315
|
+
var _$$$custom2;
|
|
48316
|
+
return (_$$$custom2 = $$.custom) == null ? void 0 : _$$$custom2.update.bind(context).apply(void 0, [element].concat(args));
|
|
48317
|
+
}
|
|
48318
|
+
}
|
|
48319
|
+
return (_point$method = point[method]) == null ? void 0 : _point$method.bind(context).apply(void 0, [element].concat(args));
|
|
48320
|
+
};
|
|
48321
|
+
};
|
|
48322
|
+
}
|
|
48323
|
+
});
|
|
48178
48324
|
;// CONCATENATED MODULE: ./src/ChartInternal/shape/point.ts
|
|
48179
48325
|
|
|
48180
48326
|
var point_this = undefined;
|
|
@@ -48185,19 +48331,11 @@ var point_this = undefined;
|
|
|
48185
48331
|
|
|
48186
48332
|
|
|
48187
48333
|
|
|
48188
|
-
|
|
48189
48334
|
const getTransitionName = function () {
|
|
48190
48335
|
_newArrowCheck(this, point_this);
|
|
48191
48336
|
return getRandom();
|
|
48192
48337
|
}.bind(undefined);
|
|
48193
48338
|
/* harmony default export */ var point = ({
|
|
48194
|
-
hasValidPointType: function hasValidPointType(type) {
|
|
48195
|
-
return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);
|
|
48196
|
-
},
|
|
48197
|
-
hasValidPointDrawMethods: function hasValidPointDrawMethods(type) {
|
|
48198
|
-
const pointType = type || this.config.point_type;
|
|
48199
|
-
return isObjectType(pointType) && isFunction(pointType.create) && isFunction(pointType.update);
|
|
48200
|
-
},
|
|
48201
48339
|
initialOpacityForCircle: function initialOpacityForCircle(d) {
|
|
48202
48340
|
const config = this.config,
|
|
48203
48341
|
withoutFadeIn = this.state.withoutFadeIn;
|
|
@@ -48511,41 +48649,6 @@ const getTransitionName = function () {
|
|
|
48511
48649
|
}
|
|
48512
48650
|
return sensitivity;
|
|
48513
48651
|
},
|
|
48514
|
-
insertPointInfoDefs: function insertPointInfoDefs(point, id) {
|
|
48515
|
-
var _this7 = this,
|
|
48516
|
-
_node$childNodes;
|
|
48517
|
-
const $$ = this,
|
|
48518
|
-
copyAttr = function (from, target) {
|
|
48519
|
-
_newArrowCheck(this, _this7);
|
|
48520
|
-
const attribs = from.attributes;
|
|
48521
|
-
for (let i = 0, name; name = attribs[i]; i++) {
|
|
48522
|
-
name = name.name;
|
|
48523
|
-
target.setAttribute(name, from.getAttribute(name));
|
|
48524
|
-
}
|
|
48525
|
-
}.bind(this),
|
|
48526
|
-
doc = new DOMParser().parseFromString(point, "image/svg+xml"),
|
|
48527
|
-
node = doc.documentElement,
|
|
48528
|
-
clone = browser_doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase());
|
|
48529
|
-
clone.id = id;
|
|
48530
|
-
clone.style.fill = "inherit";
|
|
48531
|
-
clone.style.stroke = "inherit";
|
|
48532
|
-
copyAttr(node, clone);
|
|
48533
|
-
if ((_node$childNodes = node.childNodes) != null && _node$childNodes.length) {
|
|
48534
|
-
const parent = src_select(clone);
|
|
48535
|
-
if ("innerHTML" in clone) {
|
|
48536
|
-
parent.html(node.innerHTML);
|
|
48537
|
-
} else {
|
|
48538
|
-
toArray(node.childNodes).forEach(function (v) {
|
|
48539
|
-
_newArrowCheck(this, _this7);
|
|
48540
|
-
copyAttr(v, parent.append(v.tagName).node());
|
|
48541
|
-
}.bind(this));
|
|
48542
|
-
}
|
|
48543
|
-
}
|
|
48544
|
-
$$.$el.defs.node().appendChild(clone);
|
|
48545
|
-
},
|
|
48546
|
-
pointFromDefs: function pointFromDefs(id) {
|
|
48547
|
-
return this.$el.defs.select("#" + id);
|
|
48548
|
-
},
|
|
48549
48652
|
updatePointClass: function updatePointClass(d) {
|
|
48550
48653
|
const $$ = this,
|
|
48551
48654
|
circle = $$.$el.circle;
|
|
@@ -48562,7 +48665,7 @@ const getTransitionName = function () {
|
|
|
48562
48665
|
return pointClass;
|
|
48563
48666
|
},
|
|
48564
48667
|
generateGetLinePoints: function generateGetLinePoints(lineIndices, isSub) {
|
|
48565
|
-
var
|
|
48668
|
+
var _this7 = this;
|
|
48566
48669
|
// partial duplication of generateGetBarPoints
|
|
48567
48670
|
const $$ = this,
|
|
48568
48671
|
config = $$.config,
|
|
@@ -48571,7 +48674,7 @@ const getTransitionName = function () {
|
|
|
48571
48674
|
lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),
|
|
48572
48675
|
yScale = $$.getYScaleById.bind($$);
|
|
48573
48676
|
return function (d, i) {
|
|
48574
|
-
_newArrowCheck(this,
|
|
48677
|
+
_newArrowCheck(this, _this7);
|
|
48575
48678
|
const y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
|
|
48576
48679
|
offset = lineOffset(d, i) || y0,
|
|
48577
48680
|
posX = x(d); // offset is for stacked area chart
|
|
@@ -48589,56 +48692,22 @@ const getTransitionName = function () {
|
|
|
48589
48692
|
point, point];
|
|
48590
48693
|
}.bind(this);
|
|
48591
48694
|
},
|
|
48592
|
-
generatePoint: function generatePoint() {
|
|
48593
|
-
const $$ = this,
|
|
48594
|
-
config = $$.config,
|
|
48595
|
-
datetimeId = $$.state.datetimeId,
|
|
48596
|
-
ids = [],
|
|
48597
|
-
pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
|
|
48598
|
-
return function (method, context) {
|
|
48599
|
-
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
48600
|
-
args[_key - 2] = arguments[_key];
|
|
48601
|
-
}
|
|
48602
|
-
return function (d) {
|
|
48603
|
-
var _d$data;
|
|
48604
|
-
const id = $$.getTargetSelectorSuffix(d.id || ((_d$data = d.data) == null ? void 0 : _d$data.id) || d),
|
|
48605
|
-
element = src_select(this);
|
|
48606
|
-
ids.indexOf(id) < 0 && ids.push(id);
|
|
48607
|
-
let point = pattern[ids.indexOf(id) % pattern.length];
|
|
48608
|
-
if ($$.hasValidPointType(point)) {
|
|
48609
|
-
point = $$[point];
|
|
48610
|
-
} else if (!$$.hasValidPointDrawMethods(point)) {
|
|
48611
|
-
const pointId = datetimeId + "-point" + id,
|
|
48612
|
-
pointFromDefs = $$.pointFromDefs(pointId);
|
|
48613
|
-
if (pointFromDefs.size() < 1) {
|
|
48614
|
-
$$.insertPointInfoDefs(point, pointId);
|
|
48615
|
-
}
|
|
48616
|
-
if (method === "create") {
|
|
48617
|
-
return $$.custom.create.bind(context).apply(void 0, [element, pointId].concat(args));
|
|
48618
|
-
} else if (method === "update") {
|
|
48619
|
-
return $$.custom.update.bind(context).apply(void 0, [element].concat(args));
|
|
48620
|
-
}
|
|
48621
|
-
}
|
|
48622
|
-
return point[method].bind(context).apply(void 0, [element].concat(args));
|
|
48623
|
-
};
|
|
48624
|
-
};
|
|
48625
|
-
},
|
|
48626
48695
|
custom: {
|
|
48627
48696
|
create: function create(element, id, fillStyleFn) {
|
|
48628
48697
|
return element.append("use").attr("xlink:href", "#" + id).attr("class", this.updatePointClass.bind(this)).style("fill", fillStyleFn).node();
|
|
48629
48698
|
},
|
|
48630
48699
|
update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
|
|
48631
|
-
var
|
|
48700
|
+
var _this8 = this;
|
|
48632
48701
|
const $$ = this,
|
|
48633
48702
|
_element$node$getBBox = element.node().getBBox(),
|
|
48634
48703
|
width = _element$node$getBBox.width,
|
|
48635
48704
|
height = _element$node$getBBox.height,
|
|
48636
48705
|
xPosFn2 = function (d) {
|
|
48637
|
-
_newArrowCheck(this,
|
|
48706
|
+
_newArrowCheck(this, _this8);
|
|
48638
48707
|
return isValue(d.value) ? xPosFn(d) - width / 2 : 0;
|
|
48639
48708
|
}.bind(this),
|
|
48640
48709
|
yPosFn2 = function (d) {
|
|
48641
|
-
_newArrowCheck(this,
|
|
48710
|
+
_newArrowCheck(this, _this8);
|
|
48642
48711
|
return isValue(d.value) ? yPosFn(d) - height / 2 : 0;
|
|
48643
48712
|
}.bind(this);
|
|
48644
48713
|
let mainCircles = element;
|
|
@@ -48676,23 +48745,23 @@ const getTransitionName = function () {
|
|
|
48676
48745
|
// 'rectangle' data point
|
|
48677
48746
|
rectangle: {
|
|
48678
48747
|
create: function create(element, sizeFn, fillStyleFn) {
|
|
48679
|
-
var
|
|
48748
|
+
var _this9 = this;
|
|
48680
48749
|
const rectSizeFn = function (d) {
|
|
48681
|
-
_newArrowCheck(this,
|
|
48750
|
+
_newArrowCheck(this, _this9);
|
|
48682
48751
|
return sizeFn(d) * 2;
|
|
48683
48752
|
}.bind(this);
|
|
48684
48753
|
return element.append("rect").attr("class", this.updatePointClass.bind(this)).attr("width", rectSizeFn).attr("height", rectSizeFn).style("fill", fillStyleFn).node();
|
|
48685
48754
|
},
|
|
48686
48755
|
update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
|
|
48687
|
-
var
|
|
48756
|
+
var _this10 = this;
|
|
48688
48757
|
const $$ = this,
|
|
48689
48758
|
r = $$.config.point_r,
|
|
48690
48759
|
rectXPosFn = function (d) {
|
|
48691
|
-
_newArrowCheck(this,
|
|
48760
|
+
_newArrowCheck(this, _this10);
|
|
48692
48761
|
return xPosFn(d) - r;
|
|
48693
48762
|
}.bind(this),
|
|
48694
48763
|
rectYPosFn = function (d) {
|
|
48695
|
-
_newArrowCheck(this,
|
|
48764
|
+
_newArrowCheck(this, _this10);
|
|
48696
48765
|
return yPosFn(d) - r;
|
|
48697
48766
|
}.bind(this);
|
|
48698
48767
|
let mainCircles = element;
|
|
@@ -51368,6 +51437,7 @@ var shape_this = undefined;
|
|
|
51368
51437
|
|
|
51369
51438
|
|
|
51370
51439
|
|
|
51440
|
+
|
|
51371
51441
|
// Options
|
|
51372
51442
|
|
|
51373
51443
|
|
|
@@ -51395,9 +51465,9 @@ var shape_this = undefined;
|
|
|
51395
51465
|
* @private
|
|
51396
51466
|
*/
|
|
51397
51467
|
function extendAxis(module, option) {
|
|
51398
|
-
util_extend(ChartInternal.prototype, internal.concat(module));
|
|
51468
|
+
util_extend(ChartInternal.prototype, Object.values(internal).concat(module));
|
|
51399
51469
|
util_extend(Chart.prototype, api);
|
|
51400
|
-
Options.setOptions(options.concat(option || []));
|
|
51470
|
+
Options.setOptions(Object.values(options).concat(option || []));
|
|
51401
51471
|
}
|
|
51402
51472
|
|
|
51403
51473
|
/**
|
|
@@ -51407,7 +51477,7 @@ function extendAxis(module, option) {
|
|
|
51407
51477
|
* @private
|
|
51408
51478
|
*/
|
|
51409
51479
|
function extendLine(module, option) {
|
|
51410
|
-
extendAxis([point, line].concat(module || []));
|
|
51480
|
+
extendAxis([point_common, point, line].concat(module || []));
|
|
51411
51481
|
Options.setOptions([common_point, shape_line].concat(option || []));
|
|
51412
51482
|
}
|
|
51413
51483
|
|
|
@@ -51418,8 +51488,8 @@ function extendLine(module, option) {
|
|
|
51418
51488
|
* @private
|
|
51419
51489
|
*/
|
|
51420
51490
|
function extendArc(module, option) {
|
|
51421
|
-
util_extend(ChartInternal.prototype, [arc].concat(module || []));
|
|
51422
|
-
Options.setOptions(option);
|
|
51491
|
+
util_extend(ChartInternal.prototype, [arc, point_common].concat(module || []));
|
|
51492
|
+
Options.setOptions([common_point].concat(option || []));
|
|
51423
51493
|
}
|
|
51424
51494
|
|
|
51425
51495
|
// Area types
|
|
@@ -51522,7 +51592,9 @@ let _area = function area() {
|
|
|
51522
51592
|
resolver_shape_radar = function () {
|
|
51523
51593
|
var _this14 = this;
|
|
51524
51594
|
_newArrowCheck(this, shape_this);
|
|
51525
|
-
return extendArc([point, radar], [common_point, shape_radar
|
|
51595
|
+
return extendArc([internal.eventrect, point, radar], [common_point, shape_radar, {
|
|
51596
|
+
axis_x_categories: options.optAxis.axis_x_categories
|
|
51597
|
+
}]), (resolver_shape_radar = function () {
|
|
51526
51598
|
_newArrowCheck(this, _this14);
|
|
51527
51599
|
return TYPE.RADAR;
|
|
51528
51600
|
}.bind(this))();
|
|
@@ -51530,7 +51602,7 @@ let _area = function area() {
|
|
|
51530
51602
|
resolver_shape_bar = function () {
|
|
51531
51603
|
var _this15 = this;
|
|
51532
51604
|
_newArrowCheck(this, shape_this);
|
|
51533
|
-
return extendAxis([bar], shape_bar), (resolver_shape_bar = function () {
|
|
51605
|
+
return extendAxis([bar, point_common], [shape_bar, common_point]), (resolver_shape_bar = function () {
|
|
51534
51606
|
_newArrowCheck(this, _this15);
|
|
51535
51607
|
return TYPE.BAR;
|
|
51536
51608
|
}.bind(this))();
|
|
@@ -51538,7 +51610,7 @@ let _area = function area() {
|
|
|
51538
51610
|
resolver_shape_bubble = function () {
|
|
51539
51611
|
var _this16 = this;
|
|
51540
51612
|
_newArrowCheck(this, shape_this);
|
|
51541
|
-
return extendAxis([point, bubble], [shape_bubble, common_point]), (resolver_shape_bubble = function () {
|
|
51613
|
+
return extendAxis([point_common, point, bubble], [shape_bubble, common_point]), (resolver_shape_bubble = function () {
|
|
51542
51614
|
_newArrowCheck(this, _this16);
|
|
51543
51615
|
return TYPE.BUBBLE;
|
|
51544
51616
|
}.bind(this))();
|
|
@@ -51546,7 +51618,7 @@ let _area = function area() {
|
|
|
51546
51618
|
resolver_shape_candlestick = function () {
|
|
51547
51619
|
var _this17 = this;
|
|
51548
51620
|
_newArrowCheck(this, shape_this);
|
|
51549
|
-
return extendAxis([candlestick], [shape_candlestick]), (resolver_shape_candlestick = function () {
|
|
51621
|
+
return extendAxis([candlestick, point_common], [shape_candlestick, common_point]), (resolver_shape_candlestick = function () {
|
|
51550
51622
|
_newArrowCheck(this, _this17);
|
|
51551
51623
|
return TYPE.CANDLESTICK;
|
|
51552
51624
|
}.bind(this))();
|
|
@@ -51554,7 +51626,7 @@ let _area = function area() {
|
|
|
51554
51626
|
shape_scatter = function () {
|
|
51555
51627
|
var _this18 = this;
|
|
51556
51628
|
_newArrowCheck(this, shape_this);
|
|
51557
|
-
return extendAxis([point], [common_point, scatter]), (shape_scatter = function () {
|
|
51629
|
+
return extendAxis([point_common, point], [common_point, scatter]), (shape_scatter = function () {
|
|
51558
51630
|
_newArrowCheck(this, _this18);
|
|
51559
51631
|
return TYPE.SCATTER;
|
|
51560
51632
|
}.bind(this))();
|
|
@@ -54029,7 +54101,7 @@ let _defaults = {};
|
|
|
54029
54101
|
|
|
54030
54102
|
/**
|
|
54031
54103
|
* @namespace bb
|
|
54032
|
-
* @version 3.11.
|
|
54104
|
+
* @version 3.11.2
|
|
54033
54105
|
*/
|
|
54034
54106
|
const bb = {
|
|
54035
54107
|
/**
|
|
@@ -54039,7 +54111,7 @@ const bb = {
|
|
|
54039
54111
|
* bb.version; // "1.0.0"
|
|
54040
54112
|
* @memberof bb
|
|
54041
54113
|
*/
|
|
54042
|
-
version: "3.11.
|
|
54114
|
+
version: "3.11.2",
|
|
54043
54115
|
/**
|
|
54044
54116
|
* Generate chart
|
|
54045
54117
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|