billboard.js 3.6.3 → 3.7.0-next.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.
Files changed (91) hide show
  1. package/dist/billboard.css +6 -1
  2. package/dist/billboard.js +1704 -843
  3. package/dist/billboard.min.css +2 -2
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +3819 -2263
  6. package/dist/billboard.pkgd.min.js +6 -3
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +62 -23
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +62 -23
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +48 -14
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +48 -14
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +1087 -1031
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +1171 -1112
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +1222 -1169
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +1159 -1105
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +1365 -1319
  22. package/dist/theme/datalab.css +6 -1
  23. package/dist/theme/datalab.min.css +2 -2
  24. package/dist/theme/graph.css +6 -1
  25. package/dist/theme/graph.min.css +2 -2
  26. package/dist/theme/insight.css +6 -1
  27. package/dist/theme/insight.min.css +2 -2
  28. package/dist-esm/billboard.js +942 -277
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -5
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +10 -9
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +10 -9
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -5
  34. package/package.json +44 -38
  35. package/src/Chart/api/chart.ts +13 -4
  36. package/src/Chart/api/export.ts +159 -14
  37. package/src/Chart/api/legend.ts +1 -0
  38. package/src/Chart/api/load.ts +1 -0
  39. package/src/Chart/api/tooltip.ts +11 -2
  40. package/src/ChartInternal/Axis/Axis.ts +1 -1
  41. package/src/ChartInternal/ChartInternal.ts +35 -25
  42. package/src/ChartInternal/data/IData.ts +9 -0
  43. package/src/ChartInternal/data/convert.helper.ts +35 -21
  44. package/src/ChartInternal/data/data.ts +26 -5
  45. package/src/ChartInternal/data/load.ts +3 -0
  46. package/src/ChartInternal/interactions/interaction.ts +42 -33
  47. package/src/ChartInternal/internals/class.ts +3 -4
  48. package/src/ChartInternal/internals/clip.ts +13 -10
  49. package/src/ChartInternal/internals/domain.ts +11 -4
  50. package/src/ChartInternal/internals/format.ts +1 -1
  51. package/src/ChartInternal/internals/grid.ts +1 -1
  52. package/src/ChartInternal/internals/legend.ts +3 -2
  53. package/src/ChartInternal/internals/redraw.ts +12 -5
  54. package/src/ChartInternal/internals/scale.ts +7 -2
  55. package/src/ChartInternal/internals/size.ts +41 -26
  56. package/src/ChartInternal/internals/text.ts +60 -32
  57. package/src/ChartInternal/internals/tooltip.ts +12 -8
  58. package/src/ChartInternal/internals/transform.ts +2 -2
  59. package/src/ChartInternal/internals/type.ts +6 -1
  60. package/src/ChartInternal/shape/arc.ts +145 -68
  61. package/src/ChartInternal/shape/area.ts +3 -0
  62. package/src/ChartInternal/shape/bar.ts +4 -1
  63. package/src/ChartInternal/shape/line.ts +12 -15
  64. package/src/ChartInternal/shape/radar.ts +2 -2
  65. package/src/ChartInternal/shape/shape.ts +10 -5
  66. package/src/ChartInternal/shape/treemap.ts +293 -0
  67. package/src/config/Options/common/tooltip.ts +11 -8
  68. package/src/config/Options/data/data.ts +6 -3
  69. package/src/config/Options/shape/arc.ts +47 -0
  70. package/src/config/Options/shape/gauge.ts +2 -2
  71. package/src/config/Options/shape/pie.ts +1 -1
  72. package/src/config/Options/shape/polar.ts +1 -1
  73. package/src/config/Options/shape/radar.ts +1 -1
  74. package/src/config/Options/shape/spline.ts +1 -1
  75. package/src/config/Options/shape/treemap.ts +53 -0
  76. package/src/config/Store/State.ts +1 -0
  77. package/src/config/classes.ts +7 -0
  78. package/src/config/const.ts +4 -2
  79. package/src/config/resolver/shape.ts +22 -5
  80. package/src/index.esm.ts +2 -1
  81. package/src/module/util.ts +1 -1
  82. package/src/scss/billboard.scss +6 -0
  83. package/src/scss/theme/datalab.scss +6 -0
  84. package/src/scss/theme/graph.scss +6 -0
  85. package/src/scss/theme/insight.scss +6 -0
  86. package/types/bb.d.ts +1 -0
  87. package/types/chart.d.ts +7 -0
  88. package/types/index.d.ts +1 -0
  89. package/types/options.d.ts +42 -624
  90. package/types/options.shape.d.ts +664 -0
  91. package/types/types.d.ts +4 -3
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.6.3
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -33,9 +33,7 @@ var _extendStatics = function extendStatics(d, b) {
33
33
  } instanceof Array && function (d, b) {
34
34
  d.__proto__ = b;
35
35
  } || function (d, b) {
36
- for (var p in b) {
37
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
38
- }
36
+ for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
39
37
  };
40
38
  return _extendStatics(d, b);
41
39
  };
@@ -106,7 +104,7 @@ var Plugin = /** @class */ (function () {
106
104
  delete _this[key];
107
105
  });
108
106
  };
109
- Plugin.version = "3.6.3";
107
+ Plugin.version = "3.7.0-next.2";
110
108
  return Plugin;
111
109
  }());
112
110
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.6.3
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -31,9 +31,7 @@ var _extendStatics = function extendStatics(d, b) {
31
31
  } instanceof Array && function (d, b) {
32
32
  d.__proto__ = b;
33
33
  } || function (d, b) {
34
- for (var p in b) {
35
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
36
- }
34
+ for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
37
35
  };
38
36
  return _extendStatics(d, b);
39
37
  };
@@ -49,9 +47,7 @@ var _assign = function __assign() {
49
47
  _assign = Object.assign || function (t) {
50
48
  for (var s, i = 1, n = arguments.length; i < n; i++) {
51
49
  s = arguments[i];
52
- for (var p in s) {
53
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
54
- }
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
51
  }
56
52
  return t;
57
53
  };
@@ -213,11 +209,16 @@ var $TOOLTIP = {
213
209
  tooltipContainer: "bb-tooltip-container",
214
210
  tooltipName: "bb-tooltip-name"
215
211
  };
212
+ var $TREEMAP = {
213
+ treemap: "bb-treemap",
214
+ chartTreemap: "bb-chart-treemap",
215
+ chartTreemaps: "bb-chart-treemaps"
216
+ };
216
217
  var $ZOOM = {
217
218
  buttonZoomReset: "bb-zoom-reset",
218
219
  zoomBrush: "bb-zoom-brush"
219
220
  };
220
- _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);
221
+ _assign(_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), $TREEMAP), $ZOOM);
221
222
 
222
223
  /**
223
224
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -277,7 +278,7 @@ var Plugin = /** @class */ (function () {
277
278
  delete _this[key];
278
279
  });
279
280
  };
280
- Plugin.version = "3.6.3";
281
+ Plugin.version = "3.7.0-next.2";
281
282
  return Plugin;
282
283
  }());
283
284
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.6.3
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -37,9 +37,7 @@ var _extendStatics = function extendStatics(d, b) {
37
37
  } instanceof Array && function (d, b) {
38
38
  d.__proto__ = b;
39
39
  } || function (d, b) {
40
- for (var p in b) {
41
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
42
- }
40
+ for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
43
41
  };
44
42
  return _extendStatics(d, b);
45
43
  };
@@ -55,9 +53,7 @@ var _assign = function __assign() {
55
53
  _assign = Object.assign || function (t) {
56
54
  for (var s, i = 1, n = arguments.length; i < n; i++) {
57
55
  s = arguments[i];
58
- for (var p in s) {
59
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
60
- }
56
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
61
57
  }
62
58
  return t;
63
59
  };
@@ -219,11 +215,16 @@ var $TOOLTIP = {
219
215
  tooltipContainer: "bb-tooltip-container",
220
216
  tooltipName: "bb-tooltip-name"
221
217
  };
218
+ var $TREEMAP = {
219
+ treemap: "bb-treemap",
220
+ chartTreemap: "bb-chart-treemap",
221
+ chartTreemaps: "bb-chart-treemaps"
222
+ };
222
223
  var $ZOOM = {
223
224
  buttonZoomReset: "bb-zoom-reset",
224
225
  zoomBrush: "bb-zoom-brush"
225
226
  };
226
- _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);
227
+ _assign(_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), $TREEMAP), $ZOOM);
227
228
 
228
229
  /**
229
230
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -485,7 +486,7 @@ var Plugin = /** @class */ (function () {
485
486
  delete _this[key];
486
487
  });
487
488
  };
488
- Plugin.version = "3.6.3";
489
+ Plugin.version = "3.7.0-next.2";
489
490
  return Plugin;
490
491
  }());
491
492
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.6.3
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -31,9 +31,7 @@ var _extendStatics = function extendStatics(d, b) {
31
31
  } instanceof Array && function (d, b) {
32
32
  d.__proto__ = b;
33
33
  } || function (d, b) {
34
- for (var p in b) {
35
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
36
- }
34
+ for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
37
35
  };
38
36
  return _extendStatics(d, b);
39
37
  };
@@ -49,9 +47,7 @@ var _assign = function __assign() {
49
47
  _assign = Object.assign || function (t) {
50
48
  for (var s, i = 1, n = arguments.length; i < n; i++) {
51
49
  s = arguments[i];
52
- for (var p in s) {
53
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
54
- }
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
55
51
  }
56
52
  return t;
57
53
  };
@@ -125,7 +121,7 @@ var Plugin = /** @class */ (function () {
125
121
  delete _this[key];
126
122
  });
127
123
  };
128
- Plugin.version = "3.6.3";
124
+ Plugin.version = "3.7.0-next.2";
129
125
  return Plugin;
130
126
  }());
131
127
  var Plugin$1 = Plugin;
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.6.3
8
+ * @version 3.7.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -34,9 +34,7 @@ var _extendStatics = function extendStatics(d, b) {
34
34
  } instanceof Array && function (d, b) {
35
35
  d.__proto__ = b;
36
36
  } || function (d, b) {
37
- for (var p in b) {
38
- if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
39
- }
37
+ for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
40
38
  };
41
39
  return _extendStatics(d, b);
42
40
  };
@@ -265,7 +263,7 @@ var Plugin = /** @class */ (function () {
265
263
  delete _this[key];
266
264
  });
267
265
  };
268
- Plugin.version = "3.6.3";
266
+ Plugin.version = "3.7.0-next.2";
269
267
  return Plugin;
270
268
  }());
271
269
  var Plugin$1 = Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billboard.js",
3
- "version": "3.6.3",
3
+ "version": "3.7.0-next.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",
@@ -9,10 +9,12 @@
9
9
  "type": "module",
10
10
  "exports": {
11
11
  ".": {
12
+ "types": "./types/index.d.ts",
12
13
  "import": "./dist-esm/billboard.js",
13
14
  "require": "./dist/billboard.pkgd.js"
14
15
  },
15
16
  "./dist/plugin/*": {
17
+ "types": "./types/plugin/*.d.ts",
16
18
  "import": "./dist-esm/plugin/*.js",
17
19
  "require": "./dist/plugin/pkgd/*.js"
18
20
  },
@@ -82,48 +84,51 @@
82
84
  "license": "MIT",
83
85
  "readmeFilename": "README.md",
84
86
  "dependencies": {
87
+ "@types/d3-selection": "^3.0.3",
88
+ "@types/d3-transition": "^3.0.2",
85
89
  "d3-axis": "^3.0.0",
86
90
  "d3-brush": "^3.0.0",
87
91
  "d3-drag": "^3.0.0",
88
92
  "d3-dsv": "^3.0.1",
89
93
  "d3-ease": "^3.0.1",
94
+ "d3-hierarchy": "^3.1.2",
90
95
  "d3-interpolate": "^3.0.1",
91
96
  "d3-scale": "^4.0.2",
92
97
  "d3-selection": "^3.0.0",
93
- "d3-shape": "^3.1.0",
98
+ "d3-shape": "^3.2.0",
94
99
  "d3-time-format": "^4.1.0",
95
100
  "d3-transition": "^3.0.1",
96
101
  "d3-zoom": "^3.0.0"
97
102
  },
98
103
  "devDependencies": {
99
- "@babel/core": "^7.19.3",
104
+ "@babel/core": "^7.20.7",
100
105
  "@babel/eslint-parser": "^7.19.1",
101
106
  "@babel/plugin-proposal-class-properties": "^7.18.6",
102
- "@babel/plugin-proposal-object-rest-spread": "^7.19.4",
107
+ "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
103
108
  "@babel/plugin-transform-runtime": "^7.19.1",
104
- "@babel/preset-env": "^7.19.4",
109
+ "@babel/preset-env": "^7.20.2",
105
110
  "@babel/preset-typescript": "^7.18.6",
106
- "@babel/runtime": "^7.19.4",
107
- "@commitlint/cli": "17.1.2",
108
- "@commitlint/config-conventional": "^17.1.0",
109
- "@rollup/plugin-babel": "^6.0.0",
111
+ "@babel/runtime": "^7.20.7",
112
+ "@commitlint/cli": "17.3.0",
113
+ "@commitlint/config-conventional": "^17.3.0",
114
+ "@rollup/plugin-babel": "^6.0.3",
110
115
  "@rollup/plugin-node-resolve": "^15.0.0",
111
- "@rollup/plugin-replace": "^5.0.0",
112
- "@rollup/plugin-typescript": "^9.0.1",
113
- "@semantic-release/changelog": "^6.0.1",
116
+ "@rollup/plugin-replace": "^5.0.2",
117
+ "@rollup/plugin-typescript": "^10.0.1",
118
+ "@semantic-release/changelog": "^6.0.2",
114
119
  "@semantic-release/commit-analyzer": "^9.0.2",
115
120
  "@semantic-release/exec": "^6.0.3",
116
121
  "@semantic-release/git": "^10.0.1",
117
122
  "@semantic-release/npm": "^9.0.1",
118
123
  "@semantic-release/release-notes-generator": "^10.0.3",
119
- "@types/chai": "^4.3.3",
124
+ "@types/chai": "^4.3.4",
120
125
  "@types/d3": "^7.4.0",
121
- "@types/mocha": "^10.0.0",
126
+ "@types/mocha": "^10.0.1",
122
127
  "@types/sinon": "^10.0.13",
123
- "@typescript-eslint/eslint-plugin": "^5.40.1",
124
- "@typescript-eslint/parser": "^5.40.1",
128
+ "@typescript-eslint/eslint-plugin": "^5.47.1",
129
+ "@typescript-eslint/parser": "^5.47.1",
125
130
  "babel-helper-modules": "^6.0.0",
126
- "babel-loader": "^8.2.5",
131
+ "babel-loader": "^9.1.0",
127
132
  "babel-plugin-add-module-exports": "^1.0.4",
128
133
  "babel-plugin-minify-constant-folding": "^0.5.0",
129
134
  "babel-plugin-minify-dead-code-elimination": "^0.5.2",
@@ -134,31 +139,31 @@
134
139
  "babel-plugin-transform-merge-sibling-variables": "^6.9.5",
135
140
  "babel-plugin-transform-minify-booleans": "^6.9.4",
136
141
  "better-docs": "^2.7.2",
137
- "chai": "^4.3.4",
142
+ "chai": "^4.3.7",
138
143
  "clean-webpack-plugin": "^4.0.0",
139
144
  "cloc": "^2.10.0",
140
- "core-js": "^3.25.5",
145
+ "core-js": "^3.27.0",
141
146
  "coveralls": "^3.1.1",
142
147
  "cross-env": "^7.0.3",
143
- "css-loader": "^6.7.1",
148
+ "css-loader": "^6.7.3",
144
149
  "css-minimizer-webpack-plugin": "^4.2.2",
145
150
  "d3-color": "^3.1.0",
146
151
  "d3-delaunay": "^6.0.2",
147
152
  "d3-format": "^3.1.0",
148
153
  "d3-polygon": "^3.0.1",
149
- "docdash": "^1.2.0",
154
+ "docdash": "^2.0.0",
150
155
  "dtslint": "^4.2.1",
151
- "eslint": "^8.25.0",
156
+ "eslint": "^8.30.0",
152
157
  "eslint-config-naver": "^2.1.0",
153
158
  "eslint-plugin-import": "^2.26.0",
154
- "eslint-plugin-jsdoc": "^39.3.13",
159
+ "eslint-plugin-jsdoc": "^39.6.4",
155
160
  "eslint-webpack-plugin": "^3.2.0",
156
161
  "exports-loader": "^4.0.0",
157
162
  "hammer-simulator": "0.0.1",
158
- "husky": "^8.0.1",
163
+ "husky": "^8.0.2",
159
164
  "istanbul-instrumenter-loader": "^3.0.1",
160
165
  "istanbul-lib-instrument": "^5.2.1",
161
- "jsdoc": "^3.6.11",
166
+ "jsdoc": "^4.0.0",
162
167
  "karma": "^6.4.1",
163
168
  "karma-chai": "^0.1.0",
164
169
  "karma-chrome-launcher": "^3.1.1",
@@ -169,27 +174,28 @@
169
174
  "karma-sinon": "^1.0.5",
170
175
  "karma-sourcemap-loader": "^0.3.8",
171
176
  "karma-webpack": "^5.0.0",
172
- "lint-staged": "^13.0.3",
177
+ "lint-staged": "^13.1.0",
173
178
  "lite-fixture": "^1.0.2",
174
- "mini-css-extract-plugin": "^2.6.1",
175
- "mocha": "^10.1.0",
176
- "node-sass": "^7.0.3",
177
- "regenerator-runtime": "^0.13.10",
178
- "rollup": "^3.2.3",
179
+ "mini-css-extract-plugin": "^2.7.2",
180
+ "mocha": "^10.2.0",
181
+ "node-sass": "^8.0.0",
182
+ "regenerator-runtime": "^0.13.11",
183
+ "rollup": "^3.9.0",
179
184
  "rollup-plugin-delete": "^2.0.0",
180
- "sass-loader": "^13.1.0",
185
+ "sass-loader": "^13.2.0",
181
186
  "semantic-release": "^19.0.5",
182
187
  "simulant": "^0.2.2",
183
- "sinon": "^14.0.1",
188
+ "sinon": "^15.0.1",
184
189
  "string-replace-loader": "^3.1.0",
185
190
  "style-loader": "^3.3.1",
191
+ "taffydb": "^2.7.3",
186
192
  "terser-webpack-plugin": "^5.3.6",
187
- "tslib": "^2.4.0",
188
- "typescript": "4.8.4",
189
- "webpack": "^5.74.0",
190
- "webpack-bundle-analyzer": "^4.6.1",
193
+ "tslib": "^2.4.1",
194
+ "typescript": "4.9.4",
195
+ "webpack": "^5.75.0",
196
+ "webpack-bundle-analyzer": "^4.7.0",
191
197
  "webpack-clean": "^1.2.5",
192
- "webpack-cli": "^4.10.0",
198
+ "webpack-cli": "^5.0.1",
193
199
  "webpack-common-shake": "^2.1.0",
194
200
  "webpack-dev-server": "^4.11.1",
195
201
  "webpack-merge": "^5.8.0",
@@ -3,7 +3,7 @@
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
5
  import {window} from "../../module/browser";
6
- import {notEmpty, isDefined} from "../../module/util";
6
+ import {isDefined, isEmpty, notEmpty} from "../../module/util";
7
7
 
8
8
  export default {
9
9
  /**
@@ -143,8 +143,9 @@ export default {
143
143
 
144
144
  /**
145
145
  * Get or set config option value.
146
- * - **NOTE:** for without parameter occasion
147
- * - will return all specified generation options object only. (will exclude any other options not specified at the initialization)
146
+ * - **NOTE**
147
+ * - The option key name must be specified as the last level.
148
+ * - when no argument is given, will return all specified generation options object only. (will exclude any other options not specified at the initialization)
148
149
  * @function config
149
150
  * @instance
150
151
  * @memberof Chart
@@ -158,12 +159,20 @@ export default {
158
159
  * // Getter
159
160
  * chart.config("gauge.max");
160
161
  *
162
+ * // Getter specified with top level key name will not work.
163
+ * // The option key name must be specified as the last level.
164
+ * // chart.config("gauge"); // will not work
165
+ *
161
166
  * // without any arguments, it returns generation config object
162
167
  * chart.config(); // {data: { ... }, axis: { ... }, ...}
163
168
  *
164
169
  * // Setter
165
170
  * chart.config("gauge.max", 100);
166
171
  *
172
+ * // Setter specified with top level key name will not work.
173
+ * // The option key name must be specified as the last level.
174
+ * // chart.config("gauge", {min: 10, max: 20}); // will not work
175
+ *
167
176
  * // Setter & redraw with the new option
168
177
  * chart.config("gauge.max", 100, true);
169
178
  */
@@ -182,7 +191,7 @@ export default {
182
191
  } else {
183
192
  res = config[key];
184
193
  }
185
- } else {
194
+ } else if (arguments.length === 0 || isEmpty(name)) {
186
195
  res = state.orgConfig;
187
196
  }
188
197