billboard.js 3.4.1 → 3.5.0
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 +4 -1
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +3942 -1467
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +8372 -5306
- package/dist/billboard.pkgd.min.js +3 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +29 -13
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +375 -91
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +445 -108
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +339 -73
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +335 -74
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +4236 -3792
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +4637 -3889
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +4804 -3931
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +4595 -3865
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +4607 -3873
- 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-esm/billboard.js +837 -403
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +47 -75
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +68 -86
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +52 -77
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +49 -76
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +49 -76
- package/package.json +39 -39
- package/src/Chart/api/chart.ts +4 -1
- package/src/Chart/api/data.ts +2 -2
- package/src/Chart/api/flow.ts +125 -115
- package/src/ChartInternal/Axis/AxisRenderer.ts +29 -3
- package/src/ChartInternal/ChartInternal.ts +46 -18
- package/src/ChartInternal/data/IData.ts +2 -2
- package/src/ChartInternal/data/convert.helper.ts +226 -0
- package/src/ChartInternal/data/convert.ts +43 -210
- package/src/ChartInternal/data/load.ts +5 -4
- package/src/ChartInternal/interactions/zoom.ts +17 -4
- package/src/ChartInternal/internals/class.ts +1 -1
- package/src/ChartInternal/internals/color.ts +41 -42
- package/src/ChartInternal/internals/grid.ts +5 -3
- package/src/ChartInternal/internals/legend.ts +21 -6
- package/src/ChartInternal/internals/redraw.ts +5 -2
- package/src/ChartInternal/internals/scale.ts +3 -1
- package/src/ChartInternal/internals/size.axis.ts +5 -2
- package/src/ChartInternal/internals/style.ts +54 -0
- package/src/ChartInternal/internals/text.ts +118 -18
- package/src/ChartInternal/shape/arc.ts +4 -3
- package/src/ChartInternal/shape/area.ts +14 -7
- package/src/ChartInternal/shape/bar.ts +22 -12
- package/src/ChartInternal/shape/line.ts +3 -2
- package/src/ChartInternal/shape/point.ts +15 -9
- package/src/ChartInternal/shape/polar.ts +1 -1
- package/src/Plugin/sparkline/index.ts +22 -11
- package/src/Plugin/stanford/index.ts +10 -7
- package/src/Plugin/textoverlap/index.ts +4 -1
- package/src/config/Options/Options.ts +2 -0
- package/src/config/Options/common/boost.ts +31 -0
- package/src/config/Options/common/main.ts +15 -1
- package/src/config/Options/common/tooltip.ts +1 -1
- package/src/config/Options/data/data.ts +11 -3
- package/src/config/Options/shape/area.ts +6 -1
- package/src/config/Store/State.ts +3 -0
- package/src/module/browser.ts +2 -1
- package/src/module/generator.ts +18 -16
- package/src/module/util.ts +113 -0
- package/types/chart.d.ts +2 -2
- package/types/options.d.ts +45 -8
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.5.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
12
|
import { select } from 'd3-selection';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
/******************************************************************************
|
|
15
15
|
Copyright (c) Microsoft Corporation.
|
|
16
16
|
|
|
17
17
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -57,12 +57,10 @@ function __extends(d, b) {
|
|
|
57
57
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
58
58
|
* billboard.js project is licensed under the MIT license
|
|
59
59
|
*/
|
|
60
|
-
|
|
61
60
|
/**
|
|
62
61
|
* Base class to generate billboard.js plugin
|
|
63
62
|
* @class Plugin
|
|
64
63
|
*/
|
|
65
|
-
|
|
66
64
|
/**
|
|
67
65
|
* Version info string for plugin
|
|
68
66
|
* @name version
|
|
@@ -72,77 +70,51 @@ function __extends(d, b) {
|
|
|
72
70
|
* @example
|
|
73
71
|
* bb.plugin.stanford.version; // ex) 1.9.0
|
|
74
72
|
*/
|
|
75
|
-
var Plugin =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Constructor
|
|
88
|
-
* @param {Any} options config option object
|
|
89
|
-
* @private
|
|
90
|
-
*/
|
|
91
|
-
function Plugin(options) {
|
|
92
|
-
if (options === void 0) {
|
|
93
|
-
options = {};
|
|
73
|
+
var Plugin = /** @class */ (function () {
|
|
74
|
+
/**
|
|
75
|
+
* Constructor
|
|
76
|
+
* @param {Any} options config option object
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
function Plugin(options) {
|
|
80
|
+
if (options === void 0) { options = {}; }
|
|
81
|
+
this.options = options;
|
|
94
82
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*/
|
|
131
|
-
;
|
|
132
|
-
|
|
133
|
-
_proto.$willDestroy = function $willDestroy() {
|
|
134
|
-
var _this = this;
|
|
135
|
-
|
|
136
|
-
Object.keys(this).forEach(function (key) {
|
|
137
|
-
_this[key] = null;
|
|
138
|
-
delete _this[key];
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
return Plugin;
|
|
143
|
-
}();
|
|
144
|
-
|
|
145
|
-
Plugin.version = "#3.4.1#";
|
|
83
|
+
/**
|
|
84
|
+
* Lifecycle hook for 'beforeInit' phase.
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
Plugin.prototype.$beforeInit = function () { };
|
|
88
|
+
/**
|
|
89
|
+
* Lifecycle hook for 'init' phase.
|
|
90
|
+
* @private
|
|
91
|
+
*/
|
|
92
|
+
Plugin.prototype.$init = function () { };
|
|
93
|
+
/**
|
|
94
|
+
* Lifecycle hook for 'afterInit' phase.
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
Plugin.prototype.$afterInit = function () { };
|
|
98
|
+
/**
|
|
99
|
+
* Lifecycle hook for 'redraw' phase.
|
|
100
|
+
* @private
|
|
101
|
+
*/
|
|
102
|
+
Plugin.prototype.$redraw = function () { };
|
|
103
|
+
/**
|
|
104
|
+
* Lifecycle hook for 'willDestroy' phase.
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
Plugin.prototype.$willDestroy = function () {
|
|
108
|
+
var _this = this;
|
|
109
|
+
Object.keys(this).forEach(function (key) {
|
|
110
|
+
_this[key] = null;
|
|
111
|
+
delete _this[key];
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
Plugin.version = "3.5.0";
|
|
115
|
+
return Plugin;
|
|
116
|
+
}());
|
|
117
|
+
var Plugin$1 = Plugin;
|
|
146
118
|
|
|
147
119
|
/**
|
|
148
120
|
* Bubble compare diagram plugin.<br>
|
|
@@ -241,6 +213,6 @@ var BubbleCompare = /** @class */ (function (_super) {
|
|
|
241
213
|
};
|
|
242
214
|
BubbleCompare.version = "0.0.1";
|
|
243
215
|
return BubbleCompare;
|
|
244
|
-
}(Plugin));
|
|
216
|
+
}(Plugin$1));
|
|
245
217
|
|
|
246
218
|
export { BubbleCompare as default };
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.
|
|
8
|
+
* @version 3.5.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
/******************************************************************************
|
|
13
13
|
Copyright (c) Microsoft Corporation.
|
|
14
14
|
|
|
15
15
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -232,12 +232,10 @@ _assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(
|
|
|
232
232
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
233
233
|
* billboard.js project is licensed under the MIT license
|
|
234
234
|
*/
|
|
235
|
-
|
|
236
235
|
/**
|
|
237
236
|
* Base class to generate billboard.js plugin
|
|
238
237
|
* @class Plugin
|
|
239
238
|
*/
|
|
240
|
-
|
|
241
239
|
/**
|
|
242
240
|
* Version info string for plugin
|
|
243
241
|
* @name version
|
|
@@ -247,77 +245,51 @@ _assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(
|
|
|
247
245
|
* @example
|
|
248
246
|
* bb.plugin.stanford.version; // ex) 1.9.0
|
|
249
247
|
*/
|
|
250
|
-
var Plugin =
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Constructor
|
|
263
|
-
* @param {Any} options config option object
|
|
264
|
-
* @private
|
|
265
|
-
*/
|
|
266
|
-
function Plugin(options) {
|
|
267
|
-
if (options === void 0) {
|
|
268
|
-
options = {};
|
|
248
|
+
var Plugin = /** @class */ (function () {
|
|
249
|
+
/**
|
|
250
|
+
* Constructor
|
|
251
|
+
* @param {Any} options config option object
|
|
252
|
+
* @private
|
|
253
|
+
*/
|
|
254
|
+
function Plugin(options) {
|
|
255
|
+
if (options === void 0) { options = {}; }
|
|
256
|
+
this.options = options;
|
|
269
257
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
*/
|
|
306
|
-
;
|
|
307
|
-
|
|
308
|
-
_proto.$willDestroy = function $willDestroy() {
|
|
309
|
-
var _this = this;
|
|
310
|
-
|
|
311
|
-
Object.keys(this).forEach(function (key) {
|
|
312
|
-
_this[key] = null;
|
|
313
|
-
delete _this[key];
|
|
314
|
-
});
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
return Plugin;
|
|
318
|
-
}();
|
|
319
|
-
|
|
320
|
-
Plugin.version = "#3.4.1#";
|
|
258
|
+
/**
|
|
259
|
+
* Lifecycle hook for 'beforeInit' phase.
|
|
260
|
+
* @private
|
|
261
|
+
*/
|
|
262
|
+
Plugin.prototype.$beforeInit = function () { };
|
|
263
|
+
/**
|
|
264
|
+
* Lifecycle hook for 'init' phase.
|
|
265
|
+
* @private
|
|
266
|
+
*/
|
|
267
|
+
Plugin.prototype.$init = function () { };
|
|
268
|
+
/**
|
|
269
|
+
* Lifecycle hook for 'afterInit' phase.
|
|
270
|
+
* @private
|
|
271
|
+
*/
|
|
272
|
+
Plugin.prototype.$afterInit = function () { };
|
|
273
|
+
/**
|
|
274
|
+
* Lifecycle hook for 'redraw' phase.
|
|
275
|
+
* @private
|
|
276
|
+
*/
|
|
277
|
+
Plugin.prototype.$redraw = function () { };
|
|
278
|
+
/**
|
|
279
|
+
* Lifecycle hook for 'willDestroy' phase.
|
|
280
|
+
* @private
|
|
281
|
+
*/
|
|
282
|
+
Plugin.prototype.$willDestroy = function () {
|
|
283
|
+
var _this = this;
|
|
284
|
+
Object.keys(this).forEach(function (key) {
|
|
285
|
+
_this[key] = null;
|
|
286
|
+
delete _this[key];
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
Plugin.version = "3.5.0";
|
|
290
|
+
return Plugin;
|
|
291
|
+
}());
|
|
292
|
+
var Plugin$1 = Plugin;
|
|
321
293
|
|
|
322
294
|
/**
|
|
323
295
|
* Copyright (c) 2021 ~ present NAVER Corp.
|
|
@@ -364,7 +336,8 @@ var win = (function () {
|
|
|
364
336
|
/* eslint-enable no-new-func, no-undef */
|
|
365
337
|
// fallback for non-supported environments
|
|
366
338
|
win.requestIdleCallback = win.requestIdleCallback || (function (cb) { return setTimeout(cb, 1); });
|
|
367
|
-
win.cancelIdleCallback = win.cancelIdleCallback || (
|
|
339
|
+
// win.cancelIdleCallback = win.cancelIdleCallback || (id => clearTimeout(id));
|
|
340
|
+
win.requestAnimationFrame = win.requestAnimationFrame || (function (cb) { return setTimeout(cb, 1); });
|
|
368
341
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
369
342
|
|
|
370
343
|
var isDefined = function (v) { return typeof v !== "undefined"; };
|
|
@@ -589,13 +562,21 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
589
562
|
config.legend_show = false;
|
|
590
563
|
config.resize_auto = false;
|
|
591
564
|
config.axis_x_show = false;
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
565
|
+
// set default axes padding
|
|
566
|
+
if (config.padding !== false) {
|
|
567
|
+
var hasOption = function (o) { return Object.keys(o || {}).length > 0; };
|
|
568
|
+
if (hasOption(config.axis_x_padding)) {
|
|
569
|
+
config.axis_x_padding = {
|
|
570
|
+
left: 15,
|
|
571
|
+
right: 15,
|
|
572
|
+
unit: "px"
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
if (hasOption(config.axis_y_padding)) {
|
|
576
|
+
config.axis_y_padding = 5;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
597
579
|
config.axis_y_show = false;
|
|
598
|
-
config.axis_y_padding = 5;
|
|
599
580
|
if (!config.tooltip_position) {
|
|
600
581
|
config.tooltip_position = function (data, width, height) {
|
|
601
582
|
var event = this.internal.state.event;
|
|
@@ -612,14 +593,14 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
612
593
|
}
|
|
613
594
|
};
|
|
614
595
|
Sparkline.prototype.$init = function () {
|
|
615
|
-
var
|
|
616
|
-
var $el =
|
|
596
|
+
var _a;
|
|
597
|
+
var $el = this.$$.$el;
|
|
617
598
|
// make disable-ish main chart element
|
|
618
599
|
$el.chart
|
|
619
600
|
.style("width", "0")
|
|
620
601
|
.style("height", "0")
|
|
621
602
|
.style("pointer-events", "none");
|
|
622
|
-
document.body.appendChild($el.tooltip.node());
|
|
603
|
+
((_a = $el.tooltip) === null || _a === void 0 ? void 0 : _a.node()) && document.body.appendChild($el.tooltip.node());
|
|
623
604
|
};
|
|
624
605
|
Sparkline.prototype.$afterInit = function () {
|
|
625
606
|
var $$ = this.$$;
|
|
@@ -636,7 +617,8 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
636
617
|
Sparkline.prototype.bindEvents = function (bind) {
|
|
637
618
|
var _this = this;
|
|
638
619
|
if (bind === void 0) { bind = true; }
|
|
639
|
-
|
|
620
|
+
var config = this.$$.config;
|
|
621
|
+
if (config.interaction_enabled && config.tooltip_show) {
|
|
640
622
|
var method_1 = "".concat(bind ? "add" : "remove", "EventListener");
|
|
641
623
|
this.element
|
|
642
624
|
.forEach(function (el) {
|
|
@@ -716,6 +698,6 @@ var Sparkline = /** @class */ (function (_super) {
|
|
|
716
698
|
};
|
|
717
699
|
Sparkline.version = "0.0.1";
|
|
718
700
|
return Sparkline;
|
|
719
|
-
}(Plugin));
|
|
701
|
+
}(Plugin$1));
|
|
720
702
|
|
|
721
703
|
export { Sparkline as default };
|
|
@@ -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.5.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ import { scaleSequential, scaleLog, scaleSequentialLog } from 'd3-scale';
|
|
|
15
15
|
import { axisRight } from 'd3-axis';
|
|
16
16
|
import { format } from 'd3-format';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
/******************************************************************************
|
|
19
19
|
Copyright (c) Microsoft Corporation.
|
|
20
20
|
|
|
21
21
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -247,7 +247,8 @@ var win = (function () {
|
|
|
247
247
|
/* eslint-enable no-new-func, no-undef */
|
|
248
248
|
// fallback for non-supported environments
|
|
249
249
|
win.requestIdleCallback = win.requestIdleCallback || (function (cb) { return setTimeout(cb, 1); });
|
|
250
|
-
win.cancelIdleCallback = win.cancelIdleCallback || (
|
|
250
|
+
// win.cancelIdleCallback = win.cancelIdleCallback || (id => clearTimeout(id));
|
|
251
|
+
win.requestAnimationFrame = win.requestAnimationFrame || (function (cb) { return setTimeout(cb, 1); });
|
|
251
252
|
var doc = win === null || win === void 0 ? void 0 : win.document;
|
|
252
253
|
|
|
253
254
|
var isFunction = function (v) { return typeof v === "function"; };
|
|
@@ -435,12 +436,10 @@ function loadConfig(config) {
|
|
|
435
436
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
436
437
|
* billboard.js project is licensed under the MIT license
|
|
437
438
|
*/
|
|
438
|
-
|
|
439
439
|
/**
|
|
440
440
|
* Base class to generate billboard.js plugin
|
|
441
441
|
* @class Plugin
|
|
442
442
|
*/
|
|
443
|
-
|
|
444
443
|
/**
|
|
445
444
|
* Version info string for plugin
|
|
446
445
|
* @name version
|
|
@@ -450,77 +449,51 @@ function loadConfig(config) {
|
|
|
450
449
|
* @example
|
|
451
450
|
* bb.plugin.stanford.version; // ex) 1.9.0
|
|
452
451
|
*/
|
|
453
|
-
var Plugin =
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
*/
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* Constructor
|
|
466
|
-
* @param {Any} options config option object
|
|
467
|
-
* @private
|
|
468
|
-
*/
|
|
469
|
-
function Plugin(options) {
|
|
470
|
-
if (options === void 0) {
|
|
471
|
-
options = {};
|
|
452
|
+
var Plugin = /** @class */ (function () {
|
|
453
|
+
/**
|
|
454
|
+
* Constructor
|
|
455
|
+
* @param {Any} options config option object
|
|
456
|
+
* @private
|
|
457
|
+
*/
|
|
458
|
+
function Plugin(options) {
|
|
459
|
+
if (options === void 0) { options = {}; }
|
|
460
|
+
this.options = options;
|
|
472
461
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
*/
|
|
509
|
-
;
|
|
510
|
-
|
|
511
|
-
_proto.$willDestroy = function $willDestroy() {
|
|
512
|
-
var _this = this;
|
|
513
|
-
|
|
514
|
-
Object.keys(this).forEach(function (key) {
|
|
515
|
-
_this[key] = null;
|
|
516
|
-
delete _this[key];
|
|
517
|
-
});
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
return Plugin;
|
|
521
|
-
}();
|
|
522
|
-
|
|
523
|
-
Plugin.version = "#3.4.1#";
|
|
462
|
+
/**
|
|
463
|
+
* Lifecycle hook for 'beforeInit' phase.
|
|
464
|
+
* @private
|
|
465
|
+
*/
|
|
466
|
+
Plugin.prototype.$beforeInit = function () { };
|
|
467
|
+
/**
|
|
468
|
+
* Lifecycle hook for 'init' phase.
|
|
469
|
+
* @private
|
|
470
|
+
*/
|
|
471
|
+
Plugin.prototype.$init = function () { };
|
|
472
|
+
/**
|
|
473
|
+
* Lifecycle hook for 'afterInit' phase.
|
|
474
|
+
* @private
|
|
475
|
+
*/
|
|
476
|
+
Plugin.prototype.$afterInit = function () { };
|
|
477
|
+
/**
|
|
478
|
+
* Lifecycle hook for 'redraw' phase.
|
|
479
|
+
* @private
|
|
480
|
+
*/
|
|
481
|
+
Plugin.prototype.$redraw = function () { };
|
|
482
|
+
/**
|
|
483
|
+
* Lifecycle hook for 'willDestroy' phase.
|
|
484
|
+
* @private
|
|
485
|
+
*/
|
|
486
|
+
Plugin.prototype.$willDestroy = function () {
|
|
487
|
+
var _this = this;
|
|
488
|
+
Object.keys(this).forEach(function (key) {
|
|
489
|
+
_this[key] = null;
|
|
490
|
+
delete _this[key];
|
|
491
|
+
});
|
|
492
|
+
};
|
|
493
|
+
Plugin.version = "3.5.0";
|
|
494
|
+
return Plugin;
|
|
495
|
+
}());
|
|
496
|
+
var Plugin$1 = Plugin;
|
|
524
497
|
|
|
525
498
|
/**
|
|
526
499
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -1174,9 +1147,11 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1174
1147
|
var config = this.$$.config;
|
|
1175
1148
|
if (isEmpty(config.tooltip_contents)) {
|
|
1176
1149
|
config.tooltip_contents = function (d, defaultTitleFormat, defaultValueFormat, color) {
|
|
1150
|
+
var data_x = config.data_x;
|
|
1177
1151
|
var html = "<table class=\"".concat($TOOLTIP.tooltip, "\"><tbody>");
|
|
1178
1152
|
d.forEach(function (v) {
|
|
1179
|
-
|
|
1153
|
+
var _a = v.id, id = _a === void 0 ? "" : _a, _b = v.value, value = _b === void 0 ? 0 : _b, _c = v.epochs, epochs = _c === void 0 ? 0 : _c, _d = v.x, x = _d === void 0 ? "" : _d;
|
|
1154
|
+
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>");
|
|
1180
1155
|
});
|
|
1181
1156
|
return "".concat(html, "</tbody></table>");
|
|
1182
1157
|
};
|
|
@@ -1200,6 +1175,6 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1200
1175
|
};
|
|
1201
1176
|
};
|
|
1202
1177
|
return Stanford;
|
|
1203
|
-
}(Plugin));
|
|
1178
|
+
}(Plugin$1));
|
|
1204
1179
|
|
|
1205
1180
|
export { Stanford as default };
|