billboard.js 4.1.3 → 4.1.5
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 +156 -87
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +19 -19
- package/dist/billboard.pkgd.js +156 -87
- package/dist/billboard.pkgd.min.js +23 -23
- package/dist/billboard.react.js +1 -1
- package/dist/billboard.react.min.js +1 -1
- package/dist/billboard.worker.js +1 -1
- 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 +2 -2
- 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 +13 -6
- 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 +18 -11
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +2 -2
- 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 +1 -1
- package/dist-esm/ChartInternal/interactions/flow.js +23 -16
- 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 +6 -6
- 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/subchart.util.js +1 -1
- package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
- package/dist-esm/ChartInternal/internals/text.js +5 -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 +23 -4
- 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 +5 -4
- 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 +9 -5
- package/dist-esm/ChartInternal/shape/treemap.js +1 -1
- package/dist-esm/canvas/CanvasAxisRenderer.js +18 -15
- 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 +5 -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 +2 -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 +15 -3
- 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/dist-esm/react/index.js +1 -1
- package/package.json +1 -1
- package/src/Chart/api/chart.ts +2 -1
- package/src/Chart/api/flow.ts +20 -7
- package/src/ChartInternal/Axis/AxisRenderer.ts +20 -18
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +3 -1
- package/src/ChartInternal/interactions/flow.ts +50 -19
- package/src/ChartInternal/internals/redraw.ts +15 -9
- package/src/ChartInternal/internals/text.ts +4 -0
- package/src/ChartInternal/internals/tooltip.ts +24 -6
- package/src/ChartInternal/shape/point.ts +6 -3
- package/src/ChartInternal/shape/shape.ts +15 -3
- package/src/canvas/CanvasAxisRenderer.ts +19 -22
- package/src/config/Options/interaction/subchart.ts +4 -0
- package/src/config/Store/State.ts +1 -0
- package/src/config/resolver/canvas.ts +20 -2
- package/types/options.d.ts +3 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/
|
|
10
10
|
import point_default from "../../../ChartInternal/shape/core/point.js";
|
|
11
11
|
import line_default from "../../../ChartInternal/shape/line.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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/
|
|
10
10
|
import { isObject } from "./module/util/type-checks.js";
|
|
11
11
|
import { mergeObj } from "./module/util/object.js";
|
|
@@ -18,7 +18,7 @@ import Chart from "./Chart/Chart.js";
|
|
|
18
18
|
let defaults = Object.create(null);
|
|
19
19
|
/**
|
|
20
20
|
* @namespace bb
|
|
21
|
-
* @version 4.1.
|
|
21
|
+
* @version 4.1.5
|
|
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.1.
|
|
31
|
+
version: "4.1.5",
|
|
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
package/dist-esm/index.esm.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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/
|
|
10
10
|
import "./Chart/api/stubs.js";
|
|
11
11
|
import { area, areaLineRange, areaSpline, areaSplineRange, areaStep, areaStepRange } from "./config/resolver/shape/area.js";
|
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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/
|
|
10
10
|
import { cancelAnimationFrame, cancelIdleCallback, requestAnimationFrame, requestIdleCallback, window as win } from "./browser.js";
|
|
11
11
|
import { isArray, isNumber } 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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/
|
|
10
10
|
import { requestAnimationFrame } from "../browser.js";
|
|
11
11
|
import { isArray, isDefined, isFunction, isNumber, isObject, isString, notEmpty } from "./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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -63,7 +63,7 @@ var Plugin = class {
|
|
|
63
63
|
$$;
|
|
64
64
|
options;
|
|
65
65
|
config;
|
|
66
|
-
static version = "4.1.
|
|
66
|
+
static version = "4.1.5";
|
|
67
67
|
/**
|
|
68
68
|
* Constructor
|
|
69
69
|
* @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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -169,7 +169,7 @@ var Plugin = class {
|
|
|
169
169
|
$$;
|
|
170
170
|
options;
|
|
171
171
|
config;
|
|
172
|
-
static version = "4.1.
|
|
172
|
+
static version = "4.1.5";
|
|
173
173
|
/**
|
|
174
174
|
* Constructor
|
|
175
175
|
* @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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -200,7 +200,7 @@ var Plugin = class {
|
|
|
200
200
|
$$;
|
|
201
201
|
options;
|
|
202
202
|
config;
|
|
203
|
-
static version = "4.1.
|
|
203
|
+
static version = "4.1.5";
|
|
204
204
|
/**
|
|
205
205
|
* Constructor
|
|
206
206
|
* @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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -429,7 +429,7 @@ var Plugin = class {
|
|
|
429
429
|
$$;
|
|
430
430
|
options;
|
|
431
431
|
config;
|
|
432
|
-
static version = "4.1.
|
|
432
|
+
static version = "4.1.5";
|
|
433
433
|
/**
|
|
434
434
|
* Constructor
|
|
435
435
|
* @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.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -175,7 +175,7 @@ var Plugin = class {
|
|
|
175
175
|
$$;
|
|
176
176
|
options;
|
|
177
177
|
config;
|
|
178
|
-
static version = "4.1.
|
|
178
|
+
static version = "4.1.5";
|
|
179
179
|
/**
|
|
180
180
|
* Constructor
|
|
181
181
|
* @param {Any} options config option object
|
package/dist-esm/react/index.js
CHANGED
package/package.json
CHANGED
package/src/Chart/api/chart.ts
CHANGED
|
@@ -70,7 +70,8 @@ export default {
|
|
|
70
70
|
|
|
71
71
|
// keep current zoom domain
|
|
72
72
|
if ($$.scale.zoom) {
|
|
73
|
-
|
|
73
|
+
// in the range of .zoom(): a category scale reads its end one category further
|
|
74
|
+
state.current.zoomDomain = $$.zoom?.getDomain() ?? $$.scale.zoom.domain();
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
$$.scale.zoom = null;
|
package/src/Chart/api/flow.ts
CHANGED
|
@@ -86,6 +86,18 @@ export default {
|
|
|
86
86
|
const orgDataCount = $$.getMaxDataCount();
|
|
87
87
|
const targets = $$.convertDataToTargets(data, true);
|
|
88
88
|
const isTimeSeries = $$.axis.isTimeSeries();
|
|
89
|
+
// timeseries and custom x take x from the data; otherwise x follows the index
|
|
90
|
+
const isCustomX = !isTimeSeries && $$.axis.isCustomX() && !$$.axis.isCategorized();
|
|
91
|
+
const hasDataX = isTimeSeries || isCustomX;
|
|
92
|
+
const firstValue = $$.data.targets.find(t => t.values.length)?.values[0];
|
|
93
|
+
// updateDataIndexByX() renumbers the index from 0 after each flow while x keeps
|
|
94
|
+
// moving on, so the gap between them carries x forward
|
|
95
|
+
const xOffset = firstValue ? firstValue.x - firstValue.index : 0;
|
|
96
|
+
const getX = (
|
|
97
|
+
index: number
|
|
98
|
+
) => (isTimeSeries ? $$.getOtherTargetX(index) : index + xOffset);
|
|
99
|
+
// x of the values added by this flow, for series missing from the flow data
|
|
100
|
+
const flowedXs: number[] = [];
|
|
89
101
|
|
|
90
102
|
// Update/Add data
|
|
91
103
|
$$.data.targets.forEach(t => {
|
|
@@ -106,10 +118,11 @@ export default {
|
|
|
106
118
|
for (let j = 0; j < length; j++) {
|
|
107
119
|
values[j].index = tail + j;
|
|
108
120
|
|
|
109
|
-
if (!
|
|
110
|
-
values[j].x = tail + j;
|
|
121
|
+
if (!hasDataX) {
|
|
122
|
+
values[j].x = getX(tail + j);
|
|
111
123
|
}
|
|
112
124
|
|
|
125
|
+
flowedXs[j] = values[j].x;
|
|
113
126
|
t.values.push(values[j]);
|
|
114
127
|
}
|
|
115
128
|
|
|
@@ -136,7 +149,7 @@ export default {
|
|
|
136
149
|
t.values.push({
|
|
137
150
|
id: t.id,
|
|
138
151
|
index: tail + j,
|
|
139
|
-
x:
|
|
152
|
+
x: isCustomX ? flowedXs[j] : getX(tail + j),
|
|
140
153
|
value: null
|
|
141
154
|
});
|
|
142
155
|
}
|
|
@@ -165,7 +178,7 @@ export default {
|
|
|
165
178
|
values[i] = {
|
|
166
179
|
id: t.id,
|
|
167
180
|
index,
|
|
168
|
-
x:
|
|
181
|
+
x: isCustomX ? $$.data.targets[0].values[i]?.x : getX(index),
|
|
169
182
|
value: null
|
|
170
183
|
};
|
|
171
184
|
}
|
|
@@ -176,8 +189,8 @@ export default {
|
|
|
176
189
|
|
|
177
190
|
v.index += tail;
|
|
178
191
|
|
|
179
|
-
if (!
|
|
180
|
-
v.x
|
|
192
|
+
if (!hasDataX) {
|
|
193
|
+
v.x = getX(v.index);
|
|
181
194
|
}
|
|
182
195
|
}
|
|
183
196
|
});
|
|
@@ -257,6 +270,7 @@ export default {
|
|
|
257
270
|
withUpdateXDomain: true
|
|
258
271
|
});
|
|
259
272
|
$$.updateTypesElements();
|
|
273
|
+
$$.updateCanvasFlowFocus?.();
|
|
260
274
|
args.done?.call($$.api);
|
|
261
275
|
return;
|
|
262
276
|
}
|
|
@@ -269,7 +283,6 @@ export default {
|
|
|
269
283
|
// Redraw with new targets
|
|
270
284
|
$$.redraw({
|
|
271
285
|
flow: {
|
|
272
|
-
index: baseValue.index,
|
|
273
286
|
length: length,
|
|
274
287
|
duration: isValue(args.duration) ?
|
|
275
288
|
args.duration :
|
|
@@ -545,34 +545,36 @@ export default class AxisRenderer {
|
|
|
545
545
|
);
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
// split given text by tick width size
|
|
549
|
-
//
|
|
550
|
-
|
|
551
|
-
|
|
548
|
+
// split given text by tick width size.
|
|
549
|
+
// iterate rather than recurse per line, so a very long label cannot overflow the stack
|
|
550
|
+
const text = String(tickText);
|
|
551
|
+
const result: string[] = [];
|
|
552
|
+
let start = 0;
|
|
553
|
+
|
|
554
|
+
while (true) {
|
|
552
555
|
let spaceIndex;
|
|
553
|
-
let
|
|
556
|
+
let splitAt = -1;
|
|
554
557
|
|
|
555
|
-
for (let i = 1; i < text.length; i++) {
|
|
556
|
-
if (text.charAt(i) === " ") {
|
|
558
|
+
for (let i = 1; start + i < text.length; i++) {
|
|
559
|
+
if (text.charAt(start + i) === " ") {
|
|
557
560
|
spaceIndex = i;
|
|
558
561
|
}
|
|
559
562
|
|
|
560
|
-
subtext = text.substr(0, i + 1);
|
|
561
|
-
textWidth = charWidth * subtext.length;
|
|
562
|
-
|
|
563
563
|
// if text width gets over tick width, split by space index or current index
|
|
564
|
-
if (tickWidth <
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
text.slice(spaceIndex ? spaceIndex + 1 : i)
|
|
568
|
-
);
|
|
564
|
+
if (tickWidth < charWidth * (i + 1)) {
|
|
565
|
+
splitAt = i;
|
|
566
|
+
break;
|
|
569
567
|
}
|
|
570
568
|
}
|
|
571
569
|
|
|
572
|
-
|
|
573
|
-
|
|
570
|
+
if (splitAt === -1) {
|
|
571
|
+
result.push(text.slice(start));
|
|
572
|
+
return result;
|
|
573
|
+
}
|
|
574
574
|
|
|
575
|
-
|
|
575
|
+
result.push(text.substr(start, spaceIndex || splitAt));
|
|
576
|
+
start += spaceIndex ? spaceIndex + 1 : splitAt;
|
|
577
|
+
}
|
|
576
578
|
}
|
|
577
579
|
|
|
578
580
|
scale(x?): AxisRenderer {
|
|
@@ -166,7 +166,9 @@ export default class AxisRendererHelper {
|
|
|
166
166
|
const {config} = this;
|
|
167
167
|
let transitionSelection = selection;
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
// a flow passes its own transition (setTransition), which applies even when the
|
|
170
|
+
// chart transition is off, so the ticks slide with the shapes
|
|
171
|
+
if (config.withoutTransition && !config.transition) {
|
|
170
172
|
transitionSelection = selection.interrupt();
|
|
171
173
|
} else if (config.transition || !this.owner.params.noTransition) {
|
|
172
174
|
// prevent for 'transition not found' case
|