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
package/dist/billboard.pkgd.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
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - @types/d3-selection ^3.0.12
|
|
@@ -29848,23 +29848,27 @@ function splitTickTextByWidth(text, width, painter) {
|
|
|
29848
29848
|
return [text];
|
|
29849
29849
|
}
|
|
29850
29850
|
const charWidth = painter.measureText("0").width || 5.5;
|
|
29851
|
-
|
|
29851
|
+
const lines = [];
|
|
29852
|
+
let start = 0;
|
|
29853
|
+
while (true) {
|
|
29852
29854
|
let spaceIndex;
|
|
29853
|
-
|
|
29854
|
-
|
|
29855
|
+
let splitAt = -1;
|
|
29856
|
+
for (let i = 1; start + i < text.length; i++) {
|
|
29857
|
+
if (text.charAt(start + i) === " ") {
|
|
29855
29858
|
spaceIndex = i;
|
|
29856
29859
|
}
|
|
29857
29860
|
if (width < charWidth * (i + 1)) {
|
|
29858
|
-
|
|
29859
|
-
|
|
29860
|
-
lines.concat(value.slice(0, splitIndex)),
|
|
29861
|
-
value.slice(spaceIndex ? spaceIndex + 1 : i)
|
|
29862
|
-
);
|
|
29861
|
+
splitAt = i;
|
|
29862
|
+
break;
|
|
29863
29863
|
}
|
|
29864
29864
|
}
|
|
29865
|
-
|
|
29865
|
+
if (splitAt === -1) {
|
|
29866
|
+
lines.push(text.slice(start));
|
|
29867
|
+
return lines;
|
|
29868
|
+
}
|
|
29869
|
+
lines.push(text.slice(start, start + (spaceIndex || splitAt)));
|
|
29870
|
+
start += spaceIndex ? spaceIndex + 1 : splitAt;
|
|
29866
29871
|
}
|
|
29867
|
-
return split([], text);
|
|
29868
29872
|
}
|
|
29869
29873
|
function getXTickTextWidth($$, ticks, isRotated, targetScale) {
|
|
29870
29874
|
var _a, _b;
|
|
@@ -38405,6 +38409,7 @@ class State {
|
|
|
38405
38409
|
isCanvasMode: false,
|
|
38406
38410
|
canvasShape: null,
|
|
38407
38411
|
canvasFocusKey: null,
|
|
38412
|
+
canvasFocusData: null,
|
|
38408
38413
|
canvasSubchartBrushDragging: false,
|
|
38409
38414
|
canvasSubchartBrushMode: null,
|
|
38410
38415
|
canvasSubchartBrushStart: null,
|
|
@@ -44795,7 +44800,7 @@ function _getLegendTouchOption($$) {
|
|
|
44795
44800
|
|
|
44796
44801
|
/* harmony default export */ var redraw = ({
|
|
44797
44802
|
redraw(options = {}) {
|
|
44798
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
44803
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
44799
44804
|
const $$ = this;
|
|
44800
44805
|
const { config, state, $el } = $$;
|
|
44801
44806
|
const { main, treemap } = $el;
|
|
@@ -44831,27 +44836,27 @@ function _getLegendTouchOption($$) {
|
|
|
44831
44836
|
$$.updateSizes(initializing);
|
|
44832
44837
|
if (state.isCanvasMode) {
|
|
44833
44838
|
const zoomScale = $$.scale.zoom;
|
|
44834
|
-
const zoomDomain = zoomScale == null ? void 0 : zoomScale.domain();
|
|
44839
|
+
const zoomDomain = (_d = (_c = zoomScale == null ? void 0 : zoomScale.orgDomain) == null ? void 0 : _c.call(zoomScale)) != null ? _d : zoomScale == null ? void 0 : zoomScale.domain();
|
|
44835
44840
|
zoomScale && ($$.scale.zoom = null);
|
|
44836
44841
|
$$.updateScales(initializing, wth.UpdateXDomain);
|
|
44837
44842
|
if (zoomScale) {
|
|
44838
44843
|
zoomScale.range($$.scale.x.range());
|
|
44839
44844
|
zoomDomain && zoomScale.domain(zoomDomain);
|
|
44840
|
-
$$.scale.zoom = $$.getCustomizedXScale(zoomScale);
|
|
44845
|
+
$$.scale.zoom = $$.getCustomizedXScale((_f = (_e = zoomScale.orgScale) == null ? void 0 : _e.call(zoomScale)) != null ? _f : zoomScale);
|
|
44841
44846
|
$$.axis.x.scale($$.scale.zoom);
|
|
44842
44847
|
$$.scale.x.domain(config.zoom_rescale ? zoomDomain : $$.org.xDomain);
|
|
44843
44848
|
$$.scale.subX.domain($$.org.xDomain);
|
|
44844
44849
|
}
|
|
44845
44850
|
state.hasAxis && $$.axis.syncAxisDomains(targetsToShow, wth, flow);
|
|
44846
|
-
state.hasAxis && ((
|
|
44851
|
+
state.hasAxis && ((_g = $$.applyCanvasSubchartDomain) == null ? void 0 : _g.call($$));
|
|
44847
44852
|
const shape = needShapeUpdate ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();
|
|
44848
44853
|
if (needShapeUpdate) {
|
|
44849
44854
|
state._cachedDrawShape = shape;
|
|
44850
44855
|
}
|
|
44851
44856
|
if (config.legend_show && $el.legend && !(config.legend_contents_bindto && config.legend_contents_template)) {
|
|
44852
|
-
(
|
|
44857
|
+
(_h = $$.positionHtmlLegend) == null ? void 0 : _h.call($$);
|
|
44853
44858
|
}
|
|
44854
|
-
(
|
|
44859
|
+
(_i = $$.resizeCanvas) == null ? void 0 : _i.call($$);
|
|
44855
44860
|
state.canvasFocusKey = null;
|
|
44856
44861
|
$$.renderCanvasFrame(shape, null, true);
|
|
44857
44862
|
initializing && $$.updateTypesElements();
|
|
@@ -44872,11 +44877,11 @@ function _getLegendTouchOption($$) {
|
|
|
44872
44877
|
$$.updateDimension(true);
|
|
44873
44878
|
}
|
|
44874
44879
|
config.data_empty_label_text && main.select(`text.${$TEXT.text}.${$COMMON.empty}`).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null);
|
|
44875
|
-
(
|
|
44880
|
+
(_j = $$.redrawTitle) == null ? void 0 : _j.call($$);
|
|
44876
44881
|
if (state.hasAxis) {
|
|
44877
44882
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
44878
|
-
((
|
|
44879
|
-
config.regions.length && ((
|
|
44883
|
+
((_k = $$.hasGrid) == null ? void 0 : _k.call($$)) && $$.updateGrid();
|
|
44884
|
+
config.regions.length && ((_l = $$.updateRegion) == null ? void 0 : _l.call($$));
|
|
44880
44885
|
["bar", "candlestick", "line", "area"].forEach((v) => {
|
|
44881
44886
|
const name = capitalize(v);
|
|
44882
44887
|
if (/^(line|area)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {
|
|
@@ -44888,7 +44893,7 @@ function _getLegendTouchOption($$) {
|
|
|
44888
44893
|
$el.text && main.selectAll(`.${$SELECT.selectedCircles}`).filter($$.isBarType.bind($$)).selectAll("circle").remove();
|
|
44889
44894
|
if (config.interaction_enabled && !flow && wth.EventRect) {
|
|
44890
44895
|
$$.redrawEventRect();
|
|
44891
|
-
(
|
|
44896
|
+
(_m = $$.bindZoomEvent) == null ? void 0 : _m.call($$);
|
|
44892
44897
|
}
|
|
44893
44898
|
} else {
|
|
44894
44899
|
$el.arcs && $$.redrawArc(duration, durationForExit, wth.Transform);
|
|
@@ -44899,9 +44904,9 @@ function _getLegendTouchOption($$) {
|
|
|
44899
44904
|
}
|
|
44900
44905
|
if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
|
|
44901
44906
|
if (needShapeUpdate) {
|
|
44902
|
-
$$.updateCircle();
|
|
44907
|
+
$$.updateCircle(false, !!flow);
|
|
44903
44908
|
}
|
|
44904
|
-
} else if ((
|
|
44909
|
+
} else if ((_n = $$.hasLegendDefsPoint) == null ? void 0 : _n.call($$)) {
|
|
44905
44910
|
$$.data.targets.forEach($$.point("create", this));
|
|
44906
44911
|
}
|
|
44907
44912
|
if ($$.hasDataLabel() && !$$.hasArcType(null, ["radar"])) {
|
|
@@ -44926,13 +44931,13 @@ function _getLegendTouchOption($$) {
|
|
|
44926
44931
|
generateRedrawList(targets, flow, duration, withSubchart, needShapeRegen = true) {
|
|
44927
44932
|
const $$ = this;
|
|
44928
44933
|
const { config, state } = $$;
|
|
44934
|
+
if (state.hasAxis) {
|
|
44935
|
+
config.subchart_show && $$.redrawSubchart(withSubchart, duration);
|
|
44936
|
+
}
|
|
44929
44937
|
const shape = needShapeRegen ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();
|
|
44930
44938
|
if (needShapeRegen) {
|
|
44931
44939
|
state._cachedDrawShape = shape;
|
|
44932
44940
|
}
|
|
44933
|
-
if (state.hasAxis) {
|
|
44934
|
-
config.subchart_show && $$.redrawSubchart(withSubchart, duration, shape);
|
|
44935
|
-
}
|
|
44936
44941
|
const flowFn = flow && $$.generateFlow({
|
|
44937
44942
|
targets,
|
|
44938
44943
|
flow,
|
|
@@ -44940,7 +44945,7 @@ function _getLegendTouchOption($$) {
|
|
|
44940
44945
|
shape,
|
|
44941
44946
|
xv: $$.xv.bind($$)
|
|
44942
44947
|
});
|
|
44943
|
-
const withTransition =
|
|
44948
|
+
const withTransition = !flowFn && duration && isTabVisible();
|
|
44944
44949
|
const redrawList = $$.getRedrawList(shape, flow, flowFn, withTransition);
|
|
44945
44950
|
const afterRedraw = () => {
|
|
44946
44951
|
flowFn && flowFn();
|
|
@@ -45808,6 +45813,7 @@ function batchGetBBox(elements) {
|
|
|
45808
45813
|
});
|
|
45809
45814
|
}
|
|
45810
45815
|
text.each(function(d, i) {
|
|
45816
|
+
var _a;
|
|
45811
45817
|
const labelDimension = dimensions.get(this);
|
|
45812
45818
|
const node = $T(
|
|
45813
45819
|
hasTreemap && this.childElementCount ? this.parentNode : this,
|
|
@@ -45828,6 +45834,7 @@ function batchGetBBox(elements) {
|
|
|
45828
45834
|
node.attr("transform", `translate(${pos.x} ${pos.y}) ${rotateString}`);
|
|
45829
45835
|
} else {
|
|
45830
45836
|
node.attr("x", pos.x).attr("y", pos.y);
|
|
45837
|
+
hasTreemap && ((_a = this.parentNode) == null ? void 0 : _a.removeAttribute("transform"));
|
|
45831
45838
|
}
|
|
45832
45839
|
config.data_labels.border && updateTextBorder.call($$, node.node(), pos, `${$TEXT.textBorderRect}-${i}`);
|
|
45833
45840
|
});
|
|
@@ -46195,6 +46202,11 @@ function _getCanvasTitleHeight($$) {
|
|
|
46195
46202
|
|
|
46196
46203
|
const RE_WHITESPACE = /(\r?\n|\t)/g;
|
|
46197
46204
|
const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
46205
|
+
function getRangeValueHtml(values) {
|
|
46206
|
+
return `<div style="display:inline-grid;grid-template-columns:auto auto;gap:0 .3em;text-align:left">${values.map(([name, v]) => `<b style="text-align:right">${name}:</b><span>${v}</span>`).join(
|
|
46207
|
+
""
|
|
46208
|
+
)}</div>`;
|
|
46209
|
+
}
|
|
46198
46210
|
/* harmony default export */ var internals_tooltip = ({
|
|
46199
46211
|
/**
|
|
46200
46212
|
* Initializes the tooltip
|
|
@@ -46335,7 +46347,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
46335
46347
|
(v) => valueFormat($$.getRangedData(row, v), ...param)
|
|
46336
46348
|
);
|
|
46337
46349
|
const mid = valueFormat(getRowValue(row), ...param);
|
|
46338
|
-
value =
|
|
46350
|
+
value = getRangeValueHtml([["Mid", mid], ["High", high], ["Low", low]]);
|
|
46339
46351
|
} else if ($$.isCandlestickType(row)) {
|
|
46340
46352
|
const [open, high, low, close, volume] = ["open", "high", "low", "close", "volume"].map((v) => {
|
|
46341
46353
|
const value2 = $$.getRangedData(row, v, "candlestick");
|
|
@@ -46344,7 +46356,13 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
46344
46356
|
...param
|
|
46345
46357
|
) : void 0;
|
|
46346
46358
|
});
|
|
46347
|
-
value =
|
|
46359
|
+
value = getRangeValueHtml([
|
|
46360
|
+
["Open", open],
|
|
46361
|
+
["High", high],
|
|
46362
|
+
["Low", low],
|
|
46363
|
+
["Close", close],
|
|
46364
|
+
...volume ? [["Volume", volume]] : []
|
|
46365
|
+
]);
|
|
46348
46366
|
} else if ($$.isBarRangeType(row)) {
|
|
46349
46367
|
const { value: rangeValue, id, index } = row;
|
|
46350
46368
|
value = `${valueFormat(rangeValue, void 0, id, index)}`;
|
|
@@ -46687,7 +46705,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
46687
46705
|
$el: { eventRect, svg, tooltip },
|
|
46688
46706
|
state: { event, hasAxis, hasRadar, hasTreemap }
|
|
46689
46707
|
} = $$;
|
|
46690
|
-
if ($$.state.isCanvasMode) {
|
|
46708
|
+
if ($$.state.isCanvasMode || $$.state.flowing) {
|
|
46691
46709
|
return;
|
|
46692
46710
|
}
|
|
46693
46711
|
if ((tooltip == null ? void 0 : tooltip.style("display")) === "block" && event) {
|
|
@@ -48038,6 +48056,9 @@ function getSubchartCandlestickShapeValue($$, d, isSub) {
|
|
|
48038
48056
|
return void 0;
|
|
48039
48057
|
}
|
|
48040
48058
|
if ($$.isBarType(d)) {
|
|
48059
|
+
if (isNumber(value.volume)) {
|
|
48060
|
+
return value.volume;
|
|
48061
|
+
}
|
|
48041
48062
|
return isNumber(value.open) && isNumber(value.close) ? value._isUp ? value.close : value.open : void 0;
|
|
48042
48063
|
}
|
|
48043
48064
|
return isNumber(value.close) ? value.close : void 0;
|
|
@@ -48692,23 +48713,25 @@ function updateTargetsForShape(targets, config) {
|
|
|
48692
48713
|
return sensitivity;
|
|
48693
48714
|
},
|
|
48694
48715
|
getBarW(type, axis, targetsNum) {
|
|
48695
|
-
var _a, _b, _c, _d
|
|
48716
|
+
var _a, _b, _c, _d;
|
|
48696
48717
|
const $$ = this;
|
|
48697
48718
|
const { config, org, scale, state } = $$;
|
|
48698
48719
|
const maxDataCount = $$.getMaxDataCount();
|
|
48699
48720
|
const isGrouped = type === "bar" && ((_a = config.data_groups) == null ? void 0 : _a.length);
|
|
48700
48721
|
const configName = `${type}_width`;
|
|
48701
|
-
const { k } = (_c = (_b = $$.getZoomTransform) == null ? void 0 : _b.call($$)) != null ? _c : { k: 1 };
|
|
48702
48722
|
const xMinMax = [
|
|
48703
|
-
(
|
|
48704
|
-
(
|
|
48723
|
+
(_b = config.axis_x_min) != null ? _b : org.xDomain[0],
|
|
48724
|
+
(_c = config.axis_x_max) != null ? _c : org.xDomain[1]
|
|
48705
48725
|
].map((v) => $$.axis.isTimeSeries() ? parseDate.call($$, v) : Number(v));
|
|
48706
48726
|
let tickInterval = axis.tickInterval(maxDataCount);
|
|
48707
|
-
|
|
48727
|
+
const xScale = (_d = scale.zoom) != null ? _d : scale.x;
|
|
48728
|
+
const getSpan = ([min, max]) => Math.abs(+max - +min);
|
|
48729
|
+
const isZoomed = axis !== $$.axis.subX && !$$.axis.isCategorized() && getSpan(xScale.domain()) < getSpan(org.xDomain);
|
|
48730
|
+
if (isZoomed) {
|
|
48708
48731
|
const isSameMinMax = xMinMax.every((v, i) => v === org.xDomain[i]);
|
|
48709
48732
|
tickInterval = org.xDomain.map((v, i) => {
|
|
48710
48733
|
const value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);
|
|
48711
|
-
return
|
|
48734
|
+
return xScale(value);
|
|
48712
48735
|
}).reduce((a, c) => Math.abs(a) + c) / maxDataCount;
|
|
48713
48736
|
}
|
|
48714
48737
|
const getWidth = (id) => {
|
|
@@ -50183,6 +50206,17 @@ const canvasInternal = {
|
|
|
50183
50206
|
}
|
|
50184
50207
|
callCallback && config.subchart_onbrush.bind($$.api)(scale.x.orgDomain());
|
|
50185
50208
|
},
|
|
50209
|
+
/**
|
|
50210
|
+
* Show the focus and tooltip of the data the flow moved under the pointer.
|
|
50211
|
+
* @private
|
|
50212
|
+
*/
|
|
50213
|
+
updateCanvasFlowFocus() {
|
|
50214
|
+
var _a;
|
|
50215
|
+
const $$ = this;
|
|
50216
|
+
const { state } = $$;
|
|
50217
|
+
state.canvasFocusKey = null;
|
|
50218
|
+
((_a = $$.$el.tooltip) == null ? void 0 : _a.style("display")) === "block" && state.event && $$.onCanvasMouseMove(state.event);
|
|
50219
|
+
},
|
|
50186
50220
|
/**
|
|
50187
50221
|
* Finish a pending canvas flow animation before accepting another flow mutation.
|
|
50188
50222
|
* @private
|
|
@@ -50204,7 +50238,7 @@ const canvasInternal = {
|
|
|
50204
50238
|
* @private
|
|
50205
50239
|
*/
|
|
50206
50240
|
animateCanvasFlow(flow) {
|
|
50207
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
50241
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
50208
50242
|
const $$ = this;
|
|
50209
50243
|
const { axis, data, org, scale, state } = $$;
|
|
50210
50244
|
const { done = () => {
|
|
@@ -50217,6 +50251,7 @@ const canvasInternal = {
|
|
|
50217
50251
|
const startDomain = scale.x.domain().slice(0, 2);
|
|
50218
50252
|
const startOrgDomain = (_d = (_c = org.xDomain) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c);
|
|
50219
50253
|
const startSubXDomain = (_h = (_f = (_e = scale.subX) == null ? void 0 : _e.domain) == null ? void 0 : (_g = _f.call(_e)).slice) == null ? void 0 : _h.call(_g);
|
|
50254
|
+
const focusData = state.canvasFocusKey ? state.canvasFocusData : null;
|
|
50220
50255
|
if (!isCanvasFlowDomain(startDomain, isLog)) {
|
|
50221
50256
|
return false;
|
|
50222
50257
|
}
|
|
@@ -50266,6 +50301,7 @@ const canvasInternal = {
|
|
|
50266
50301
|
state.canvasFlowFrame = null;
|
|
50267
50302
|
state.canvasFlowFinish = null;
|
|
50268
50303
|
state.flowing = false;
|
|
50304
|
+
$$.updateCanvasFlowFocus();
|
|
50269
50305
|
done.call($$.api);
|
|
50270
50306
|
};
|
|
50271
50307
|
const render = (timestamp) => {
|
|
@@ -50277,7 +50313,7 @@ const canvasInternal = {
|
|
|
50277
50313
|
state._cachedDrawShape = null;
|
|
50278
50314
|
state._canvasVisibleRangeCache = null;
|
|
50279
50315
|
state._canvasXTickValuesCache = null;
|
|
50280
|
-
$$.renderCanvasFrame(void 0,
|
|
50316
|
+
$$.renderCanvasFrame(void 0, focusData, false);
|
|
50281
50317
|
if (ratio < 1) {
|
|
50282
50318
|
state.canvasFlowFrame = requestFrame(render);
|
|
50283
50319
|
} else {
|
|
@@ -50290,7 +50326,6 @@ const canvasInternal = {
|
|
|
50290
50326
|
axis.x.scale(scale.x);
|
|
50291
50327
|
state.flowing = true;
|
|
50292
50328
|
state.cancelClick = true;
|
|
50293
|
-
(_k = $$.hideTooltip) == null ? void 0 : _k.call($$);
|
|
50294
50329
|
state.canvasFlowFinish = finish;
|
|
50295
50330
|
state.canvasFlowFrame = requestFrame(render);
|
|
50296
50331
|
return true;
|
|
@@ -51634,6 +51669,7 @@ const canvasInternal = {
|
|
|
51634
51669
|
const $$ = this;
|
|
51635
51670
|
const { state } = $$;
|
|
51636
51671
|
const withMainRedraw = (_b = (_a = $$.canvasRenderer).hasExpandedShapeFocus) == null ? void 0 : _b.call(_a, $$, focusData);
|
|
51672
|
+
state.canvasFocusData = focusData;
|
|
51637
51673
|
if (withMainRedraw) {
|
|
51638
51674
|
const drawShape = state.canvasShape || $$.getDrawShape();
|
|
51639
51675
|
$$.canvasEngine.beginFrame(state.current.width, $$.getCanvasSurfaceHeight());
|
|
@@ -51835,7 +51871,7 @@ function loadConfig(config) {
|
|
|
51835
51871
|
* chart.flush(true);
|
|
51836
51872
|
*/
|
|
51837
51873
|
flush(soft) {
|
|
51838
|
-
var _a, _b;
|
|
51874
|
+
var _a, _b, _c, _d;
|
|
51839
51875
|
const $$ = this.internal;
|
|
51840
51876
|
const { state, $el: { zoomResetBtn } } = $$;
|
|
51841
51877
|
if (state.rendered) {
|
|
@@ -51846,7 +51882,7 @@ function loadConfig(config) {
|
|
|
51846
51882
|
}
|
|
51847
51883
|
zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
|
|
51848
51884
|
if ($$.scale.zoom) {
|
|
51849
|
-
state.current.zoomDomain = $$.scale.zoom.domain();
|
|
51885
|
+
state.current.zoomDomain = (_d = (_c = $$.zoom) == null ? void 0 : _c.getDomain()) != null ? _d : $$.scale.zoom.domain();
|
|
51850
51886
|
}
|
|
51851
51887
|
$$.scale.zoom = null;
|
|
51852
51888
|
if (!state.resizing) {
|
|
@@ -53223,7 +53259,7 @@ let exportApi = () => {
|
|
|
53223
53259
|
});
|
|
53224
53260
|
}
|
|
53225
53261
|
function _() {
|
|
53226
|
-
var _a, _b, _c;
|
|
53262
|
+
var _a, _b, _c, _d, _e;
|
|
53227
53263
|
let domain;
|
|
53228
53264
|
let length = 0;
|
|
53229
53265
|
let tail = 0;
|
|
@@ -53237,6 +53273,12 @@ let exportApi = () => {
|
|
|
53237
53273
|
const orgDataCount = $$.getMaxDataCount();
|
|
53238
53274
|
const targets = $$.convertDataToTargets(data, true);
|
|
53239
53275
|
const isTimeSeries = $$.axis.isTimeSeries();
|
|
53276
|
+
const isCustomX = !isTimeSeries && $$.axis.isCustomX() && !$$.axis.isCategorized();
|
|
53277
|
+
const hasDataX = isTimeSeries || isCustomX;
|
|
53278
|
+
const firstValue = (_b = $$.data.targets.find((t) => t.values.length)) == null ? void 0 : _b.values[0];
|
|
53279
|
+
const xOffset = firstValue ? firstValue.x - firstValue.index : 0;
|
|
53280
|
+
const getX = (index) => isTimeSeries ? $$.getOtherTargetX(index) : index + xOffset;
|
|
53281
|
+
const flowedXs = [];
|
|
53240
53282
|
$$.data.targets.forEach((t) => {
|
|
53241
53283
|
let found = false;
|
|
53242
53284
|
for (let i = 0; i < targets.length; i++) {
|
|
@@ -53249,9 +53291,10 @@ let exportApi = () => {
|
|
|
53249
53291
|
length = values.length;
|
|
53250
53292
|
for (let j = 0; j < length; j++) {
|
|
53251
53293
|
values[j].index = tail + j;
|
|
53252
|
-
if (!
|
|
53253
|
-
values[j].x = tail + j;
|
|
53294
|
+
if (!hasDataX) {
|
|
53295
|
+
values[j].x = getX(tail + j);
|
|
53254
53296
|
}
|
|
53297
|
+
flowedXs[j] = values[j].x;
|
|
53255
53298
|
t.values.push(values[j]);
|
|
53256
53299
|
}
|
|
53257
53300
|
targets.splice(i, 1);
|
|
@@ -53271,7 +53314,7 @@ let exportApi = () => {
|
|
|
53271
53314
|
t.values.push({
|
|
53272
53315
|
id: t.id,
|
|
53273
53316
|
index: tail + j,
|
|
53274
|
-
x:
|
|
53317
|
+
x: isCustomX ? flowedXs[j] : getX(tail + j),
|
|
53275
53318
|
value: null
|
|
53276
53319
|
});
|
|
53277
53320
|
}
|
|
@@ -53280,6 +53323,7 @@ let exportApi = () => {
|
|
|
53280
53323
|
});
|
|
53281
53324
|
if ($$.data.targets.length) {
|
|
53282
53325
|
targets.forEach((t) => {
|
|
53326
|
+
var _a2;
|
|
53283
53327
|
const firstIndex = $$.data.targets[0].values[0].index;
|
|
53284
53328
|
const values = t.values;
|
|
53285
53329
|
const valueLength = values.length;
|
|
@@ -53294,7 +53338,7 @@ let exportApi = () => {
|
|
|
53294
53338
|
values[i] = {
|
|
53295
53339
|
id: t.id,
|
|
53296
53340
|
index,
|
|
53297
|
-
x:
|
|
53341
|
+
x: isCustomX ? (_a2 = $$.data.targets[0].values[i]) == null ? void 0 : _a2.x : getX(index),
|
|
53298
53342
|
value: null
|
|
53299
53343
|
};
|
|
53300
53344
|
}
|
|
@@ -53302,8 +53346,8 @@ let exportApi = () => {
|
|
|
53302
53346
|
for (let i = missingLength; i < values.length; i++) {
|
|
53303
53347
|
const v = values[i];
|
|
53304
53348
|
v.index += tail;
|
|
53305
|
-
if (!
|
|
53306
|
-
v.x
|
|
53349
|
+
if (!hasDataX) {
|
|
53350
|
+
v.x = getX(v.index);
|
|
53307
53351
|
}
|
|
53308
53352
|
}
|
|
53309
53353
|
});
|
|
@@ -53336,7 +53380,7 @@ let exportApi = () => {
|
|
|
53336
53380
|
domain && $$.updateXDomain(null, true, true, false, domain);
|
|
53337
53381
|
if ($$.state.isCanvasMode) {
|
|
53338
53382
|
const duration = isValue(args.duration) ? args.duration : $$.config.transition_duration;
|
|
53339
|
-
const animated = (
|
|
53383
|
+
const animated = (_c = $$.animateCanvasFlow) == null ? void 0 : _c.call($$, {
|
|
53340
53384
|
done: args.done,
|
|
53341
53385
|
duration,
|
|
53342
53386
|
length,
|
|
@@ -53361,7 +53405,8 @@ let exportApi = () => {
|
|
|
53361
53405
|
withUpdateXDomain: true
|
|
53362
53406
|
});
|
|
53363
53407
|
$$.updateTypesElements();
|
|
53364
|
-
(
|
|
53408
|
+
(_d = $$.updateCanvasFlowFocus) == null ? void 0 : _d.call($$);
|
|
53409
|
+
(_e = args.done) == null ? void 0 : _e.call($$.api);
|
|
53365
53410
|
return;
|
|
53366
53411
|
}
|
|
53367
53412
|
$$.updateTargets($$.data.targets);
|
|
@@ -53369,7 +53414,6 @@ let exportApi = () => {
|
|
|
53369
53414
|
$$.state._eventRectFingerprint = null;
|
|
53370
53415
|
$$.redraw({
|
|
53371
53416
|
flow: {
|
|
53372
|
-
index: baseValue.index,
|
|
53373
53417
|
length,
|
|
53374
53418
|
duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
|
|
53375
53419
|
done: args.done,
|
|
@@ -53397,9 +53441,12 @@ let exportApi = () => {
|
|
|
53397
53441
|
*/
|
|
53398
53442
|
generateFlow(args) {
|
|
53399
53443
|
const $$ = this;
|
|
53400
|
-
const { data, state, $el } = $$;
|
|
53444
|
+
const { config, data, state, $el } = $$;
|
|
53401
53445
|
return function() {
|
|
53402
53446
|
var _a;
|
|
53447
|
+
if (!$$.$el) {
|
|
53448
|
+
return;
|
|
53449
|
+
}
|
|
53403
53450
|
const flowLength = args.flow.length;
|
|
53404
53451
|
state.flowing = true;
|
|
53405
53452
|
data.targets.forEach((d) => {
|
|
@@ -53430,7 +53477,15 @@ let exportApi = () => {
|
|
|
53430
53477
|
elements[v] = node;
|
|
53431
53478
|
}
|
|
53432
53479
|
});
|
|
53433
|
-
(
|
|
53480
|
+
if (config.axis_rotated) {
|
|
53481
|
+
(_a = $$.hideGridFocus) == null ? void 0 : _a.call($$);
|
|
53482
|
+
} else {
|
|
53483
|
+
const xFocus = $el.main.selectAll(
|
|
53484
|
+
`line.${config_classes.xgridFocus}:not(.${config_classes.xgridFocusContinuous})`
|
|
53485
|
+
);
|
|
53486
|
+
xFocus.size() && (elements["gridFocus.x"] = xFocus);
|
|
53487
|
+
$el.main.selectAll(`line.${config_classes.ygridFocus}`).style("visibility", "hidden");
|
|
53488
|
+
}
|
|
53434
53489
|
$$.setFlowList(elements, args);
|
|
53435
53490
|
};
|
|
53436
53491
|
},
|
|
@@ -53445,11 +53500,9 @@ let exportApi = () => {
|
|
|
53445
53500
|
const { flow, targets } = args;
|
|
53446
53501
|
const {
|
|
53447
53502
|
duration = args.duration,
|
|
53448
|
-
index: flowIndex,
|
|
53449
|
-
length: flowLength,
|
|
53450
53503
|
orgDataCount
|
|
53451
53504
|
} = flow;
|
|
53452
|
-
const transform = $$.getFlowTransform(targets, orgDataCount
|
|
53505
|
+
const transform = $$.getFlowTransform(targets, orgDataCount);
|
|
53453
53506
|
const wait = generateWait();
|
|
53454
53507
|
let n;
|
|
53455
53508
|
wait.add(Object.keys(elements).map((v) => {
|
|
@@ -53476,7 +53529,11 @@ let exportApi = () => {
|
|
|
53476
53529
|
* @private
|
|
53477
53530
|
*/
|
|
53478
53531
|
cleanUpFlow(elements, args) {
|
|
53532
|
+
var _a, _b;
|
|
53479
53533
|
const $$ = this;
|
|
53534
|
+
if (!$$.$el) {
|
|
53535
|
+
return;
|
|
53536
|
+
}
|
|
53480
53537
|
const { config, state, $el: { svg } } = $$;
|
|
53481
53538
|
const isRotated = config.axis_rotated;
|
|
53482
53539
|
const { flow, shape, xv } = args;
|
|
@@ -53487,12 +53544,18 @@ let exportApi = () => {
|
|
|
53487
53544
|
length: flowLength
|
|
53488
53545
|
} = flow;
|
|
53489
53546
|
if (flowLength) {
|
|
53547
|
+
const isFocusCircle = $$.isPointFocusOnly() ? (node) => {
|
|
53548
|
+
var _a2;
|
|
53549
|
+
return (_a2 = node.parentElement) == null ? void 0 : _a2.classList.contains(config_classes.circles);
|
|
53550
|
+
} : () => false;
|
|
53490
53551
|
["circle", "text", "shape", "eventRect"].forEach((v) => {
|
|
53491
53552
|
const target = [];
|
|
53492
53553
|
for (let i = 0; i < flowLength; i++) {
|
|
53493
53554
|
target.push(`.${config_classes[v]}-${i}`);
|
|
53494
53555
|
}
|
|
53495
|
-
svg.selectAll(`.${config_classes[`${v}s`]}`).selectAll(target).
|
|
53556
|
+
svg.selectAll(`.${config_classes[`${v}s`]}`).selectAll(target).filter(function() {
|
|
53557
|
+
return !isFocusCircle(this);
|
|
53558
|
+
}).remove();
|
|
53496
53559
|
});
|
|
53497
53560
|
svg.select(`.${config_classes.xgrid}`).remove();
|
|
53498
53561
|
}
|
|
@@ -53523,24 +53586,25 @@ let exportApi = () => {
|
|
|
53523
53586
|
}
|
|
53524
53587
|
});
|
|
53525
53588
|
config.interaction_enabled && $$.redrawEventRect();
|
|
53526
|
-
done.call($$.api);
|
|
53527
53589
|
state.flowing = false;
|
|
53590
|
+
if (((_a = $$.$el.tooltip) == null ? void 0 : _a.style("display")) === "block") {
|
|
53591
|
+
$$.updateTooltipOnRedraw();
|
|
53592
|
+
} else {
|
|
53593
|
+
(_b = $$.hideGridFocus) == null ? void 0 : _b.call($$);
|
|
53594
|
+
}
|
|
53595
|
+
done.call($$.api);
|
|
53528
53596
|
},
|
|
53529
53597
|
/**
|
|
53530
53598
|
* Get flow transform value
|
|
53531
53599
|
* @param {object} targets target
|
|
53532
53600
|
* @param {number} orgDataCount original data count
|
|
53533
|
-
* @param {number} flowIndex flow index
|
|
53534
|
-
* @param {number} flowLength flow length
|
|
53535
53601
|
* @returns {string}
|
|
53536
53602
|
* @private
|
|
53537
53603
|
*/
|
|
53538
|
-
getFlowTransform(targets, orgDataCount
|
|
53604
|
+
getFlowTransform(targets, orgDataCount) {
|
|
53539
53605
|
const $$ = this;
|
|
53540
53606
|
const { data, scale: { x } } = $$;
|
|
53541
53607
|
const dataValues = data.targets[0].values;
|
|
53542
|
-
let flowStart = $$.getValueOnIndex(dataValues, flowIndex);
|
|
53543
|
-
let flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength);
|
|
53544
53608
|
let translateX;
|
|
53545
53609
|
const orgDomain = x.domain();
|
|
53546
53610
|
const domain = $$.updateXDomain(targets, true, true);
|
|
@@ -53549,17 +53613,15 @@ let exportApi = () => {
|
|
|
53549
53613
|
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
53550
53614
|
} else {
|
|
53551
53615
|
if ($$.axis.isTimeSeries()) {
|
|
53552
|
-
flowStart = $$.getValueOnIndex(dataValues, 0);
|
|
53553
|
-
flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
|
|
53616
|
+
const flowStart = $$.getValueOnIndex(dataValues, 0);
|
|
53617
|
+
const flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
|
|
53554
53618
|
translateX = x(flowStart.x) - x(flowEnd.x);
|
|
53555
53619
|
} else {
|
|
53556
53620
|
translateX = diffDomain(domain) / 2;
|
|
53557
53621
|
}
|
|
53558
53622
|
}
|
|
53559
|
-
} else if (orgDataCount === 1 || (flowStart == null ? void 0 : flowStart.x) === (flowEnd == null ? void 0 : flowEnd.x)) {
|
|
53560
|
-
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
53561
53623
|
} else {
|
|
53562
|
-
translateX =
|
|
53624
|
+
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
53563
53625
|
}
|
|
53564
53626
|
const scaleX = diffDomain(orgDomain) / diffDomain(domain);
|
|
53565
53627
|
return `translate(${translateX},0) scale(${scaleX},1)`;
|
|
@@ -55383,6 +55445,10 @@ function dispatchSubchartEvent($$, type, event, context) {
|
|
|
55383
55445
|
* - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
|
|
55384
55446
|
* - `show: subchart()`
|
|
55385
55447
|
* @property {string} [subchart.type] Set chart type for the subchart. Defaults to data.type.
|
|
55448
|
+
* - **NOTE:** When candlestick data is rendered as another type in the subchart, the subchart takes one value of the data:
|
|
55449
|
+
* - `bar`: the `volume` of the data. Without `volume`, the close value for a rise and the open value for a fall, from zero.
|
|
55450
|
+
* - other types (`line`, `area`, etc.): the close value.
|
|
55451
|
+
* - The y axis domain of the subchart follows the taken values. The `volume` is not part of the main chart's y axis domain.
|
|
55386
55452
|
* @property {object} [subchart.types] Set chart type for each data in the subchart. Defaults to data.types.
|
|
55387
55453
|
* @property {boolean} [subchart.brush.enabled=true] Enable subchart brush interaction.
|
|
55388
55454
|
* @property {boolean} [subchart.showHandle=false] Show sub chart's handle.
|
|
@@ -57517,7 +57583,7 @@ function getPointBBox(node) {
|
|
|
57517
57583
|
});
|
|
57518
57584
|
});
|
|
57519
57585
|
},
|
|
57520
|
-
updateCircle(isSub = false) {
|
|
57586
|
+
updateCircle(isSub = false, withFlow = false) {
|
|
57521
57587
|
const $$ = this;
|
|
57522
57588
|
const { config, state, $el } = $$;
|
|
57523
57589
|
const focusOnly = $$.isPointFocusOnly();
|
|
@@ -57532,8 +57598,9 @@ function getPointBBox(node) {
|
|
|
57532
57598
|
const pointR = $$.pointR.bind($$);
|
|
57533
57599
|
const updateCircleColor = $$.generateUpdateCircleColor();
|
|
57534
57600
|
const initialOpacityForCircle = $$.initialOpacityForCircle.bind($$);
|
|
57535
|
-
circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
|
|
57536
|
-
$root.circle = $root.main.selectAll(`.${$CIRCLE.circles} .${$CIRCLE.circle}`).style("stroke", $$.getStylePropValue($$.color))
|
|
57601
|
+
const entered = circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
|
|
57602
|
+
$root.circle = $root.main.selectAll(`.${$CIRCLE.circles} .${$CIRCLE.circle}`).style("stroke", $$.getStylePropValue($$.color));
|
|
57603
|
+
(focusOnly && withFlow ? entered : $root.circle).style("opacity", initialOpacityForCircle);
|
|
57537
57604
|
}
|
|
57538
57605
|
},
|
|
57539
57606
|
/**
|
|
@@ -58424,7 +58491,7 @@ class AxisRendererHelper {
|
|
|
58424
58491
|
transitionise(selection) {
|
|
58425
58492
|
const { config } = this;
|
|
58426
58493
|
let transitionSelection = selection;
|
|
58427
|
-
if (config.withoutTransition) {
|
|
58494
|
+
if (config.withoutTransition && !config.transition) {
|
|
58428
58495
|
transitionSelection = selection.interrupt();
|
|
58429
58496
|
} else if (config.transition || !this.owner.params.noTransition) {
|
|
58430
58497
|
try {
|
|
@@ -58772,26 +58839,28 @@ class AxisRenderer {
|
|
|
58772
58839
|
if (!tickWidth || tickWidth <= 0) {
|
|
58773
58840
|
tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
|
|
58774
58841
|
}
|
|
58775
|
-
|
|
58776
|
-
|
|
58842
|
+
const text = String(tickText);
|
|
58843
|
+
const result = [];
|
|
58844
|
+
let start = 0;
|
|
58845
|
+
while (true) {
|
|
58777
58846
|
let spaceIndex;
|
|
58778
|
-
let
|
|
58779
|
-
for (let i = 1; i < text.length; i++) {
|
|
58780
|
-
if (text.charAt(i) === " ") {
|
|
58847
|
+
let splitAt = -1;
|
|
58848
|
+
for (let i = 1; start + i < text.length; i++) {
|
|
58849
|
+
if (text.charAt(start + i) === " ") {
|
|
58781
58850
|
spaceIndex = i;
|
|
58782
58851
|
}
|
|
58783
|
-
|
|
58784
|
-
|
|
58785
|
-
|
|
58786
|
-
return split(
|
|
58787
|
-
splitted2.concat(text.substr(0, spaceIndex || i)),
|
|
58788
|
-
text.slice(spaceIndex ? spaceIndex + 1 : i)
|
|
58789
|
-
);
|
|
58852
|
+
if (tickWidth < charWidth * (i + 1)) {
|
|
58853
|
+
splitAt = i;
|
|
58854
|
+
break;
|
|
58790
58855
|
}
|
|
58791
58856
|
}
|
|
58792
|
-
|
|
58857
|
+
if (splitAt === -1) {
|
|
58858
|
+
result.push(text.slice(start));
|
|
58859
|
+
return result;
|
|
58860
|
+
}
|
|
58861
|
+
result.push(text.substr(start, spaceIndex || splitAt));
|
|
58862
|
+
start += spaceIndex ? spaceIndex + 1 : splitAt;
|
|
58793
58863
|
}
|
|
58794
|
-
return split(splitted, String(tickText));
|
|
58795
58864
|
}
|
|
58796
58865
|
scale(x) {
|
|
58797
58866
|
if (!arguments.length) {
|
|
@@ -67726,7 +67795,7 @@ const bb = {
|
|
|
67726
67795
|
* bb.version; // "1.0.0"
|
|
67727
67796
|
* @memberof bb
|
|
67728
67797
|
*/
|
|
67729
|
-
version: "4.1.
|
|
67798
|
+
version: "4.1.5",
|
|
67730
67799
|
/**
|
|
67731
67800
|
* Generate chart
|
|
67732
67801
|
* - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:
|