billboard.js 4.0.2 → 4.0.3
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 +102 -71
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +16 -17
- package/dist/billboard.pkgd.js +102 -71
- package/dist/billboard.pkgd.min.js +22 -23
- 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.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
- 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 +7 -11
- 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 +15 -6
- 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 +1 -1
- 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 +5 -5
- 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 +2 -2
- 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 +26 -34
- 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 +23 -7
- 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 +2 -2
- package/dist-esm/ChartInternal/shape/point.js +22 -10
- 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 +19 -4
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/src/Chart/api/focus.ts +8 -12
- package/src/ChartInternal/data/data.ts +15 -5
- package/src/ChartInternal/internals/color.ts +5 -4
- package/src/ChartInternal/internals/text.ts +1 -1
- package/src/ChartInternal/internals/type.ts +26 -32
- package/src/ChartInternal/shape/bar.ts +26 -7
- package/src/ChartInternal/shape/line.ts +1 -1
- package/src/ChartInternal/shape/point.ts +26 -12
- package/src/ChartInternal/shape/shape.ts +25 -3
|
@@ -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.3
|
|
9
9
|
*/
|
|
10
10
|
import ChartInternal from '../../../ChartInternal/ChartInternal.js';
|
|
11
11
|
import shapeArc from '../../../ChartInternal/shape/arc.js';
|
|
@@ -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.3
|
|
9
9
|
*/
|
|
10
10
|
import shapePointCommon from '../../../ChartInternal/shape/core/point.js';
|
|
11
11
|
import shapeLine from '../../../ChartInternal/shape/line.js';
|
|
@@ -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.3
|
|
9
9
|
*/
|
|
10
10
|
import shapeBar from '../../../ChartInternal/shape/bar.js';
|
|
11
11
|
import shapePointCommon from '../../../ChartInternal/shape/core/point.js';
|
|
@@ -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.3
|
|
9
9
|
*/
|
|
10
10
|
import shapeBubbleCommon from '../../../ChartInternal/shape/core/bubble.js';
|
|
11
11
|
import shapePointCommon from '../../../ChartInternal/shape/core/point.js';
|
|
@@ -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.3
|
|
9
9
|
*/
|
|
10
10
|
import shapeCandlestick from '../../../ChartInternal/shape/candlestick.js';
|
|
11
11
|
import shapePointCommon from '../../../ChartInternal/shape/core/point.js';
|
|
@@ -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.3
|
|
9
9
|
*/
|
|
10
10
|
import shapePointCommon from '../../../ChartInternal/shape/core/point.js';
|
|
11
11
|
import shapePoint from '../../../ChartInternal/shape/point.js';
|
package/dist-esm/core.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.3
|
|
9
9
|
*/
|
|
10
10
|
import Chart from './Chart/Chart.js';
|
|
11
11
|
import { mergeObj } from './module/util/object.js';
|
|
@@ -18,7 +18,7 @@ import { isObject } from './module/util/type-checks.js';
|
|
|
18
18
|
let defaults = Object.create(null);
|
|
19
19
|
/**
|
|
20
20
|
* @namespace bb
|
|
21
|
-
* @version 4.0.
|
|
21
|
+
* @version 4.0.3
|
|
22
22
|
*/
|
|
23
23
|
const bb = {
|
|
24
24
|
/**
|
|
@@ -28,7 +28,7 @@ const bb = {
|
|
|
28
28
|
* bb.version; // "1.0.0"
|
|
29
29
|
* @memberof bb
|
|
30
30
|
*/
|
|
31
|
-
version: "4.0.
|
|
31
|
+
version: "4.0.3",
|
|
32
32
|
/**
|
|
33
33
|
* Generate chart
|
|
34
34
|
* - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:
|
package/dist-esm/index.canvas.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.3
|
|
9
9
|
*/
|
|
10
10
|
import './Chart/api/stubs.js';
|
|
11
11
|
export { area, areaLineRange, areaSpline, areaSplineRange, areaStep, areaStepRange, bar, bubble, candlestick, line, scatter, spline, step, treemap } from './config/resolver/canvasShape.js';
|
package/dist-esm/index.esm.js
CHANGED
package/dist-esm/module/Cache.js
CHANGED
package/dist-esm/module/dsv.js
CHANGED
package/dist-esm/module/error.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.3
|
|
9
9
|
*/
|
|
10
10
|
import { requestIdleCallback, window as win, cancelIdleCallback } from './browser.js';
|
|
11
11
|
import { isNumber, isArray } from './util/type-checks.js';
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -75,7 +75,7 @@ class Plugin {
|
|
|
75
75
|
$$;
|
|
76
76
|
options;
|
|
77
77
|
config;
|
|
78
|
-
static version = "4.0.
|
|
78
|
+
static version = "4.0.3";
|
|
79
79
|
/**
|
|
80
80
|
* Constructor
|
|
81
81
|
* @param {Any} options config option object
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -179,7 +179,7 @@ class Plugin {
|
|
|
179
179
|
$$;
|
|
180
180
|
options;
|
|
181
181
|
config;
|
|
182
|
-
static version = "4.0.
|
|
182
|
+
static version = "4.0.3";
|
|
183
183
|
/**
|
|
184
184
|
* Constructor
|
|
185
185
|
* @param {Any} options config option object
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -248,7 +248,7 @@ class Plugin {
|
|
|
248
248
|
$$;
|
|
249
249
|
options;
|
|
250
250
|
config;
|
|
251
|
-
static version = "4.0.
|
|
251
|
+
static version = "4.0.3";
|
|
252
252
|
/**
|
|
253
253
|
* Constructor
|
|
254
254
|
* @param {Any} options config option object
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -530,7 +530,7 @@ class Plugin {
|
|
|
530
530
|
$$;
|
|
531
531
|
options;
|
|
532
532
|
config;
|
|
533
|
-
static version = "4.0.
|
|
533
|
+
static version = "4.0.3";
|
|
534
534
|
/**
|
|
535
535
|
* Constructor
|
|
536
536
|
* @param {Any} options config option object
|
|
@@ -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.3
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -119,7 +119,7 @@ class Plugin {
|
|
|
119
119
|
$$;
|
|
120
120
|
options;
|
|
121
121
|
config;
|
|
122
|
-
static version = "4.0.
|
|
122
|
+
static version = "4.0.3";
|
|
123
123
|
/**
|
|
124
124
|
* Constructor
|
|
125
125
|
* @param {Any} options config option object
|
package/package.json
CHANGED
package/src/Chart/api/focus.ts
CHANGED
|
@@ -141,10 +141,7 @@ export default {
|
|
|
141
141
|
const $$ = this.internal;
|
|
142
142
|
const {config, state, $el} = $$;
|
|
143
143
|
const targetIds = $$.mapToTargetIds(targetIdsValue);
|
|
144
|
-
|
|
145
|
-
if (state.isCanvasMode) {
|
|
146
|
-
const changed = !!state.focusedTargetIds?.size || !!state.defocusedTargetIds?.size;
|
|
147
|
-
|
|
144
|
+
const resetLegend = () => {
|
|
148
145
|
if (config.legend_show) {
|
|
149
146
|
$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
|
|
150
147
|
$el.legend.selectAll($$.selectorLegends(targetIds))
|
|
@@ -153,6 +150,12 @@ export default {
|
|
|
153
150
|
})
|
|
154
151
|
.classed($FOCUS.legendItemFocused, false);
|
|
155
152
|
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
if (state.isCanvasMode) {
|
|
156
|
+
const changed = !!state.focusedTargetIds?.size || !!state.defocusedTargetIds?.size;
|
|
157
|
+
|
|
158
|
+
resetLegend();
|
|
156
159
|
|
|
157
160
|
state.focusedTargetIds = new Set();
|
|
158
161
|
state.defocusedTargetIds = new Set();
|
|
@@ -166,14 +169,7 @@ export default {
|
|
|
166
169
|
|
|
167
170
|
$$.hasArcType(null, ["polar"]) && $$.unexpandArc(targetIds);
|
|
168
171
|
|
|
169
|
-
|
|
170
|
-
$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
|
|
171
|
-
$el.legend.selectAll($$.selectorLegends(targetIds))
|
|
172
|
-
.filter(function() {
|
|
173
|
-
return d3Select(this).classed($FOCUS.legendItemFocused);
|
|
174
|
-
})
|
|
175
|
-
.classed($FOCUS.legendItemFocused, false);
|
|
176
|
-
}
|
|
172
|
+
resetLegend();
|
|
177
173
|
|
|
178
174
|
state.focusedTargetIds = new Set();
|
|
179
175
|
state.defocusedTargetIds = new Set();
|
|
@@ -35,6 +35,16 @@ const rangedDataKeyIndex: Record<string, Record<string, number>> = {
|
|
|
35
35
|
candlestick: {open: 0, high: 1, low: 2, close: 3, volume: 4}
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Normalize target ids to an array
|
|
40
|
+
* @param {Array|string} targetIds Target ids
|
|
41
|
+
* @returns {Array} Target ids array
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
function normalizeTargetIds(targetIds: string[] | string): string[] {
|
|
45
|
+
return (isArray(targetIds) ? targetIds : [targetIds]) as string[];
|
|
46
|
+
}
|
|
47
|
+
|
|
38
48
|
export default {
|
|
39
49
|
isX(key) {
|
|
40
50
|
const $$ = this;
|
|
@@ -628,9 +638,8 @@ export default {
|
|
|
628
638
|
*/
|
|
629
639
|
addTargetIds(type: string, targetIds: string[] | string): void {
|
|
630
640
|
const {state} = this;
|
|
631
|
-
const ids = (isArray(targetIds) ? targetIds : [targetIds]) as string[];
|
|
632
641
|
|
|
633
|
-
|
|
642
|
+
normalizeTargetIds(targetIds).forEach(v => state[type].add(v));
|
|
634
643
|
},
|
|
635
644
|
|
|
636
645
|
/**
|
|
@@ -641,9 +650,8 @@ export default {
|
|
|
641
650
|
*/
|
|
642
651
|
removeTargetIds(type: string, targetIds: string[] | string): void {
|
|
643
652
|
const {state} = this;
|
|
644
|
-
const ids = (isArray(targetIds) ? targetIds : [targetIds]) as string[];
|
|
645
653
|
|
|
646
|
-
|
|
654
|
+
normalizeTargetIds(targetIds).forEach(v => state[type].delete(v));
|
|
647
655
|
},
|
|
648
656
|
|
|
649
657
|
addHiddenTargetIds(targetIds: string[]): void {
|
|
@@ -1177,8 +1185,10 @@ export default {
|
|
|
1177
1185
|
const yIndex = +!isRotated; // true: 0, false: 1
|
|
1178
1186
|
const y = $$.circleY(data, data.index);
|
|
1179
1187
|
const x = (scale.zoom || scale.x)(data.x);
|
|
1188
|
+
const dx = x - pos[xIndex];
|
|
1189
|
+
const dy = y - pos[yIndex];
|
|
1180
1190
|
|
|
1181
|
-
return Math.sqrt(
|
|
1191
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
1182
1192
|
},
|
|
1183
1193
|
|
|
1184
1194
|
/**
|
|
@@ -229,14 +229,15 @@ export default {
|
|
|
229
229
|
const colorValue = sanitize(v === "" ? color : color?.[v] || "");
|
|
230
230
|
|
|
231
231
|
if (defs.select(`#${id}`).empty()) {
|
|
232
|
-
defs.append("filter")
|
|
232
|
+
const filter = defs.append("filter")
|
|
233
233
|
.attr("x", attr.x)
|
|
234
234
|
.attr("y", attr.y)
|
|
235
235
|
.attr("width", attr.width)
|
|
236
236
|
.attr("height", attr.height)
|
|
237
|
-
.attr("id", id)
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
.attr("id", id);
|
|
238
|
+
|
|
239
|
+
filter.append("feFlood").attr("flood-color", colorValue);
|
|
240
|
+
filter.append("feComposite").attr("in", "SourceGraphic");
|
|
240
241
|
}
|
|
241
242
|
});
|
|
242
243
|
}
|
|
@@ -598,7 +598,7 @@ export default {
|
|
|
598
598
|
const translate = getTranslation(textNode.node());
|
|
599
599
|
|
|
600
600
|
// Calculates the length of the hypotenuse
|
|
601
|
-
const calcHypo = (x, y) => Math.sqrt(
|
|
601
|
+
const calcHypo = (x, y) => Math.sqrt(x * x + y * y);
|
|
602
602
|
|
|
603
603
|
textNode.node() && filteredTextNodes.each(function() {
|
|
604
604
|
const coordinate = getTranslation(this);
|