billboard.js 3.11.1 → 3.11.3
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/README.md +1 -1
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +209 -124
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +209 -124
- 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 +182 -132
- 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 +17 -17
- package/src/ChartInternal/ChartInternal.ts +2 -2
- package/src/ChartInternal/data/IData.ts +2 -2
- package/src/ChartInternal/data/data.ts +1 -1
- package/src/ChartInternal/data/load.ts +7 -1
- package/src/ChartInternal/internals/clip.ts +1 -6
- package/src/ChartInternal/internals/legend.ts +6 -5
- package/src/ChartInternal/internals/redraw.ts +2 -1
- package/src/ChartInternal/internals/tooltip.ts +10 -6
- 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/Options/common/legend.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-esm/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.3
|
|
9
9
|
*/
|
|
10
10
|
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
|
|
11
11
|
import { pointer, select, namespaces, selectAll } from 'd3-selection';
|
|
@@ -2805,7 +2805,7 @@ var legend$2 = {
|
|
|
2805
2805
|
* - rectangle
|
|
2806
2806
|
* @property {boolean} [legend.format] Set formatter function for legend text.
|
|
2807
2807
|
* The argument:<br>
|
|
2808
|
-
* - `id`: legend text
|
|
2808
|
+
* - `id`: legend text value. When `data.names` is specified, will pass from it, otherwise will pass data id.
|
|
2809
2809
|
* @property {boolean} [legend.tooltip=false] Show full legend text value using system tooltip(via `<title>` element).
|
|
2810
2810
|
* @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
|
|
2811
2811
|
* @see [Demo: format](https://naver.github.io/billboard.js/demo/#Legend.LegendFormat)
|
|
@@ -4837,8 +4837,10 @@ var dataLoad = {
|
|
|
4837
4837
|
});
|
|
4838
4838
|
},
|
|
4839
4839
|
unload: function (rawTargetIds, customDoneCb) {
|
|
4840
|
+
var _a;
|
|
4840
4841
|
var $$ = this;
|
|
4841
4842
|
var state = $$.state, $el = $$.$el, $T = $$.$T;
|
|
4843
|
+
var hasLegendDefsPoint = !!((_a = $$.hasLegendDefsPoint) === null || _a === void 0 ? void 0 : _a.call($$));
|
|
4842
4844
|
var done = customDoneCb;
|
|
4843
4845
|
var targetIds = rawTargetIds;
|
|
4844
4846
|
// reset internally cached data
|
|
@@ -4859,14 +4861,18 @@ var dataLoad = {
|
|
|
4859
4861
|
.remove()
|
|
4860
4862
|
.call(endall, done);
|
|
4861
4863
|
targetIds.forEach(function (id) {
|
|
4864
|
+
var _a;
|
|
4865
|
+
var suffixId = $$.getTargetSelectorSuffix(id);
|
|
4862
4866
|
// Reset fadein for future load
|
|
4863
4867
|
state.withoutFadeIn[id] = false;
|
|
4864
4868
|
// Remove target's elements
|
|
4865
4869
|
if ($el.legend) {
|
|
4866
|
-
$el.legend.selectAll(".".concat($LEGEND.legendItem).concat(
|
|
4870
|
+
$el.legend.selectAll(".".concat($LEGEND.legendItem).concat(suffixId)).remove();
|
|
4867
4871
|
}
|
|
4868
4872
|
// Remove target
|
|
4869
4873
|
$$.data.targets = $$.data.targets.filter(function (t) { return t.id !== id; });
|
|
4874
|
+
// Remove custom point def element
|
|
4875
|
+
hasLegendDefsPoint && ((_a = $el.defs) === null || _a === void 0 ? void 0 : _a.select("#".concat($$.getDefsPointId(suffixId))).remove());
|
|
4870
4876
|
});
|
|
4871
4877
|
// since treemap uses different data types, it needs to be transformed
|
|
4872
4878
|
state.hasTreemap && $$.updateTargetsForTreemap($$.data.targets);
|
|
@@ -5936,13 +5942,15 @@ function getLegendColor(id) {
|
|
|
5936
5942
|
/**
|
|
5937
5943
|
* Get formatted text value
|
|
5938
5944
|
* @param {string} id Legend text id
|
|
5945
|
+
* @param {boolean} formatted Whether or not to format the text
|
|
5939
5946
|
* @returns {string} Formatted legend text
|
|
5940
5947
|
*/
|
|
5941
|
-
function getFormattedText(id) {
|
|
5948
|
+
function getFormattedText(id, formatted) {
|
|
5942
5949
|
var _a;
|
|
5950
|
+
if (formatted === void 0) { formatted = true; }
|
|
5943
5951
|
var config = this.config;
|
|
5944
5952
|
var text = (_a = config.data_names[id]) !== null && _a !== void 0 ? _a : id;
|
|
5945
|
-
if (isFunction(config.legend_format)) {
|
|
5953
|
+
if (formatted && isFunction(config.legend_format)) {
|
|
5946
5954
|
text = config.legend_format(text);
|
|
5947
5955
|
}
|
|
5948
5956
|
return text;
|
|
@@ -6402,11 +6410,11 @@ var legend$1 = {
|
|
|
6402
6410
|
if (config.legend_tooltip) {
|
|
6403
6411
|
legend.selectAll("title")
|
|
6404
6412
|
.data(targetIdz)
|
|
6405
|
-
.text(function (id) { return id; });
|
|
6413
|
+
.text(function (id) { return getFormattedText.bind($$)(id, false); });
|
|
6406
6414
|
}
|
|
6407
6415
|
var texts = legend.selectAll("text")
|
|
6408
6416
|
.data(targetIdz)
|
|
6409
|
-
.text(getFormattedText.bind($$)) // MEMO: needed for update
|
|
6417
|
+
.text(function (id) { return getFormattedText.bind($$)(id); }) // MEMO: needed for update
|
|
6410
6418
|
.each(function (id, i) {
|
|
6411
6419
|
updatePositions(this, id, i);
|
|
6412
6420
|
});
|
|
@@ -6536,7 +6544,7 @@ var legend$1 = {
|
|
|
6536
6544
|
l.append("title").text(function (id) { return id; });
|
|
6537
6545
|
}
|
|
6538
6546
|
l.append("text")
|
|
6539
|
-
.text(getFormattedText.bind($$))
|
|
6547
|
+
.text(function (id) { return getFormattedText.bind($$)(id); })
|
|
6540
6548
|
.each(function (id, i) {
|
|
6541
6549
|
updatePositions(this, id, i);
|
|
6542
6550
|
})
|
|
@@ -6675,7 +6683,7 @@ var legend$1 = {
|
|
|
6675
6683
|
*/
|
|
6676
6684
|
var redraw = {
|
|
6677
6685
|
redraw: function (options) {
|
|
6678
|
-
var _a, _b, _c;
|
|
6686
|
+
var _a, _b, _c, _d;
|
|
6679
6687
|
if (options === void 0) { options = {}; }
|
|
6680
6688
|
var $$ = this;
|
|
6681
6689
|
var config = $$.config, state = $$.state, $el = $$.$el;
|
|
@@ -6740,14 +6748,16 @@ var redraw = {
|
|
|
6740
6748
|
// treemap
|
|
6741
6749
|
treemap && $$.updateTreemap(durationForExit);
|
|
6742
6750
|
}
|
|
6743
|
-
// @TODO: Axis & Radar type
|
|
6744
6751
|
if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
|
|
6745
6752
|
$$.updateCircle();
|
|
6746
6753
|
}
|
|
6754
|
+
else if ((_c = $$.hasLegendDefsPoint) === null || _c === void 0 ? void 0 : _c.call($$)) {
|
|
6755
|
+
$$.data.targets.forEach($$.point("create", this));
|
|
6756
|
+
}
|
|
6747
6757
|
// text
|
|
6748
6758
|
$$.hasDataLabel() && !$$.hasArcType(null, ["radar"]) && $$.updateText();
|
|
6749
6759
|
// title
|
|
6750
|
-
(
|
|
6760
|
+
(_d = $$.redrawTitle) === null || _d === void 0 ? void 0 : _d.call($$);
|
|
6751
6761
|
initializing && $$.updateTypesElements();
|
|
6752
6762
|
$$.generateRedrawList(targetsToShow, flow, duration, wth.Subchart);
|
|
6753
6763
|
$$.updateTooltipOnRedraw();
|
|
@@ -7404,16 +7414,16 @@ var shape = {
|
|
|
7404
7414
|
$$.getYScaleById(id)($$.getBaseValue(d));
|
|
7405
7415
|
},
|
|
7406
7416
|
getBarW: function (type, axis, targetsNum) {
|
|
7407
|
-
var _a, _b, _c;
|
|
7417
|
+
var _a, _b, _c, _d, _e;
|
|
7408
7418
|
var $$ = this;
|
|
7409
7419
|
var config = $$.config, org = $$.org, scale = $$.scale;
|
|
7410
7420
|
var maxDataCount = $$.getMaxDataCount();
|
|
7411
7421
|
var isGrouped = type === "bar" && ((_a = config.data_groups) === null || _a === void 0 ? void 0 : _a.length);
|
|
7412
7422
|
var configName = "".concat(type, "_width");
|
|
7413
|
-
var k = $$.getZoomTransform().k;
|
|
7423
|
+
var k = ((_c = (_b = $$.getZoomTransform) === null || _b === void 0 ? void 0 : _b.call($$)) !== null && _c !== void 0 ? _c : { k: 1 }).k;
|
|
7414
7424
|
var xMinMax = [
|
|
7415
|
-
(
|
|
7416
|
-
(
|
|
7425
|
+
(_d = config.axis_x_min) !== null && _d !== void 0 ? _d : org.xDomain[0],
|
|
7426
|
+
(_e = config.axis_x_max) !== null && _e !== void 0 ? _e : org.xDomain[1]
|
|
7417
7427
|
].map($$.axis.isTimeSeries() ? parseDate.bind($$) : Number);
|
|
7418
7428
|
var tickInterval = axis.tickInterval(maxDataCount);
|
|
7419
7429
|
if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
|
|
@@ -8807,13 +8817,11 @@ var tooltip$1 = {
|
|
|
8807
8817
|
* @private
|
|
8808
8818
|
*/
|
|
8809
8819
|
getTooltipPosition: function (tWidth, tHeight, currPos) {
|
|
8810
|
-
var _a, _b;
|
|
8820
|
+
var _a, _b, _c;
|
|
8811
8821
|
var $$ = this;
|
|
8812
8822
|
var config = $$.config, scale = $$.scale, state = $$.state;
|
|
8813
|
-
var width = state.width, height = state.height, current = state.current, isLegendRight = state.isLegendRight, inputType = state.inputType;
|
|
8823
|
+
var width = state.width, height = state.height, current = state.current, hasRadar = state.hasRadar, hasTreemap = state.hasTreemap, isLegendRight = state.isLegendRight, inputType = state.inputType;
|
|
8814
8824
|
var hasGauge = $$.hasType("gauge") && !config.gauge_fullCircle;
|
|
8815
|
-
var hasTreemap = state.hasTreemap;
|
|
8816
|
-
var hasRadar = state.hasRadar;
|
|
8817
8825
|
var isRotated = config.axis_rotated;
|
|
8818
8826
|
var hasArcType = $$.hasArcType();
|
|
8819
8827
|
var svgLeft = $$.getSvgLeft(true);
|
|
@@ -8826,10 +8834,14 @@ var tooltip$1 = {
|
|
|
8826
8834
|
y += 15;
|
|
8827
8835
|
}
|
|
8828
8836
|
else if (hasArcType) {
|
|
8829
|
-
var
|
|
8830
|
-
if (
|
|
8837
|
+
var notTouch = inputType !== "touch";
|
|
8838
|
+
if (notTouch) {
|
|
8839
|
+
var titlePadding = (_b = (_a = $$.getTitlePadding) === null || _a === void 0 ? void 0 : _a.call($$)) !== null && _b !== void 0 ? _b : 0;
|
|
8840
|
+
if (titlePadding && hasGauge && ((_c = config.arc_rangeText_values) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
8841
|
+
titlePadding += 10;
|
|
8842
|
+
}
|
|
8831
8843
|
x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
|
|
8832
|
-
y += (hasGauge ? height : (height / 2) + tHeight) +
|
|
8844
|
+
y += (hasGauge ? height : (height / 2) + tHeight) + titlePadding;
|
|
8833
8845
|
}
|
|
8834
8846
|
}
|
|
8835
8847
|
else if (hasTreemap) {
|
|
@@ -9540,6 +9552,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
9540
9552
|
}
|
|
9541
9553
|
};
|
|
9542
9554
|
ChartInternal.prototype.initParams = function () {
|
|
9555
|
+
var _a;
|
|
9543
9556
|
var $$ = this;
|
|
9544
9557
|
var config = $$.config, format = $$.format, state = $$.state;
|
|
9545
9558
|
var isRotated = config.axis_rotated;
|
|
@@ -9553,7 +9566,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
9553
9566
|
config.axis_y2_show = false;
|
|
9554
9567
|
config.subchart_show = false;
|
|
9555
9568
|
}
|
|
9556
|
-
if ($$.hasPointType()) {
|
|
9569
|
+
if ($$.hasPointType() || ((_a = $$.hasLegendDefsPoint) === null || _a === void 0 ? void 0 : _a.call($$))) {
|
|
9557
9570
|
$$.point = $$.generatePoint();
|
|
9558
9571
|
}
|
|
9559
9572
|
if (state.hasAxis) {
|
|
@@ -9587,7 +9600,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
9587
9600
|
state.inputType = convertInputType(config.interaction_inputType_mouse, config.interaction_inputType_touch);
|
|
9588
9601
|
};
|
|
9589
9602
|
ChartInternal.prototype.initWithData = function (data) {
|
|
9590
|
-
var _a, _b;
|
|
9603
|
+
var _a, _b, _c;
|
|
9591
9604
|
var $$ = this;
|
|
9592
9605
|
var config = $$.config, scale = $$.scale, state = $$.state, $el = $$.$el, org = $$.org;
|
|
9593
9606
|
var hasAxis = state.hasAxis, hasTreemap = state.hasTreemap;
|
|
@@ -9652,7 +9665,7 @@ var ChartInternal = /** @class */ (function () {
|
|
|
9652
9665
|
// Define defs
|
|
9653
9666
|
var hasColorPatterns = (isFunction(config.color_tiles) && $$.patterns);
|
|
9654
9667
|
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap ||
|
|
9655
|
-
config.data_labels_backgroundColors) {
|
|
9668
|
+
config.data_labels_backgroundColors || ((_a = $$.hasLegendDefsPoint) === null || _a === void 0 ? void 0 : _a.call($$))) {
|
|
9656
9669
|
$el.defs = $el.svg.append("defs");
|
|
9657
9670
|
if (hasAxis) {
|
|
9658
9671
|
["id", "idXAxis", "idYAxis", "idGrid"].forEach(function (v) {
|
|
@@ -9701,11 +9714,11 @@ var ChartInternal = /** @class */ (function () {
|
|
|
9701
9714
|
$$.initChartElements();
|
|
9702
9715
|
if (hasAxis) {
|
|
9703
9716
|
// Cover whole with rects for events
|
|
9704
|
-
hasInteraction && ((
|
|
9717
|
+
hasInteraction && ((_b = $$.initEventRect) === null || _b === void 0 ? void 0 : _b.call($$));
|
|
9705
9718
|
// Grids
|
|
9706
9719
|
$$.initGrid();
|
|
9707
9720
|
// Add Axis here, when clipPath is 'true'
|
|
9708
|
-
config.clipPath && ((
|
|
9721
|
+
config.clipPath && ((_c = $$.axis) === null || _c === void 0 ? void 0 : _c.init());
|
|
9709
9722
|
}
|
|
9710
9723
|
// Set targets
|
|
9711
9724
|
$$.updateTargets($$.data.targets);
|
|
@@ -14468,10 +14481,7 @@ var clip = {
|
|
|
14468
14481
|
(!config.axis_y_clipPath && /-clip-yaxis$/.test(id))) {
|
|
14469
14482
|
return null;
|
|
14470
14483
|
}
|
|
14471
|
-
|
|
14472
|
-
win.navigator.appVersion
|
|
14473
|
-
.toLowerCase().indexOf("msie 9.") >= 0 : false;
|
|
14474
|
-
return "url(".concat((isIE9 ? "" : doc.URL.split("#")[0]), "#").concat(id, ")");
|
|
14484
|
+
return "url(#".concat(id, ")");
|
|
14475
14485
|
},
|
|
14476
14486
|
appendClip: function (parent, id) {
|
|
14477
14487
|
id && parent.append("clipPath")
|
|
@@ -17110,20 +17120,20 @@ var api = [
|
|
|
17110
17120
|
apiRegion,
|
|
17111
17121
|
apiX
|
|
17112
17122
|
];
|
|
17113
|
-
var internal =
|
|
17114
|
-
axis,
|
|
17115
|
-
clip,
|
|
17116
|
-
eventrect,
|
|
17117
|
-
flow,
|
|
17118
|
-
grid,
|
|
17119
|
-
region,
|
|
17120
|
-
sizeAxis,
|
|
17121
|
-
|
|
17122
|
-
var options =
|
|
17123
|
-
optDataAxis,
|
|
17124
|
-
optAxis,
|
|
17125
|
-
optGrid,
|
|
17126
|
-
|
|
17123
|
+
var internal = {
|
|
17124
|
+
axis: axis,
|
|
17125
|
+
clip: clip,
|
|
17126
|
+
eventrect: eventrect,
|
|
17127
|
+
flow: flow,
|
|
17128
|
+
grid: grid,
|
|
17129
|
+
region: region,
|
|
17130
|
+
sizeAxis: sizeAxis,
|
|
17131
|
+
};
|
|
17132
|
+
var options = {
|
|
17133
|
+
optDataAxis: optDataAxis,
|
|
17134
|
+
optAxis: optAxis,
|
|
17135
|
+
optGrid: optGrid,
|
|
17136
|
+
};
|
|
17127
17137
|
|
|
17128
17138
|
/**
|
|
17129
17139
|
* Get radius functions
|
|
@@ -19131,16 +19141,125 @@ var shapeLine = {
|
|
|
19131
19141
|
},
|
|
19132
19142
|
};
|
|
19133
19143
|
|
|
19134
|
-
|
|
19135
|
-
|
|
19144
|
+
/**
|
|
19145
|
+
* Check if point draw methods are valid
|
|
19146
|
+
* @param {string} point point type
|
|
19147
|
+
* @returns {boolean}
|
|
19148
|
+
* @private
|
|
19149
|
+
*/
|
|
19150
|
+
function hasValidPointDrawMethods(point) {
|
|
19151
|
+
return isObjectType(point) &&
|
|
19152
|
+
isFunction(point.create) && isFunction(point.update);
|
|
19153
|
+
}
|
|
19154
|
+
/**
|
|
19155
|
+
* Insert point info defs element
|
|
19156
|
+
* @param {string} point Point element
|
|
19157
|
+
* @param {string} id Point id
|
|
19158
|
+
* @private
|
|
19159
|
+
*/
|
|
19160
|
+
function insertPointInfoDefs(point, id) {
|
|
19161
|
+
var _a;
|
|
19162
|
+
var $$ = this;
|
|
19163
|
+
var copyAttr = function (from, target) {
|
|
19164
|
+
var attribs = from.attributes;
|
|
19165
|
+
for (var i = 0, name_1; (name_1 = attribs[i]); i++) {
|
|
19166
|
+
name_1 = name_1.name;
|
|
19167
|
+
target.setAttribute(name_1, from.getAttribute(name_1));
|
|
19168
|
+
}
|
|
19169
|
+
};
|
|
19170
|
+
var doc$1 = new DOMParser().parseFromString(point, "image/svg+xml");
|
|
19171
|
+
var node = doc$1.documentElement;
|
|
19172
|
+
var clone = doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase());
|
|
19173
|
+
clone.id = id;
|
|
19174
|
+
clone.style.fill = "inherit";
|
|
19175
|
+
clone.style.stroke = "inherit";
|
|
19176
|
+
copyAttr(node, clone);
|
|
19177
|
+
if ((_a = node.childNodes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
19178
|
+
var parent_1 = select(clone);
|
|
19179
|
+
if ("innerHTML" in clone) {
|
|
19180
|
+
parent_1.html(node.innerHTML);
|
|
19181
|
+
}
|
|
19182
|
+
else {
|
|
19183
|
+
toArray(node.childNodes).forEach(function (v) {
|
|
19184
|
+
copyAttr(v, parent_1.append(v.tagName).node());
|
|
19185
|
+
});
|
|
19186
|
+
}
|
|
19187
|
+
}
|
|
19188
|
+
$$.$el.defs.node().appendChild(clone);
|
|
19189
|
+
}
|
|
19190
|
+
var shapePointCommon = {
|
|
19191
|
+
/**
|
|
19192
|
+
* Check if point type option is valid
|
|
19193
|
+
* @param {string} type point type
|
|
19194
|
+
* @returns {boolean}
|
|
19195
|
+
* @private
|
|
19196
|
+
*/
|
|
19136
19197
|
hasValidPointType: function (type) {
|
|
19137
19198
|
return /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);
|
|
19138
19199
|
},
|
|
19139
|
-
|
|
19140
|
-
|
|
19141
|
-
|
|
19142
|
-
|
|
19200
|
+
/**
|
|
19201
|
+
* Check if pattern point is set to be used on legend
|
|
19202
|
+
* @returns {boolean}
|
|
19203
|
+
* @private
|
|
19204
|
+
*/
|
|
19205
|
+
hasLegendDefsPoint: function () {
|
|
19206
|
+
var _a;
|
|
19207
|
+
var config = this.config;
|
|
19208
|
+
return config.legend_show && ((_a = config.point_pattern) === null || _a === void 0 ? void 0 : _a.length) && config.legend_usePoint;
|
|
19209
|
+
},
|
|
19210
|
+
getDefsPointId: function (id) {
|
|
19211
|
+
var datetimeId = this.state.datetimeId;
|
|
19212
|
+
return "".concat(datetimeId, "-point").concat(id);
|
|
19143
19213
|
},
|
|
19214
|
+
/**
|
|
19215
|
+
* Get generate point function
|
|
19216
|
+
* @returns {Function}
|
|
19217
|
+
* @private
|
|
19218
|
+
*/
|
|
19219
|
+
generatePoint: function () {
|
|
19220
|
+
var $$ = this;
|
|
19221
|
+
var $el = $$.$el, config = $$.config;
|
|
19222
|
+
var ids = [];
|
|
19223
|
+
var pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
|
|
19224
|
+
return function (method, context) {
|
|
19225
|
+
var args = [];
|
|
19226
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
19227
|
+
args[_i - 2] = arguments[_i];
|
|
19228
|
+
}
|
|
19229
|
+
return function (d) {
|
|
19230
|
+
var _a, _b, _c, _d;
|
|
19231
|
+
var id = $$.getTargetSelectorSuffix(d.id || ((_a = d.data) === null || _a === void 0 ? void 0 : _a.id) || d);
|
|
19232
|
+
var element = select(this);
|
|
19233
|
+
ids.indexOf(id) < 0 && ids.push(id);
|
|
19234
|
+
var point = pattern[ids.indexOf(id) % pattern.length];
|
|
19235
|
+
if ($$.hasValidPointType(point)) {
|
|
19236
|
+
point = $$[point];
|
|
19237
|
+
}
|
|
19238
|
+
else if (!hasValidPointDrawMethods(point || config.point_type)) {
|
|
19239
|
+
var pointId = $$.getDefsPointId(id);
|
|
19240
|
+
var defsPoint = $el.defs.select("#".concat(pointId));
|
|
19241
|
+
if (defsPoint.size() < 1) {
|
|
19242
|
+
insertPointInfoDefs.bind($$)(point, pointId);
|
|
19243
|
+
}
|
|
19244
|
+
if (method === "create") {
|
|
19245
|
+
return (_b = $$.custom) === null || _b === void 0 ? void 0 : _b.create.bind(context).apply(void 0, __spreadArray([element, pointId], args, false));
|
|
19246
|
+
}
|
|
19247
|
+
else if (method === "update") {
|
|
19248
|
+
return (_c = $$.custom) === null || _c === void 0 ? void 0 : _c.update.bind(context).apply(void 0, __spreadArray([element], args, false));
|
|
19249
|
+
}
|
|
19250
|
+
}
|
|
19251
|
+
return (_d = point[method]) === null || _d === void 0 ? void 0 : _d.bind(context).apply(void 0, __spreadArray([element], args, false));
|
|
19252
|
+
};
|
|
19253
|
+
};
|
|
19254
|
+
}
|
|
19255
|
+
};
|
|
19256
|
+
|
|
19257
|
+
/**
|
|
19258
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
19259
|
+
* billboard.js project is licensed under the MIT license
|
|
19260
|
+
*/
|
|
19261
|
+
var getTransitionName = function () { return getRandom(); };
|
|
19262
|
+
var shapePoint = {
|
|
19144
19263
|
initialOpacityForCircle: function (d) {
|
|
19145
19264
|
var _a = this, config = _a.config, withoutFadeIn = _a.state.withoutFadeIn;
|
|
19146
19265
|
var opacity = config.point_opacity;
|
|
@@ -19453,39 +19572,6 @@ var shapePoint = {
|
|
|
19453
19572
|
}
|
|
19454
19573
|
return sensitivity;
|
|
19455
19574
|
},
|
|
19456
|
-
insertPointInfoDefs: function (point, id) {
|
|
19457
|
-
var _a;
|
|
19458
|
-
var $$ = this;
|
|
19459
|
-
var copyAttr = function (from, target) {
|
|
19460
|
-
var attribs = from.attributes;
|
|
19461
|
-
for (var i = 0, name_1; (name_1 = attribs[i]); i++) {
|
|
19462
|
-
name_1 = name_1.name;
|
|
19463
|
-
target.setAttribute(name_1, from.getAttribute(name_1));
|
|
19464
|
-
}
|
|
19465
|
-
};
|
|
19466
|
-
var doc$1 = new DOMParser().parseFromString(point, "image/svg+xml");
|
|
19467
|
-
var node = doc$1.documentElement;
|
|
19468
|
-
var clone = doc.createElementNS(namespaces.svg, node.nodeName.toLowerCase());
|
|
19469
|
-
clone.id = id;
|
|
19470
|
-
clone.style.fill = "inherit";
|
|
19471
|
-
clone.style.stroke = "inherit";
|
|
19472
|
-
copyAttr(node, clone);
|
|
19473
|
-
if ((_a = node.childNodes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
19474
|
-
var parent_1 = select(clone);
|
|
19475
|
-
if ("innerHTML" in clone) {
|
|
19476
|
-
parent_1.html(node.innerHTML);
|
|
19477
|
-
}
|
|
19478
|
-
else {
|
|
19479
|
-
toArray(node.childNodes).forEach(function (v) {
|
|
19480
|
-
copyAttr(v, parent_1.append(v.tagName).node());
|
|
19481
|
-
});
|
|
19482
|
-
}
|
|
19483
|
-
}
|
|
19484
|
-
$$.$el.defs.node().appendChild(clone);
|
|
19485
|
-
},
|
|
19486
|
-
pointFromDefs: function (id) {
|
|
19487
|
-
return this.$el.defs.select("#".concat(id));
|
|
19488
|
-
},
|
|
19489
19575
|
updatePointClass: function (d) {
|
|
19490
19576
|
var $$ = this;
|
|
19491
19577
|
var circle = $$.$el.circle;
|
|
@@ -19528,42 +19614,6 @@ var shapePoint = {
|
|
|
19528
19614
|
];
|
|
19529
19615
|
};
|
|
19530
19616
|
},
|
|
19531
|
-
generatePoint: function () {
|
|
19532
|
-
var $$ = this;
|
|
19533
|
-
var config = $$.config, datetimeId = $$.state.datetimeId;
|
|
19534
|
-
var ids = [];
|
|
19535
|
-
var pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];
|
|
19536
|
-
return function (method, context) {
|
|
19537
|
-
var args = [];
|
|
19538
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
19539
|
-
args[_i - 2] = arguments[_i];
|
|
19540
|
-
}
|
|
19541
|
-
return function (d) {
|
|
19542
|
-
var _a;
|
|
19543
|
-
var id = $$.getTargetSelectorSuffix(d.id || ((_a = d.data) === null || _a === void 0 ? void 0 : _a.id) || d);
|
|
19544
|
-
var element = select(this);
|
|
19545
|
-
ids.indexOf(id) < 0 && ids.push(id);
|
|
19546
|
-
var point = pattern[ids.indexOf(id) % pattern.length];
|
|
19547
|
-
if ($$.hasValidPointType(point)) {
|
|
19548
|
-
point = $$[point];
|
|
19549
|
-
}
|
|
19550
|
-
else if (!$$.hasValidPointDrawMethods(point)) {
|
|
19551
|
-
var pointId = "".concat(datetimeId, "-point").concat(id);
|
|
19552
|
-
var pointFromDefs = $$.pointFromDefs(pointId);
|
|
19553
|
-
if (pointFromDefs.size() < 1) {
|
|
19554
|
-
$$.insertPointInfoDefs(point, pointId);
|
|
19555
|
-
}
|
|
19556
|
-
if (method === "create") {
|
|
19557
|
-
return $$.custom.create.bind(context).apply(void 0, __spreadArray([element, pointId], args, false));
|
|
19558
|
-
}
|
|
19559
|
-
else if (method === "update") {
|
|
19560
|
-
return $$.custom.update.bind(context).apply(void 0, __spreadArray([element], args, false));
|
|
19561
|
-
}
|
|
19562
|
-
}
|
|
19563
|
-
return point[method].bind(context).apply(void 0, __spreadArray([element], args, false));
|
|
19564
|
-
};
|
|
19565
|
-
};
|
|
19566
|
-
},
|
|
19567
19617
|
custom: {
|
|
19568
19618
|
create: function (element, id, fillStyleFn) {
|
|
19569
19619
|
return element.append("use")
|
|
@@ -21615,9 +21665,9 @@ var optTreemap = {
|
|
|
21615
21665
|
* @private
|
|
21616
21666
|
*/
|
|
21617
21667
|
function extendAxis(module, option) {
|
|
21618
|
-
extend(ChartInternal.prototype, internal.concat(module));
|
|
21668
|
+
extend(ChartInternal.prototype, Object.values(internal).concat(module));
|
|
21619
21669
|
extend(Chart.prototype, api);
|
|
21620
|
-
Options.setOptions(options.concat(option || []));
|
|
21670
|
+
Options.setOptions(Object.values(options).concat(option || []));
|
|
21621
21671
|
}
|
|
21622
21672
|
/**
|
|
21623
21673
|
* Extend Line type modules
|
|
@@ -21626,7 +21676,7 @@ function extendAxis(module, option) {
|
|
|
21626
21676
|
* @private
|
|
21627
21677
|
*/
|
|
21628
21678
|
function extendLine(module, option) {
|
|
21629
|
-
extendAxis([shapePoint, shapeLine].concat(module || []));
|
|
21679
|
+
extendAxis([shapePointCommon, shapePoint, shapeLine].concat(module || []));
|
|
21630
21680
|
Options.setOptions([optPoint, optLine].concat(option || []));
|
|
21631
21681
|
}
|
|
21632
21682
|
/**
|
|
@@ -21636,8 +21686,8 @@ function extendLine(module, option) {
|
|
|
21636
21686
|
* @private
|
|
21637
21687
|
*/
|
|
21638
21688
|
function extendArc(module, option) {
|
|
21639
|
-
extend(ChartInternal.prototype, [shapeArc].concat(module || []));
|
|
21640
|
-
Options.setOptions(option);
|
|
21689
|
+
extend(ChartInternal.prototype, [shapeArc, shapePointCommon].concat(module || []));
|
|
21690
|
+
Options.setOptions([optPoint].concat(option || []));
|
|
21641
21691
|
}
|
|
21642
21692
|
// Area types
|
|
21643
21693
|
var area = function () { return (extendLine(shapeArea, [optArea]), (area = function () { return TYPE.AREA; })()); };
|
|
@@ -21654,12 +21704,12 @@ var donut = function () { return (extendArc(undefined, [optArc, optDonut]), (don
|
|
|
21654
21704
|
var gauge = function () { return (extendArc([shapeGauge], [optArc, optGauge]), (gauge = function () { return TYPE.GAUGE; })()); };
|
|
21655
21705
|
var pie = function () { return (extendArc(undefined, [optArc, optPie]), (pie = function () { return TYPE.PIE; })()); };
|
|
21656
21706
|
var polar = function () { return (extendArc([shapePolar], [optArc, optPolar]), (polar = function () { return TYPE.POLAR; })()); };
|
|
21657
|
-
var radar = function () { return (extendArc([shapePoint, shapeRadar], [optPoint, optRadar]), (radar = function () { return TYPE.RADAR; })()); };
|
|
21707
|
+
var radar = function () { return (extendArc([internal.eventrect, shapePoint, shapeRadar], [optPoint, optRadar, { axis_x_categories: options.optAxis.axis_x_categories }]), (radar = function () { return TYPE.RADAR; })()); };
|
|
21658
21708
|
// Axis based types
|
|
21659
|
-
var bar = function () { return (extendAxis([shapeBar], optBar), (bar = function () { return TYPE.BAR; })()); };
|
|
21660
|
-
var bubble = function () { return (extendAxis([shapePoint, shapeBubble], [optBubble, optPoint]), (bubble = function () { return TYPE.BUBBLE; })()); };
|
|
21661
|
-
var candlestick = function () { return (extendAxis([shapeCandlestick], [optCandlestick]), (candlestick = function () { return TYPE.CANDLESTICK; })()); };
|
|
21662
|
-
var scatter = function () { return (extendAxis([shapePoint], [optPoint, optScatter]), (scatter = function () { return TYPE.SCATTER; })()); };
|
|
21709
|
+
var bar = function () { return (extendAxis([shapeBar, shapePointCommon], [optBar, optPoint]), (bar = function () { return TYPE.BAR; })()); };
|
|
21710
|
+
var bubble = function () { return (extendAxis([shapePointCommon, shapePoint, shapeBubble], [optBubble, optPoint]), (bubble = function () { return TYPE.BUBBLE; })()); };
|
|
21711
|
+
var candlestick = function () { return (extendAxis([shapeCandlestick, shapePointCommon], [optCandlestick, optPoint]), (candlestick = function () { return TYPE.CANDLESTICK; })()); };
|
|
21712
|
+
var scatter = function () { return (extendAxis([shapePointCommon, shapePoint], [optPoint, optScatter]), (scatter = function () { return TYPE.SCATTER; })()); };
|
|
21663
21713
|
// Non Axis based types
|
|
21664
21714
|
var treemap = function () { return (extendAxis([shapeTreemap], [optTreemap]), (treemap = function () { return TYPE.TREEMAP; })()); };
|
|
21665
21715
|
|
|
@@ -23380,7 +23430,7 @@ var zoomModule = function () {
|
|
|
23380
23430
|
var defaults = {};
|
|
23381
23431
|
/**
|
|
23382
23432
|
* @namespace bb
|
|
23383
|
-
* @version 3.11.
|
|
23433
|
+
* @version 3.11.3
|
|
23384
23434
|
*/
|
|
23385
23435
|
var bb = {
|
|
23386
23436
|
/**
|
|
@@ -23390,7 +23440,7 @@ var bb = {
|
|
|
23390
23440
|
* bb.version; // "1.0.0"
|
|
23391
23441
|
* @memberof bb
|
|
23392
23442
|
*/
|
|
23393
|
-
version: "3.11.
|
|
23443
|
+
version: "3.11.3",
|
|
23394
23444
|
/**
|
|
23395
23445
|
* Generate chart
|
|
23396
23446
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () {
|
|
|
104
104
|
delete _this[key];
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
|
-
Plugin.version = "3.11.
|
|
107
|
+
Plugin.version = "3.11.3";
|
|
108
108
|
return Plugin;
|
|
109
109
|
}());
|
|
110
110
|
var Plugin$1 = Plugin;
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -280,7 +280,7 @@ var Plugin = /** @class */ (function () {
|
|
|
280
280
|
delete _this[key];
|
|
281
281
|
});
|
|
282
282
|
};
|
|
283
|
-
Plugin.version = "3.11.
|
|
283
|
+
Plugin.version = "3.11.3";
|
|
284
284
|
return Plugin;
|
|
285
285
|
}());
|
|
286
286
|
var Plugin$1 = Plugin;
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -494,7 +494,7 @@ var Plugin = /** @class */ (function () {
|
|
|
494
494
|
delete _this[key];
|
|
495
495
|
});
|
|
496
496
|
};
|
|
497
|
-
Plugin.version = "3.11.
|
|
497
|
+
Plugin.version = "3.11.3";
|
|
498
498
|
return Plugin;
|
|
499
499
|
}());
|
|
500
500
|
var Plugin$1 = Plugin;
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () {
|
|
|
121
121
|
delete _this[key];
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
-
Plugin.version = "3.11.
|
|
124
|
+
Plugin.version = "3.11.3";
|
|
125
125
|
return Plugin;
|
|
126
126
|
}());
|
|
127
127
|
var Plugin$1 = Plugin;
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -269,7 +269,7 @@ var Plugin = /** @class */ (function () {
|
|
|
269
269
|
delete _this[key];
|
|
270
270
|
});
|
|
271
271
|
};
|
|
272
|
-
Plugin.version = "3.11.
|
|
272
|
+
Plugin.version = "3.11.3";
|
|
273
273
|
return Plugin;
|
|
274
274
|
}());
|
|
275
275
|
var Plugin$1 = Plugin;
|