billboard.js 3.14.2 → 3.14.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/dist/billboard.css +1 -1
- package/dist/billboard.js +7 -6
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +3 -3
- package/dist/billboard.pkgd.js +7 -6
- package/dist/billboard.pkgd.min.js +17 -17
- 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 +377 -376
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +4 -4
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +15 -15
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +13 -13
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +10 -10
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +8 -8
- package/package.json +29 -29
- package/src/ChartInternal/data/data.ts +1 -1
- package/src/ChartInternal/interactions/interaction.ts +1 -1
- package/src/config/Options/shape/gauge.ts +3 -2
- package/types/options.shape.d.ts +3 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.14.
|
|
8
|
+
* @version 3.14.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -66,7 +66,7 @@ var Plugin = /** @class */ (function () {
|
|
|
66
66
|
* @private
|
|
67
67
|
*/
|
|
68
68
|
function Plugin(options) {
|
|
69
|
-
if (options ===
|
|
69
|
+
if (options === undefined) { options = {}; }
|
|
70
70
|
this.options = options;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -100,7 +100,7 @@ var Plugin = /** @class */ (function () {
|
|
|
100
100
|
delete _this[key];
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
Plugin.version = "3.14.
|
|
103
|
+
Plugin.version = "3.14.3";
|
|
104
104
|
return Plugin;
|
|
105
105
|
}());
|
|
106
106
|
|
|
@@ -159,7 +159,7 @@ var BubbleCompare = /** @class */ (function (_super) {
|
|
|
159
159
|
};
|
|
160
160
|
BubbleCompare.prototype.pointExpandedR = function (d) {
|
|
161
161
|
var baseR = this.getBubbleR(d);
|
|
162
|
-
var _a = this.options.expandScale, expandScale = _a ===
|
|
162
|
+
var _a = this.options.expandScale, expandScale = _a === undefined ? 1 : _a;
|
|
163
163
|
BubbleCompare.raiseFocusedBubbleLayer(d);
|
|
164
164
|
this.changeCursorPoint();
|
|
165
165
|
return baseR * expandScale;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.14.
|
|
8
|
+
* @version 3.14.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -251,7 +251,7 @@ function getGlobal() {
|
|
|
251
251
|
Function("return this")();
|
|
252
252
|
}
|
|
253
253
|
var win = getGlobal();
|
|
254
|
-
var doc = win === null || win ===
|
|
254
|
+
var doc = win === null || win === undefined ? undefined : win.document;
|
|
255
255
|
|
|
256
256
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
257
257
|
var isObjectType = function (v) { return typeof v === "object"; };
|
|
@@ -268,7 +268,7 @@ var isArray = function (arr) { return Array.isArray(arr); };
|
|
|
268
268
|
* @returns {boolean}
|
|
269
269
|
* @private
|
|
270
270
|
*/
|
|
271
|
-
var isObject = function (obj) { return obj && !(obj === null || obj ===
|
|
271
|
+
var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
|
|
272
272
|
/**
|
|
273
273
|
* Merge object returning new object
|
|
274
274
|
* @param {object} target Target object
|
|
@@ -297,7 +297,7 @@ function mergeObj(target) {
|
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
return mergeObj.apply(
|
|
300
|
+
return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
|
|
301
301
|
}
|
|
302
302
|
// emulate event
|
|
303
303
|
({
|
|
@@ -314,14 +314,14 @@ function mergeObj(target) {
|
|
|
314
314
|
// eslint-disable-next-line no-new
|
|
315
315
|
new MouseEvent("t");
|
|
316
316
|
return function (el, eventType, params) {
|
|
317
|
-
if (params ===
|
|
317
|
+
if (params === undefined) { params = getParams(); }
|
|
318
318
|
el.dispatchEvent(new MouseEvent(eventType, params));
|
|
319
319
|
};
|
|
320
320
|
}
|
|
321
321
|
catch (_a) {
|
|
322
322
|
// Polyfills DOM4 MouseEvent
|
|
323
323
|
return function (el, eventType, params) {
|
|
324
|
-
if (params ===
|
|
324
|
+
if (params === undefined) { params = getParams(); }
|
|
325
325
|
var mouseEvent = doc.createEvent("MouseEvent");
|
|
326
326
|
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
327
327
|
mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
|
|
@@ -409,7 +409,7 @@ var Plugin = /** @class */ (function () {
|
|
|
409
409
|
* @private
|
|
410
410
|
*/
|
|
411
411
|
function Plugin(options) {
|
|
412
|
-
if (options ===
|
|
412
|
+
if (options === undefined) { options = {}; }
|
|
413
413
|
this.options = options;
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
@@ -443,7 +443,7 @@ var Plugin = /** @class */ (function () {
|
|
|
443
443
|
delete _this[key];
|
|
444
444
|
});
|
|
445
445
|
};
|
|
446
|
-
Plugin.version = "3.14.
|
|
446
|
+
Plugin.version = "3.14.3";
|
|
447
447
|
return Plugin;
|
|
448
448
|
}());
|
|
449
449
|
|
|
@@ -610,7 +610,7 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
610
610
|
.style("width", "0")
|
|
611
611
|
.style("height", "0")
|
|
612
612
|
.style("pointer-events", "none");
|
|
613
|
-
((_a = $el.tooltip) === null || _a ===
|
|
613
|
+
((_a = $el.tooltip) === null || _a === undefined ? undefined : _a.node()) && document.body.appendChild($el.tooltip.node());
|
|
614
614
|
};
|
|
615
615
|
Sparkline.prototype.$afterInit = function () {
|
|
616
616
|
var $$ = this.$$;
|
|
@@ -626,7 +626,7 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
626
626
|
*/
|
|
627
627
|
Sparkline.prototype.bindEvents = function (bind) {
|
|
628
628
|
var _this = this;
|
|
629
|
-
if (bind ===
|
|
629
|
+
if (bind === undefined) { bind = true; }
|
|
630
630
|
var config = this.$$.config;
|
|
631
631
|
if (config.interaction_enabled && config.tooltip_show) {
|
|
632
632
|
var method_1 = "".concat(bind ? "add" : "remove", "EventListener");
|
|
@@ -648,14 +648,14 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
648
648
|
var _a, _b, _c, _d;
|
|
649
649
|
var $$ = this.$$;
|
|
650
650
|
var index = $$.getDataIndexFromEvent(e);
|
|
651
|
-
var data = (_a = $$.api.data(e.target.__id)) === null || _a ===
|
|
652
|
-
var d = (_b = data === null || data ===
|
|
651
|
+
var data = (_a = $$.api.data(e.target.__id)) === null || _a === undefined ? undefined : _a[0];
|
|
652
|
+
var d = (_b = data === null || data === undefined ? undefined : data.values) === null || _b === undefined ? undefined : _b[index];
|
|
653
653
|
if (d && !d.name) {
|
|
654
654
|
d.name = d.id;
|
|
655
655
|
}
|
|
656
656
|
$$.state.event = e;
|
|
657
|
-
if (((_c = $$.isPointFocusOnly) === null || _c ===
|
|
658
|
-
(_d = $$.showCircleFocus) === null || _d ===
|
|
657
|
+
if (((_c = $$.isPointFocusOnly) === null || _c === undefined ? undefined : _c.call($$)) && d) {
|
|
658
|
+
(_d = $$.showCircleFocus) === null || _d === undefined ? undefined : _d.call($$, [d]);
|
|
659
659
|
}
|
|
660
660
|
$$.setExpand(index, data.id, true);
|
|
661
661
|
$$.showTooltip([d], e.target);
|
|
@@ -672,7 +672,7 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
672
672
|
var $el = $$.$el;
|
|
673
673
|
var el = this.element;
|
|
674
674
|
var data = $$.api.data();
|
|
675
|
-
var svgWrapper = (_a = $el.chart.html().match(/<svg[^>]*>/)) === null || _a ===
|
|
675
|
+
var svgWrapper = (_a = $el.chart.html().match(/<svg[^>]*>/)) === null || _a === undefined ? undefined : _a[0];
|
|
676
676
|
// append sparkline holder if is less than the data length
|
|
677
677
|
if (el.length < data.length) {
|
|
678
678
|
var chart = $el.chart.node();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.14.
|
|
8
|
+
* @version 3.14.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -257,7 +257,7 @@ function getGlobal() {
|
|
|
257
257
|
Function("return this")();
|
|
258
258
|
}
|
|
259
259
|
var win = getGlobal();
|
|
260
|
-
var doc = win === null || win ===
|
|
260
|
+
var doc = win === null || win === undefined ? undefined : win.document;
|
|
261
261
|
|
|
262
262
|
var isFunction = function (v) { return typeof v === "function"; };
|
|
263
263
|
var isString = function (v) { return typeof v === "string"; };
|
|
@@ -282,7 +282,7 @@ var isArray = function (arr) { return Array.isArray(arr); };
|
|
|
282
282
|
* @returns {boolean}
|
|
283
283
|
* @private
|
|
284
284
|
*/
|
|
285
|
-
var isObject = function (obj) { return obj && !(obj === null || obj ===
|
|
285
|
+
var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
|
|
286
286
|
/**
|
|
287
287
|
* Merge object returning new object
|
|
288
288
|
* @param {object} target Target object
|
|
@@ -311,7 +311,7 @@ function mergeObj(target) {
|
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
return mergeObj.apply(
|
|
314
|
+
return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* Get range
|
|
@@ -344,14 +344,14 @@ var getRange = function (start, end, step) {
|
|
|
344
344
|
// eslint-disable-next-line no-new
|
|
345
345
|
new MouseEvent("t");
|
|
346
346
|
return function (el, eventType, params) {
|
|
347
|
-
if (params ===
|
|
347
|
+
if (params === undefined) { params = getParams(); }
|
|
348
348
|
el.dispatchEvent(new MouseEvent(eventType, params));
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
catch (_a) {
|
|
352
352
|
// Polyfills DOM4 MouseEvent
|
|
353
353
|
return function (el, eventType, params) {
|
|
354
|
-
if (params ===
|
|
354
|
+
if (params === undefined) { params = getParams(); }
|
|
355
355
|
var mouseEvent = doc.createEvent("MouseEvent");
|
|
356
356
|
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
357
357
|
mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
|
|
@@ -396,7 +396,7 @@ function parseDate(date) {
|
|
|
396
396
|
var _b = this, config = _b.config, format = _b.format;
|
|
397
397
|
// if fails to parse, try by new Date()
|
|
398
398
|
// https://github.com/naver/billboard.js/issues/1714
|
|
399
|
-
parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !==
|
|
399
|
+
parsedDate = (_a = format.dataTime(config.data_xFormat)(date)) !== null && _a !== undefined ? _a : new Date(date);
|
|
400
400
|
}
|
|
401
401
|
else if (isNumber(date) && !isNaN(date)) {
|
|
402
402
|
parsedDate = new Date(+date);
|
|
@@ -467,7 +467,7 @@ var Plugin = /** @class */ (function () {
|
|
|
467
467
|
* @private
|
|
468
468
|
*/
|
|
469
469
|
function Plugin(options) {
|
|
470
|
-
if (options ===
|
|
470
|
+
if (options === undefined) { options = {}; }
|
|
471
471
|
this.options = options;
|
|
472
472
|
}
|
|
473
473
|
/**
|
|
@@ -501,7 +501,7 @@ var Plugin = /** @class */ (function () {
|
|
|
501
501
|
delete _this[key];
|
|
502
502
|
});
|
|
503
503
|
};
|
|
504
|
-
Plugin.version = "3.14.
|
|
504
|
+
Plugin.version = "3.14.3";
|
|
505
505
|
return Plugin;
|
|
506
506
|
}());
|
|
507
507
|
|
|
@@ -819,7 +819,7 @@ var Elements = /** @class */ (function () {
|
|
|
819
819
|
.style("opacity", null);
|
|
820
820
|
};
|
|
821
821
|
Elements.prototype.updateStanfordElements = function (duration) {
|
|
822
|
-
if (duration ===
|
|
822
|
+
if (duration === undefined) { duration = 0; }
|
|
823
823
|
this.updateStanfordLines(duration);
|
|
824
824
|
this.updateStanfordRegions(duration);
|
|
825
825
|
};
|
|
@@ -1113,8 +1113,8 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1113
1113
|
};
|
|
1114
1114
|
Stanford.prototype.$redraw = function (duration) {
|
|
1115
1115
|
var _a, _b;
|
|
1116
|
-
(_a = this.colorScale) === null || _a ===
|
|
1117
|
-
(_b = this.elements) === null || _b ===
|
|
1116
|
+
(_a = this.colorScale) === null || _a === undefined ? undefined : _a.drawColorScale();
|
|
1117
|
+
(_b = this.elements) === null || _b === undefined ? undefined : _b.updateStanfordElements(duration);
|
|
1118
1118
|
};
|
|
1119
1119
|
Stanford.prototype.getOptions = function () {
|
|
1120
1120
|
return new Options();
|
|
@@ -1159,7 +1159,7 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1159
1159
|
var data_x = config.data_x;
|
|
1160
1160
|
var html = "<table class=\"".concat($TOOLTIP.tooltip, "\"><tbody>");
|
|
1161
1161
|
d.forEach(function (v) {
|
|
1162
|
-
var _a = v.id, id = _a ===
|
|
1162
|
+
var _a = v.id, id = _a === undefined ? "" : _a, _b = v.value, value = _b === undefined ? 0 : _b, _c = v.epochs, epochs = _c === undefined ? 0 : _c, _d = v.x, x = _d === undefined ? "" : _d;
|
|
1163
1163
|
html += "<tr>\n\t\t\t\t\t\t\t<th>".concat(data_x || "", "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultTitleFormat(x), "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>").concat(v.id, "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultValueFormat(value), "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"").concat($TOOLTIP.tooltipName, "-").concat(id, "\">\n\t\t\t\t\t\t\t<td class=\"name\"><span style=\"background-color:").concat(color(v), "\"></span>Epochs</td>\n\t\t\t\t\t\t\t<td class=\"value\">").concat(defaultValueFormat(epochs), "</td>\n\t\t\t\t\t\t</tr>");
|
|
1164
1164
|
});
|
|
1165
1165
|
return "".concat(html, "</tbody></table>");
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.14.
|
|
8
|
+
* @version 3.14.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -83,7 +83,7 @@ function getGlobal() {
|
|
|
83
83
|
Function("return this")();
|
|
84
84
|
}
|
|
85
85
|
var win = getGlobal();
|
|
86
|
-
var doc = win === null || win ===
|
|
86
|
+
var doc = win === null || win === undefined ? undefined : win.document;
|
|
87
87
|
|
|
88
88
|
var isNumber = function (v) { return typeof v === "number"; };
|
|
89
89
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
@@ -101,7 +101,7 @@ var isArray = function (arr) { return Array.isArray(arr); };
|
|
|
101
101
|
* @returns {boolean}
|
|
102
102
|
* @private
|
|
103
103
|
*/
|
|
104
|
-
var isObject = function (obj) { return obj && !(obj === null || obj ===
|
|
104
|
+
var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
|
|
105
105
|
/**
|
|
106
106
|
* Merge object returning new object
|
|
107
107
|
* @param {object} target Target object
|
|
@@ -130,7 +130,7 @@ function mergeObj(target) {
|
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
return mergeObj.apply(
|
|
133
|
+
return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
|
|
134
134
|
}
|
|
135
135
|
// emulate event
|
|
136
136
|
({
|
|
@@ -147,14 +147,14 @@ function mergeObj(target) {
|
|
|
147
147
|
// eslint-disable-next-line no-new
|
|
148
148
|
new MouseEvent("t");
|
|
149
149
|
return function (el, eventType, params) {
|
|
150
|
-
if (params ===
|
|
150
|
+
if (params === undefined) { params = getParams(); }
|
|
151
151
|
el.dispatchEvent(new MouseEvent(eventType, params));
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
catch (_a) {
|
|
155
155
|
// Polyfills DOM4 MouseEvent
|
|
156
156
|
return function (el, eventType, params) {
|
|
157
|
-
if (params ===
|
|
157
|
+
if (params === undefined) { params = getParams(); }
|
|
158
158
|
var mouseEvent = doc.createEvent("MouseEvent");
|
|
159
159
|
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
160
160
|
mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
|
|
@@ -256,7 +256,7 @@ var Plugin = /** @class */ (function () {
|
|
|
256
256
|
* @private
|
|
257
257
|
*/
|
|
258
258
|
function Plugin(options) {
|
|
259
|
-
if (options ===
|
|
259
|
+
if (options === undefined) { options = {}; }
|
|
260
260
|
this.options = options;
|
|
261
261
|
}
|
|
262
262
|
/**
|
|
@@ -290,7 +290,7 @@ var Plugin = /** @class */ (function () {
|
|
|
290
290
|
delete _this[key];
|
|
291
291
|
});
|
|
292
292
|
};
|
|
293
|
-
Plugin.version = "3.14.
|
|
293
|
+
Plugin.version = "3.14.3";
|
|
294
294
|
return Plugin;
|
|
295
295
|
}());
|
|
296
296
|
|
|
@@ -549,11 +549,11 @@ var TableView = /** @class */ (function (_super) {
|
|
|
549
549
|
};
|
|
550
550
|
TableView.prototype.$willDestroy = function () {
|
|
551
551
|
var _a, _b;
|
|
552
|
-
(_a = this.element.parentNode) === null || _a ===
|
|
552
|
+
(_a = this.element.parentNode) === null || _a === undefined ? undefined : _a.removeChild(this.element);
|
|
553
553
|
// remove default css style when left one chart instance
|
|
554
554
|
if (this.$$.charts.length === 1) {
|
|
555
555
|
var s = document.getElementById(defaultStyle.id);
|
|
556
|
-
(_b = s === null || s ===
|
|
556
|
+
(_b = s === null || s === undefined ? undefined : s.parentNode) === null || _b === undefined ? undefined : _b.removeChild(s);
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
return TableView;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.14.
|
|
8
|
+
* @version 3.14.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -75,7 +75,7 @@ function getGlobal() {
|
|
|
75
75
|
Function("return this")();
|
|
76
76
|
}
|
|
77
77
|
var win = getGlobal();
|
|
78
|
-
var doc = win === null || win ===
|
|
78
|
+
var doc = win === null || win === undefined ? undefined : win.document;
|
|
79
79
|
|
|
80
80
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
81
81
|
var isObjectType = function (v) { return typeof v === "object"; };
|
|
@@ -92,7 +92,7 @@ var isArray = function (arr) { return Array.isArray(arr); };
|
|
|
92
92
|
* @returns {boolean}
|
|
93
93
|
* @private
|
|
94
94
|
*/
|
|
95
|
-
var isObject = function (obj) { return obj && !(obj === null || obj ===
|
|
95
|
+
var isObject = function (obj) { return obj && !(obj === null || obj === undefined ? undefined : obj.nodeType) && isObjectType(obj) && !isArray(obj); };
|
|
96
96
|
/**
|
|
97
97
|
* Merge object returning new object
|
|
98
98
|
* @param {object} target Target object
|
|
@@ -121,7 +121,7 @@ function mergeObj(target) {
|
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
return mergeObj.apply(
|
|
124
|
+
return mergeObj.apply(undefined, __spreadArray([target], objectN, false));
|
|
125
125
|
}
|
|
126
126
|
// emulate event
|
|
127
127
|
({
|
|
@@ -138,14 +138,14 @@ function mergeObj(target) {
|
|
|
138
138
|
// eslint-disable-next-line no-new
|
|
139
139
|
new MouseEvent("t");
|
|
140
140
|
return function (el, eventType, params) {
|
|
141
|
-
if (params ===
|
|
141
|
+
if (params === undefined) { params = getParams(); }
|
|
142
142
|
el.dispatchEvent(new MouseEvent(eventType, params));
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
catch (_a) {
|
|
146
146
|
// Polyfills DOM4 MouseEvent
|
|
147
147
|
return function (el, eventType, params) {
|
|
148
|
-
if (params ===
|
|
148
|
+
if (params === undefined) { params = getParams(); }
|
|
149
149
|
var mouseEvent = doc.createEvent("MouseEvent");
|
|
150
150
|
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent
|
|
151
151
|
mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, win, 0, // the event's mouse click count
|
|
@@ -233,7 +233,7 @@ var Plugin = /** @class */ (function () {
|
|
|
233
233
|
* @private
|
|
234
234
|
*/
|
|
235
235
|
function Plugin(options) {
|
|
236
|
-
if (options ===
|
|
236
|
+
if (options === undefined) { options = {}; }
|
|
237
237
|
this.options = options;
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
@@ -267,7 +267,7 @@ var Plugin = /** @class */ (function () {
|
|
|
267
267
|
delete _this[key];
|
|
268
268
|
});
|
|
269
269
|
};
|
|
270
|
-
Plugin.version = "3.14.
|
|
270
|
+
Plugin.version = "3.14.3";
|
|
271
271
|
return Plugin;
|
|
272
272
|
}());
|
|
273
273
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.3",
|
|
4
4
|
"description": "Re-usable easy interface JavaScript chart library, based on D3 v4+",
|
|
5
5
|
"homepage": "https://naver.github.io/billboard.js/",
|
|
6
6
|
"main": "dist/billboard.js",
|
|
@@ -102,25 +102,25 @@
|
|
|
102
102
|
"d3-zoom": "^3.0.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@commitlint/cli": "^19.
|
|
106
|
-
"@commitlint/config-conventional": "^19.
|
|
107
|
-
"@eslint/js": "^9.
|
|
108
|
-
"@rollup/plugin-node-resolve": "^
|
|
109
|
-
"@rollup/plugin-replace": "^6.0.
|
|
110
|
-
"@rollup/plugin-typescript": "^12.1.
|
|
105
|
+
"@commitlint/cli": "^19.6.1",
|
|
106
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
107
|
+
"@eslint/js": "^9.17.0",
|
|
108
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
109
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
110
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
111
111
|
"@semantic-release/changelog": "^6.0.3",
|
|
112
|
-
"@semantic-release/commit-analyzer": "^13.0.
|
|
112
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
113
113
|
"@semantic-release/exec": "^6.0.3",
|
|
114
114
|
"@semantic-release/git": "^10.0.1",
|
|
115
115
|
"@semantic-release/npm": "^12.0.1",
|
|
116
|
-
"@semantic-release/release-notes-generator": "^14.0.
|
|
116
|
+
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
117
117
|
"@testing-library/dom": "^10.4.0",
|
|
118
|
-
"@testing-library/react": "^16.0
|
|
118
|
+
"@testing-library/react": "^16.1.0",
|
|
119
119
|
"@types/d3": "^7.4.3",
|
|
120
120
|
"@types/sinon": "^17.0.3",
|
|
121
|
-
"@vitest/browser": "^2.1.
|
|
122
|
-
"@vitest/coverage-istanbul": "^2.1.
|
|
123
|
-
"@vitest/ui": "^2.1.
|
|
121
|
+
"@vitest/browser": "^2.1.8",
|
|
122
|
+
"@vitest/coverage-istanbul": "^2.1.8",
|
|
123
|
+
"@vitest/ui": "^2.1.8",
|
|
124
124
|
"better-docs": "^2.7.3",
|
|
125
125
|
"clean-webpack-plugin": "^4.0.0",
|
|
126
126
|
"cloc": "2.2.0-cloc",
|
|
@@ -133,36 +133,36 @@
|
|
|
133
133
|
"d3-format": "^3.1.0",
|
|
134
134
|
"d3-polygon": "^3.0.1",
|
|
135
135
|
"docdash": "^2.0.2",
|
|
136
|
-
"dprint": "^0.
|
|
136
|
+
"dprint": "^0.48.0",
|
|
137
137
|
"esbuild-loader": "^4.2.2",
|
|
138
|
-
"eslint": "^9.
|
|
138
|
+
"eslint": "^9.17.0",
|
|
139
139
|
"eslint-plugin-import": "^2.31.0",
|
|
140
|
-
"eslint-plugin-jsdoc": "^50.
|
|
141
|
-
"husky": "^9.1.
|
|
140
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
141
|
+
"husky": "^9.1.7",
|
|
142
142
|
"jsdoc": "^4.0.4",
|
|
143
|
-
"lint-staged": "^15.
|
|
143
|
+
"lint-staged": "^15.3.0",
|
|
144
144
|
"mini-css-extract-plugin": "^2.9.2",
|
|
145
|
-
"playwright": "^1.
|
|
145
|
+
"playwright": "^1.49.1",
|
|
146
146
|
"regenerator-runtime": "^0.14.1",
|
|
147
|
-
"rollup": "^4.
|
|
147
|
+
"rollup": "^4.30.0",
|
|
148
148
|
"rollup-plugin-delete": "^2.1.0",
|
|
149
|
-
"sass": "^1.
|
|
150
|
-
"sass-loader": "^16.0.
|
|
151
|
-
"semantic-release": "^24.2.
|
|
149
|
+
"sass": "^1.83.1",
|
|
150
|
+
"sass-loader": "^16.0.4",
|
|
151
|
+
"semantic-release": "^24.2.1",
|
|
152
152
|
"simulant": "^0.2.2",
|
|
153
153
|
"sinon": "^19.0.2",
|
|
154
154
|
"string-replace-loader": "^3.1.0",
|
|
155
155
|
"style-loader": "^4.0.0",
|
|
156
156
|
"tslib": "^2.8.1",
|
|
157
|
-
"typescript": "^5.
|
|
158
|
-
"typescript-eslint": "^8.
|
|
159
|
-
"vitest": "^2.1.
|
|
160
|
-
"webpack": "^5.
|
|
157
|
+
"typescript": "^5.7.2",
|
|
158
|
+
"typescript-eslint": "^8.19.1",
|
|
159
|
+
"vitest": "^2.1.8",
|
|
160
|
+
"webpack": "^5.97.1",
|
|
161
161
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
162
162
|
"webpack-clean": "^1.2.5",
|
|
163
|
-
"webpack-cli": "^
|
|
163
|
+
"webpack-cli": "^6.0.1",
|
|
164
164
|
"webpack-common-shake": "^2.1.0",
|
|
165
|
-
"webpack-dev-server": "^5.
|
|
165
|
+
"webpack-dev-server": "^5.2.0",
|
|
166
166
|
"webpack-merge": "^6.0.1",
|
|
167
167
|
"webpackbar": "^7.0.0",
|
|
168
168
|
"write-file-webpack-plugin": "^4.5.1"
|
|
@@ -736,7 +736,7 @@ export default {
|
|
|
736
736
|
const pos = [point, 0];
|
|
737
737
|
|
|
738
738
|
isRotated && pos.reverse();
|
|
739
|
-
point = getTransformCTM($el.
|
|
739
|
+
point = getTransformCTM($el.eventRect.node(), ...pos)[isRotated ? "y" : "x"];
|
|
740
740
|
} else {
|
|
741
741
|
point -= isRotated ? rect.top : rect.left;
|
|
742
742
|
}
|
|
@@ -226,7 +226,7 @@ export default {
|
|
|
226
226
|
let y = top + (mouse ? mouse[1] : 0) + (isRotated ? 4 : 0);
|
|
227
227
|
|
|
228
228
|
if (hasViewBox(svg)) {
|
|
229
|
-
const ctm = getTransformCTM($$.$el.
|
|
229
|
+
const ctm = getTransformCTM($$.$el.eventRect.node(), x, y, false);
|
|
230
230
|
|
|
231
231
|
x = ctm.x;
|
|
232
232
|
y = ctm.y;
|
|
@@ -27,8 +27,9 @@ export default {
|
|
|
27
27
|
* @property {number} [gauge.expand.rate=0.98] Set expand rate.
|
|
28
28
|
* @property {number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.
|
|
29
29
|
* @property {boolean} [gauge.enforceMinMax=false] Enforce to given min/max value.
|
|
30
|
-
* -
|
|
31
|
-
*
|
|
30
|
+
* - **Note:** Only works for single data series.
|
|
31
|
+
* - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
|
|
32
|
+
* - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
|
|
32
33
|
* @property {number} [gauge.min=0] Set min value of the gauge.
|
|
33
34
|
* @property {number} [gauge.max=100] Set max value of the gauge.
|
|
34
35
|
* @property {number} [gauge.startingAngle=-1 * Math.PI / 2] Set starting angle where data draws.
|
package/types/options.shape.d.ts
CHANGED
|
@@ -440,8 +440,9 @@ export interface GaugeOptions {
|
|
|
440
440
|
|
|
441
441
|
/**
|
|
442
442
|
* Enforce to given min/max value.
|
|
443
|
-
*
|
|
444
|
-
*
|
|
443
|
+
* **Note:** Only works for single data series.
|
|
444
|
+
* - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
|
|
445
|
+
* - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
|
|
445
446
|
*/
|
|
446
447
|
enforceMinMax?: boolean;
|
|
447
448
|
|