billboard.js 3.3.0-next.1 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +644 -427
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2809 -2331
- package/dist/billboard.pkgd.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
- 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.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-sparkline.js +156 -103
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-stanford.js +154 -101
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-tableview.js +20 -128
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
- package/dist/plugin/billboardjs-plugin-textoverlap.js +20 -128
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2166 -1905
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2325 -2011
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2320 -2006
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2186 -2033
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2187 -2034
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +642 -440
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
- package/dist-esm/plugin/billboardjs-plugin-sparkline.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +131 -79
- package/dist-esm/plugin/billboardjs-plugin-stanford.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
- package/dist-esm/plugin/billboardjs-plugin-tableview.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
- package/package.json +39 -38
- package/src/Chart/api/chart.ts +8 -2
- package/src/Chart/api/data.ts +3 -4
- package/src/Chart/api/focus.ts +8 -8
- package/src/Chart/api/regions.ts +3 -3
- package/src/Chart/api/selection.ts +15 -15
- package/src/Chart/api/subchart.ts +10 -10
- package/src/ChartInternal/Axis/Axis.ts +26 -19
- package/src/ChartInternal/ChartInternal.ts +8 -7
- package/src/ChartInternal/data/IData.ts +9 -0
- package/src/ChartInternal/data/data.ts +4 -4
- package/src/ChartInternal/data/load.ts +2 -2
- package/src/ChartInternal/interactions/drag.ts +15 -15
- package/src/ChartInternal/interactions/eventrect.ts +18 -18
- package/src/ChartInternal/interactions/interaction.ts +46 -14
- package/src/ChartInternal/interactions/zoom.ts +4 -4
- package/src/ChartInternal/internals/color.ts +4 -4
- package/src/ChartInternal/internals/domain.ts +1 -1
- package/src/ChartInternal/internals/format.ts +9 -4
- package/src/ChartInternal/internals/grid.ts +32 -32
- package/src/ChartInternal/internals/legend.ts +27 -27
- package/src/ChartInternal/internals/redraw.ts +6 -5
- package/src/ChartInternal/internals/region.ts +3 -3
- package/src/ChartInternal/internals/selection.ts +16 -15
- package/src/ChartInternal/internals/size.ts +3 -3
- package/src/ChartInternal/internals/text.ts +8 -8
- package/src/ChartInternal/internals/title.ts +4 -4
- package/src/ChartInternal/internals/tooltip.ts +5 -6
- package/src/ChartInternal/internals/transform.ts +5 -5
- package/src/ChartInternal/shape/arc.ts +24 -22
- package/src/ChartInternal/shape/area.ts +4 -4
- package/src/ChartInternal/shape/bar.ts +11 -9
- package/src/ChartInternal/shape/candlestick.ts +8 -8
- package/src/ChartInternal/shape/gauge.ts +8 -8
- package/src/ChartInternal/shape/line.ts +7 -7
- package/src/ChartInternal/shape/point.ts +18 -18
- package/src/ChartInternal/shape/radar.ts +12 -10
- package/src/ChartInternal/shape/shape.ts +43 -11
- package/src/Plugin/sparkline/index.ts +4 -4
- package/src/Plugin/stanford/index.ts +3 -3
- package/src/Plugin/stanford/util.ts +0 -1
- package/src/config/Options/axis/x.ts +25 -5
- package/src/config/Options/axis/y.ts +24 -3
- package/src/config/Options/axis/y2.ts +24 -3
- package/src/config/Options/common/tooltip.ts +10 -1
- package/src/config/Options/shape/bar.ts +8 -0
- package/src/config/classes.ts +154 -66
- package/src/module/util.ts +17 -11
- package/types/axis.d.ts +22 -8
- package/types/chart.d.ts +1 -1
- package/types/options.d.ts +32 -32
- package/types/plugin/tableview/index.d.ts +3 -3
- package/types/plugin/tableview/options.d.ts +1 -1
|
@@ -5,15 +5,13 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.3.
|
|
8
|
+
* @version 3.3.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
12
|
import { interpolateHslLong } from 'd3-interpolate';
|
|
13
13
|
import { hsl } from 'd3-color';
|
|
14
14
|
import { scaleSequential, scaleLog, scaleSequentialLog } from 'd3-scale';
|
|
15
|
-
import 'd3-selection';
|
|
16
|
-
import 'd3-brush';
|
|
17
15
|
import { axisRight } from 'd3-axis';
|
|
18
16
|
import { format } from 'd3-format';
|
|
19
17
|
|
|
@@ -58,6 +56,22 @@ function __extends(d, b) {
|
|
|
58
56
|
|
|
59
57
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
60
58
|
}
|
|
59
|
+
|
|
60
|
+
var _assign = function __assign() {
|
|
61
|
+
_assign = Object.assign || function (t) {
|
|
62
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
63
|
+
s = arguments[i];
|
|
64
|
+
|
|
65
|
+
for (var p in s) {
|
|
66
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return t;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return _assign.apply(this, arguments);
|
|
74
|
+
};
|
|
61
75
|
function __spreadArray(to, from, pack) {
|
|
62
76
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
63
77
|
if (ar || !(i in from)) {
|
|
@@ -76,111 +90,151 @@ function __spreadArray(to, from, pack) {
|
|
|
76
90
|
* CSS class names definition
|
|
77
91
|
* @private
|
|
78
92
|
*/
|
|
79
|
-
var
|
|
93
|
+
var $COMMON = {
|
|
94
|
+
button: "bb-button",
|
|
95
|
+
chart: "bb-chart",
|
|
96
|
+
empty: "bb-empty",
|
|
97
|
+
main: "bb-main",
|
|
98
|
+
target: "bb-target",
|
|
99
|
+
EXPANDED: "_expanded_"
|
|
100
|
+
};
|
|
101
|
+
var $ARC = {
|
|
80
102
|
arc: "bb-arc",
|
|
81
103
|
arcLabelLine: "bb-arc-label-line",
|
|
82
104
|
arcs: "bb-arcs",
|
|
105
|
+
chartArc: "bb-chart-arc",
|
|
106
|
+
chartArcs: "bb-chart-arcs",
|
|
107
|
+
chartArcsBackground: "bb-chart-arcs-background",
|
|
108
|
+
chartArcsTitle: "bb-chart-arcs-title"
|
|
109
|
+
};
|
|
110
|
+
var $AREA = {
|
|
83
111
|
area: "bb-area",
|
|
84
|
-
areas: "bb-areas"
|
|
112
|
+
areas: "bb-areas"
|
|
113
|
+
};
|
|
114
|
+
var $AXIS = {
|
|
85
115
|
axis: "bb-axis",
|
|
86
116
|
axisX: "bb-axis-x",
|
|
87
117
|
axisXLabel: "bb-axis-x-label",
|
|
88
118
|
axisY: "bb-axis-y",
|
|
89
119
|
axisY2: "bb-axis-y2",
|
|
90
120
|
axisY2Label: "bb-axis-y2-label",
|
|
91
|
-
axisYLabel: "bb-axis-y-label"
|
|
121
|
+
axisYLabel: "bb-axis-y-label"
|
|
122
|
+
};
|
|
123
|
+
var $BAR = {
|
|
92
124
|
bar: "bb-bar",
|
|
93
125
|
bars: "bb-bars",
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
126
|
+
chartBar: "bb-chart-bar",
|
|
127
|
+
chartBars: "bb-chart-bars"
|
|
128
|
+
};
|
|
129
|
+
var $CANDLESTICK = {
|
|
97
130
|
candlestick: "bb-candlestick",
|
|
98
131
|
candlesticks: "bb-candlesticks",
|
|
99
|
-
chart: "bb-chart",
|
|
100
|
-
chartArc: "bb-chart-arc",
|
|
101
|
-
chartArcs: "bb-chart-arcs",
|
|
102
|
-
chartArcsBackground: "bb-chart-arcs-background",
|
|
103
|
-
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
104
|
-
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
105
|
-
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
106
|
-
chartArcsTitle: "bb-chart-arcs-title",
|
|
107
|
-
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
108
|
-
chartBar: "bb-chart-bar",
|
|
109
|
-
chartBars: "bb-chart-bars",
|
|
110
132
|
chartCandlestick: "bb-chart-candlestick",
|
|
111
133
|
chartCandlesticks: "bb-chart-candlesticks",
|
|
134
|
+
valueDown: "bb-value-down",
|
|
135
|
+
valueUp: "bb-value-up"
|
|
136
|
+
};
|
|
137
|
+
var $CIRCLE = {
|
|
112
138
|
chartCircles: "bb-chart-circles",
|
|
113
|
-
chartLine: "bb-chart-line",
|
|
114
|
-
chartLines: "bb-chart-lines",
|
|
115
|
-
chartRadar: "bb-chart-radar",
|
|
116
|
-
chartRadars: "bb-chart-radars",
|
|
117
|
-
chartText: "bb-chart-text",
|
|
118
|
-
chartTexts: "bb-chart-texts",
|
|
119
139
|
circle: "bb-circle",
|
|
120
|
-
circles: "bb-circles"
|
|
140
|
+
circles: "bb-circles"
|
|
141
|
+
};
|
|
142
|
+
var $COLOR = {
|
|
121
143
|
colorPattern: "bb-color-pattern",
|
|
122
|
-
colorScale: "bb-colorscale"
|
|
123
|
-
|
|
144
|
+
colorScale: "bb-colorscale"
|
|
145
|
+
};
|
|
146
|
+
var $DRAG = {
|
|
124
147
|
dragarea: "bb-dragarea",
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
148
|
+
INCLUDED: "_included_"
|
|
149
|
+
};
|
|
150
|
+
var $GAUGE = {
|
|
151
|
+
chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
|
|
152
|
+
chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
|
|
153
|
+
chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
|
|
154
|
+
chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
|
|
155
|
+
gaugeValue: "bb-gauge-value"
|
|
156
|
+
};
|
|
157
|
+
var $LEGEND = {
|
|
134
158
|
legend: "bb-legend",
|
|
135
159
|
legendBackground: "bb-legend-background",
|
|
136
160
|
legendItem: "bb-legend-item",
|
|
137
161
|
legendItemEvent: "bb-legend-item-event",
|
|
138
|
-
legendItemFocused: "bb-legend-item-focused",
|
|
139
162
|
legendItemHidden: "bb-legend-item-hidden",
|
|
140
163
|
legendItemPoint: "bb-legend-item-point",
|
|
141
|
-
legendItemTile: "bb-legend-item-tile"
|
|
142
|
-
|
|
143
|
-
|
|
164
|
+
legendItemTile: "bb-legend-item-tile"
|
|
165
|
+
};
|
|
166
|
+
var $LINE = {
|
|
167
|
+
chartLine: "bb-chart-line",
|
|
168
|
+
chartLines: "bb-chart-lines",
|
|
144
169
|
line: "bb-line",
|
|
145
|
-
lines: "bb-lines"
|
|
146
|
-
|
|
170
|
+
lines: "bb-lines"
|
|
171
|
+
};
|
|
172
|
+
var $EVENT = {
|
|
173
|
+
eventRect: "bb-event-rect",
|
|
174
|
+
eventRects: "bb-event-rects",
|
|
175
|
+
eventRectsMultiple: "bb-event-rects-multiple",
|
|
176
|
+
eventRectsSingle: "bb-event-rects-single"
|
|
177
|
+
};
|
|
178
|
+
var $FOCUS = {
|
|
179
|
+
focused: "bb-focused",
|
|
180
|
+
defocused: "bb-defocused",
|
|
181
|
+
legendItemFocused: "bb-legend-item-focused",
|
|
182
|
+
xgridFocus: "bb-xgrid-focus",
|
|
183
|
+
ygridFocus: "bb-ygrid-focus"
|
|
184
|
+
};
|
|
185
|
+
var $GRID = {
|
|
186
|
+
grid: "bb-grid",
|
|
187
|
+
gridLines: "bb-grid-lines",
|
|
188
|
+
xgrid: "bb-xgrid",
|
|
189
|
+
xgridLine: "bb-xgrid-line",
|
|
190
|
+
xgridLines: "bb-xgrid-lines",
|
|
191
|
+
xgrids: "bb-xgrids",
|
|
192
|
+
ygrid: "bb-ygrid",
|
|
193
|
+
ygridLine: "bb-ygrid-line",
|
|
194
|
+
ygridLines: "bb-ygrid-lines",
|
|
195
|
+
ygrids: "bb-ygrids"
|
|
196
|
+
};
|
|
197
|
+
var $RADAR = {
|
|
198
|
+
chartRadar: "bb-chart-radar",
|
|
199
|
+
chartRadars: "bb-chart-radars",
|
|
200
|
+
level: "bb-level",
|
|
201
|
+
levels: "bb-levels"
|
|
202
|
+
};
|
|
203
|
+
var $REGION = {
|
|
147
204
|
region: "bb-region",
|
|
148
|
-
regions: "bb-regions"
|
|
205
|
+
regions: "bb-regions"
|
|
206
|
+
};
|
|
207
|
+
var $SELECT = {
|
|
149
208
|
selectedCircle: "bb-selected-circle",
|
|
150
209
|
selectedCircles: "bb-selected-circles",
|
|
210
|
+
SELECTED: "_selected_"
|
|
211
|
+
};
|
|
212
|
+
var $SHAPE = {
|
|
151
213
|
shape: "bb-shape",
|
|
152
|
-
shapes: "bb-shapes"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
214
|
+
shapes: "bb-shapes"
|
|
215
|
+
};
|
|
216
|
+
var $SUBCHART = {
|
|
217
|
+
brush: "bb-brush",
|
|
218
|
+
subchart: "bb-subchart"
|
|
219
|
+
};
|
|
220
|
+
var $TEXT = {
|
|
221
|
+
chartText: "bb-chart-text",
|
|
222
|
+
chartTexts: "bb-chart-texts",
|
|
160
223
|
text: "bb-text",
|
|
161
224
|
texts: "bb-texts",
|
|
162
225
|
title: "bb-title",
|
|
226
|
+
TextOverlapping: "text-overlapping"
|
|
227
|
+
};
|
|
228
|
+
var $TOOLTIP = {
|
|
163
229
|
tooltip: "bb-tooltip",
|
|
164
230
|
tooltipContainer: "bb-tooltip-container",
|
|
165
|
-
tooltipName: "bb-tooltip-name"
|
|
166
|
-
valueDown: "bb-value-down",
|
|
167
|
-
valueUp: "bb-value-up",
|
|
168
|
-
xgrid: "bb-xgrid",
|
|
169
|
-
xgridFocus: "bb-xgrid-focus",
|
|
170
|
-
xgridLine: "bb-xgrid-line",
|
|
171
|
-
xgridLines: "bb-xgrid-lines",
|
|
172
|
-
xgrids: "bb-xgrids",
|
|
173
|
-
ygrid: "bb-ygrid",
|
|
174
|
-
ygridFocus: "bb-ygrid-focus",
|
|
175
|
-
ygridLine: "bb-ygrid-line",
|
|
176
|
-
ygridLines: "bb-ygrid-lines",
|
|
177
|
-
ygrids: "bb-ygrids",
|
|
178
|
-
zoomBrush: "bb-zoom-brush",
|
|
179
|
-
EXPANDED: "_expanded_",
|
|
180
|
-
SELECTED: "_selected_",
|
|
181
|
-
INCLUDED: "_included_",
|
|
182
|
-
TextOverlapping: "text-overlapping"
|
|
231
|
+
tooltipName: "bb-tooltip-name"
|
|
183
232
|
};
|
|
233
|
+
var $ZOOM = {
|
|
234
|
+
buttonZoomReset: "bb-zoom-reset",
|
|
235
|
+
zoomBrush: "bb-zoom-brush"
|
|
236
|
+
};
|
|
237
|
+
_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign(_assign({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM);
|
|
184
238
|
|
|
185
239
|
/**
|
|
186
240
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -415,8 +469,6 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
415
469
|
if (options === void 0) {
|
|
416
470
|
options = {};
|
|
417
471
|
}
|
|
418
|
-
|
|
419
|
-
this.$$;
|
|
420
472
|
this.options = options;
|
|
421
473
|
}
|
|
422
474
|
/**
|
|
@@ -467,7 +519,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
467
519
|
return Plugin;
|
|
468
520
|
}();
|
|
469
521
|
|
|
470
|
-
Plugin.version = "#3.3.
|
|
522
|
+
Plugin.version = "#3.3.2#";
|
|
471
523
|
|
|
472
524
|
/**
|
|
473
525
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -614,6 +666,7 @@ var Options = /** @class */ (function () {
|
|
|
614
666
|
}
|
|
615
667
|
return Options;
|
|
616
668
|
}());
|
|
669
|
+
var Options$1 = Options;
|
|
617
670
|
|
|
618
671
|
/**
|
|
619
672
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -853,6 +906,7 @@ var Elements = /** @class */ (function () {
|
|
|
853
906
|
};
|
|
854
907
|
return Elements;
|
|
855
908
|
}());
|
|
909
|
+
var Elements$1 = Elements;
|
|
856
910
|
|
|
857
911
|
/**
|
|
858
912
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -938,6 +992,7 @@ var ColorScale = /** @class */ (function () {
|
|
|
938
992
|
};
|
|
939
993
|
return ColorScale;
|
|
940
994
|
}());
|
|
995
|
+
var ColorScale$1 = ColorScale;
|
|
941
996
|
|
|
942
997
|
/**
|
|
943
998
|
* Stanford diagram plugin
|
|
@@ -1028,7 +1083,7 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1028
1083
|
__extends(Stanford, _super);
|
|
1029
1084
|
function Stanford(options) {
|
|
1030
1085
|
var _this = _super.call(this, options) || this;
|
|
1031
|
-
_this.config = new Options();
|
|
1086
|
+
_this.config = new Options$1();
|
|
1032
1087
|
return _this;
|
|
1033
1088
|
}
|
|
1034
1089
|
Stanford.prototype.$beforeInit = function () {
|
|
@@ -1047,8 +1102,8 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1047
1102
|
var $$ = this.$$;
|
|
1048
1103
|
loadConfig.call(this, this.options);
|
|
1049
1104
|
$$.color = this.getStanfordPointColor.bind($$);
|
|
1050
|
-
this.colorScale = new ColorScale(this);
|
|
1051
|
-
this.elements = new Elements(this);
|
|
1105
|
+
this.colorScale = new ColorScale$1(this);
|
|
1106
|
+
this.elements = new Elements$1(this);
|
|
1052
1107
|
this.convertData();
|
|
1053
1108
|
this.initStanfordData();
|
|
1054
1109
|
this.setStanfordTooltip();
|
|
@@ -1061,7 +1116,7 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1061
1116
|
(_b = this.elements) === null || _b === void 0 ? void 0 : _b.updateStanfordElements(duration);
|
|
1062
1117
|
};
|
|
1063
1118
|
Stanford.prototype.getOptions = function () {
|
|
1064
|
-
return new Options();
|
|
1119
|
+
return new Options$1();
|
|
1065
1120
|
};
|
|
1066
1121
|
Stanford.prototype.convertData = function () {
|
|
1067
1122
|
var data = this.$$.data.targets;
|
|
@@ -1118,9 +1173,9 @@ var Stanford = /** @class */ (function (_super) {
|
|
|
1118
1173
|
var config = this.$$.config;
|
|
1119
1174
|
if (isEmpty(config.tooltip_contents)) {
|
|
1120
1175
|
config.tooltip_contents = function (d, defaultTitleFormat, defaultValueFormat, color) {
|
|
1121
|
-
var html = "<table class=\"".concat(
|
|
1176
|
+
var html = "<table class=\"".concat($TOOLTIP.tooltip, "\"><tbody>");
|
|
1122
1177
|
d.forEach(function (v) {
|
|
1123
|
-
html += "<tr>\n\t\t\t\t\t\t\t<th>".concat(defaultTitleFormat(config.data_x), "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultValueFormat(v.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(defaultTitleFormat(v.id), "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultValueFormat(v.value), "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"").concat(
|
|
1178
|
+
html += "<tr>\n\t\t\t\t\t\t\t<th>".concat(defaultTitleFormat(config.data_x), "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultValueFormat(v.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(defaultTitleFormat(v.id), "</th>\n\t\t\t\t\t\t\t<th class=\"value\">").concat(defaultValueFormat(v.value), "</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class=\"").concat($TOOLTIP.tooltipName, "-").concat(v.id, "\">\n\t\t\t\t\t\t\t<td class=\"name\"><span style=\"background-color:").concat(color(v), "\"></span>").concat(defaultTitleFormat("Epochs"), "</td>\n\t\t\t\t\t\t\t<td class=\"value\">").concat(defaultValueFormat(v.epochs), "</td>\n\t\t\t\t\t\t</tr>");
|
|
1124
1179
|
});
|
|
1125
1180
|
return "".concat(html, "</tbody></table>");
|
|
1126
1181
|
};
|
|
@@ -5,13 +5,10 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.3.
|
|
8
|
+
* @version 3.3.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
|
-
import 'd3-selection';
|
|
13
|
-
import 'd3-brush';
|
|
14
|
-
|
|
15
12
|
/*! *****************************************************************************
|
|
16
13
|
Copyright (c) Microsoft Corporation.
|
|
17
14
|
|
|
@@ -118,8 +115,6 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
118
115
|
if (options === void 0) {
|
|
119
116
|
options = {};
|
|
120
117
|
}
|
|
121
|
-
|
|
122
|
-
this.$$;
|
|
123
118
|
this.options = options;
|
|
124
119
|
}
|
|
125
120
|
/**
|
|
@@ -170,7 +165,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
170
165
|
return Plugin;
|
|
171
166
|
}();
|
|
172
167
|
|
|
173
|
-
Plugin.version = "#3.3.
|
|
168
|
+
Plugin.version = "#3.3.2#";
|
|
174
169
|
|
|
175
170
|
/**
|
|
176
171
|
* Copyright (c) 2021 ~ present NAVER Corp.
|
|
@@ -273,6 +268,7 @@ var Options = /** @class */ (function () {
|
|
|
273
268
|
}
|
|
274
269
|
return Options;
|
|
275
270
|
}());
|
|
271
|
+
var Options$1 = Options;
|
|
276
272
|
|
|
277
273
|
/**
|
|
278
274
|
* Copyright (c) 2021 ~ present NAVER Corp.
|
|
@@ -497,7 +493,7 @@ var TableView = /** @class */ (function (_super) {
|
|
|
497
493
|
__extends(TableView, _super);
|
|
498
494
|
function TableView(options) {
|
|
499
495
|
var _this = _super.call(this, options) || this;
|
|
500
|
-
_this.config = new Options();
|
|
496
|
+
_this.config = new Options$1();
|
|
501
497
|
return _this;
|
|
502
498
|
}
|
|
503
499
|
TableView.prototype.$beforeInit = function () {
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.3.
|
|
8
|
+
* @version 3.3.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
12
12
|
import { Delaunay } from 'd3-delaunay';
|
|
13
13
|
import { polygonCentroid, polygonArea } from 'd3-polygon';
|
|
14
|
-
import 'd3-selection';
|
|
15
|
-
import 'd3-brush';
|
|
16
14
|
|
|
17
15
|
/*! *****************************************************************************
|
|
18
16
|
Copyright (c) Microsoft Corporation.
|
|
@@ -248,8 +246,6 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
248
246
|
if (options === void 0) {
|
|
249
247
|
options = {};
|
|
250
248
|
}
|
|
251
|
-
|
|
252
|
-
this.$$;
|
|
253
249
|
this.options = options;
|
|
254
250
|
}
|
|
255
251
|
/**
|
|
@@ -300,7 +296,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
300
296
|
return Plugin;
|
|
301
297
|
}();
|
|
302
298
|
|
|
303
|
-
Plugin.version = "#3.3.
|
|
299
|
+
Plugin.version = "#3.3.2#";
|
|
304
300
|
|
|
305
301
|
/**
|
|
306
302
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -353,6 +349,7 @@ var Options = /** @class */ (function () {
|
|
|
353
349
|
}
|
|
354
350
|
return Options;
|
|
355
351
|
}());
|
|
352
|
+
var Options$1 = Options;
|
|
356
353
|
|
|
357
354
|
/**
|
|
358
355
|
* TextOverlap plugin<br>
|
|
@@ -401,7 +398,7 @@ var TextOverlap = /** @class */ (function (_super) {
|
|
|
401
398
|
__extends(TextOverlap, _super);
|
|
402
399
|
function TextOverlap(options) {
|
|
403
400
|
var _this = _super.call(this, options) || this;
|
|
404
|
-
_this.config = new Options();
|
|
401
|
+
_this.config = new Options$1();
|
|
405
402
|
return _this;
|
|
406
403
|
}
|
|
407
404
|
TextOverlap.prototype.$init = function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"start": "webpack serve --open",
|
|
23
23
|
"start:plugin": "cross-env PLUGIN=true webpack-dev-server --open",
|
|
24
|
-
"build": "npm run build:production && npm run build:packaged && npm run build:theme && npm run build:plugin && npm run build:esm && npm run build:cjs",
|
|
24
|
+
"build": "npm run build:production && npm run build:packaged && npm run build:theme && npm run build:plugin && npm run build:esm && npm run build:cjs && npm run build:plugin:types",
|
|
25
25
|
"build:cjs": "node ./config/cjs.js",
|
|
26
26
|
"build:esm": "rollup -c ./config/rollup/esm.js",
|
|
27
27
|
"build:production": "cross-env NODE_ENV=production webpack",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"build:theme": "cross-env NODE_ENV=theme webpack",
|
|
31
31
|
"build:production:analyzer": "cross-env ANALYZER=true npm run build:production",
|
|
32
32
|
"build:packaged:analyzer": "cross-env ANALYZER=true npm run build:packaged",
|
|
33
|
-
"build:plugin": "cross-env NODE_ENV=plugin webpack && cross-env NODE_ENV=plugin MODE=min webpack &&
|
|
33
|
+
"build:plugin": "cross-env NODE_ENV=plugin webpack && cross-env NODE_ENV=plugin MODE=min webpack && cross-env NODE_ENV=plugin MODE=pkgd webpack",
|
|
34
|
+
"build:plugin:types": "node ./config/type.d-plugin.js",
|
|
34
35
|
"release": "semantic-release",
|
|
35
36
|
"lint": "npm run lint:types && eslint src --ext .ts",
|
|
36
37
|
"lint:types": "dtslint --onlyTestTsNext types",
|
|
@@ -88,38 +89,38 @@
|
|
|
88
89
|
"d3-interpolate": "^3.0.1",
|
|
89
90
|
"d3-scale": "^4.0.2",
|
|
90
91
|
"d3-selection": "^3.0.0",
|
|
91
|
-
"d3-shape": "^3.0
|
|
92
|
+
"d3-shape": "^3.1.0",
|
|
92
93
|
"d3-time-format": "^4.1.0",
|
|
93
94
|
"d3-transition": "^3.0.1",
|
|
94
95
|
"d3-zoom": "^3.0.0"
|
|
95
96
|
},
|
|
96
97
|
"devDependencies": {
|
|
97
|
-
"@babel/core": "^7.
|
|
98
|
-
"@babel/eslint-parser": "^7.
|
|
99
|
-
"@babel/plugin-proposal-class-properties": "^7.16.
|
|
100
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.16.
|
|
101
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
102
|
-
"@babel/preset-env": "^7.16.
|
|
103
|
-
"@babel/preset-typescript": "^7.16.
|
|
104
|
-
"@babel/runtime": "^7.
|
|
98
|
+
"@babel/core": "^7.17.2",
|
|
99
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
100
|
+
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
101
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.16.7",
|
|
102
|
+
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
103
|
+
"@babel/preset-env": "^7.16.8",
|
|
104
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
105
|
+
"@babel/runtime": "^7.17.2",
|
|
105
106
|
"@commitlint/cli": "^15.0.0",
|
|
106
|
-
"@commitlint/config-conventional": "^
|
|
107
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
107
108
|
"@rollup/plugin-babel": "^5.3.0",
|
|
108
|
-
"@rollup/plugin-node-resolve": "^13.1.
|
|
109
|
-
"@rollup/plugin-replace": "^3.
|
|
109
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
110
|
+
"@rollup/plugin-replace": "^3.1.0",
|
|
110
111
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
111
112
|
"@semantic-release/changelog": "^6.0.1",
|
|
112
113
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
113
|
-
"@semantic-release/exec": "^6.0.
|
|
114
|
+
"@semantic-release/exec": "^6.0.3",
|
|
114
115
|
"@semantic-release/git": "^10.0.1",
|
|
115
|
-
"@semantic-release/npm": "^
|
|
116
|
+
"@semantic-release/npm": "^9.0.0",
|
|
116
117
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
117
118
|
"@types/chai": "^4.3.0",
|
|
118
119
|
"@types/d3": "^7.1.0",
|
|
119
120
|
"@types/mocha": "^9.0.0",
|
|
120
|
-
"@types/sinon": "^10.0.
|
|
121
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
122
|
-
"@typescript-eslint/parser": "^5.
|
|
121
|
+
"@types/sinon": "^10.0.11",
|
|
122
|
+
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
|
123
|
+
"@typescript-eslint/parser": "^5.11.0",
|
|
123
124
|
"babel-helper-modules": "^6.0.0",
|
|
124
125
|
"babel-loader": "^8.2.3",
|
|
125
126
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
@@ -131,33 +132,33 @@
|
|
|
131
132
|
"babel-plugin-transform-inline-consecutive-adds": "^0.4.3",
|
|
132
133
|
"babel-plugin-transform-merge-sibling-variables": "^6.9.4",
|
|
133
134
|
"babel-plugin-transform-minify-booleans": "^6.9.4",
|
|
134
|
-
"better-docs": "^2.
|
|
135
|
+
"better-docs": "^2.7.2",
|
|
135
136
|
"chai": "^4.3.4",
|
|
136
137
|
"clean-webpack-plugin": "^4.0.0",
|
|
137
138
|
"cloc": "^2.9.0",
|
|
138
|
-
"core-js": "^3.
|
|
139
|
+
"core-js": "^3.21.0",
|
|
139
140
|
"coveralls": "^3.1.1",
|
|
140
141
|
"cross-env": "^7.0.3",
|
|
141
|
-
"css-loader": "^6.
|
|
142
|
-
"css-minimizer-webpack-plugin": "^3.
|
|
142
|
+
"css-loader": "^6.6.0",
|
|
143
|
+
"css-minimizer-webpack-plugin": "^3.3.1",
|
|
143
144
|
"d3-color": "^3.0.1",
|
|
144
145
|
"d3-delaunay": "^6.0.2",
|
|
145
146
|
"d3-format": "^3.1.0",
|
|
146
147
|
"d3-polygon": "^3.0.1",
|
|
147
148
|
"docdash": "^1.2.0",
|
|
148
149
|
"dtslint": "^4.2.1",
|
|
149
|
-
"eslint": "^8.
|
|
150
|
+
"eslint": "^8.9.0",
|
|
150
151
|
"eslint-config-naver": "^2.1.0",
|
|
151
|
-
"eslint-plugin-import": "^2.25.
|
|
152
|
-
"eslint-plugin-jsdoc": "^37.
|
|
152
|
+
"eslint-plugin-import": "^2.25.4",
|
|
153
|
+
"eslint-plugin-jsdoc": "^37.9.1",
|
|
153
154
|
"eslint-webpack-plugin": "^3.1.1",
|
|
154
155
|
"exports-loader": "^3.1.0",
|
|
155
156
|
"hammer-simulator": "0.0.1",
|
|
156
157
|
"husky": "^7.0.4",
|
|
157
158
|
"istanbul-instrumenter-loader": "^3.0.1",
|
|
158
159
|
"istanbul-lib-instrument": "^5.1.0",
|
|
159
|
-
"jsdoc": "^3.6.
|
|
160
|
-
"karma": "^6.3.
|
|
160
|
+
"jsdoc": "^3.6.10",
|
|
161
|
+
"karma": "^6.3.16",
|
|
161
162
|
"karma-chai": "^0.1.0",
|
|
162
163
|
"karma-chrome-launcher": "^3.1.0",
|
|
163
164
|
"karma-coverage-istanbul-reporter": "^3.0.3",
|
|
@@ -168,27 +169,27 @@
|
|
|
168
169
|
"karma-sourcemap-loader": "^0.3.8",
|
|
169
170
|
"karma-webpack": "^5.0.0",
|
|
170
171
|
"lite-fixture": "^1.0.2",
|
|
171
|
-
"mini-css-extract-plugin": "^2.
|
|
172
|
-
"mocha": "^9.1.
|
|
173
|
-
"node-sass": "^
|
|
172
|
+
"mini-css-extract-plugin": "^2.5.2",
|
|
173
|
+
"mocha": "^9.1.4",
|
|
174
|
+
"node-sass": "^7.0.1",
|
|
174
175
|
"regenerator-runtime": "^0.13.7",
|
|
175
|
-
"rollup": "^2.
|
|
176
|
+
"rollup": "^2.67.2",
|
|
176
177
|
"rollup-plugin-delete": "^2.0.0",
|
|
177
178
|
"sass-loader": "^12.4.0",
|
|
178
|
-
"semantic-release": "^
|
|
179
|
+
"semantic-release": "^19.0.2",
|
|
179
180
|
"simulant": "^0.2.2",
|
|
180
|
-
"sinon": "^
|
|
181
|
+
"sinon": "^13.0.1",
|
|
181
182
|
"string-replace-loader": "^3.1.0",
|
|
182
183
|
"style-loader": "^3.3.1",
|
|
183
|
-
"terser-webpack-plugin": "^5.
|
|
184
|
+
"terser-webpack-plugin": "^5.3.1",
|
|
184
185
|
"tslib": "^2.3.1",
|
|
185
186
|
"typescript": "^4.5.4",
|
|
186
|
-
"webpack": "^5.
|
|
187
|
+
"webpack": "^5.68.0",
|
|
187
188
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
188
189
|
"webpack-clean": "^1.2.5",
|
|
189
190
|
"webpack-cli": "^4.9.1",
|
|
190
191
|
"webpack-common-shake": "^2.1.0",
|
|
191
|
-
"webpack-dev-server": "^4.
|
|
192
|
+
"webpack-dev-server": "^4.7.4",
|
|
192
193
|
"webpack-merge": "^5.8.0",
|
|
193
194
|
"webpackbar": "^5.0.2",
|
|
194
195
|
"write-file-webpack-plugin": "^4.5.1"
|
package/src/Chart/api/chart.ts
CHANGED
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
|
|
32
32
|
state.resizing = true;
|
|
33
33
|
|
|
34
|
-
this.flush(false
|
|
34
|
+
this.flush(false);
|
|
35
35
|
$$.resizeFunction();
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -106,12 +106,18 @@ export default {
|
|
|
106
106
|
$$.callPluginHook("$willDestroy");
|
|
107
107
|
$$.charts.splice($$.charts.indexOf(this), 1);
|
|
108
108
|
|
|
109
|
+
// detach events
|
|
110
|
+
$$.unbindAllEvents();
|
|
111
|
+
|
|
109
112
|
// clear timers && pending transition
|
|
110
113
|
svg.select("*").interrupt();
|
|
111
114
|
$$.resizeFunction.clear();
|
|
112
115
|
|
|
113
116
|
window.removeEventListener("resize", $$.resizeFunction);
|
|
114
|
-
chart.classed("bb", false)
|
|
117
|
+
chart.classed("bb", false)
|
|
118
|
+
.style("position", null)
|
|
119
|
+
.selectChildren()
|
|
120
|
+
.remove();
|
|
115
121
|
|
|
116
122
|
// releasing own references
|
|
117
123
|
Object.keys(this).forEach(key => {
|