billboard.js 4.1.4 → 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 +154 -87
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +19 -19
- package/dist/billboard.pkgd.js +154 -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 +1 -1
- package/dist-esm/ChartInternal/internals/text.util.js +1 -1
- package/dist-esm/ChartInternal/internals/title.js +1 -1
- package/dist-esm/ChartInternal/internals/tooltip.js +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/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();
|
|
@@ -46197,6 +46202,11 @@ function _getCanvasTitleHeight($$) {
|
|
|
46197
46202
|
|
|
46198
46203
|
const RE_WHITESPACE = /(\r?\n|\t)/g;
|
|
46199
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
|
+
}
|
|
46200
46210
|
/* harmony default export */ var internals_tooltip = ({
|
|
46201
46211
|
/**
|
|
46202
46212
|
* Initializes the tooltip
|
|
@@ -46337,7 +46347,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
46337
46347
|
(v) => valueFormat($$.getRangedData(row, v), ...param)
|
|
46338
46348
|
);
|
|
46339
46349
|
const mid = valueFormat(getRowValue(row), ...param);
|
|
46340
|
-
value =
|
|
46350
|
+
value = getRangeValueHtml([["Mid", mid], ["High", high], ["Low", low]]);
|
|
46341
46351
|
} else if ($$.isCandlestickType(row)) {
|
|
46342
46352
|
const [open, high, low, close, volume] = ["open", "high", "low", "close", "volume"].map((v) => {
|
|
46343
46353
|
const value2 = $$.getRangedData(row, v, "candlestick");
|
|
@@ -46346,7 +46356,13 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
46346
46356
|
...param
|
|
46347
46357
|
) : void 0;
|
|
46348
46358
|
});
|
|
46349
|
-
value =
|
|
46359
|
+
value = getRangeValueHtml([
|
|
46360
|
+
["Open", open],
|
|
46361
|
+
["High", high],
|
|
46362
|
+
["Low", low],
|
|
46363
|
+
["Close", close],
|
|
46364
|
+
...volume ? [["Volume", volume]] : []
|
|
46365
|
+
]);
|
|
46350
46366
|
} else if ($$.isBarRangeType(row)) {
|
|
46351
46367
|
const { value: rangeValue, id, index } = row;
|
|
46352
46368
|
value = `${valueFormat(rangeValue, void 0, id, index)}`;
|
|
@@ -46689,7 +46705,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
46689
46705
|
$el: { eventRect, svg, tooltip },
|
|
46690
46706
|
state: { event, hasAxis, hasRadar, hasTreemap }
|
|
46691
46707
|
} = $$;
|
|
46692
|
-
if ($$.state.isCanvasMode) {
|
|
46708
|
+
if ($$.state.isCanvasMode || $$.state.flowing) {
|
|
46693
46709
|
return;
|
|
46694
46710
|
}
|
|
46695
46711
|
if ((tooltip == null ? void 0 : tooltip.style("display")) === "block" && event) {
|
|
@@ -48040,6 +48056,9 @@ function getSubchartCandlestickShapeValue($$, d, isSub) {
|
|
|
48040
48056
|
return void 0;
|
|
48041
48057
|
}
|
|
48042
48058
|
if ($$.isBarType(d)) {
|
|
48059
|
+
if (isNumber(value.volume)) {
|
|
48060
|
+
return value.volume;
|
|
48061
|
+
}
|
|
48043
48062
|
return isNumber(value.open) && isNumber(value.close) ? value._isUp ? value.close : value.open : void 0;
|
|
48044
48063
|
}
|
|
48045
48064
|
return isNumber(value.close) ? value.close : void 0;
|
|
@@ -48694,23 +48713,25 @@ function updateTargetsForShape(targets, config) {
|
|
|
48694
48713
|
return sensitivity;
|
|
48695
48714
|
},
|
|
48696
48715
|
getBarW(type, axis, targetsNum) {
|
|
48697
|
-
var _a, _b, _c, _d
|
|
48716
|
+
var _a, _b, _c, _d;
|
|
48698
48717
|
const $$ = this;
|
|
48699
48718
|
const { config, org, scale, state } = $$;
|
|
48700
48719
|
const maxDataCount = $$.getMaxDataCount();
|
|
48701
48720
|
const isGrouped = type === "bar" && ((_a = config.data_groups) == null ? void 0 : _a.length);
|
|
48702
48721
|
const configName = `${type}_width`;
|
|
48703
|
-
const { k } = (_c = (_b = $$.getZoomTransform) == null ? void 0 : _b.call($$)) != null ? _c : { k: 1 };
|
|
48704
48722
|
const xMinMax = [
|
|
48705
|
-
(
|
|
48706
|
-
(
|
|
48723
|
+
(_b = config.axis_x_min) != null ? _b : org.xDomain[0],
|
|
48724
|
+
(_c = config.axis_x_max) != null ? _c : org.xDomain[1]
|
|
48707
48725
|
].map((v) => $$.axis.isTimeSeries() ? parseDate.call($$, v) : Number(v));
|
|
48708
48726
|
let tickInterval = axis.tickInterval(maxDataCount);
|
|
48709
|
-
|
|
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) {
|
|
48710
48731
|
const isSameMinMax = xMinMax.every((v, i) => v === org.xDomain[i]);
|
|
48711
48732
|
tickInterval = org.xDomain.map((v, i) => {
|
|
48712
48733
|
const value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);
|
|
48713
|
-
return
|
|
48734
|
+
return xScale(value);
|
|
48714
48735
|
}).reduce((a, c) => Math.abs(a) + c) / maxDataCount;
|
|
48715
48736
|
}
|
|
48716
48737
|
const getWidth = (id) => {
|
|
@@ -50185,6 +50206,17 @@ const canvasInternal = {
|
|
|
50185
50206
|
}
|
|
50186
50207
|
callCallback && config.subchart_onbrush.bind($$.api)(scale.x.orgDomain());
|
|
50187
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
|
+
},
|
|
50188
50220
|
/**
|
|
50189
50221
|
* Finish a pending canvas flow animation before accepting another flow mutation.
|
|
50190
50222
|
* @private
|
|
@@ -50206,7 +50238,7 @@ const canvasInternal = {
|
|
|
50206
50238
|
* @private
|
|
50207
50239
|
*/
|
|
50208
50240
|
animateCanvasFlow(flow) {
|
|
50209
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
50241
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
50210
50242
|
const $$ = this;
|
|
50211
50243
|
const { axis, data, org, scale, state } = $$;
|
|
50212
50244
|
const { done = () => {
|
|
@@ -50219,6 +50251,7 @@ const canvasInternal = {
|
|
|
50219
50251
|
const startDomain = scale.x.domain().slice(0, 2);
|
|
50220
50252
|
const startOrgDomain = (_d = (_c = org.xDomain) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c);
|
|
50221
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;
|
|
50222
50255
|
if (!isCanvasFlowDomain(startDomain, isLog)) {
|
|
50223
50256
|
return false;
|
|
50224
50257
|
}
|
|
@@ -50268,6 +50301,7 @@ const canvasInternal = {
|
|
|
50268
50301
|
state.canvasFlowFrame = null;
|
|
50269
50302
|
state.canvasFlowFinish = null;
|
|
50270
50303
|
state.flowing = false;
|
|
50304
|
+
$$.updateCanvasFlowFocus();
|
|
50271
50305
|
done.call($$.api);
|
|
50272
50306
|
};
|
|
50273
50307
|
const render = (timestamp) => {
|
|
@@ -50279,7 +50313,7 @@ const canvasInternal = {
|
|
|
50279
50313
|
state._cachedDrawShape = null;
|
|
50280
50314
|
state._canvasVisibleRangeCache = null;
|
|
50281
50315
|
state._canvasXTickValuesCache = null;
|
|
50282
|
-
$$.renderCanvasFrame(void 0,
|
|
50316
|
+
$$.renderCanvasFrame(void 0, focusData, false);
|
|
50283
50317
|
if (ratio < 1) {
|
|
50284
50318
|
state.canvasFlowFrame = requestFrame(render);
|
|
50285
50319
|
} else {
|
|
@@ -50292,7 +50326,6 @@ const canvasInternal = {
|
|
|
50292
50326
|
axis.x.scale(scale.x);
|
|
50293
50327
|
state.flowing = true;
|
|
50294
50328
|
state.cancelClick = true;
|
|
50295
|
-
(_k = $$.hideTooltip) == null ? void 0 : _k.call($$);
|
|
50296
50329
|
state.canvasFlowFinish = finish;
|
|
50297
50330
|
state.canvasFlowFrame = requestFrame(render);
|
|
50298
50331
|
return true;
|
|
@@ -51636,6 +51669,7 @@ const canvasInternal = {
|
|
|
51636
51669
|
const $$ = this;
|
|
51637
51670
|
const { state } = $$;
|
|
51638
51671
|
const withMainRedraw = (_b = (_a = $$.canvasRenderer).hasExpandedShapeFocus) == null ? void 0 : _b.call(_a, $$, focusData);
|
|
51672
|
+
state.canvasFocusData = focusData;
|
|
51639
51673
|
if (withMainRedraw) {
|
|
51640
51674
|
const drawShape = state.canvasShape || $$.getDrawShape();
|
|
51641
51675
|
$$.canvasEngine.beginFrame(state.current.width, $$.getCanvasSurfaceHeight());
|
|
@@ -51837,7 +51871,7 @@ function loadConfig(config) {
|
|
|
51837
51871
|
* chart.flush(true);
|
|
51838
51872
|
*/
|
|
51839
51873
|
flush(soft) {
|
|
51840
|
-
var _a, _b;
|
|
51874
|
+
var _a, _b, _c, _d;
|
|
51841
51875
|
const $$ = this.internal;
|
|
51842
51876
|
const { state, $el: { zoomResetBtn } } = $$;
|
|
51843
51877
|
if (state.rendered) {
|
|
@@ -51848,7 +51882,7 @@ function loadConfig(config) {
|
|
|
51848
51882
|
}
|
|
51849
51883
|
zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
|
|
51850
51884
|
if ($$.scale.zoom) {
|
|
51851
|
-
state.current.zoomDomain = $$.scale.zoom.domain();
|
|
51885
|
+
state.current.zoomDomain = (_d = (_c = $$.zoom) == null ? void 0 : _c.getDomain()) != null ? _d : $$.scale.zoom.domain();
|
|
51852
51886
|
}
|
|
51853
51887
|
$$.scale.zoom = null;
|
|
51854
51888
|
if (!state.resizing) {
|
|
@@ -53225,7 +53259,7 @@ let exportApi = () => {
|
|
|
53225
53259
|
});
|
|
53226
53260
|
}
|
|
53227
53261
|
function _() {
|
|
53228
|
-
var _a, _b, _c;
|
|
53262
|
+
var _a, _b, _c, _d, _e;
|
|
53229
53263
|
let domain;
|
|
53230
53264
|
let length = 0;
|
|
53231
53265
|
let tail = 0;
|
|
@@ -53239,6 +53273,12 @@ let exportApi = () => {
|
|
|
53239
53273
|
const orgDataCount = $$.getMaxDataCount();
|
|
53240
53274
|
const targets = $$.convertDataToTargets(data, true);
|
|
53241
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 = [];
|
|
53242
53282
|
$$.data.targets.forEach((t) => {
|
|
53243
53283
|
let found = false;
|
|
53244
53284
|
for (let i = 0; i < targets.length; i++) {
|
|
@@ -53251,9 +53291,10 @@ let exportApi = () => {
|
|
|
53251
53291
|
length = values.length;
|
|
53252
53292
|
for (let j = 0; j < length; j++) {
|
|
53253
53293
|
values[j].index = tail + j;
|
|
53254
|
-
if (!
|
|
53255
|
-
values[j].x = tail + j;
|
|
53294
|
+
if (!hasDataX) {
|
|
53295
|
+
values[j].x = getX(tail + j);
|
|
53256
53296
|
}
|
|
53297
|
+
flowedXs[j] = values[j].x;
|
|
53257
53298
|
t.values.push(values[j]);
|
|
53258
53299
|
}
|
|
53259
53300
|
targets.splice(i, 1);
|
|
@@ -53273,7 +53314,7 @@ let exportApi = () => {
|
|
|
53273
53314
|
t.values.push({
|
|
53274
53315
|
id: t.id,
|
|
53275
53316
|
index: tail + j,
|
|
53276
|
-
x:
|
|
53317
|
+
x: isCustomX ? flowedXs[j] : getX(tail + j),
|
|
53277
53318
|
value: null
|
|
53278
53319
|
});
|
|
53279
53320
|
}
|
|
@@ -53282,6 +53323,7 @@ let exportApi = () => {
|
|
|
53282
53323
|
});
|
|
53283
53324
|
if ($$.data.targets.length) {
|
|
53284
53325
|
targets.forEach((t) => {
|
|
53326
|
+
var _a2;
|
|
53285
53327
|
const firstIndex = $$.data.targets[0].values[0].index;
|
|
53286
53328
|
const values = t.values;
|
|
53287
53329
|
const valueLength = values.length;
|
|
@@ -53296,7 +53338,7 @@ let exportApi = () => {
|
|
|
53296
53338
|
values[i] = {
|
|
53297
53339
|
id: t.id,
|
|
53298
53340
|
index,
|
|
53299
|
-
x:
|
|
53341
|
+
x: isCustomX ? (_a2 = $$.data.targets[0].values[i]) == null ? void 0 : _a2.x : getX(index),
|
|
53300
53342
|
value: null
|
|
53301
53343
|
};
|
|
53302
53344
|
}
|
|
@@ -53304,8 +53346,8 @@ let exportApi = () => {
|
|
|
53304
53346
|
for (let i = missingLength; i < values.length; i++) {
|
|
53305
53347
|
const v = values[i];
|
|
53306
53348
|
v.index += tail;
|
|
53307
|
-
if (!
|
|
53308
|
-
v.x
|
|
53349
|
+
if (!hasDataX) {
|
|
53350
|
+
v.x = getX(v.index);
|
|
53309
53351
|
}
|
|
53310
53352
|
}
|
|
53311
53353
|
});
|
|
@@ -53338,7 +53380,7 @@ let exportApi = () => {
|
|
|
53338
53380
|
domain && $$.updateXDomain(null, true, true, false, domain);
|
|
53339
53381
|
if ($$.state.isCanvasMode) {
|
|
53340
53382
|
const duration = isValue(args.duration) ? args.duration : $$.config.transition_duration;
|
|
53341
|
-
const animated = (
|
|
53383
|
+
const animated = (_c = $$.animateCanvasFlow) == null ? void 0 : _c.call($$, {
|
|
53342
53384
|
done: args.done,
|
|
53343
53385
|
duration,
|
|
53344
53386
|
length,
|
|
@@ -53363,7 +53405,8 @@ let exportApi = () => {
|
|
|
53363
53405
|
withUpdateXDomain: true
|
|
53364
53406
|
});
|
|
53365
53407
|
$$.updateTypesElements();
|
|
53366
|
-
(
|
|
53408
|
+
(_d = $$.updateCanvasFlowFocus) == null ? void 0 : _d.call($$);
|
|
53409
|
+
(_e = args.done) == null ? void 0 : _e.call($$.api);
|
|
53367
53410
|
return;
|
|
53368
53411
|
}
|
|
53369
53412
|
$$.updateTargets($$.data.targets);
|
|
@@ -53371,7 +53414,6 @@ let exportApi = () => {
|
|
|
53371
53414
|
$$.state._eventRectFingerprint = null;
|
|
53372
53415
|
$$.redraw({
|
|
53373
53416
|
flow: {
|
|
53374
|
-
index: baseValue.index,
|
|
53375
53417
|
length,
|
|
53376
53418
|
duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
|
|
53377
53419
|
done: args.done,
|
|
@@ -53399,9 +53441,12 @@ let exportApi = () => {
|
|
|
53399
53441
|
*/
|
|
53400
53442
|
generateFlow(args) {
|
|
53401
53443
|
const $$ = this;
|
|
53402
|
-
const { data, state, $el } = $$;
|
|
53444
|
+
const { config, data, state, $el } = $$;
|
|
53403
53445
|
return function() {
|
|
53404
53446
|
var _a;
|
|
53447
|
+
if (!$$.$el) {
|
|
53448
|
+
return;
|
|
53449
|
+
}
|
|
53405
53450
|
const flowLength = args.flow.length;
|
|
53406
53451
|
state.flowing = true;
|
|
53407
53452
|
data.targets.forEach((d) => {
|
|
@@ -53432,7 +53477,15 @@ let exportApi = () => {
|
|
|
53432
53477
|
elements[v] = node;
|
|
53433
53478
|
}
|
|
53434
53479
|
});
|
|
53435
|
-
(
|
|
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
|
+
}
|
|
53436
53489
|
$$.setFlowList(elements, args);
|
|
53437
53490
|
};
|
|
53438
53491
|
},
|
|
@@ -53447,11 +53500,9 @@ let exportApi = () => {
|
|
|
53447
53500
|
const { flow, targets } = args;
|
|
53448
53501
|
const {
|
|
53449
53502
|
duration = args.duration,
|
|
53450
|
-
index: flowIndex,
|
|
53451
|
-
length: flowLength,
|
|
53452
53503
|
orgDataCount
|
|
53453
53504
|
} = flow;
|
|
53454
|
-
const transform = $$.getFlowTransform(targets, orgDataCount
|
|
53505
|
+
const transform = $$.getFlowTransform(targets, orgDataCount);
|
|
53455
53506
|
const wait = generateWait();
|
|
53456
53507
|
let n;
|
|
53457
53508
|
wait.add(Object.keys(elements).map((v) => {
|
|
@@ -53478,7 +53529,11 @@ let exportApi = () => {
|
|
|
53478
53529
|
* @private
|
|
53479
53530
|
*/
|
|
53480
53531
|
cleanUpFlow(elements, args) {
|
|
53532
|
+
var _a, _b;
|
|
53481
53533
|
const $$ = this;
|
|
53534
|
+
if (!$$.$el) {
|
|
53535
|
+
return;
|
|
53536
|
+
}
|
|
53482
53537
|
const { config, state, $el: { svg } } = $$;
|
|
53483
53538
|
const isRotated = config.axis_rotated;
|
|
53484
53539
|
const { flow, shape, xv } = args;
|
|
@@ -53489,12 +53544,18 @@ let exportApi = () => {
|
|
|
53489
53544
|
length: flowLength
|
|
53490
53545
|
} = flow;
|
|
53491
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;
|
|
53492
53551
|
["circle", "text", "shape", "eventRect"].forEach((v) => {
|
|
53493
53552
|
const target = [];
|
|
53494
53553
|
for (let i = 0; i < flowLength; i++) {
|
|
53495
53554
|
target.push(`.${config_classes[v]}-${i}`);
|
|
53496
53555
|
}
|
|
53497
|
-
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();
|
|
53498
53559
|
});
|
|
53499
53560
|
svg.select(`.${config_classes.xgrid}`).remove();
|
|
53500
53561
|
}
|
|
@@ -53525,24 +53586,25 @@ let exportApi = () => {
|
|
|
53525
53586
|
}
|
|
53526
53587
|
});
|
|
53527
53588
|
config.interaction_enabled && $$.redrawEventRect();
|
|
53528
|
-
done.call($$.api);
|
|
53529
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);
|
|
53530
53596
|
},
|
|
53531
53597
|
/**
|
|
53532
53598
|
* Get flow transform value
|
|
53533
53599
|
* @param {object} targets target
|
|
53534
53600
|
* @param {number} orgDataCount original data count
|
|
53535
|
-
* @param {number} flowIndex flow index
|
|
53536
|
-
* @param {number} flowLength flow length
|
|
53537
53601
|
* @returns {string}
|
|
53538
53602
|
* @private
|
|
53539
53603
|
*/
|
|
53540
|
-
getFlowTransform(targets, orgDataCount
|
|
53604
|
+
getFlowTransform(targets, orgDataCount) {
|
|
53541
53605
|
const $$ = this;
|
|
53542
53606
|
const { data, scale: { x } } = $$;
|
|
53543
53607
|
const dataValues = data.targets[0].values;
|
|
53544
|
-
let flowStart = $$.getValueOnIndex(dataValues, flowIndex);
|
|
53545
|
-
let flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength);
|
|
53546
53608
|
let translateX;
|
|
53547
53609
|
const orgDomain = x.domain();
|
|
53548
53610
|
const domain = $$.updateXDomain(targets, true, true);
|
|
@@ -53551,17 +53613,15 @@ let exportApi = () => {
|
|
|
53551
53613
|
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
53552
53614
|
} else {
|
|
53553
53615
|
if ($$.axis.isTimeSeries()) {
|
|
53554
|
-
flowStart = $$.getValueOnIndex(dataValues, 0);
|
|
53555
|
-
flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
|
|
53616
|
+
const flowStart = $$.getValueOnIndex(dataValues, 0);
|
|
53617
|
+
const flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
|
|
53556
53618
|
translateX = x(flowStart.x) - x(flowEnd.x);
|
|
53557
53619
|
} else {
|
|
53558
53620
|
translateX = diffDomain(domain) / 2;
|
|
53559
53621
|
}
|
|
53560
53622
|
}
|
|
53561
|
-
} else if (orgDataCount === 1 || (flowStart == null ? void 0 : flowStart.x) === (flowEnd == null ? void 0 : flowEnd.x)) {
|
|
53562
|
-
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
53563
53623
|
} else {
|
|
53564
|
-
translateX =
|
|
53624
|
+
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
53565
53625
|
}
|
|
53566
53626
|
const scaleX = diffDomain(orgDomain) / diffDomain(domain);
|
|
53567
53627
|
return `translate(${translateX},0) scale(${scaleX},1)`;
|
|
@@ -55385,6 +55445,10 @@ function dispatchSubchartEvent($$, type, event, context) {
|
|
|
55385
55445
|
* - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
|
|
55386
55446
|
* - `show: subchart()`
|
|
55387
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.
|
|
55388
55452
|
* @property {object} [subchart.types] Set chart type for each data in the subchart. Defaults to data.types.
|
|
55389
55453
|
* @property {boolean} [subchart.brush.enabled=true] Enable subchart brush interaction.
|
|
55390
55454
|
* @property {boolean} [subchart.showHandle=false] Show sub chart's handle.
|
|
@@ -57519,7 +57583,7 @@ function getPointBBox(node) {
|
|
|
57519
57583
|
});
|
|
57520
57584
|
});
|
|
57521
57585
|
},
|
|
57522
|
-
updateCircle(isSub = false) {
|
|
57586
|
+
updateCircle(isSub = false, withFlow = false) {
|
|
57523
57587
|
const $$ = this;
|
|
57524
57588
|
const { config, state, $el } = $$;
|
|
57525
57589
|
const focusOnly = $$.isPointFocusOnly();
|
|
@@ -57534,8 +57598,9 @@ function getPointBBox(node) {
|
|
|
57534
57598
|
const pointR = $$.pointR.bind($$);
|
|
57535
57599
|
const updateCircleColor = $$.generateUpdateCircleColor();
|
|
57536
57600
|
const initialOpacityForCircle = $$.initialOpacityForCircle.bind($$);
|
|
57537
|
-
circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
|
|
57538
|
-
$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);
|
|
57539
57604
|
}
|
|
57540
57605
|
},
|
|
57541
57606
|
/**
|
|
@@ -58426,7 +58491,7 @@ class AxisRendererHelper {
|
|
|
58426
58491
|
transitionise(selection) {
|
|
58427
58492
|
const { config } = this;
|
|
58428
58493
|
let transitionSelection = selection;
|
|
58429
|
-
if (config.withoutTransition) {
|
|
58494
|
+
if (config.withoutTransition && !config.transition) {
|
|
58430
58495
|
transitionSelection = selection.interrupt();
|
|
58431
58496
|
} else if (config.transition || !this.owner.params.noTransition) {
|
|
58432
58497
|
try {
|
|
@@ -58774,26 +58839,28 @@ class AxisRenderer {
|
|
|
58774
58839
|
if (!tickWidth || tickWidth <= 0) {
|
|
58775
58840
|
tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
|
|
58776
58841
|
}
|
|
58777
|
-
|
|
58778
|
-
|
|
58842
|
+
const text = String(tickText);
|
|
58843
|
+
const result = [];
|
|
58844
|
+
let start = 0;
|
|
58845
|
+
while (true) {
|
|
58779
58846
|
let spaceIndex;
|
|
58780
|
-
let
|
|
58781
|
-
for (let i = 1; i < text.length; i++) {
|
|
58782
|
-
if (text.charAt(i) === " ") {
|
|
58847
|
+
let splitAt = -1;
|
|
58848
|
+
for (let i = 1; start + i < text.length; i++) {
|
|
58849
|
+
if (text.charAt(start + i) === " ") {
|
|
58783
58850
|
spaceIndex = i;
|
|
58784
58851
|
}
|
|
58785
|
-
|
|
58786
|
-
|
|
58787
|
-
|
|
58788
|
-
return split(
|
|
58789
|
-
splitted2.concat(text.substr(0, spaceIndex || i)),
|
|
58790
|
-
text.slice(spaceIndex ? spaceIndex + 1 : i)
|
|
58791
|
-
);
|
|
58852
|
+
if (tickWidth < charWidth * (i + 1)) {
|
|
58853
|
+
splitAt = i;
|
|
58854
|
+
break;
|
|
58792
58855
|
}
|
|
58793
58856
|
}
|
|
58794
|
-
|
|
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;
|
|
58795
58863
|
}
|
|
58796
|
-
return split(splitted, String(tickText));
|
|
58797
58864
|
}
|
|
58798
58865
|
scale(x) {
|
|
58799
58866
|
if (!arguments.length) {
|
|
@@ -67728,7 +67795,7 @@ const bb = {
|
|
|
67728
67795
|
* bb.version; // "1.0.0"
|
|
67729
67796
|
* @memberof bb
|
|
67730
67797
|
*/
|
|
67731
|
-
version: "4.1.
|
|
67798
|
+
version: "4.1.5",
|
|
67732
67799
|
/**
|
|
67733
67800
|
* Generate chart
|
|
67734
67801
|
* - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:
|