billboard.js 3.9.3 → 3.10.0-next.1
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 +2 -2
- package/dist/billboard.css +2 -2
- package/dist/billboard.js +2687 -2541
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +3493 -3331
- package/dist/billboard.pkgd.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +15 -15
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +215 -196
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +244 -239
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +184 -164
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +170 -151
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/{billboardjs-plugin-bubblecompare.js → billboardjs-plugin-bubblecompare.pkgd.js} +664 -634
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-sparkline.js → billboardjs-plugin-sparkline.pkgd.js} +861 -812
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-stanford.js → billboardjs-plugin-stanford.pkgd.js} +926 -892
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-tableview.js → billboardjs-plugin-tableview.pkgd.js} +830 -780
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +12 -0
- package/dist/plugin/pkgd/{billboardjs-plugin-textoverlap.js → billboardjs-plugin-textoverlap.pkgd.js} +929 -889
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +12 -0
- package/dist/theme/dark.css +5 -4
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +5 -4
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +5 -4
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +5 -4
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +591 -462
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +13 -7
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +21 -28
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +17 -11
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +13 -7
- package/package.json +27 -27
- package/src/Chart/api/axis.ts +4 -0
- package/src/Chart/api/category.ts +8 -4
- package/src/Chart/api/export.ts +1 -2
- package/src/Chart/api/subchart.ts +162 -89
- package/src/Chart/api/zoom.ts +69 -79
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +0 -8
- package/src/ChartInternal/data/IData.ts +4 -1
- package/src/ChartInternal/data/convert.helper.ts +1 -15
- package/src/ChartInternal/data/data.ts +8 -2
- package/src/ChartInternal/interactions/eventrect.ts +0 -1
- package/src/ChartInternal/interactions/flow.ts +1 -7
- package/src/ChartInternal/interactions/interaction.ts +10 -4
- package/src/ChartInternal/interactions/subchart.ts +36 -30
- package/src/ChartInternal/interactions/zoom.ts +13 -3
- package/src/ChartInternal/internals/category.ts +2 -2
- package/src/ChartInternal/internals/clip.ts +4 -4
- package/src/ChartInternal/internals/domain.ts +46 -10
- package/src/ChartInternal/internals/grid.ts +57 -86
- package/src/ChartInternal/internals/redraw.ts +0 -5
- package/src/ChartInternal/internals/region.ts +35 -12
- package/src/ChartInternal/internals/text.ts +1 -26
- package/src/ChartInternal/internals/title.ts +10 -48
- package/src/ChartInternal/internals/tooltip.ts +47 -51
- package/src/ChartInternal/shape/arc.ts +2 -2
- package/src/ChartInternal/shape/candlestick.ts +2 -17
- package/src/ChartInternal/shape/shape.ts +50 -4
- package/src/ChartInternal/shape/treemap.ts +2 -2
- package/src/Plugin/bubblecompare/index.ts +1 -1
- package/src/Plugin/stanford/Elements.ts +10 -2
- package/src/Plugin/stanford/index.ts +1 -24
- package/src/Plugin/tableview/index.ts +2 -2
- package/src/config/Options/axis/x.ts +1 -0
- package/src/config/Options/common/main.ts +12 -2
- package/src/config/Options/common/tooltip.ts +10 -10
- package/src/config/Options/data/axis.ts +3 -1
- package/src/config/Options/data/data.ts +10 -2
- package/src/config/Store/State.ts +3 -0
- package/src/module/Cache.ts +7 -5
- package/src/module/browser.ts +34 -14
- package/src/module/util.ts +8 -4
- package/src/module/worker.ts +24 -13
- package/src/scss/billboard.scss +4 -2
- package/src/scss/theme/dark.scss +4 -2
- package/src/scss/theme/datalab.scss +4 -2
- package/src/scss/theme/graph.scss +4 -2
- package/src/scss/theme/insight.scss +4 -2
- package/types/chart.d.ts +11 -0
- package/types/options.d.ts +3 -3
- package/types/types.d.ts +15 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.10.0-next.1
|
|
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.
|
|
107
|
+
Plugin.version = "3.10.0-next.1";
|
|
108
108
|
return Plugin;
|
|
109
109
|
}());
|
|
110
110
|
var Plugin$1 = Plugin;
|
|
@@ -173,7 +173,7 @@ var BubbleCompare = /** @class */ (function (_super) {
|
|
|
173
173
|
d.raise && select(d.node().parentNode.parentNode).raise();
|
|
174
174
|
};
|
|
175
175
|
BubbleCompare.prototype.changeCursorPoint = function () {
|
|
176
|
-
this.$$.$el.
|
|
176
|
+
this.$$.$el.eventRect.style("cursor", "pointer");
|
|
177
177
|
};
|
|
178
178
|
BubbleCompare.prototype.findClosest = function (values, pos) {
|
|
179
179
|
var _this = this;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.10.0-next.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -279,7 +279,7 @@ var Plugin = /** @class */ (function () {
|
|
|
279
279
|
delete _this[key];
|
|
280
280
|
});
|
|
281
281
|
};
|
|
282
|
-
Plugin.version = "3.
|
|
282
|
+
Plugin.version = "3.10.0-next.1";
|
|
283
283
|
return Plugin;
|
|
284
284
|
}());
|
|
285
285
|
var Plugin$1 = Plugin;
|
|
@@ -325,12 +325,18 @@ var Options$1 = Options;
|
|
|
325
325
|
* @private
|
|
326
326
|
*/
|
|
327
327
|
/* eslint-disable no-new-func, no-undef */
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Get global object
|
|
330
|
+
* @returns {object} window object
|
|
331
|
+
* @private
|
|
332
|
+
*/
|
|
333
|
+
function getGlobal() {
|
|
334
|
+
return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
|
|
330
335
|
(typeof global === "object" && global !== null && global.Object === Object && global) ||
|
|
331
|
-
(typeof self === "object" && self !== null && self.Object === Object && self)
|
|
332
|
-
|
|
333
|
-
}
|
|
336
|
+
(typeof self === "object" && self !== null && self.Object === Object && self) ||
|
|
337
|
+
Function("return this")();
|
|
338
|
+
}
|
|
339
|
+
var win = getGlobal();
|
|
334
340
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
335
341
|
|
|
336
342
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.10.0-next.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -236,12 +236,18 @@ _assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(
|
|
|
236
236
|
* @private
|
|
237
237
|
*/
|
|
238
238
|
/* eslint-disable no-new-func, no-undef */
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Get global object
|
|
241
|
+
* @returns {object} window object
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
function getGlobal() {
|
|
245
|
+
return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
|
|
241
246
|
(typeof global === "object" && global !== null && global.Object === Object && global) ||
|
|
242
|
-
(typeof self === "object" && self !== null && self.Object === Object && self)
|
|
243
|
-
|
|
244
|
-
}
|
|
247
|
+
(typeof self === "object" && self !== null && self.Object === Object && self) ||
|
|
248
|
+
Function("return this")();
|
|
249
|
+
}
|
|
250
|
+
var win = getGlobal();
|
|
245
251
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
246
252
|
|
|
247
253
|
var isFunction = function (v) { return typeof v === "function"; };
|
|
@@ -487,7 +493,7 @@ var Plugin = /** @class */ (function () {
|
|
|
487
493
|
delete _this[key];
|
|
488
494
|
});
|
|
489
495
|
};
|
|
490
|
-
Plugin.version = "3.
|
|
496
|
+
Plugin.version = "3.10.0-next.1";
|
|
491
497
|
return Plugin;
|
|
492
498
|
}());
|
|
493
499
|
var Plugin$1 = Plugin;
|
|
@@ -793,9 +799,15 @@ var Elements = /** @class */ (function () {
|
|
|
793
799
|
.select("line")
|
|
794
800
|
.transition()
|
|
795
801
|
.duration(duration)
|
|
796
|
-
.attr("x1", function (d) {
|
|
802
|
+
.attr("x1", function (d) {
|
|
803
|
+
var v = isRotated ? yvCustom(d, "y1") : xvCustom(d, "x1");
|
|
804
|
+
return v;
|
|
805
|
+
})
|
|
797
806
|
.attr("x2", function (d) { return (isRotated ? yvCustom(d, "y2") : xvCustom(d, "x2")); })
|
|
798
|
-
.attr("y1", function (d) {
|
|
807
|
+
.attr("y1", function (d) {
|
|
808
|
+
var v = isRotated ? xvCustom(d, "x1") : yvCustom(d, "y1");
|
|
809
|
+
return v;
|
|
810
|
+
})
|
|
799
811
|
.attr("y2", function (d) { return (isRotated ? xvCustom(d, "x2") : yvCustom(d, "y2")); })
|
|
800
812
|
.transition()
|
|
801
813
|
.style("opacity", null);
|
|
@@ -1103,25 +1115,6 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1103
1115
|
d.colorscale = undefined;
|
|
1104
1116
|
});
|
|
1105
1117
|
};
|
|
1106
|
-
Stanford.prototype.xvCustom = function (d, xyValue) {
|
|
1107
|
-
var $$ = this;
|
|
1108
|
-
var axis = $$.axis, config = $$.config;
|
|
1109
|
-
var value = xyValue ? d[xyValue] : $$.getBaseValue(d);
|
|
1110
|
-
if (axis.isTimeSeries()) {
|
|
1111
|
-
value = parseDate.call($$, value);
|
|
1112
|
-
}
|
|
1113
|
-
else if (axis.isCategorized() && isString(value)) {
|
|
1114
|
-
value = config.axis_x_categories.indexOf(d.value);
|
|
1115
|
-
}
|
|
1116
|
-
return Math.ceil($$.scale.x(value));
|
|
1117
|
-
};
|
|
1118
|
-
Stanford.prototype.yvCustom = function (d, xyValue) {
|
|
1119
|
-
var $$ = this;
|
|
1120
|
-
var scale = $$.scale;
|
|
1121
|
-
var yScale = d.axis && d.axis === "y2" ? scale.y2 : scale.y;
|
|
1122
|
-
var value = xyValue ? d[xyValue] : $$.getBaseValue(d);
|
|
1123
|
-
return Math.ceil(yScale(value));
|
|
1124
|
-
};
|
|
1125
1118
|
Stanford.prototype.initStanfordData = function () {
|
|
1126
1119
|
var config = this.config;
|
|
1127
1120
|
var target = this.$$.data.targets[0];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.10.0-next.1
|
|
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.
|
|
124
|
+
Plugin.version = "3.10.0-next.1";
|
|
125
125
|
return Plugin;
|
|
126
126
|
}());
|
|
127
127
|
var Plugin$1 = Plugin;
|
|
@@ -259,12 +259,18 @@ var tpl = {
|
|
|
259
259
|
* @private
|
|
260
260
|
*/
|
|
261
261
|
/* eslint-disable no-new-func, no-undef */
|
|
262
|
-
|
|
263
|
-
|
|
262
|
+
/**
|
|
263
|
+
* Get global object
|
|
264
|
+
* @returns {object} window object
|
|
265
|
+
* @private
|
|
266
|
+
*/
|
|
267
|
+
function getGlobal() {
|
|
268
|
+
return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
|
|
264
269
|
(typeof global === "object" && global !== null && global.Object === Object && global) ||
|
|
265
|
-
(typeof self === "object" && self !== null && self.Object === Object && self)
|
|
266
|
-
|
|
267
|
-
}
|
|
270
|
+
(typeof self === "object" && self !== null && self.Object === Object && self) ||
|
|
271
|
+
Function("return this")();
|
|
272
|
+
}
|
|
273
|
+
var win = getGlobal();
|
|
268
274
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
269
275
|
|
|
270
276
|
var isNumber = function (v) { return typeof v === "number"; };
|
|
@@ -522,7 +528,7 @@ var TableView = /** @class */ (function (_super) {
|
|
|
522
528
|
(isNumber(d) ? d.toLocaleString() : "")
|
|
523
529
|
}); }).join(""), "</tr>");
|
|
524
530
|
});
|
|
525
|
-
var rx =
|
|
531
|
+
var rx = /(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/ig;
|
|
526
532
|
var r = tplProcess(tpl.body, _assign(_assign({}, config), { title: config.title || $$.config.title_text || "", thead: thead, tbody: tbody })).replace(rx, "");
|
|
527
533
|
element.innerHTML = r;
|
|
528
534
|
};
|
|
@@ -532,12 +538,12 @@ var TableView = /** @class */ (function (_super) {
|
|
|
532
538
|
!doNotUpdate && this.generateTable();
|
|
533
539
|
};
|
|
534
540
|
TableView.prototype.$willDestroy = function () {
|
|
535
|
-
var _a;
|
|
536
|
-
this.element.parentNode.removeChild(this.element);
|
|
541
|
+
var _a, _b;
|
|
542
|
+
(_a = this.element.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.element);
|
|
537
543
|
// remove default css style when left one chart instance
|
|
538
544
|
if (this.$$.charts.length === 1) {
|
|
539
545
|
var s = document.getElementById(defaultStyle.id);
|
|
540
|
-
(
|
|
546
|
+
(_b = s === null || s === void 0 ? void 0 : s.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(s);
|
|
541
547
|
}
|
|
542
548
|
};
|
|
543
549
|
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.
|
|
8
|
+
* @version 3.10.0-next.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -65,12 +65,18 @@ function __spreadArray(to, from, pack) {
|
|
|
65
65
|
* @private
|
|
66
66
|
*/
|
|
67
67
|
/* eslint-disable no-new-func, no-undef */
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Get global object
|
|
70
|
+
* @returns {object} window object
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
function getGlobal() {
|
|
74
|
+
return (typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis) ||
|
|
70
75
|
(typeof global === "object" && global !== null && global.Object === Object && global) ||
|
|
71
|
-
(typeof self === "object" && self !== null && self.Object === Object && self)
|
|
72
|
-
|
|
73
|
-
}
|
|
76
|
+
(typeof self === "object" && self !== null && self.Object === Object && self) ||
|
|
77
|
+
Function("return this")();
|
|
78
|
+
}
|
|
79
|
+
var win = getGlobal();
|
|
74
80
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
75
81
|
|
|
76
82
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
@@ -263,7 +269,7 @@ var Plugin = /** @class */ (function () {
|
|
|
263
269
|
delete _this[key];
|
|
264
270
|
});
|
|
265
271
|
};
|
|
266
|
-
Plugin.version = "3.
|
|
272
|
+
Plugin.version = "3.10.0-next.1";
|
|
267
273
|
return Plugin;
|
|
268
274
|
}());
|
|
269
275
|
var Plugin$1 = Plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0-next.1",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"build:theme": "cross-env NODE_ENV=theme webpack",
|
|
34
34
|
"build:production:analyzer": "cross-env ANALYZER=true npm run build:production",
|
|
35
35
|
"build:packaged:analyzer": "cross-env ANALYZER=true npm run build:packaged",
|
|
36
|
-
"build:plugin": "cross-env NODE_ENV=plugin webpack && cross-env NODE_ENV=plugin MODE=min webpack && cross-env NODE_ENV=plugin MODE=pkgd webpack",
|
|
36
|
+
"build:plugin": "cross-env NODE_ENV=plugin webpack && cross-env NODE_ENV=plugin MODE=min webpack && cross-env NODE_ENV=plugin MODE=pkgd webpack && cross-env NODE_ENV=plugin MODE=pkgd-min webpack",
|
|
37
37
|
"build:plugin:types": "node ./config/type.d-plugin.js",
|
|
38
38
|
"release": "semantic-release",
|
|
39
39
|
"lint": "npm run lint:types && eslint src --ext .ts",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"license": "MIT",
|
|
86
86
|
"readmeFilename": "README.md",
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@types/d3-selection": "^3.0.
|
|
89
|
-
"@types/d3-transition": "^3.0.
|
|
88
|
+
"@types/d3-selection": "^3.0.6",
|
|
89
|
+
"@types/d3-transition": "^3.0.4",
|
|
90
90
|
"d3-axis": "^3.0.0",
|
|
91
91
|
"d3-brush": "^3.0.0",
|
|
92
92
|
"d3-drag": "^3.0.0",
|
|
@@ -102,32 +102,32 @@
|
|
|
102
102
|
"d3-zoom": "^3.0.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@babel/core": "^7.22.
|
|
106
|
-
"@babel/eslint-parser": "^7.22.
|
|
105
|
+
"@babel/core": "^7.22.11",
|
|
106
|
+
"@babel/eslint-parser": "^7.22.11",
|
|
107
107
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
108
108
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
109
109
|
"@babel/plugin-transform-runtime": "^7.22.10",
|
|
110
110
|
"@babel/preset-env": "^7.22.10",
|
|
111
|
-
"@babel/preset-typescript": "^7.22.
|
|
112
|
-
"@babel/runtime": "^7.22.
|
|
113
|
-
"@commitlint/cli": "17.
|
|
114
|
-
"@commitlint/config-conventional": "^17.
|
|
111
|
+
"@babel/preset-typescript": "^7.22.11",
|
|
112
|
+
"@babel/runtime": "^7.22.11",
|
|
113
|
+
"@commitlint/cli": "17.7.1",
|
|
114
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
115
115
|
"@rollup/plugin-babel": "^6.0.3",
|
|
116
|
-
"@rollup/plugin-node-resolve": "^15.
|
|
116
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
117
117
|
"@rollup/plugin-replace": "^5.0.2",
|
|
118
|
-
"@rollup/plugin-typescript": "^11.1.
|
|
118
|
+
"@rollup/plugin-typescript": "^11.1.3",
|
|
119
119
|
"@semantic-release/changelog": "^6.0.3",
|
|
120
|
-
"@semantic-release/commit-analyzer": "^10.0.
|
|
120
|
+
"@semantic-release/commit-analyzer": "^10.0.4",
|
|
121
121
|
"@semantic-release/exec": "^6.0.3",
|
|
122
122
|
"@semantic-release/git": "^10.0.1",
|
|
123
|
-
"@semantic-release/npm": "^10.0.
|
|
124
|
-
"@semantic-release/release-notes-generator": "^11.0.
|
|
123
|
+
"@semantic-release/npm": "^10.0.5",
|
|
124
|
+
"@semantic-release/release-notes-generator": "^11.0.7",
|
|
125
125
|
"@types/chai": "^4.3.5",
|
|
126
126
|
"@types/d3": "^7.4.0",
|
|
127
127
|
"@types/mocha": "^10.0.1",
|
|
128
128
|
"@types/sinon": "^10.0.16",
|
|
129
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
130
|
-
"@typescript-eslint/parser": "^6.
|
|
129
|
+
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
|
130
|
+
"@typescript-eslint/parser": "^6.5.0",
|
|
131
131
|
"babel-helper-modules": "^6.0.0",
|
|
132
132
|
"babel-loader": "^9.1.3",
|
|
133
133
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
@@ -140,10 +140,10 @@
|
|
|
140
140
|
"babel-plugin-transform-merge-sibling-variables": "^6.9.5",
|
|
141
141
|
"babel-plugin-transform-minify-booleans": "^6.9.4",
|
|
142
142
|
"better-docs": "^2.7.2",
|
|
143
|
-
"chai": "^4.3.
|
|
143
|
+
"chai": "^4.3.8",
|
|
144
144
|
"clean-webpack-plugin": "^4.0.0",
|
|
145
145
|
"cloc": "^2.11.0",
|
|
146
|
-
"core-js": "^3.32.
|
|
146
|
+
"core-js": "^3.32.1",
|
|
147
147
|
"coveralls": "^3.1.1",
|
|
148
148
|
"cross-env": "^7.0.3",
|
|
149
149
|
"css-loader": "^6.8.1",
|
|
@@ -154,10 +154,10 @@
|
|
|
154
154
|
"d3-polygon": "^3.0.1",
|
|
155
155
|
"docdash": "^2.0.1",
|
|
156
156
|
"dtslint": "^4.2.1",
|
|
157
|
-
"eslint": "^8.
|
|
157
|
+
"eslint": "^8.48.0",
|
|
158
158
|
"eslint-config-naver": "^2.1.0",
|
|
159
|
-
"eslint-plugin-import": "^2.28.
|
|
160
|
-
"eslint-plugin-jsdoc": "^46.
|
|
159
|
+
"eslint-plugin-import": "^2.28.1",
|
|
160
|
+
"eslint-plugin-jsdoc": "^46.5.0",
|
|
161
161
|
"eslint-webpack-plugin": "^4.0.1",
|
|
162
162
|
"exports-loader": "^4.0.0",
|
|
163
163
|
"hammer-simulator": "0.0.1",
|
|
@@ -175,24 +175,24 @@
|
|
|
175
175
|
"karma-sinon": "^1.0.5",
|
|
176
176
|
"karma-sourcemap-loader": "^0.4.0",
|
|
177
177
|
"karma-webpack": "^5.0.0",
|
|
178
|
-
"lint-staged": "^
|
|
178
|
+
"lint-staged": "^14.0.1",
|
|
179
179
|
"lite-fixture": "^1.0.2",
|
|
180
180
|
"mini-css-extract-plugin": "^2.7.6",
|
|
181
181
|
"mocha": "^10.2.0",
|
|
182
182
|
"node-sass": "^9.0.0",
|
|
183
183
|
"regenerator-runtime": "^0.14.0",
|
|
184
|
-
"rollup": "^3.
|
|
184
|
+
"rollup": "^3.28.1",
|
|
185
185
|
"rollup-plugin-delete": "^2.0.0",
|
|
186
186
|
"sass-loader": "^13.3.2",
|
|
187
|
-
"semantic-release": "^21.
|
|
187
|
+
"semantic-release": "^21.1.1",
|
|
188
188
|
"simulant": "^0.2.2",
|
|
189
189
|
"sinon": "^15.2.0",
|
|
190
190
|
"string-replace-loader": "^3.1.0",
|
|
191
191
|
"style-loader": "^3.3.3",
|
|
192
192
|
"taffydb": "^2.7.3",
|
|
193
193
|
"terser-webpack-plugin": "^5.3.9",
|
|
194
|
-
"tslib": "^2.6.
|
|
195
|
-
"typescript": "5.
|
|
194
|
+
"tslib": "^2.6.2",
|
|
195
|
+
"typescript": "5.2.2",
|
|
196
196
|
"webpack": "^5.88.2",
|
|
197
197
|
"webpack-bundle-analyzer": "^4.9.0",
|
|
198
198
|
"webpack-clean": "^1.2.5",
|
package/src/Chart/api/axis.ts
CHANGED
|
@@ -77,6 +77,7 @@ function getMinMax($$, type: "min" | "max"): {x: number, y: number, y2: number}
|
|
|
77
77
|
const axis = {
|
|
78
78
|
/**
|
|
79
79
|
* Get and set axis labels.
|
|
80
|
+
* - **NOTE:** Only applicable for chart types which has x and y axes.
|
|
80
81
|
* @function axis․labels
|
|
81
82
|
* @instance
|
|
82
83
|
* @memberof Chart
|
|
@@ -126,6 +127,7 @@ const axis = {
|
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
129
|
* Get and set axis min value.
|
|
130
|
+
* - **NOTE:** Only applicable for chart types which has x and y axes.
|
|
129
131
|
* @function axis․min
|
|
130
132
|
* @instance
|
|
131
133
|
* @memberof Chart
|
|
@@ -163,6 +165,7 @@ const axis = {
|
|
|
163
165
|
|
|
164
166
|
/**
|
|
165
167
|
* Get and set axis max value.
|
|
168
|
+
* - **NOTE:** Only applicable for chart types which has x and y axes.
|
|
166
169
|
* @function axis․max
|
|
167
170
|
* @instance
|
|
168
171
|
* @memberof Chart
|
|
@@ -200,6 +203,7 @@ const axis = {
|
|
|
200
203
|
|
|
201
204
|
/**
|
|
202
205
|
* Get and set axis min and max value.
|
|
206
|
+
* - **NOTE:** Only applicable for chart types which has x and y axes.
|
|
203
207
|
* @function axis․range
|
|
204
208
|
* @instance
|
|
205
209
|
* @memberof Chart
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
3
|
* billboard.js project is licensed under the MIT license
|
|
4
4
|
*/
|
|
5
|
+
import {isEmpty} from "../../module/util";
|
|
6
|
+
|
|
5
7
|
export default {
|
|
6
8
|
/**
|
|
7
9
|
* Set specified category name on category axis.
|
|
@@ -27,7 +29,7 @@ export default {
|
|
|
27
29
|
},
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
|
-
* Set category names on category axis.
|
|
32
|
+
* Set or get category names on category axis.
|
|
31
33
|
* @function categories
|
|
32
34
|
* @instance
|
|
33
35
|
* @memberof Chart
|
|
@@ -38,12 +40,14 @@ export default {
|
|
|
38
40
|
* "Category 1", "Category 2", ...
|
|
39
41
|
* ]);
|
|
40
42
|
*/
|
|
41
|
-
categories(categories
|
|
43
|
+
categories(categories?: string[]): string[] {
|
|
42
44
|
const $$ = this.internal;
|
|
43
45
|
const {config} = $$;
|
|
44
46
|
|
|
45
|
-
if (!
|
|
46
|
-
|
|
47
|
+
if (!categories || !Array.isArray(categories)) {
|
|
48
|
+
const cat = config.axis_x_categories;
|
|
49
|
+
|
|
50
|
+
return isEmpty(cat) ? Object.values($$.data.xs)[0] : cat;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
config.axis_x_categories = categories;
|
package/src/Chart/api/export.ts
CHANGED
|
@@ -87,8 +87,7 @@ function nodeToSvgDataUrl(node, option: TExportOption, orgSize: TSize) {
|
|
|
87
87
|
<foreignObject width="100%" height="100%">
|
|
88
88
|
${styleXml}
|
|
89
89
|
${nodeXml.replace(/(url\()[^#]+/g, "$1")}
|
|
90
|
-
</foreignObject></svg
|
|
91
|
-
.replace("/\n/g", "%0A");
|
|
90
|
+
</foreignObject></svg>`;
|
|
92
91
|
|
|
93
92
|
return `data:image/svg+xml;base64,${b64EncodeUnicode(dataStr)}`;
|
|
94
93
|
}
|