billboard.js 4.0.1 → 4.0.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 (219) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/README.md +6 -6
  3. package/dist/billboard.css +1 -1
  4. package/dist/billboard.js +71 -26
  5. package/dist/billboard.min.css +1 -1
  6. package/dist/billboard.min.js +18 -18
  7. package/dist/billboard.pkgd.js +288 -243
  8. package/dist/billboard.pkgd.min.js +23 -23
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.js +21 -6
  10. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-sparkline.js +21 -6
  12. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  13. package/dist/plugin/billboardjs-plugin-stanford.js +21 -6
  14. package/dist/plugin/billboardjs-plugin-stanford.min.js +5 -5
  15. package/dist/plugin/billboardjs-plugin-tableview.js +21 -6
  16. package/dist/plugin/billboardjs-plugin-tableview.min.js +3 -3
  17. package/dist/plugin/billboardjs-plugin-textoverlap.js +21 -6
  18. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +67 -52
  20. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +23 -8
  22. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +9 -9
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +73 -58
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +9 -9
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +21 -6
  26. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +32 -17
  28. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
  29. package/dist/theme/dark.css +1 -1
  30. package/dist/theme/dark.min.css +1 -1
  31. package/dist/theme/datalab.css +1 -1
  32. package/dist/theme/datalab.min.css +1 -1
  33. package/dist/theme/graph.css +1 -1
  34. package/dist/theme/graph.min.css +1 -1
  35. package/dist/theme/insight.css +1 -1
  36. package/dist/theme/insight.min.css +1 -1
  37. package/dist/theme/modern.css +1 -1
  38. package/dist/theme/modern.min.css +1 -1
  39. package/dist-esm/Chart/Chart.js +1 -1
  40. package/dist-esm/Chart/api/axis.js +1 -1
  41. package/dist-esm/Chart/api/category.js +1 -1
  42. package/dist-esm/Chart/api/chart.js +1 -1
  43. package/dist-esm/Chart/api/color.js +1 -1
  44. package/dist-esm/Chart/api/data.js +1 -1
  45. package/dist-esm/Chart/api/export.js +1 -1
  46. package/dist-esm/Chart/api/flow.js +1 -1
  47. package/dist-esm/Chart/api/focus.js +1 -1
  48. package/dist-esm/Chart/api/grid.js +1 -1
  49. package/dist-esm/Chart/api/group.js +1 -1
  50. package/dist-esm/Chart/api/legend.js +1 -1
  51. package/dist-esm/Chart/api/load.js +1 -1
  52. package/dist-esm/Chart/api/regions.js +1 -1
  53. package/dist-esm/Chart/api/selection.js +1 -1
  54. package/dist-esm/Chart/api/show.js +1 -1
  55. package/dist-esm/Chart/api/stubs.js +1 -1
  56. package/dist-esm/Chart/api/subchart.js +1 -1
  57. package/dist-esm/Chart/api/tooltip.js +1 -1
  58. package/dist-esm/Chart/api/x.js +1 -1
  59. package/dist-esm/Chart/api/zoom.js +1 -1
  60. package/dist-esm/ChartInternal/Axis/Axis.js +1 -1
  61. package/dist-esm/ChartInternal/Axis/AxisRenderer.js +1 -1
  62. package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
  63. package/dist-esm/ChartInternal/ChartInternal.js +1 -1
  64. package/dist-esm/ChartInternal/data/convert.helper.js +1 -1
  65. package/dist-esm/ChartInternal/data/convert.js +1 -1
  66. package/dist-esm/ChartInternal/data/data.js +1 -1
  67. package/dist-esm/ChartInternal/data/load.js +1 -1
  68. package/dist-esm/ChartInternal/interactions/drag.js +1 -1
  69. package/dist-esm/ChartInternal/interactions/eventrect.js +39 -7
  70. package/dist-esm/ChartInternal/interactions/flow.js +1 -1
  71. package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
  72. package/dist-esm/ChartInternal/interactions/subchart.js +1 -1
  73. package/dist-esm/ChartInternal/interactions/zoom.js +1 -1
  74. package/dist-esm/ChartInternal/internals/category.js +1 -1
  75. package/dist-esm/ChartInternal/internals/class.js +1 -1
  76. package/dist-esm/ChartInternal/internals/clip.js +1 -1
  77. package/dist-esm/ChartInternal/internals/color.js +1 -1
  78. package/dist-esm/ChartInternal/internals/domain.js +1 -1
  79. package/dist-esm/ChartInternal/internals/format.js +1 -1
  80. package/dist-esm/ChartInternal/internals/grid.js +1 -1
  81. package/dist-esm/ChartInternal/internals/legend.js +1 -1
  82. package/dist-esm/ChartInternal/internals/redraw.js +1 -1
  83. package/dist-esm/ChartInternal/internals/region.js +1 -1
  84. package/dist-esm/ChartInternal/internals/scale.js +1 -1
  85. package/dist-esm/ChartInternal/internals/selection.js +1 -1
  86. package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
  87. package/dist-esm/ChartInternal/internals/size.js +1 -1
  88. package/dist-esm/ChartInternal/internals/style.js +1 -1
  89. package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
  90. package/dist-esm/ChartInternal/internals/text.js +1 -1
  91. package/dist-esm/ChartInternal/internals/text.util.js +1 -1
  92. package/dist-esm/ChartInternal/internals/title.js +1 -1
  93. package/dist-esm/ChartInternal/internals/tooltip.js +1 -1
  94. package/dist-esm/ChartInternal/internals/transform.js +1 -1
  95. package/dist-esm/ChartInternal/internals/type.js +1 -1
  96. package/dist-esm/ChartInternal/shape/arc.js +1 -1
  97. package/dist-esm/ChartInternal/shape/area.js +1 -1
  98. package/dist-esm/ChartInternal/shape/bar.js +1 -1
  99. package/dist-esm/ChartInternal/shape/bubble.js +1 -1
  100. package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
  101. package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
  102. package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
  103. package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
  104. package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
  105. package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
  106. package/dist-esm/ChartInternal/shape/core/path.js +1 -1
  107. package/dist-esm/ChartInternal/shape/core/point.js +1 -1
  108. package/dist-esm/ChartInternal/shape/core/treemap.js +1 -1
  109. package/dist-esm/ChartInternal/shape/funnel.js +1 -1
  110. package/dist-esm/ChartInternal/shape/gauge.js +1 -1
  111. package/dist-esm/ChartInternal/shape/line.js +1 -1
  112. package/dist-esm/ChartInternal/shape/point.js +1 -1
  113. package/dist-esm/ChartInternal/shape/polar.js +1 -1
  114. package/dist-esm/ChartInternal/shape/radar.js +1 -1
  115. package/dist-esm/ChartInternal/shape/shape.js +1 -1
  116. package/dist-esm/ChartInternal/shape/treemap.js +1 -1
  117. package/dist-esm/canvas/CanvasAxisRenderer.js +1 -1
  118. package/dist-esm/canvas/CanvasEngine.js +1 -1
  119. package/dist-esm/canvas/CanvasPainter.js +1 -1
  120. package/dist-esm/canvas/CanvasRenderer.js +4 -4
  121. package/dist-esm/canvas/CanvasTheme.js +1 -1
  122. package/dist-esm/canvas/HitDetector.js +1 -1
  123. package/dist-esm/canvas/axisTicks.js +1 -1
  124. package/dist-esm/canvas/classes.js +1 -1
  125. package/dist-esm/canvas/color.js +1 -1
  126. package/dist-esm/canvas/geometry.js +1 -1
  127. package/dist-esm/canvas/labels.js +1 -1
  128. package/dist-esm/canvas/pointPattern.js +1 -1
  129. package/dist-esm/canvas/util.js +1 -1
  130. package/dist-esm/config/Options/Options.js +1 -1
  131. package/dist-esm/config/Options/axis/axis.js +1 -1
  132. package/dist-esm/config/Options/axis/x.js +1 -1
  133. package/dist-esm/config/Options/axis/y.js +1 -1
  134. package/dist-esm/config/Options/axis/y2.js +1 -1
  135. package/dist-esm/config/Options/common/boost.js +1 -1
  136. package/dist-esm/config/Options/common/color.js +1 -1
  137. package/dist-esm/config/Options/common/grid.js +1 -1
  138. package/dist-esm/config/Options/common/legend.js +1 -1
  139. package/dist-esm/config/Options/common/main.js +1 -1
  140. package/dist-esm/config/Options/common/point.js +1 -1
  141. package/dist-esm/config/Options/common/title.js +1 -1
  142. package/dist-esm/config/Options/common/tooltip.js +1 -1
  143. package/dist-esm/config/Options/data/axis.js +1 -1
  144. package/dist-esm/config/Options/data/data.js +1 -1
  145. package/dist-esm/config/Options/data/selection.js +1 -1
  146. package/dist-esm/config/Options/interaction/interaction.js +1 -1
  147. package/dist-esm/config/Options/interaction/subchart.js +1 -1
  148. package/dist-esm/config/Options/interaction/zoom.js +1 -1
  149. package/dist-esm/config/Options/shape/arc.js +1 -1
  150. package/dist-esm/config/Options/shape/area.js +1 -1
  151. package/dist-esm/config/Options/shape/bar.js +1 -1
  152. package/dist-esm/config/Options/shape/bubble.js +1 -1
  153. package/dist-esm/config/Options/shape/candlestick.js +1 -1
  154. package/dist-esm/config/Options/shape/donut.js +1 -1
  155. package/dist-esm/config/Options/shape/funnel.js +1 -1
  156. package/dist-esm/config/Options/shape/gauge.js +1 -1
  157. package/dist-esm/config/Options/shape/line.js +1 -1
  158. package/dist-esm/config/Options/shape/pie.js +1 -1
  159. package/dist-esm/config/Options/shape/polar.js +1 -1
  160. package/dist-esm/config/Options/shape/radar.js +1 -1
  161. package/dist-esm/config/Options/shape/scatter.js +1 -1
  162. package/dist-esm/config/Options/shape/spline.js +1 -1
  163. package/dist-esm/config/Options/shape/treemap.js +1 -1
  164. package/dist-esm/config/Store/Element.js +1 -1
  165. package/dist-esm/config/Store/State.js +1 -1
  166. package/dist-esm/config/Store/Store.js +1 -1
  167. package/dist-esm/config/classes.js +1 -1
  168. package/dist-esm/config/config.js +1 -1
  169. package/dist-esm/config/const.js +1 -1
  170. package/dist-esm/config/resolver/axis.core.js +1 -1
  171. package/dist-esm/config/resolver/axis.js +1 -1
  172. package/dist-esm/config/resolver/canvas.js +5 -4
  173. package/dist-esm/config/resolver/canvasShape.js +1 -1
  174. package/dist-esm/config/resolver/category.js +1 -1
  175. package/dist-esm/config/resolver/export.js +1 -1
  176. package/dist-esm/config/resolver/flow.js +1 -1
  177. package/dist-esm/config/resolver/grid.js +1 -1
  178. package/dist-esm/config/resolver/interaction/selection.js +1 -1
  179. package/dist-esm/config/resolver/interaction/subchart.js +1 -1
  180. package/dist-esm/config/resolver/interaction/zoom.js +1 -1
  181. package/dist-esm/config/resolver/regions.js +1 -1
  182. package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
  183. package/dist-esm/config/resolver/shape/area.js +1 -1
  184. package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
  185. package/dist-esm/config/resolver/shape/bar.js +1 -1
  186. package/dist-esm/config/resolver/shape/bubble.js +1 -1
  187. package/dist-esm/config/resolver/shape/candlestick.js +1 -1
  188. package/dist-esm/config/resolver/shape/donut.js +1 -1
  189. package/dist-esm/config/resolver/shape/funnel.js +1 -1
  190. package/dist-esm/config/resolver/shape/gauge.js +1 -1
  191. package/dist-esm/config/resolver/shape/line.js +1 -1
  192. package/dist-esm/config/resolver/shape/pie.js +1 -1
  193. package/dist-esm/config/resolver/shape/polar.js +1 -1
  194. package/dist-esm/config/resolver/shape/radar.js +1 -1
  195. package/dist-esm/config/resolver/shape/scatter.js +1 -1
  196. package/dist-esm/config/resolver/shape/treemap.js +1 -1
  197. package/dist-esm/core.js +3 -3
  198. package/dist-esm/index.canvas.js +1 -1
  199. package/dist-esm/index.esm.js +1 -1
  200. package/dist-esm/module/Cache.js +1 -1
  201. package/dist-esm/module/browser.js +1 -1
  202. package/dist-esm/module/dsv.js +1 -1
  203. package/dist-esm/module/error.js +1 -1
  204. package/dist-esm/module/generator.js +1 -1
  205. package/dist-esm/module/sanitize.js +1 -1
  206. package/dist-esm/module/util/brush.js +1 -1
  207. package/dist-esm/module/util/dom.js +1 -1
  208. package/dist-esm/module/util/object.js +1 -1
  209. package/dist-esm/module/util/type-checks.js +1 -1
  210. package/dist-esm/module/worker.js +1 -1
  211. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  212. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  213. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  214. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  215. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  216. package/package.json +34 -59
  217. package/src/ChartInternal/interactions/eventrect.ts +47 -8
  218. package/src/canvas/CanvasRenderer.ts +2 -2
  219. package/src/config/resolver/canvas.ts +4 -3
package/CONTRIBUTING.md CHANGED
@@ -106,8 +106,8 @@ Steps to submit your pull request:
106
106
  2. Create a new branch from your billboard.js `master` branch (and be sure it is always up-to-date)
107
107
  3. Do your work
108
108
  4. Create test code for your work (when possible)
109
- 5. Run `npm run lint` for linting and code style check. (update until there are no errors or warnings)
110
- 6. Run test code by `npm test` or `npm test:chrome` for chrome browser.
109
+ 5. Run `pnpm run lint` for linting and code style check. (update until there are no errors or warnings)
110
+ 6. Run test code by `pnpm test`.
111
111
  Make sure all tests pass at least on the latest version of Chrome (mobile/desktop).
112
112
  7. Write a commit log following convention and push to your repository branch.
113
113
  8. Create a new PR from your branch to `billboard.js/master` branch.
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [![download][badge-download]][link-download] [![download][badge-download-weekly]][link-download] [![jsDelivr][badge-jsDelivr]][link-jsDelivr] [![jsDelivr][badge-jsDelivr-weekly]][link-jsDelivr]<br>
10
10
  ![CI Status][badge-ci-status] [![Coverage Status][badge-coverage]][link-coverage] [![Known Vulnerabilities][badge-snyk]][link-snyk] [![gzip size][badge-gzip-size]][link-gzip-size]
11
11
 
12
- billboard.js is a re-usable, easy interface JavaScript chart library, based on [D3.js](https://d3js.org/).
12
+ billboard.js is a re-usable, easy interface JavaScript chart library based on [D3.js](https://d3js.org/), with SVG and Canvas rendering support.
13
13
  > The name "billboard" comes from the famous `billboard chart` which everybody knows.<br>
14
14
  > - [Why we decided to start billboard.js?](https://github.com/naver/billboard.js/wiki/Why-we-decided-to-start-billboard.js%3F)
15
15
 
@@ -52,7 +52,7 @@ If you have any questions, check out the previous posts or create a new one at:
52
52
 
53
53
  ## Download and Installation
54
54
 
55
- Download dist files from the repo directly or install it via npm.
55
+ Download dist files from the repo directly or install it with pnpm.
56
56
 
57
57
  <details>
58
58
  <summary>Dist file list from the repo. (click to expand)</summary>
@@ -147,7 +147,7 @@ There are two ways to install from the `nightly` branch directly.
147
147
 
148
148
  ```sh
149
149
  # Run install command from shell
150
- $ npm install git+https://github.com/naver/billboard.js.git#nightly --save
150
+ $ pnpm add git+https://github.com/naver/billboard.js.git#nightly
151
151
  ```
152
152
 
153
153
  ### Next (Release Candidate) version
@@ -156,13 +156,13 @@ Next version is the 'release candidate' build, prior to the latest official rele
156
156
 
157
157
  ```sh
158
158
  # Run install command from shell
159
- $ npm install billboard.js@next --save
159
+ $ pnpm add billboard.js@next
160
160
  ```
161
161
 
162
- ### Installation with npm
162
+ ### Installation with pnpm
163
163
 
164
164
  ```bash
165
- $ npm install billboard.js
165
+ $ pnpm add billboard.js
166
166
  ```
167
167
 
168
168
  ### Packages
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.1
8
+ * @version 4.0.2
9
9
  */
10
10
  /*-- Chart --*/
11
11
  .bb svg {
package/dist/billboard.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.1
8
+ * @version 4.0.2
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -117,11 +117,26 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
117
117
  /************************************************************************/
118
118
  /******/ /* webpack/runtime/define property getters */
119
119
  /******/ !function() {
120
- /******/ // define getter functions for harmony exports
120
+ /******/ // define getter/value functions for harmony exports
121
121
  /******/ __webpack_require__.d = function(exports, definition) {
122
- /******/ for(var key in definition) {
123
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
124
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
122
+ /******/ if(Array.isArray(definition)) {
123
+ /******/ var i = 0;
124
+ /******/ while(i < definition.length) {
125
+ /******/ var key = definition[i++];
126
+ /******/ var binding = definition[i++];
127
+ /******/ if(!__webpack_require__.o(exports, key)) {
128
+ /******/ if(binding === 0) {
129
+ /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
130
+ /******/ } else {
131
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
132
+ /******/ }
133
+ /******/ } else if(binding === 0) { i++; }
134
+ /******/ }
135
+ /******/ } else {
136
+ /******/ for(var key in definition) {
137
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
138
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
139
+ /******/ }
125
140
  /******/ }
126
141
  /******/ }
127
142
  /******/ };
@@ -161,19 +176,19 @@ __webpack_require__.d(__webpack_exports__, {
161
176
  "default": function() { return /* reexport */ bb; }
162
177
  });
163
178
 
164
- // NAMESPACE OBJECT: ./src/config/resolver/interaction/index.ts
165
- var resolver_interaction_namespaceObject = {};
166
- __webpack_require__.r(resolver_interaction_namespaceObject);
167
- __webpack_require__.d(resolver_interaction_namespaceObject, {
179
+ // NAMESPACE OBJECT (decoupled): ./src/config/resolver/interaction/index.ts
180
+ var interaction_namespaceObject = {};
181
+ __webpack_require__.r(interaction_namespaceObject);
182
+ __webpack_require__.d(interaction_namespaceObject, {
168
183
  selection: function() { return selectionModule; },
169
184
  subchart: function() { return subchartModule; },
170
185
  zoom: function() { return zoomModule; }
171
186
  });
172
187
 
173
- // NAMESPACE OBJECT: ./src/config/resolver/shape/index.ts
174
- var resolver_shape_namespaceObject = {};
175
- __webpack_require__.r(resolver_shape_namespaceObject);
176
- __webpack_require__.d(resolver_shape_namespaceObject, {
188
+ // NAMESPACE OBJECT (decoupled): ./src/config/resolver/shape/index.ts
189
+ var shape_namespaceObject = {};
190
+ __webpack_require__.r(shape_namespaceObject);
191
+ __webpack_require__.d(shape_namespaceObject, {
177
192
  area: function() { return area_area; },
178
193
  areaLineRange: function() { return areaLineRange; },
179
194
  areaSpline: function() { return areaSpline; },
@@ -5702,7 +5717,7 @@ class CanvasRenderer {
5702
5717
  const cx = (_e = $$.subxx) == null ? void 0 : _e.bind($$);
5703
5718
  if (cx && cy) {
5704
5719
  for (const target of targets) {
5705
- if (!isCanvasPointType($$, target) || isCanvasLineType($$, target) && !shouldDrawPoints($$, target)) {
5720
+ if (!isCanvasScatterType($$, target) && !isCanvasBubbleType($$, target)) {
5706
5721
  continue;
5707
5722
  }
5708
5723
  const color = $$.color(target.id);
@@ -18371,8 +18386,10 @@ function bindCanvasHtmlLegendInteractions($$, item) {
18371
18386
  }, touchOption);
18372
18387
  !isTouch && item.on("mouseover", interaction || isFunction(config.legend_item_onover) ? function(event, id) {
18373
18388
  if (!callFn(config.legend_item_onover, api, id, !state.hiddenTargetIds.has(id))) {
18374
- setCanvasHtmlLegendFocus($$, id);
18375
- !state.transiting && $$.isTargetToShow(id) && setCanvasLegendTargetFocus($$, id);
18389
+ if (!state.transiting && $$.isTargetToShow(id)) {
18390
+ setCanvasHtmlLegendFocus($$, id);
18391
+ setCanvasLegendTargetFocus($$, id);
18392
+ }
18376
18393
  }
18377
18394
  } : null).on("mouseout", interaction || isFunction(config.legend_item_onout) ? function(event, id) {
18378
18395
  if (!callFn(config.legend_item_onout, api, id, !state.hiddenTargetIds.has(id))) {
@@ -28063,9 +28080,9 @@ var __pow = Math.pow;
28063
28080
  * @private
28064
28081
  */
28065
28082
  selectRectForSingle(context, index) {
28066
- var _a, _b;
28083
+ var _a, _b, _c, _d;
28067
28084
  const $$ = this;
28068
- const { config, $el: { main, circle } } = $$;
28085
+ const { config, state, $el: { main, circle } } = $$;
28069
28086
  const isSelectionEnabled = config.data_selection_enabled;
28070
28087
  const isSelectionGrouped = config.data_selection_grouped;
28071
28088
  const isSelectable = config.data_selection_isselectable;
@@ -28085,11 +28102,6 @@ var __pow = Math.pow;
28085
28102
  const shapeAtIndex = main.selectAll(`.${$SHAPE.shape}-${index}`).classed($COMMON.EXPANDED, true).style("cursor", isSelectable ? "pointer" : null).filter(function(d) {
28086
28103
  return $$.isWithinShape(this, d);
28087
28104
  });
28088
- if (shapeAtIndex.empty() && !isTooltipGrouped && config.interaction_onout) {
28089
- (_b = $$.hideGridFocus) == null ? void 0 : _b.call($$);
28090
- $$.hideTooltip();
28091
- !isSelectionGrouped && $$.setExpand(index);
28092
- }
28093
28105
  shapeAtIndex.call((selected) => {
28094
28106
  var _a2, _b2;
28095
28107
  const d = selected.data();
@@ -28103,6 +28115,39 @@ var __pow = Math.pow;
28103
28115
  selected.each((d2) => $$.setExpand(index, d2.id));
28104
28116
  }
28105
28117
  });
28118
+ if (!isTooltipGrouped && shapeAtIndex.empty()) {
28119
+ const mouse = getPointer(state.event, context);
28120
+ const closestData = selectedData.filter((d) => {
28121
+ if ($$.isTargetToShow(d.id)) {
28122
+ const dist = $$.dist(d, mouse);
28123
+ return dist < $$.getPointSensitivity(d);
28124
+ }
28125
+ return false;
28126
+ });
28127
+ if (closestData.length > 0) {
28128
+ let closest = closestData[0];
28129
+ let minDist = $$.dist(closest, mouse);
28130
+ for (let i = 1; i < closestData.length; i++) {
28131
+ const d = closestData[i];
28132
+ const dist = $$.dist(d, mouse);
28133
+ if (dist < minDist) {
28134
+ minDist = dist;
28135
+ closest = d;
28136
+ }
28137
+ }
28138
+ $$.showTooltip([closest], context);
28139
+ (_b = $$.showGridFocus) == null ? void 0 : _b.call($$, [closest]);
28140
+ (_c = $$.unexpandCircles) == null ? void 0 : _c.call($$);
28141
+ $$.setExpand(index, closest.id, true);
28142
+ if (isSelectionEnabled && (isSelectionGrouped || (isSelectable == null ? void 0 : isSelectable.bind($$.api)(closest)))) {
28143
+ context.style.cursor = "pointer";
28144
+ }
28145
+ } else if (config.interaction_onout) {
28146
+ (_d = $$.hideGridFocus) == null ? void 0 : _d.call($$);
28147
+ $$.hideTooltip();
28148
+ !isSelectionGrouped && $$.setExpand(index);
28149
+ }
28150
+ }
28106
28151
  },
28107
28152
  /**
28108
28153
  * Select rect for multiple x values
@@ -34696,7 +34741,7 @@ const bb = {
34696
34741
  * bb.version; // "1.0.0"
34697
34742
  * @memberof bb
34698
34743
  */
34699
- version: "4.0.1",
34744
+ version: "4.0.2",
34700
34745
  /**
34701
34746
  * Generate chart
34702
34747
  * - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:
@@ -34900,8 +34945,8 @@ const bb = {
34900
34945
 
34901
34946
 
34902
34947
 
34903
- Object.keys(resolver_shape_namespaceObject).forEach((v) => resolver_shape_namespaceObject[v]());
34904
- Object.keys(resolver_interaction_namespaceObject).forEach((v) => resolver_interaction_namespaceObject[v]());
34948
+ Object.keys(shape_namespaceObject).forEach((v) => shape_namespaceObject[v]());
34949
+ Object.keys(interaction_namespaceObject).forEach((v) => interaction_namespaceObject[v]());
34905
34950
  exportApi();
34906
34951
  flow_flow();
34907
34952
  grid_grid();
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 4.0.1
8
+ * @version 4.0.2
9
9
  */.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle,.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-arc .bb-arc-label-line{fill:none;stroke-width:1px;pointer-events:none}.bb-chart-arc .bb-arc-label-line{stroke:#7f7f7f}.bb-chart-arc>text.bb-arc-label-line-text{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{font-size:13px;fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:1em;fill:#fff;white-space:nowrap}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:gray;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}div.bb-canvas-legend{position:absolute;z-index:1;box-sizing:border-box;display:block;overflow:visible;pointer-events:auto;font-family:sans-serif;font-size:12px;color:#000}div.bb-canvas-legend.bb-canvas-legend-bottom{right:0;bottom:6px;left:0}div.bb-canvas-legend.bb-canvas-legend-right{overflow:visible}button.bb-legend-item{position:absolute;display:block;box-sizing:border-box;margin:0;padding:0;border:0;background:transparent;color:inherit;font-family:inherit;font-size:inherit;line-height:normal;text-align:left}button.bb-legend-item.bb-legend-item-interactive{cursor:pointer}.bb-canvas-legend .bb-legend-item-title{position:absolute;white-space:nowrap;pointer-events:none}.bb-canvas-legend .bb-legend-item-tile{position:absolute;display:block;box-sizing:border-box;width:10px;height:10px}.bb-canvas-legend .bb-legend-item-tile.bb-legend-item-tile-circle{border-radius:50%}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;user-select:none;transform:translateZ(0)}.bb-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;opacity:.9;box-shadow:7px 7px 12px -9px #777;white-space:nowrap}.bb-tooltip tr{border:1px solid #CCC}.bb-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#fff}.bb-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{font-size:11px;border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}