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.css
CHANGED
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.11.
|
|
8
|
+
* @version 3.11.2
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -5687,7 +5687,8 @@ function callDone(fn, resizeAfter) {
|
|
|
5687
5687
|
const $$ = this,
|
|
5688
5688
|
state = $$.state,
|
|
5689
5689
|
$el = $$.$el,
|
|
5690
|
-
$T = $$.$T
|
|
5690
|
+
$T = $$.$T,
|
|
5691
|
+
hasLegendDefsPoint = !!($$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint());
|
|
5691
5692
|
let done = customDoneCb,
|
|
5692
5693
|
targetIds = rawTargetIds;
|
|
5693
5694
|
// reset internally cached data
|
|
@@ -5715,14 +5716,17 @@ function callDone(fn, resizeAfter) {
|
|
|
5715
5716
|
}.bind(this)));
|
|
5716
5717
|
$T(targets).style("opacity", "0").remove().call(endall, done);
|
|
5717
5718
|
targetIds.forEach(function (id) {
|
|
5718
|
-
var _this4 = this
|
|
5719
|
+
var _this4 = this,
|
|
5720
|
+
_$el$defs;
|
|
5719
5721
|
_newArrowCheck(this, _this3);
|
|
5722
|
+
const suffixId = $$.getTargetSelectorSuffix(id);
|
|
5723
|
+
|
|
5720
5724
|
// Reset fadein for future load
|
|
5721
5725
|
state.withoutFadeIn[id] = !1;
|
|
5722
5726
|
|
|
5723
5727
|
// Remove target's elements
|
|
5724
5728
|
if ($el.legend) {
|
|
5725
|
-
$el.legend.selectAll("." + $LEGEND.legendItem +
|
|
5729
|
+
$el.legend.selectAll("." + $LEGEND.legendItem + suffixId).remove();
|
|
5726
5730
|
}
|
|
5727
5731
|
|
|
5728
5732
|
// Remove target
|
|
@@ -5730,6 +5734,9 @@ function callDone(fn, resizeAfter) {
|
|
|
5730
5734
|
_newArrowCheck(this, _this4);
|
|
5731
5735
|
return t.id !== id;
|
|
5732
5736
|
}.bind(this));
|
|
5737
|
+
|
|
5738
|
+
// Remove custom point def element
|
|
5739
|
+
hasLegendDefsPoint && ((_$el$defs = $el.defs) == null ? void 0 : _$el$defs.select("#" + $$.getDefsPointId(suffixId)).remove());
|
|
5733
5740
|
}.bind(this));
|
|
5734
5741
|
|
|
5735
5742
|
// since treemap uses different data types, it needs to be transformed
|
|
@@ -7805,10 +7812,10 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
7805
7812
|
// treemap
|
|
7806
7813
|
treemap && $$.updateTreemap(durationForExit);
|
|
7807
7814
|
}
|
|
7808
|
-
|
|
7809
|
-
// @TODO: Axis & Radar type
|
|
7810
7815
|
if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
|
|
7811
7816
|
$$.updateCircle();
|
|
7817
|
+
} else if ($$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint()) {
|
|
7818
|
+
$$.data.targets.forEach($$.point("create", this));
|
|
7812
7819
|
}
|
|
7813
7820
|
|
|
7814
7821
|
// text
|
|
@@ -8598,6 +8605,7 @@ function getGroupedDataPointsFn(d) {
|
|
|
8598
8605
|
},
|
|
8599
8606
|
getBarW: function getBarW(type, axis, targetsNum) {
|
|
8600
8607
|
var _config$data_groups,
|
|
8608
|
+
_$$$getZoomTransform,
|
|
8601
8609
|
_config$axis_x_min,
|
|
8602
8610
|
_config$axis_x_max,
|
|
8603
8611
|
_this11 = this;
|
|
@@ -8608,8 +8616,10 @@ function getGroupedDataPointsFn(d) {
|
|
|
8608
8616
|
maxDataCount = $$.getMaxDataCount(),
|
|
8609
8617
|
isGrouped = type === "bar" && ((_config$data_groups = config.data_groups) == null ? void 0 : _config$data_groups.length),
|
|
8610
8618
|
configName = type + "_width",
|
|
8611
|
-
_$$$getZoomTransform = $$.getZoomTransform()
|
|
8612
|
-
|
|
8619
|
+
_ref2 = (_$$$getZoomTransform = $$.getZoomTransform == null ? void 0 : $$.getZoomTransform()) != null ? _$$$getZoomTransform : {
|
|
8620
|
+
k: 1
|
|
8621
|
+
},
|
|
8622
|
+
k = _ref2.k,
|
|
8613
8623
|
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);
|
|
8614
8624
|
let tickInterval = axis.tickInterval(maxDataCount);
|
|
8615
8625
|
if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
|
|
@@ -10914,7 +10924,7 @@ let ChartInternal = /*#__PURE__*/function () {
|
|
|
10914
10924
|
config.axis_y2_show = !1;
|
|
10915
10925
|
config.subchart_show = !1;
|
|
10916
10926
|
}
|
|
10917
|
-
if ($$.hasPointType()) {
|
|
10927
|
+
if ($$.hasPointType() || $$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint()) {
|
|
10918
10928
|
$$.point = $$.generatePoint();
|
|
10919
10929
|
}
|
|
10920
10930
|
if (state.hasAxis) {
|
|
@@ -11021,7 +11031,7 @@ let ChartInternal = /*#__PURE__*/function () {
|
|
|
11021
11031
|
|
|
11022
11032
|
// Define defs
|
|
11023
11033
|
const hasColorPatterns = isFunction(config.color_tiles) && $$.patterns;
|
|
11024
|
-
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || config.data_labels_backgroundColors) {
|
|
11034
|
+
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || config.data_labels_backgroundColors || $$.hasLegendDefsPoint != null && $$.hasLegendDefsPoint()) {
|
|
11025
11035
|
$el.defs = $el.svg.append("defs");
|
|
11026
11036
|
if (hasAxis) {
|
|
11027
11037
|
["id", "idXAxis", "idYAxis", "idGrid"].forEach(function (v) {
|
|
@@ -19031,8 +19041,20 @@ function axis_objectSpread(e) { for (var r = 1, t; r < arguments.length; r++) {
|
|
|
19031
19041
|
|
|
19032
19042
|
|
|
19033
19043
|
const api = [api_axis, api_category, flow, api_grid, group, api_regions, x];
|
|
19034
|
-
const internal =
|
|
19035
|
-
|
|
19044
|
+
const internal = {
|
|
19045
|
+
axis: Axis,
|
|
19046
|
+
clip: clip,
|
|
19047
|
+
eventrect: eventrect,
|
|
19048
|
+
flow: interactions_flow,
|
|
19049
|
+
grid: internals_grid,
|
|
19050
|
+
region: region,
|
|
19051
|
+
sizeAxis: size_axis
|
|
19052
|
+
};
|
|
19053
|
+
const options = {
|
|
19054
|
+
optDataAxis: data_axis,
|
|
19055
|
+
optAxis: axis_axis,
|
|
19056
|
+
optGrid: common_grid
|
|
19057
|
+
};
|
|
19036
19058
|
// EXTERNAL MODULE: external {"commonjs":"d3-interpolate","commonjs2":"d3-interpolate","amd":"d3-interpolate","root":"d3"}
|
|
19037
19059
|
var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate_root_d3_ = __webpack_require__(12);
|
|
19038
19060
|
;// CONCATENATED MODULE: ./src/ChartInternal/shape/arc.ts
|
|
@@ -21205,6 +21227,130 @@ function candlestick_objectSpread(e) { for (var r = 1, t; r < arguments.length;
|
|
|
21205
21227
|
return linePoint === !0 || isArray(linePoint) && linePoint.indexOf(d.id) !== -1;
|
|
21206
21228
|
}
|
|
21207
21229
|
});
|
|
21230
|
+
;// CONCATENATED MODULE: ./src/ChartInternal/shape/point.common.ts
|
|
21231
|
+
|
|
21232
|
+
/**
|
|
21233
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
21234
|
+
* billboard.js project is licensed under the MIT license
|
|
21235
|
+
*/
|
|
21236
|
+
|
|
21237
|
+
|
|
21238
|
+
|
|
21239
|
+
|
|
21240
|
+
/**
|
|
21241
|
+
* Check if point draw methods are valid
|
|
21242
|
+
* @param {string} point point type
|
|
21243
|
+
* @returns {boolean}
|
|
21244
|
+
* @private
|
|
21245
|
+
*/
|
|
21246
|
+
function hasValidPointDrawMethods(point) {
|
|
21247
|
+
return isObjectType(point) && isFunction(point.create) && isFunction(point.update);
|
|
21248
|
+
}
|
|
21249
|
+
|
|
21250
|
+
/**
|
|
21251
|
+
* Insert point info defs element
|
|
21252
|
+
* @param {string} point Point element
|
|
21253
|
+
* @param {string} id Point id
|
|
21254
|
+
* @private
|
|
21255
|
+
*/
|
|
21256
|
+
function insertPointInfoDefs(point, id) {
|
|
21257
|
+
var _this = this,
|
|
21258
|
+
_node$childNodes;
|
|
21259
|
+
const $$ = this,
|
|
21260
|
+
copyAttr = function (from, target) {
|
|
21261
|
+
_newArrowCheck(this, _this);
|
|
21262
|
+
const attribs = from.attributes;
|
|
21263
|
+
for (let i = 0, name; name = attribs[i]; i++) {
|
|
21264
|
+
name = name.name;
|
|
21265
|
+
target.setAttribute(name, from.getAttribute(name));
|
|
21266
|
+
}
|
|
21267
|
+
}.bind(this),
|
|
21268
|
+
doc = new DOMParser().parseFromString(point, "image/svg+xml"),
|
|
21269
|
+
node = doc.documentElement,
|
|
21270
|
+
clone = browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.namespaces.svg, node.nodeName.toLowerCase());
|
|
21271
|
+
clone.id = id;
|
|
21272
|
+
clone.style.fill = "inherit";
|
|
21273
|
+
clone.style.stroke = "inherit";
|
|
21274
|
+
copyAttr(node, clone);
|
|
21275
|
+
if ((_node$childNodes = node.childNodes) != null && _node$childNodes.length) {
|
|
21276
|
+
const parent = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(clone);
|
|
21277
|
+
if ("innerHTML" in clone) {
|
|
21278
|
+
parent.html(node.innerHTML);
|
|
21279
|
+
} else {
|
|
21280
|
+
toArray(node.childNodes).forEach(function (v) {
|
|
21281
|
+
_newArrowCheck(this, _this);
|
|
21282
|
+
copyAttr(v, parent.append(v.tagName).node());
|
|
21283
|
+
}.bind(this));
|
|
21284
|
+
}
|
|
21285
|
+
}
|
|
21286
|
+
$$.$el.defs.node().appendChild(clone);
|
|
21287
|
+
}
|
|
21288
|
+
/* harmony default export */ var point_common = ({
|
|
21289
|
+
/**
|
|
21290
|
+
* Check if point type option is valid
|
|
21291
|
+
* @param {string} type point type
|
|
21292
|
+
* @returns {boolean}
|
|
21293
|
+
* @private
|
|
21294
|
+
*/
|
|
21295
|
+
hasValidPointType: function hasValidPointType(type) {
|
|
21296
|
+
return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);
|
|
21297
|
+
},
|
|
21298
|
+
/**
|
|
21299
|
+
* Check if pattern point is set to be used on legend
|
|
21300
|
+
* @returns {boolean}
|
|
21301
|
+
* @private
|
|
21302
|
+
*/
|
|
21303
|
+
hasLegendDefsPoint: function hasLegendDefsPoint() {
|
|
21304
|
+
var _config$point_pattern;
|
|
21305
|
+
const config = this.config;
|
|
21306
|
+
return config.legend_show && ((_config$point_pattern = config.point_pattern) == null ? void 0 : _config$point_pattern.length) && config.legend_usePoint;
|
|
21307
|
+
},
|
|
21308
|
+
getDefsPointId: function getDefsPointId(id) {
|
|
21309
|
+
const datetimeId = this.state.datetimeId;
|
|
21310
|
+
return datetimeId + "-point" + id;
|
|
21311
|
+
},
|
|
21312
|
+
/**
|
|
21313
|
+
* Get generate point function
|
|
21314
|
+
* @returns {Function}
|
|
21315
|
+
* @private
|
|
21316
|
+
*/
|
|
21317
|
+
generatePoint: function generatePoint() {
|
|
21318
|
+
const $$ = this,
|
|
21319
|
+
$el = $$.$el,
|
|
21320
|
+
config = $$.config,
|
|
21321
|
+
ids = [],
|
|
21322
|
+
pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
|
|
21323
|
+
return function (method, context) {
|
|
21324
|
+
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
21325
|
+
args[_key - 2] = arguments[_key];
|
|
21326
|
+
}
|
|
21327
|
+
return function (d) {
|
|
21328
|
+
var _d$data, _point$method;
|
|
21329
|
+
const id = $$.getTargetSelectorSuffix(d.id || ((_d$data = d.data) == null ? void 0 : _d$data.id) || d),
|
|
21330
|
+
element = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this);
|
|
21331
|
+
ids.indexOf(id) < 0 && ids.push(id);
|
|
21332
|
+
let point = pattern[ids.indexOf(id) % pattern.length];
|
|
21333
|
+
if ($$.hasValidPointType(point)) {
|
|
21334
|
+
point = $$[point];
|
|
21335
|
+
} else if (!hasValidPointDrawMethods(point || config.point_type)) {
|
|
21336
|
+
const pointId = $$.getDefsPointId(id),
|
|
21337
|
+
defsPoint = $el.defs.select("#" + pointId);
|
|
21338
|
+
if (defsPoint.size() < 1) {
|
|
21339
|
+
insertPointInfoDefs.bind($$)(point, pointId);
|
|
21340
|
+
}
|
|
21341
|
+
if (method === "create") {
|
|
21342
|
+
var _$$$custom;
|
|
21343
|
+
return (_$$$custom = $$.custom) == null ? void 0 : _$$$custom.create.bind(context).apply(void 0, [element, pointId].concat(args));
|
|
21344
|
+
} else if (method === "update") {
|
|
21345
|
+
var _$$$custom2;
|
|
21346
|
+
return (_$$$custom2 = $$.custom) == null ? void 0 : _$$$custom2.update.bind(context).apply(void 0, [element].concat(args));
|
|
21347
|
+
}
|
|
21348
|
+
}
|
|
21349
|
+
return (_point$method = point[method]) == null ? void 0 : _point$method.bind(context).apply(void 0, [element].concat(args));
|
|
21350
|
+
};
|
|
21351
|
+
};
|
|
21352
|
+
}
|
|
21353
|
+
});
|
|
21208
21354
|
;// CONCATENATED MODULE: ./src/ChartInternal/shape/point.ts
|
|
21209
21355
|
|
|
21210
21356
|
var point_this = undefined;
|
|
@@ -21215,19 +21361,11 @@ var point_this = undefined;
|
|
|
21215
21361
|
|
|
21216
21362
|
|
|
21217
21363
|
|
|
21218
|
-
|
|
21219
21364
|
const getTransitionName = function () {
|
|
21220
21365
|
_newArrowCheck(this, point_this);
|
|
21221
21366
|
return getRandom();
|
|
21222
21367
|
}.bind(undefined);
|
|
21223
21368
|
/* harmony default export */ var point = ({
|
|
21224
|
-
hasValidPointType: function hasValidPointType(type) {
|
|
21225
|
-
return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);
|
|
21226
|
-
},
|
|
21227
|
-
hasValidPointDrawMethods: function hasValidPointDrawMethods(type) {
|
|
21228
|
-
const pointType = type || this.config.point_type;
|
|
21229
|
-
return isObjectType(pointType) && isFunction(pointType.create) && isFunction(pointType.update);
|
|
21230
|
-
},
|
|
21231
21369
|
initialOpacityForCircle: function initialOpacityForCircle(d) {
|
|
21232
21370
|
const config = this.config,
|
|
21233
21371
|
withoutFadeIn = this.state.withoutFadeIn;
|
|
@@ -21541,41 +21679,6 @@ const getTransitionName = function () {
|
|
|
21541
21679
|
}
|
|
21542
21680
|
return sensitivity;
|
|
21543
21681
|
},
|
|
21544
|
-
insertPointInfoDefs: function insertPointInfoDefs(point, id) {
|
|
21545
|
-
var _this7 = this,
|
|
21546
|
-
_node$childNodes;
|
|
21547
|
-
const $$ = this,
|
|
21548
|
-
copyAttr = function (from, target) {
|
|
21549
|
-
_newArrowCheck(this, _this7);
|
|
21550
|
-
const attribs = from.attributes;
|
|
21551
|
-
for (let i = 0, name; name = attribs[i]; i++) {
|
|
21552
|
-
name = name.name;
|
|
21553
|
-
target.setAttribute(name, from.getAttribute(name));
|
|
21554
|
-
}
|
|
21555
|
-
}.bind(this),
|
|
21556
|
-
doc = new DOMParser().parseFromString(point, "image/svg+xml"),
|
|
21557
|
-
node = doc.documentElement,
|
|
21558
|
-
clone = browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.namespaces.svg, node.nodeName.toLowerCase());
|
|
21559
|
-
clone.id = id;
|
|
21560
|
-
clone.style.fill = "inherit";
|
|
21561
|
-
clone.style.stroke = "inherit";
|
|
21562
|
-
copyAttr(node, clone);
|
|
21563
|
-
if ((_node$childNodes = node.childNodes) != null && _node$childNodes.length) {
|
|
21564
|
-
const parent = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(clone);
|
|
21565
|
-
if ("innerHTML" in clone) {
|
|
21566
|
-
parent.html(node.innerHTML);
|
|
21567
|
-
} else {
|
|
21568
|
-
toArray(node.childNodes).forEach(function (v) {
|
|
21569
|
-
_newArrowCheck(this, _this7);
|
|
21570
|
-
copyAttr(v, parent.append(v.tagName).node());
|
|
21571
|
-
}.bind(this));
|
|
21572
|
-
}
|
|
21573
|
-
}
|
|
21574
|
-
$$.$el.defs.node().appendChild(clone);
|
|
21575
|
-
},
|
|
21576
|
-
pointFromDefs: function pointFromDefs(id) {
|
|
21577
|
-
return this.$el.defs.select("#" + id);
|
|
21578
|
-
},
|
|
21579
21682
|
updatePointClass: function updatePointClass(d) {
|
|
21580
21683
|
const $$ = this,
|
|
21581
21684
|
circle = $$.$el.circle;
|
|
@@ -21592,7 +21695,7 @@ const getTransitionName = function () {
|
|
|
21592
21695
|
return pointClass;
|
|
21593
21696
|
},
|
|
21594
21697
|
generateGetLinePoints: function generateGetLinePoints(lineIndices, isSub) {
|
|
21595
|
-
var
|
|
21698
|
+
var _this7 = this;
|
|
21596
21699
|
// partial duplication of generateGetBarPoints
|
|
21597
21700
|
const $$ = this,
|
|
21598
21701
|
config = $$.config,
|
|
@@ -21601,7 +21704,7 @@ const getTransitionName = function () {
|
|
|
21601
21704
|
lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),
|
|
21602
21705
|
yScale = $$.getYScaleById.bind($$);
|
|
21603
21706
|
return function (d, i) {
|
|
21604
|
-
_newArrowCheck(this,
|
|
21707
|
+
_newArrowCheck(this, _this7);
|
|
21605
21708
|
const y0 = yScale.call($$, d.id, isSub)($$.getShapeYMin(d.id)),
|
|
21606
21709
|
offset = lineOffset(d, i) || y0,
|
|
21607
21710
|
posX = x(d); // offset is for stacked area chart
|
|
@@ -21619,56 +21722,22 @@ const getTransitionName = function () {
|
|
|
21619
21722
|
point, point];
|
|
21620
21723
|
}.bind(this);
|
|
21621
21724
|
},
|
|
21622
|
-
generatePoint: function generatePoint() {
|
|
21623
|
-
const $$ = this,
|
|
21624
|
-
config = $$.config,
|
|
21625
|
-
datetimeId = $$.state.datetimeId,
|
|
21626
|
-
ids = [],
|
|
21627
|
-
pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
|
|
21628
|
-
return function (method, context) {
|
|
21629
|
-
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
21630
|
-
args[_key - 2] = arguments[_key];
|
|
21631
|
-
}
|
|
21632
|
-
return function (d) {
|
|
21633
|
-
var _d$data;
|
|
21634
|
-
const id = $$.getTargetSelectorSuffix(d.id || ((_d$data = d.data) == null ? void 0 : _d$data.id) || d),
|
|
21635
|
-
element = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this);
|
|
21636
|
-
ids.indexOf(id) < 0 && ids.push(id);
|
|
21637
|
-
let point = pattern[ids.indexOf(id) % pattern.length];
|
|
21638
|
-
if ($$.hasValidPointType(point)) {
|
|
21639
|
-
point = $$[point];
|
|
21640
|
-
} else if (!$$.hasValidPointDrawMethods(point)) {
|
|
21641
|
-
const pointId = datetimeId + "-point" + id,
|
|
21642
|
-
pointFromDefs = $$.pointFromDefs(pointId);
|
|
21643
|
-
if (pointFromDefs.size() < 1) {
|
|
21644
|
-
$$.insertPointInfoDefs(point, pointId);
|
|
21645
|
-
}
|
|
21646
|
-
if (method === "create") {
|
|
21647
|
-
return $$.custom.create.bind(context).apply(void 0, [element, pointId].concat(args));
|
|
21648
|
-
} else if (method === "update") {
|
|
21649
|
-
return $$.custom.update.bind(context).apply(void 0, [element].concat(args));
|
|
21650
|
-
}
|
|
21651
|
-
}
|
|
21652
|
-
return point[method].bind(context).apply(void 0, [element].concat(args));
|
|
21653
|
-
};
|
|
21654
|
-
};
|
|
21655
|
-
},
|
|
21656
21725
|
custom: {
|
|
21657
21726
|
create: function create(element, id, fillStyleFn) {
|
|
21658
21727
|
return element.append("use").attr("xlink:href", "#" + id).attr("class", this.updatePointClass.bind(this)).style("fill", fillStyleFn).node();
|
|
21659
21728
|
},
|
|
21660
21729
|
update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
|
|
21661
|
-
var
|
|
21730
|
+
var _this8 = this;
|
|
21662
21731
|
const $$ = this,
|
|
21663
21732
|
_element$node$getBBox = element.node().getBBox(),
|
|
21664
21733
|
width = _element$node$getBBox.width,
|
|
21665
21734
|
height = _element$node$getBBox.height,
|
|
21666
21735
|
xPosFn2 = function (d) {
|
|
21667
|
-
_newArrowCheck(this,
|
|
21736
|
+
_newArrowCheck(this, _this8);
|
|
21668
21737
|
return isValue(d.value) ? xPosFn(d) - width / 2 : 0;
|
|
21669
21738
|
}.bind(this),
|
|
21670
21739
|
yPosFn2 = function (d) {
|
|
21671
|
-
_newArrowCheck(this,
|
|
21740
|
+
_newArrowCheck(this, _this8);
|
|
21672
21741
|
return isValue(d.value) ? yPosFn(d) - height / 2 : 0;
|
|
21673
21742
|
}.bind(this);
|
|
21674
21743
|
let mainCircles = element;
|
|
@@ -21706,23 +21775,23 @@ const getTransitionName = function () {
|
|
|
21706
21775
|
// 'rectangle' data point
|
|
21707
21776
|
rectangle: {
|
|
21708
21777
|
create: function create(element, sizeFn, fillStyleFn) {
|
|
21709
|
-
var
|
|
21778
|
+
var _this9 = this;
|
|
21710
21779
|
const rectSizeFn = function (d) {
|
|
21711
|
-
_newArrowCheck(this,
|
|
21780
|
+
_newArrowCheck(this, _this9);
|
|
21712
21781
|
return sizeFn(d) * 2;
|
|
21713
21782
|
}.bind(this);
|
|
21714
21783
|
return element.append("rect").attr("class", this.updatePointClass.bind(this)).attr("width", rectSizeFn).attr("height", rectSizeFn).style("fill", fillStyleFn).node();
|
|
21715
21784
|
},
|
|
21716
21785
|
update: function update(element, xPosFn, yPosFn, fillStyleFn, withTransition, flow, selectedCircles) {
|
|
21717
|
-
var
|
|
21786
|
+
var _this10 = this;
|
|
21718
21787
|
const $$ = this,
|
|
21719
21788
|
r = $$.config.point_r,
|
|
21720
21789
|
rectXPosFn = function (d) {
|
|
21721
|
-
_newArrowCheck(this,
|
|
21790
|
+
_newArrowCheck(this, _this10);
|
|
21722
21791
|
return xPosFn(d) - r;
|
|
21723
21792
|
}.bind(this),
|
|
21724
21793
|
rectYPosFn = function (d) {
|
|
21725
|
-
_newArrowCheck(this,
|
|
21794
|
+
_newArrowCheck(this, _this10);
|
|
21726
21795
|
return yPosFn(d) - r;
|
|
21727
21796
|
}.bind(this);
|
|
21728
21797
|
let mainCircles = element;
|
|
@@ -23852,6 +23921,7 @@ var shape_this = undefined;
|
|
|
23852
23921
|
|
|
23853
23922
|
|
|
23854
23923
|
|
|
23924
|
+
|
|
23855
23925
|
// Options
|
|
23856
23926
|
|
|
23857
23927
|
|
|
@@ -23879,9 +23949,9 @@ var shape_this = undefined;
|
|
|
23879
23949
|
* @private
|
|
23880
23950
|
*/
|
|
23881
23951
|
function extendAxis(module, option) {
|
|
23882
|
-
extend(ChartInternal.prototype, internal.concat(module));
|
|
23952
|
+
extend(ChartInternal.prototype, Object.values(internal).concat(module));
|
|
23883
23953
|
extend(Chart.prototype, api);
|
|
23884
|
-
Options.setOptions(options.concat(option || []));
|
|
23954
|
+
Options.setOptions(Object.values(options).concat(option || []));
|
|
23885
23955
|
}
|
|
23886
23956
|
|
|
23887
23957
|
/**
|
|
@@ -23891,7 +23961,7 @@ function extendAxis(module, option) {
|
|
|
23891
23961
|
* @private
|
|
23892
23962
|
*/
|
|
23893
23963
|
function extendLine(module, option) {
|
|
23894
|
-
extendAxis([point, line].concat(module || []));
|
|
23964
|
+
extendAxis([point_common, point, line].concat(module || []));
|
|
23895
23965
|
Options.setOptions([common_point, shape_line].concat(option || []));
|
|
23896
23966
|
}
|
|
23897
23967
|
|
|
@@ -23902,8 +23972,8 @@ function extendLine(module, option) {
|
|
|
23902
23972
|
* @private
|
|
23903
23973
|
*/
|
|
23904
23974
|
function extendArc(module, option) {
|
|
23905
|
-
extend(ChartInternal.prototype, [arc].concat(module || []));
|
|
23906
|
-
Options.setOptions(option);
|
|
23975
|
+
extend(ChartInternal.prototype, [arc, point_common].concat(module || []));
|
|
23976
|
+
Options.setOptions([common_point].concat(option || []));
|
|
23907
23977
|
}
|
|
23908
23978
|
|
|
23909
23979
|
// Area types
|
|
@@ -24006,7 +24076,9 @@ let _area = function area() {
|
|
|
24006
24076
|
resolver_shape_radar = function () {
|
|
24007
24077
|
var _this14 = this;
|
|
24008
24078
|
_newArrowCheck(this, shape_this);
|
|
24009
|
-
return extendArc([point, radar], [common_point, shape_radar
|
|
24079
|
+
return extendArc([internal.eventrect, point, radar], [common_point, shape_radar, {
|
|
24080
|
+
axis_x_categories: options.optAxis.axis_x_categories
|
|
24081
|
+
}]), (resolver_shape_radar = function () {
|
|
24010
24082
|
_newArrowCheck(this, _this14);
|
|
24011
24083
|
return TYPE.RADAR;
|
|
24012
24084
|
}.bind(this))();
|
|
@@ -24014,7 +24086,7 @@ let _area = function area() {
|
|
|
24014
24086
|
resolver_shape_bar = function () {
|
|
24015
24087
|
var _this15 = this;
|
|
24016
24088
|
_newArrowCheck(this, shape_this);
|
|
24017
|
-
return extendAxis([bar], shape_bar), (resolver_shape_bar = function () {
|
|
24089
|
+
return extendAxis([bar, point_common], [shape_bar, common_point]), (resolver_shape_bar = function () {
|
|
24018
24090
|
_newArrowCheck(this, _this15);
|
|
24019
24091
|
return TYPE.BAR;
|
|
24020
24092
|
}.bind(this))();
|
|
@@ -24022,7 +24094,7 @@ let _area = function area() {
|
|
|
24022
24094
|
resolver_shape_bubble = function () {
|
|
24023
24095
|
var _this16 = this;
|
|
24024
24096
|
_newArrowCheck(this, shape_this);
|
|
24025
|
-
return extendAxis([point, bubble], [shape_bubble, common_point]), (resolver_shape_bubble = function () {
|
|
24097
|
+
return extendAxis([point_common, point, bubble], [shape_bubble, common_point]), (resolver_shape_bubble = function () {
|
|
24026
24098
|
_newArrowCheck(this, _this16);
|
|
24027
24099
|
return TYPE.BUBBLE;
|
|
24028
24100
|
}.bind(this))();
|
|
@@ -24030,7 +24102,7 @@ let _area = function area() {
|
|
|
24030
24102
|
resolver_shape_candlestick = function () {
|
|
24031
24103
|
var _this17 = this;
|
|
24032
24104
|
_newArrowCheck(this, shape_this);
|
|
24033
|
-
return extendAxis([candlestick], [shape_candlestick]), (resolver_shape_candlestick = function () {
|
|
24105
|
+
return extendAxis([candlestick, point_common], [shape_candlestick, common_point]), (resolver_shape_candlestick = function () {
|
|
24034
24106
|
_newArrowCheck(this, _this17);
|
|
24035
24107
|
return TYPE.CANDLESTICK;
|
|
24036
24108
|
}.bind(this))();
|
|
@@ -24038,7 +24110,7 @@ let _area = function area() {
|
|
|
24038
24110
|
shape_scatter = function () {
|
|
24039
24111
|
var _this18 = this;
|
|
24040
24112
|
_newArrowCheck(this, shape_this);
|
|
24041
|
-
return extendAxis([point], [common_point, scatter]), (shape_scatter = function () {
|
|
24113
|
+
return extendAxis([point_common, point], [common_point, scatter]), (shape_scatter = function () {
|
|
24042
24114
|
_newArrowCheck(this, _this18);
|
|
24043
24115
|
return TYPE.SCATTER;
|
|
24044
24116
|
}.bind(this))();
|
|
@@ -25950,7 +26022,7 @@ let _defaults = {};
|
|
|
25950
26022
|
|
|
25951
26023
|
/**
|
|
25952
26024
|
* @namespace bb
|
|
25953
|
-
* @version 3.11.
|
|
26025
|
+
* @version 3.11.2
|
|
25954
26026
|
*/
|
|
25955
26027
|
const bb = {
|
|
25956
26028
|
/**
|
|
@@ -25960,7 +26032,7 @@ const bb = {
|
|
|
25960
26032
|
* bb.version; // "1.0.0"
|
|
25961
26033
|
* @memberof bb
|
|
25962
26034
|
*/
|
|
25963
|
-
version: "3.11.
|
|
26035
|
+
version: "3.11.2",
|
|
25964
26036
|
/**
|
|
25965
26037
|
* Generate chart
|
|
25966
26038
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
package/dist/billboard.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
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
|
*/.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region rect,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px}
|