billboard.js 4.0.0 → 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.
- package/CONTRIBUTING.md +2 -2
- package/README.md +6 -6
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +71 -26
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +18 -18
- package/dist/billboard.pkgd.js +288 -243
- package/dist/billboard.pkgd.min.js +23 -23
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +21 -6
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +21 -6
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +21 -6
- package/dist/plugin/billboardjs-plugin-stanford.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-tableview.js +21 -6
- package/dist/plugin/billboardjs-plugin-tableview.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.js +21 -6
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +67 -52
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +23 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +9 -9
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +73 -58
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +9 -9
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +21 -6
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +32 -17
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- 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/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/Chart/Chart.js +1 -1
- package/dist-esm/Chart/api/axis.js +1 -1
- package/dist-esm/Chart/api/category.js +1 -1
- package/dist-esm/Chart/api/chart.js +1 -1
- package/dist-esm/Chart/api/color.js +1 -1
- package/dist-esm/Chart/api/data.js +1 -1
- package/dist-esm/Chart/api/export.js +1 -1
- package/dist-esm/Chart/api/flow.js +1 -1
- package/dist-esm/Chart/api/focus.js +1 -1
- package/dist-esm/Chart/api/grid.js +1 -1
- package/dist-esm/Chart/api/group.js +1 -1
- package/dist-esm/Chart/api/legend.js +1 -1
- package/dist-esm/Chart/api/load.js +1 -1
- package/dist-esm/Chart/api/regions.js +1 -1
- package/dist-esm/Chart/api/selection.js +1 -1
- package/dist-esm/Chart/api/show.js +1 -1
- package/dist-esm/Chart/api/stubs.js +1 -1
- package/dist-esm/Chart/api/subchart.js +1 -1
- package/dist-esm/Chart/api/tooltip.js +1 -1
- package/dist-esm/Chart/api/x.js +1 -1
- package/dist-esm/Chart/api/zoom.js +1 -1
- package/dist-esm/ChartInternal/Axis/Axis.js +1 -1
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +1 -1
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
- package/dist-esm/ChartInternal/ChartInternal.js +1 -1
- package/dist-esm/ChartInternal/data/convert.helper.js +1 -1
- package/dist-esm/ChartInternal/data/convert.js +1 -1
- package/dist-esm/ChartInternal/data/data.js +1 -1
- package/dist-esm/ChartInternal/data/load.js +1 -1
- package/dist-esm/ChartInternal/interactions/drag.js +1 -1
- package/dist-esm/ChartInternal/interactions/eventrect.js +39 -7
- package/dist-esm/ChartInternal/interactions/flow.js +1 -1
- package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
- package/dist-esm/ChartInternal/interactions/subchart.js +1 -1
- package/dist-esm/ChartInternal/interactions/zoom.js +1 -1
- package/dist-esm/ChartInternal/internals/category.js +1 -1
- package/dist-esm/ChartInternal/internals/class.js +1 -1
- package/dist-esm/ChartInternal/internals/clip.js +1 -1
- package/dist-esm/ChartInternal/internals/color.js +1 -1
- package/dist-esm/ChartInternal/internals/domain.js +1 -1
- package/dist-esm/ChartInternal/internals/format.js +1 -1
- package/dist-esm/ChartInternal/internals/grid.js +1 -1
- package/dist-esm/ChartInternal/internals/legend.js +1 -1
- package/dist-esm/ChartInternal/internals/redraw.js +1 -1
- package/dist-esm/ChartInternal/internals/region.js +1 -1
- package/dist-esm/ChartInternal/internals/scale.js +1 -1
- package/dist-esm/ChartInternal/internals/selection.js +1 -1
- package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
- package/dist-esm/ChartInternal/internals/size.js +1 -1
- package/dist-esm/ChartInternal/internals/style.js +1 -1
- package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
- package/dist-esm/ChartInternal/internals/text.js +1 -1
- package/dist-esm/ChartInternal/internals/text.util.js +1 -1
- package/dist-esm/ChartInternal/internals/title.js +1 -1
- package/dist-esm/ChartInternal/internals/tooltip.js +1 -1
- package/dist-esm/ChartInternal/internals/transform.js +1 -1
- package/dist-esm/ChartInternal/internals/type.js +1 -1
- package/dist-esm/ChartInternal/shape/arc.js +1 -1
- package/dist-esm/ChartInternal/shape/area.js +1 -1
- package/dist-esm/ChartInternal/shape/bar.js +1 -1
- package/dist-esm/ChartInternal/shape/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
- package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
- package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
- package/dist-esm/ChartInternal/shape/core/path.js +1 -1
- package/dist-esm/ChartInternal/shape/core/point.js +1 -1
- package/dist-esm/ChartInternal/shape/core/treemap.js +1 -1
- package/dist-esm/ChartInternal/shape/funnel.js +1 -1
- package/dist-esm/ChartInternal/shape/gauge.js +1 -1
- package/dist-esm/ChartInternal/shape/line.js +1 -1
- package/dist-esm/ChartInternal/shape/point.js +1 -1
- package/dist-esm/ChartInternal/shape/polar.js +1 -1
- package/dist-esm/ChartInternal/shape/radar.js +1 -1
- package/dist-esm/ChartInternal/shape/shape.js +1 -1
- package/dist-esm/ChartInternal/shape/treemap.js +1 -1
- package/dist-esm/canvas/CanvasAxisRenderer.js +1 -1
- package/dist-esm/canvas/CanvasEngine.js +1 -1
- package/dist-esm/canvas/CanvasPainter.js +1 -1
- package/dist-esm/canvas/CanvasRenderer.js +4 -4
- package/dist-esm/canvas/CanvasTheme.js +1 -1
- package/dist-esm/canvas/HitDetector.js +1 -1
- package/dist-esm/canvas/axisTicks.js +1 -1
- package/dist-esm/canvas/classes.js +1 -1
- package/dist-esm/canvas/color.js +1 -1
- package/dist-esm/canvas/geometry.js +1 -1
- package/dist-esm/canvas/labels.js +1 -1
- package/dist-esm/canvas/pointPattern.js +1 -1
- package/dist-esm/canvas/util.js +1 -1
- package/dist-esm/config/Options/Options.js +1 -1
- package/dist-esm/config/Options/axis/axis.js +1 -1
- package/dist-esm/config/Options/axis/x.js +1 -1
- package/dist-esm/config/Options/axis/y.js +1 -1
- package/dist-esm/config/Options/axis/y2.js +1 -1
- package/dist-esm/config/Options/common/boost.js +1 -1
- package/dist-esm/config/Options/common/color.js +1 -1
- package/dist-esm/config/Options/common/grid.js +1 -1
- package/dist-esm/config/Options/common/legend.js +1 -1
- package/dist-esm/config/Options/common/main.js +1 -1
- package/dist-esm/config/Options/common/point.js +1 -1
- package/dist-esm/config/Options/common/title.js +1 -1
- package/dist-esm/config/Options/common/tooltip.js +1 -1
- package/dist-esm/config/Options/data/axis.js +1 -1
- package/dist-esm/config/Options/data/data.js +1 -1
- package/dist-esm/config/Options/data/selection.js +1 -1
- package/dist-esm/config/Options/interaction/interaction.js +1 -1
- package/dist-esm/config/Options/interaction/subchart.js +1 -1
- package/dist-esm/config/Options/interaction/zoom.js +1 -1
- package/dist-esm/config/Options/shape/arc.js +1 -1
- package/dist-esm/config/Options/shape/area.js +1 -1
- package/dist-esm/config/Options/shape/bar.js +1 -1
- package/dist-esm/config/Options/shape/bubble.js +1 -1
- package/dist-esm/config/Options/shape/candlestick.js +1 -1
- package/dist-esm/config/Options/shape/donut.js +1 -1
- package/dist-esm/config/Options/shape/funnel.js +1 -1
- package/dist-esm/config/Options/shape/gauge.js +1 -1
- package/dist-esm/config/Options/shape/line.js +1 -1
- package/dist-esm/config/Options/shape/pie.js +1 -1
- package/dist-esm/config/Options/shape/polar.js +1 -1
- package/dist-esm/config/Options/shape/radar.js +1 -1
- package/dist-esm/config/Options/shape/scatter.js +1 -1
- package/dist-esm/config/Options/shape/spline.js +1 -1
- package/dist-esm/config/Options/shape/treemap.js +1 -1
- package/dist-esm/config/Store/Element.js +1 -1
- package/dist-esm/config/Store/State.js +1 -1
- package/dist-esm/config/Store/Store.js +1 -1
- package/dist-esm/config/classes.js +1 -1
- package/dist-esm/config/config.js +1 -1
- package/dist-esm/config/const.js +1 -1
- package/dist-esm/config/resolver/axis.core.js +1 -1
- package/dist-esm/config/resolver/axis.js +1 -1
- package/dist-esm/config/resolver/canvas.js +5 -4
- package/dist-esm/config/resolver/canvasShape.js +1 -1
- package/dist-esm/config/resolver/category.js +1 -1
- package/dist-esm/config/resolver/export.js +1 -1
- package/dist-esm/config/resolver/flow.js +1 -1
- package/dist-esm/config/resolver/grid.js +1 -1
- package/dist-esm/config/resolver/interaction/selection.js +1 -1
- package/dist-esm/config/resolver/interaction/subchart.js +1 -1
- package/dist-esm/config/resolver/interaction/zoom.js +1 -1
- package/dist-esm/config/resolver/regions.js +1 -1
- package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/area.js +1 -1
- package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/bar.js +1 -1
- package/dist-esm/config/resolver/shape/bubble.js +1 -1
- package/dist-esm/config/resolver/shape/candlestick.js +1 -1
- package/dist-esm/config/resolver/shape/donut.js +1 -1
- package/dist-esm/config/resolver/shape/funnel.js +1 -1
- package/dist-esm/config/resolver/shape/gauge.js +1 -1
- package/dist-esm/config/resolver/shape/line.js +1 -1
- package/dist-esm/config/resolver/shape/pie.js +1 -1
- package/dist-esm/config/resolver/shape/polar.js +1 -1
- package/dist-esm/config/resolver/shape/radar.js +1 -1
- package/dist-esm/config/resolver/shape/scatter.js +1 -1
- package/dist-esm/config/resolver/shape/treemap.js +1 -1
- package/dist-esm/core.js +3 -3
- package/dist-esm/index.canvas.js +1 -1
- package/dist-esm/index.esm.js +1 -1
- package/dist-esm/module/Cache.js +1 -1
- package/dist-esm/module/browser.js +1 -1
- package/dist-esm/module/dsv.js +1 -1
- package/dist-esm/module/error.js +1 -1
- package/dist-esm/module/generator.js +1 -1
- package/dist-esm/module/sanitize.js +1 -1
- package/dist-esm/module/util/brush.js +1 -1
- package/dist-esm/module/util/dom.js +1 -1
- package/dist-esm/module/util/object.js +1 -1
- package/dist-esm/module/util/type-checks.js +1 -1
- package/dist-esm/module/worker.js +1 -1
- 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 +41 -59
- package/src/ChartInternal/interactions/eventrect.ts +47 -8
- package/src/canvas/CanvasRenderer.ts +2 -2
- 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 `
|
|
110
|
-
6. Run test code by `
|
|
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
|
|
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
|
|
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
|
-
$
|
|
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
|
-
$
|
|
159
|
+
$ pnpm add billboard.js@next
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
### Installation with
|
|
162
|
+
### Installation with pnpm
|
|
163
163
|
|
|
164
164
|
```bash
|
|
165
|
-
$
|
|
165
|
+
$ pnpm add billboard.js
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
### Packages
|
package/dist/billboard.css
CHANGED
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.
|
|
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
|
-
/******/
|
|
123
|
-
/******/
|
|
124
|
-
/******/
|
|
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
|
|
166
|
-
__webpack_require__.r(
|
|
167
|
-
__webpack_require__.d(
|
|
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
|
|
175
|
-
__webpack_require__.r(
|
|
176
|
-
__webpack_require__.d(
|
|
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 (!
|
|
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
|
-
|
|
18375
|
-
|
|
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.
|
|
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(
|
|
34904
|
-
Object.keys(
|
|
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();
|
package/dist/billboard.min.css
CHANGED
|
@@ -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.
|
|
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}
|