billboard.js 3.3.0-next.2 → 3.3.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/dist/billboard.css +1 -1
- package/dist/billboard.js +38 -10
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +39 -11
- package/dist/billboard.pkgd.min.js +3 -3
- 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.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2 -2
- 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 +45 -10
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +19 -19
- package/src/Chart/api/chart.ts +7 -1
- package/src/ChartInternal/ChartInternal.ts +3 -1
- package/src/ChartInternal/interactions/interaction.ts +36 -4
- package/src/ChartInternal/internals/tooltip.ts +0 -1
- package/types/axis.d.ts +4 -4
- package/types/chart.d.ts +1 -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.3.0
|
|
8
|
+
* @version 3.3.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -467,7 +467,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
467
467
|
return Plugin;
|
|
468
468
|
}();
|
|
469
469
|
|
|
470
|
-
Plugin.version = "#3.3.0
|
|
470
|
+
Plugin.version = "#3.3.0#";
|
|
471
471
|
|
|
472
472
|
/**
|
|
473
473
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.3.0
|
|
8
|
+
* @version 3.3.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -170,7 +170,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
170
170
|
return Plugin;
|
|
171
171
|
}();
|
|
172
172
|
|
|
173
|
-
Plugin.version = "#3.3.0
|
|
173
|
+
Plugin.version = "#3.3.0#";
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* Copyright (c) 2021 ~ present NAVER Corp.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.3.0
|
|
8
|
+
* @version 3.3.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -300,7 +300,7 @@ var Plugin = /*#__PURE__*/function () {
|
|
|
300
300
|
return Plugin;
|
|
301
301
|
}();
|
|
302
302
|
|
|
303
|
-
Plugin.version = "#3.3.0
|
|
303
|
+
Plugin.version = "#3.3.0#";
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
306
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.3.0
|
|
3
|
+
"version": "3.3.0",
|
|
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",
|
|
@@ -89,24 +89,24 @@
|
|
|
89
89
|
"d3-interpolate": "^3.0.1",
|
|
90
90
|
"d3-scale": "^4.0.2",
|
|
91
91
|
"d3-selection": "^3.0.0",
|
|
92
|
-
"d3-shape": "^3.0
|
|
92
|
+
"d3-shape": "^3.1.0",
|
|
93
93
|
"d3-time-format": "^4.1.0",
|
|
94
94
|
"d3-transition": "^3.0.1",
|
|
95
95
|
"d3-zoom": "^3.0.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@babel/core": "^7.16.
|
|
98
|
+
"@babel/core": "^7.16.7",
|
|
99
99
|
"@babel/eslint-parser": "^7.16.5",
|
|
100
|
-
"@babel/plugin-proposal-class-properties": "^7.16.
|
|
101
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.16.
|
|
102
|
-
"@babel/plugin-transform-runtime": "^7.16.
|
|
103
|
-
"@babel/preset-env": "^7.16.
|
|
104
|
-
"@babel/preset-typescript": "^7.16.
|
|
105
|
-
"@babel/runtime": "^7.16.
|
|
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.16.8",
|
|
103
|
+
"@babel/preset-env": "^7.16.8",
|
|
104
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
105
|
+
"@babel/runtime": "^7.16.7",
|
|
106
106
|
"@commitlint/cli": "^15.0.0",
|
|
107
107
|
"@commitlint/config-conventional": "^16.0.0",
|
|
108
108
|
"@rollup/plugin-babel": "^5.3.0",
|
|
109
|
-
"@rollup/plugin-node-resolve": "^13.1.
|
|
109
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
110
110
|
"@rollup/plugin-replace": "^3.0.1",
|
|
111
111
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
112
112
|
"@semantic-release/changelog": "^6.0.1",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"@types/d3": "^7.1.0",
|
|
120
120
|
"@types/mocha": "^9.0.0",
|
|
121
121
|
"@types/sinon": "^10.0.6",
|
|
122
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
123
|
-
"@typescript-eslint/parser": "^5.
|
|
122
|
+
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
|
123
|
+
"@typescript-eslint/parser": "^5.9.1",
|
|
124
124
|
"babel-helper-modules": "^6.0.0",
|
|
125
125
|
"babel-loader": "^8.2.3",
|
|
126
126
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"chai": "^4.3.4",
|
|
137
137
|
"clean-webpack-plugin": "^4.0.0",
|
|
138
138
|
"cloc": "^2.9.0",
|
|
139
|
-
"core-js": "^3.20.
|
|
139
|
+
"core-js": "^3.20.2",
|
|
140
140
|
"coveralls": "^3.1.1",
|
|
141
141
|
"cross-env": "^7.0.3",
|
|
142
142
|
"css-loader": "^6.5.1",
|
|
@@ -147,10 +147,10 @@
|
|
|
147
147
|
"d3-polygon": "^3.0.1",
|
|
148
148
|
"docdash": "^1.2.0",
|
|
149
149
|
"dtslint": "^4.2.1",
|
|
150
|
-
"eslint": "^8.
|
|
150
|
+
"eslint": "^8.6.0",
|
|
151
151
|
"eslint-config-naver": "^2.1.0",
|
|
152
|
-
"eslint-plugin-import": "^2.25.
|
|
153
|
-
"eslint-plugin-jsdoc": "^37.
|
|
152
|
+
"eslint-plugin-import": "^2.25.4",
|
|
153
|
+
"eslint-plugin-jsdoc": "^37.6.1",
|
|
154
154
|
"eslint-webpack-plugin": "^3.1.1",
|
|
155
155
|
"exports-loader": "^3.1.0",
|
|
156
156
|
"hammer-simulator": "0.0.1",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"istanbul-instrumenter-loader": "^3.0.1",
|
|
159
159
|
"istanbul-lib-instrument": "^5.1.0",
|
|
160
160
|
"jsdoc": "^3.6.7",
|
|
161
|
-
"karma": "^6.3.
|
|
161
|
+
"karma": "^6.3.10",
|
|
162
162
|
"karma-chai": "^0.1.0",
|
|
163
163
|
"karma-chrome-launcher": "^3.1.0",
|
|
164
164
|
"karma-coverage-istanbul-reporter": "^3.0.3",
|
|
@@ -169,11 +169,11 @@
|
|
|
169
169
|
"karma-sourcemap-loader": "^0.3.8",
|
|
170
170
|
"karma-webpack": "^5.0.0",
|
|
171
171
|
"lite-fixture": "^1.0.2",
|
|
172
|
-
"mini-css-extract-plugin": "^2.4.
|
|
172
|
+
"mini-css-extract-plugin": "^2.4.6",
|
|
173
173
|
"mocha": "^9.1.3",
|
|
174
174
|
"node-sass": "^7.0.1",
|
|
175
175
|
"regenerator-runtime": "^0.13.7",
|
|
176
|
-
"rollup": "^2.
|
|
176
|
+
"rollup": "^2.63.0",
|
|
177
177
|
"rollup-plugin-delete": "^2.0.0",
|
|
178
178
|
"sass-loader": "^12.4.0",
|
|
179
179
|
"semantic-release": "^18.0.1",
|
package/src/Chart/api/chart.ts
CHANGED
|
@@ -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 => {
|
|
@@ -210,7 +210,9 @@ export default class ChartInternal {
|
|
|
210
210
|
$el.chart = d3Select(document.body.appendChild(document.createElement("div")));
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
$el.chart.html("")
|
|
213
|
+
$el.chart.html("")
|
|
214
|
+
.classed(bindto.classname, true)
|
|
215
|
+
.style("position", "relative");
|
|
214
216
|
|
|
215
217
|
$$.initToRender();
|
|
216
218
|
}
|
|
@@ -254,10 +254,42 @@ export default {
|
|
|
254
254
|
const $$ = this;
|
|
255
255
|
const {$el: {eventRect, zoomResetBtn}} = $$;
|
|
256
256
|
|
|
257
|
-
eventRect
|
|
258
|
-
.on(".zoom", null)
|
|
259
|
-
.on(".drag", null);
|
|
257
|
+
eventRect?.on(".zoom wheel.zoom .drag", null);
|
|
260
258
|
|
|
261
|
-
zoomResetBtn?.
|
|
259
|
+
zoomResetBtn?.on("click", null)
|
|
260
|
+
.style("display", "none");
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Unbind all attached events
|
|
265
|
+
* @private
|
|
266
|
+
*/
|
|
267
|
+
unbindAllEvents(): void {
|
|
268
|
+
const $$ = this;
|
|
269
|
+
const {$el: {arcs, eventRect, legend, region, svg}, brush} = $$;
|
|
270
|
+
const list = [
|
|
271
|
+
"wheel",
|
|
272
|
+
"click",
|
|
273
|
+
"mouseover",
|
|
274
|
+
"mousemove",
|
|
275
|
+
"mouseout",
|
|
276
|
+
"touchstart",
|
|
277
|
+
"touchmove",
|
|
278
|
+
"touchend",
|
|
279
|
+
"touchstart.eventRect",
|
|
280
|
+
"touchmove.eventRect",
|
|
281
|
+
"touchend.eventRect",
|
|
282
|
+
".brush",
|
|
283
|
+
".drag",
|
|
284
|
+
".zoom",
|
|
285
|
+
"wheel.zoom",
|
|
286
|
+
"dblclick.zoom"
|
|
287
|
+
].join(" ");
|
|
288
|
+
|
|
289
|
+
// detach all possible event types
|
|
290
|
+
[svg, eventRect, region?.list, brush?.getSelection(), arcs?.selectAll("path"), legend?.selectAll("g")]
|
|
291
|
+
.forEach(v => v?.on(list, null));
|
|
292
|
+
|
|
293
|
+
$$.unbindZoomEvent?.();
|
|
262
294
|
}
|
|
263
295
|
};
|
package/types/axis.d.ts
CHANGED
|
@@ -94,10 +94,10 @@ export interface xAxisConfiguration extends AxisConfigurationBase {
|
|
|
94
94
|
* Set default extent for subchart and zoom.
|
|
95
95
|
* This can be an array or function that returns an array.
|
|
96
96
|
*/
|
|
97
|
-
extent?: number
|
|
97
|
+
extent?: Array<number|string> | (
|
|
98
98
|
(
|
|
99
99
|
this: Chart,
|
|
100
|
-
domain: Date|string|number
|
|
100
|
+
domain: Array<Date|string|number>,
|
|
101
101
|
scale: (value: any) => number
|
|
102
102
|
) => number[]
|
|
103
103
|
);
|
|
@@ -233,7 +233,7 @@ export interface XTickConfiguration {
|
|
|
233
233
|
* If this option is provided, the position of the ticks will be determined based on those values.
|
|
234
234
|
* This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option.
|
|
235
235
|
*/
|
|
236
|
-
values?: number
|
|
236
|
+
values?: Array<number|string> | ((this: Chart) => number[]);
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
239
|
* Rotate x axis tick text.
|
|
@@ -414,6 +414,6 @@ export interface AxesConfiguration {
|
|
|
414
414
|
/**
|
|
415
415
|
* Set tick values manually
|
|
416
416
|
*/
|
|
417
|
-
values?: number|string|Date
|
|
417
|
+
values?: Array<number|string|Date>;
|
|
418
418
|
};
|
|
419
419
|
}
|
package/types/chart.d.ts
CHANGED
|
@@ -347,7 +347,7 @@ export interface Chart {
|
|
|
347
347
|
load(this: Chart, args: {
|
|
348
348
|
append?: boolean;
|
|
349
349
|
url?: string;
|
|
350
|
-
json?: [{ [key: string]: string | number }] | {[key: string]: string
|
|
350
|
+
json?: [{ [key: string]: string | number }] | {[key: string]: Array<string|number>};
|
|
351
351
|
rows?: PrimitiveArray[];
|
|
352
352
|
columns?: PrimitiveArray[];
|
|
353
353
|
data?: Array<{ [key: string]: number }>;
|