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.css
CHANGED
package/dist/billboard.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -2493,23 +2493,27 @@ function splitTickTextByWidth(text, width, painter) {
|
|
|
2493
2493
|
return [text];
|
|
2494
2494
|
}
|
|
2495
2495
|
const charWidth = painter.measureText("0").width || 5.5;
|
|
2496
|
-
|
|
2496
|
+
const lines = [];
|
|
2497
|
+
let start = 0;
|
|
2498
|
+
while (true) {
|
|
2497
2499
|
let spaceIndex;
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
+
let splitAt = -1;
|
|
2501
|
+
for (let i = 1; start + i < text.length; i++) {
|
|
2502
|
+
if (text.charAt(start + i) === " ") {
|
|
2500
2503
|
spaceIndex = i;
|
|
2501
2504
|
}
|
|
2502
2505
|
if (width < charWidth * (i + 1)) {
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
lines.concat(value.slice(0, splitIndex)),
|
|
2506
|
-
value.slice(spaceIndex ? spaceIndex + 1 : i)
|
|
2507
|
-
);
|
|
2506
|
+
splitAt = i;
|
|
2507
|
+
break;
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
|
-
|
|
2510
|
+
if (splitAt === -1) {
|
|
2511
|
+
lines.push(text.slice(start));
|
|
2512
|
+
return lines;
|
|
2513
|
+
}
|
|
2514
|
+
lines.push(text.slice(start, start + (spaceIndex || splitAt)));
|
|
2515
|
+
start += spaceIndex ? spaceIndex + 1 : splitAt;
|
|
2511
2516
|
}
|
|
2512
|
-
return split([], text);
|
|
2513
2517
|
}
|
|
2514
2518
|
function getXTickTextWidth($$, ticks, isRotated, targetScale) {
|
|
2515
2519
|
var _a, _b;
|
|
@@ -10762,6 +10766,7 @@ class State {
|
|
|
10762
10766
|
isCanvasMode: false,
|
|
10763
10767
|
canvasShape: null,
|
|
10764
10768
|
canvasFocusKey: null,
|
|
10769
|
+
canvasFocusData: null,
|
|
10765
10770
|
canvasSubchartBrushDragging: false,
|
|
10766
10771
|
canvasSubchartBrushMode: null,
|
|
10767
10772
|
canvasSubchartBrushStart: null,
|
|
@@ -15344,7 +15349,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15344
15349
|
|
|
15345
15350
|
/* harmony default export */ var redraw = ({
|
|
15346
15351
|
redraw(options = {}) {
|
|
15347
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
15352
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
15348
15353
|
const $$ = this;
|
|
15349
15354
|
const { config, state, $el } = $$;
|
|
15350
15355
|
const { main, treemap } = $el;
|
|
@@ -15380,27 +15385,27 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15380
15385
|
$$.updateSizes(initializing);
|
|
15381
15386
|
if (state.isCanvasMode) {
|
|
15382
15387
|
const zoomScale = $$.scale.zoom;
|
|
15383
|
-
const zoomDomain = zoomScale == null ? void 0 : zoomScale.domain();
|
|
15388
|
+
const zoomDomain = (_d = (_c = zoomScale == null ? void 0 : zoomScale.orgDomain) == null ? void 0 : _c.call(zoomScale)) != null ? _d : zoomScale == null ? void 0 : zoomScale.domain();
|
|
15384
15389
|
zoomScale && ($$.scale.zoom = null);
|
|
15385
15390
|
$$.updateScales(initializing, wth.UpdateXDomain);
|
|
15386
15391
|
if (zoomScale) {
|
|
15387
15392
|
zoomScale.range($$.scale.x.range());
|
|
15388
15393
|
zoomDomain && zoomScale.domain(zoomDomain);
|
|
15389
|
-
$$.scale.zoom = $$.getCustomizedXScale(zoomScale);
|
|
15394
|
+
$$.scale.zoom = $$.getCustomizedXScale((_f = (_e = zoomScale.orgScale) == null ? void 0 : _e.call(zoomScale)) != null ? _f : zoomScale);
|
|
15390
15395
|
$$.axis.x.scale($$.scale.zoom);
|
|
15391
15396
|
$$.scale.x.domain(config.zoom_rescale ? zoomDomain : $$.org.xDomain);
|
|
15392
15397
|
$$.scale.subX.domain($$.org.xDomain);
|
|
15393
15398
|
}
|
|
15394
15399
|
state.hasAxis && $$.axis.syncAxisDomains(targetsToShow, wth, flow);
|
|
15395
|
-
state.hasAxis && ((
|
|
15400
|
+
state.hasAxis && ((_g = $$.applyCanvasSubchartDomain) == null ? void 0 : _g.call($$));
|
|
15396
15401
|
const shape = needShapeUpdate ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();
|
|
15397
15402
|
if (needShapeUpdate) {
|
|
15398
15403
|
state._cachedDrawShape = shape;
|
|
15399
15404
|
}
|
|
15400
15405
|
if (config.legend_show && $el.legend && !(config.legend_contents_bindto && config.legend_contents_template)) {
|
|
15401
|
-
(
|
|
15406
|
+
(_h = $$.positionHtmlLegend) == null ? void 0 : _h.call($$);
|
|
15402
15407
|
}
|
|
15403
|
-
(
|
|
15408
|
+
(_i = $$.resizeCanvas) == null ? void 0 : _i.call($$);
|
|
15404
15409
|
state.canvasFocusKey = null;
|
|
15405
15410
|
$$.renderCanvasFrame(shape, null, true);
|
|
15406
15411
|
initializing && $$.updateTypesElements();
|
|
@@ -15421,11 +15426,11 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15421
15426
|
$$.updateDimension(true);
|
|
15422
15427
|
}
|
|
15423
15428
|
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);
|
|
15424
|
-
(
|
|
15429
|
+
(_j = $$.redrawTitle) == null ? void 0 : _j.call($$);
|
|
15425
15430
|
if (state.hasAxis) {
|
|
15426
15431
|
$$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing);
|
|
15427
|
-
((
|
|
15428
|
-
config.regions.length && ((
|
|
15432
|
+
((_k = $$.hasGrid) == null ? void 0 : _k.call($$)) && $$.updateGrid();
|
|
15433
|
+
config.regions.length && ((_l = $$.updateRegion) == null ? void 0 : _l.call($$));
|
|
15429
15434
|
["bar", "candlestick", "line", "area"].forEach((v) => {
|
|
15430
15435
|
const name = capitalize(v);
|
|
15431
15436
|
if (/^(line|area)$/.test(v) && $$.hasTypeOf(name) || $$.hasType(v)) {
|
|
@@ -15437,7 +15442,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15437
15442
|
$el.text && main.selectAll(`.${$SELECT.selectedCircles}`).filter($$.isBarType.bind($$)).selectAll("circle").remove();
|
|
15438
15443
|
if (config.interaction_enabled && !flow && wth.EventRect) {
|
|
15439
15444
|
$$.redrawEventRect();
|
|
15440
|
-
(
|
|
15445
|
+
(_m = $$.bindZoomEvent) == null ? void 0 : _m.call($$);
|
|
15441
15446
|
}
|
|
15442
15447
|
} else {
|
|
15443
15448
|
$el.arcs && $$.redrawArc(duration, durationForExit, wth.Transform);
|
|
@@ -15448,9 +15453,9 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15448
15453
|
}
|
|
15449
15454
|
if (!state.resizing && !treemap && ($$.hasPointType() || state.hasRadar)) {
|
|
15450
15455
|
if (needShapeUpdate) {
|
|
15451
|
-
$$.updateCircle();
|
|
15456
|
+
$$.updateCircle(false, !!flow);
|
|
15452
15457
|
}
|
|
15453
|
-
} else if ((
|
|
15458
|
+
} else if ((_n = $$.hasLegendDefsPoint) == null ? void 0 : _n.call($$)) {
|
|
15454
15459
|
$$.data.targets.forEach($$.point("create", this));
|
|
15455
15460
|
}
|
|
15456
15461
|
if ($$.hasDataLabel() && !$$.hasArcType(null, ["radar"])) {
|
|
@@ -15475,13 +15480,13 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15475
15480
|
generateRedrawList(targets, flow, duration, withSubchart, needShapeRegen = true) {
|
|
15476
15481
|
const $$ = this;
|
|
15477
15482
|
const { config, state } = $$;
|
|
15483
|
+
if (state.hasAxis) {
|
|
15484
|
+
config.subchart_show && $$.redrawSubchart(withSubchart, duration);
|
|
15485
|
+
}
|
|
15478
15486
|
const shape = needShapeRegen ? $$.getDrawShape() : state._cachedDrawShape || $$.getDrawShape();
|
|
15479
15487
|
if (needShapeRegen) {
|
|
15480
15488
|
state._cachedDrawShape = shape;
|
|
15481
15489
|
}
|
|
15482
|
-
if (state.hasAxis) {
|
|
15483
|
-
config.subchart_show && $$.redrawSubchart(withSubchart, duration, shape);
|
|
15484
|
-
}
|
|
15485
15490
|
const flowFn = flow && $$.generateFlow({
|
|
15486
15491
|
targets,
|
|
15487
15492
|
flow,
|
|
@@ -15489,7 +15494,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
15489
15494
|
shape,
|
|
15490
15495
|
xv: $$.xv.bind($$)
|
|
15491
15496
|
});
|
|
15492
|
-
const withTransition =
|
|
15497
|
+
const withTransition = !flowFn && duration && isTabVisible();
|
|
15493
15498
|
const redrawList = $$.getRedrawList(shape, flow, flowFn, withTransition);
|
|
15494
15499
|
const afterRedraw = () => {
|
|
15495
15500
|
flowFn && flowFn();
|
|
@@ -16739,6 +16744,11 @@ function _getCanvasTitleHeight($$) {
|
|
|
16739
16744
|
|
|
16740
16745
|
const RE_WHITESPACE = /(\r?\n|\t)/g;
|
|
16741
16746
|
const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
16747
|
+
function getRangeValueHtml(values) {
|
|
16748
|
+
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(
|
|
16749
|
+
""
|
|
16750
|
+
)}</div>`;
|
|
16751
|
+
}
|
|
16742
16752
|
/* harmony default export */ var internals_tooltip = ({
|
|
16743
16753
|
/**
|
|
16744
16754
|
* Initializes the tooltip
|
|
@@ -16879,7 +16889,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
16879
16889
|
(v) => valueFormat($$.getRangedData(row, v), ...param)
|
|
16880
16890
|
);
|
|
16881
16891
|
const mid = valueFormat(getRowValue(row), ...param);
|
|
16882
|
-
value =
|
|
16892
|
+
value = getRangeValueHtml([["Mid", mid], ["High", high], ["Low", low]]);
|
|
16883
16893
|
} else if ($$.isCandlestickType(row)) {
|
|
16884
16894
|
const [open, high, low, close, volume] = ["open", "high", "low", "close", "volume"].map((v) => {
|
|
16885
16895
|
const value2 = $$.getRangedData(row, v, "candlestick");
|
|
@@ -16888,7 +16898,13 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
16888
16898
|
...param
|
|
16889
16899
|
) : void 0;
|
|
16890
16900
|
});
|
|
16891
|
-
value =
|
|
16901
|
+
value = getRangeValueHtml([
|
|
16902
|
+
["Open", open],
|
|
16903
|
+
["High", high],
|
|
16904
|
+
["Low", low],
|
|
16905
|
+
["Close", close],
|
|
16906
|
+
...volume ? [["Volume", volume]] : []
|
|
16907
|
+
]);
|
|
16892
16908
|
} else if ($$.isBarRangeType(row)) {
|
|
16893
16909
|
const { value: rangeValue, id, index } = row;
|
|
16894
16910
|
value = `${valueFormat(rangeValue, void 0, id, index)}`;
|
|
@@ -17231,7 +17247,7 @@ const RE_TOOLTIP_TPL = /{{(.*)}}/;
|
|
|
17231
17247
|
$el: { eventRect, svg, tooltip },
|
|
17232
17248
|
state: { event, hasAxis, hasRadar, hasTreemap }
|
|
17233
17249
|
} = $$;
|
|
17234
|
-
if ($$.state.isCanvasMode) {
|
|
17250
|
+
if ($$.state.isCanvasMode || $$.state.flowing) {
|
|
17235
17251
|
return;
|
|
17236
17252
|
}
|
|
17237
17253
|
if ((tooltip == null ? void 0 : tooltip.style("display")) === "block" && event) {
|
|
@@ -17704,6 +17720,9 @@ function getSubchartCandlestickShapeValue($$, d, isSub) {
|
|
|
17704
17720
|
return void 0;
|
|
17705
17721
|
}
|
|
17706
17722
|
if ($$.isBarType(d)) {
|
|
17723
|
+
if (isNumber(value.volume)) {
|
|
17724
|
+
return value.volume;
|
|
17725
|
+
}
|
|
17707
17726
|
return isNumber(value.open) && isNumber(value.close) ? value._isUp ? value.close : value.open : void 0;
|
|
17708
17727
|
}
|
|
17709
17728
|
return isNumber(value.close) ? value.close : void 0;
|
|
@@ -18358,23 +18377,25 @@ function updateTargetsForShape(targets, config) {
|
|
|
18358
18377
|
return sensitivity;
|
|
18359
18378
|
},
|
|
18360
18379
|
getBarW(type, axis, targetsNum) {
|
|
18361
|
-
var _a, _b, _c, _d
|
|
18380
|
+
var _a, _b, _c, _d;
|
|
18362
18381
|
const $$ = this;
|
|
18363
18382
|
const { config, org, scale, state } = $$;
|
|
18364
18383
|
const maxDataCount = $$.getMaxDataCount();
|
|
18365
18384
|
const isGrouped = type === "bar" && ((_a = config.data_groups) == null ? void 0 : _a.length);
|
|
18366
18385
|
const configName = `${type}_width`;
|
|
18367
|
-
const { k } = (_c = (_b = $$.getZoomTransform) == null ? void 0 : _b.call($$)) != null ? _c : { k: 1 };
|
|
18368
18386
|
const xMinMax = [
|
|
18369
|
-
(
|
|
18370
|
-
(
|
|
18387
|
+
(_b = config.axis_x_min) != null ? _b : org.xDomain[0],
|
|
18388
|
+
(_c = config.axis_x_max) != null ? _c : org.xDomain[1]
|
|
18371
18389
|
].map((v) => $$.axis.isTimeSeries() ? parseDate.call($$, v) : Number(v));
|
|
18372
18390
|
let tickInterval = axis.tickInterval(maxDataCount);
|
|
18373
|
-
|
|
18391
|
+
const xScale = (_d = scale.zoom) != null ? _d : scale.x;
|
|
18392
|
+
const getSpan = ([min, max]) => Math.abs(+max - +min);
|
|
18393
|
+
const isZoomed = axis !== $$.axis.subX && !$$.axis.isCategorized() && getSpan(xScale.domain()) < getSpan(org.xDomain);
|
|
18394
|
+
if (isZoomed) {
|
|
18374
18395
|
const isSameMinMax = xMinMax.every((v, i) => v === org.xDomain[i]);
|
|
18375
18396
|
tickInterval = org.xDomain.map((v, i) => {
|
|
18376
18397
|
const value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);
|
|
18377
|
-
return
|
|
18398
|
+
return xScale(value);
|
|
18378
18399
|
}).reduce((a, c) => Math.abs(a) + c) / maxDataCount;
|
|
18379
18400
|
}
|
|
18380
18401
|
const getWidth = (id) => {
|
|
@@ -19849,6 +19870,17 @@ const canvasInternal = {
|
|
|
19849
19870
|
}
|
|
19850
19871
|
callCallback && config.subchart_onbrush.bind($$.api)(scale.x.orgDomain());
|
|
19851
19872
|
},
|
|
19873
|
+
/**
|
|
19874
|
+
* Show the focus and tooltip of the data the flow moved under the pointer.
|
|
19875
|
+
* @private
|
|
19876
|
+
*/
|
|
19877
|
+
updateCanvasFlowFocus() {
|
|
19878
|
+
var _a;
|
|
19879
|
+
const $$ = this;
|
|
19880
|
+
const { state } = $$;
|
|
19881
|
+
state.canvasFocusKey = null;
|
|
19882
|
+
((_a = $$.$el.tooltip) == null ? void 0 : _a.style("display")) === "block" && state.event && $$.onCanvasMouseMove(state.event);
|
|
19883
|
+
},
|
|
19852
19884
|
/**
|
|
19853
19885
|
* Finish a pending canvas flow animation before accepting another flow mutation.
|
|
19854
19886
|
* @private
|
|
@@ -19870,7 +19902,7 @@ const canvasInternal = {
|
|
|
19870
19902
|
* @private
|
|
19871
19903
|
*/
|
|
19872
19904
|
animateCanvasFlow(flow) {
|
|
19873
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j
|
|
19905
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
19874
19906
|
const $$ = this;
|
|
19875
19907
|
const { axis, data, org, scale, state } = $$;
|
|
19876
19908
|
const { done = () => {
|
|
@@ -19883,6 +19915,7 @@ const canvasInternal = {
|
|
|
19883
19915
|
const startDomain = scale.x.domain().slice(0, 2);
|
|
19884
19916
|
const startOrgDomain = (_d = (_c = org.xDomain) == null ? void 0 : _c.slice) == null ? void 0 : _d.call(_c);
|
|
19885
19917
|
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);
|
|
19918
|
+
const focusData = state.canvasFocusKey ? state.canvasFocusData : null;
|
|
19886
19919
|
if (!isCanvasFlowDomain(startDomain, isLog)) {
|
|
19887
19920
|
return false;
|
|
19888
19921
|
}
|
|
@@ -19932,6 +19965,7 @@ const canvasInternal = {
|
|
|
19932
19965
|
state.canvasFlowFrame = null;
|
|
19933
19966
|
state.canvasFlowFinish = null;
|
|
19934
19967
|
state.flowing = false;
|
|
19968
|
+
$$.updateCanvasFlowFocus();
|
|
19935
19969
|
done.call($$.api);
|
|
19936
19970
|
};
|
|
19937
19971
|
const render = (timestamp) => {
|
|
@@ -19943,7 +19977,7 @@ const canvasInternal = {
|
|
|
19943
19977
|
state._cachedDrawShape = null;
|
|
19944
19978
|
state._canvasVisibleRangeCache = null;
|
|
19945
19979
|
state._canvasXTickValuesCache = null;
|
|
19946
|
-
$$.renderCanvasFrame(void 0,
|
|
19980
|
+
$$.renderCanvasFrame(void 0, focusData, false);
|
|
19947
19981
|
if (ratio < 1) {
|
|
19948
19982
|
state.canvasFlowFrame = requestFrame(render);
|
|
19949
19983
|
} else {
|
|
@@ -19956,7 +19990,6 @@ const canvasInternal = {
|
|
|
19956
19990
|
axis.x.scale(scale.x);
|
|
19957
19991
|
state.flowing = true;
|
|
19958
19992
|
state.cancelClick = true;
|
|
19959
|
-
(_k = $$.hideTooltip) == null ? void 0 : _k.call($$);
|
|
19960
19993
|
state.canvasFlowFinish = finish;
|
|
19961
19994
|
state.canvasFlowFrame = requestFrame(render);
|
|
19962
19995
|
return true;
|
|
@@ -21300,6 +21333,7 @@ const canvasInternal = {
|
|
|
21300
21333
|
const $$ = this;
|
|
21301
21334
|
const { state } = $$;
|
|
21302
21335
|
const withMainRedraw = (_b = (_a = $$.canvasRenderer).hasExpandedShapeFocus) == null ? void 0 : _b.call(_a, $$, focusData);
|
|
21336
|
+
state.canvasFocusData = focusData;
|
|
21303
21337
|
if (withMainRedraw) {
|
|
21304
21338
|
const drawShape = state.canvasShape || $$.getDrawShape();
|
|
21305
21339
|
$$.canvasEngine.beginFrame(state.current.width, $$.getCanvasSurfaceHeight());
|
|
@@ -21501,7 +21535,7 @@ function loadConfig(config) {
|
|
|
21501
21535
|
* chart.flush(true);
|
|
21502
21536
|
*/
|
|
21503
21537
|
flush(soft) {
|
|
21504
|
-
var _a, _b;
|
|
21538
|
+
var _a, _b, _c, _d;
|
|
21505
21539
|
const $$ = this.internal;
|
|
21506
21540
|
const { state, $el: { zoomResetBtn } } = $$;
|
|
21507
21541
|
if (state.rendered) {
|
|
@@ -21512,7 +21546,7 @@ function loadConfig(config) {
|
|
|
21512
21546
|
}
|
|
21513
21547
|
zoomResetBtn == null ? void 0 : zoomResetBtn.style("display", "none");
|
|
21514
21548
|
if ($$.scale.zoom) {
|
|
21515
|
-
state.current.zoomDomain = $$.scale.zoom.domain();
|
|
21549
|
+
state.current.zoomDomain = (_d = (_c = $$.zoom) == null ? void 0 : _c.getDomain()) != null ? _d : $$.scale.zoom.domain();
|
|
21516
21550
|
}
|
|
21517
21551
|
$$.scale.zoom = null;
|
|
21518
21552
|
if (!state.resizing) {
|
|
@@ -22889,7 +22923,7 @@ let exportApi = () => {
|
|
|
22889
22923
|
});
|
|
22890
22924
|
}
|
|
22891
22925
|
function _() {
|
|
22892
|
-
var _a, _b, _c;
|
|
22926
|
+
var _a, _b, _c, _d, _e;
|
|
22893
22927
|
let domain;
|
|
22894
22928
|
let length = 0;
|
|
22895
22929
|
let tail = 0;
|
|
@@ -22903,6 +22937,12 @@ let exportApi = () => {
|
|
|
22903
22937
|
const orgDataCount = $$.getMaxDataCount();
|
|
22904
22938
|
const targets = $$.convertDataToTargets(data, true);
|
|
22905
22939
|
const isTimeSeries = $$.axis.isTimeSeries();
|
|
22940
|
+
const isCustomX = !isTimeSeries && $$.axis.isCustomX() && !$$.axis.isCategorized();
|
|
22941
|
+
const hasDataX = isTimeSeries || isCustomX;
|
|
22942
|
+
const firstValue = (_b = $$.data.targets.find((t) => t.values.length)) == null ? void 0 : _b.values[0];
|
|
22943
|
+
const xOffset = firstValue ? firstValue.x - firstValue.index : 0;
|
|
22944
|
+
const getX = (index) => isTimeSeries ? $$.getOtherTargetX(index) : index + xOffset;
|
|
22945
|
+
const flowedXs = [];
|
|
22906
22946
|
$$.data.targets.forEach((t) => {
|
|
22907
22947
|
let found = false;
|
|
22908
22948
|
for (let i = 0; i < targets.length; i++) {
|
|
@@ -22915,9 +22955,10 @@ let exportApi = () => {
|
|
|
22915
22955
|
length = values.length;
|
|
22916
22956
|
for (let j = 0; j < length; j++) {
|
|
22917
22957
|
values[j].index = tail + j;
|
|
22918
|
-
if (!
|
|
22919
|
-
values[j].x = tail + j;
|
|
22958
|
+
if (!hasDataX) {
|
|
22959
|
+
values[j].x = getX(tail + j);
|
|
22920
22960
|
}
|
|
22961
|
+
flowedXs[j] = values[j].x;
|
|
22921
22962
|
t.values.push(values[j]);
|
|
22922
22963
|
}
|
|
22923
22964
|
targets.splice(i, 1);
|
|
@@ -22937,7 +22978,7 @@ let exportApi = () => {
|
|
|
22937
22978
|
t.values.push({
|
|
22938
22979
|
id: t.id,
|
|
22939
22980
|
index: tail + j,
|
|
22940
|
-
x:
|
|
22981
|
+
x: isCustomX ? flowedXs[j] : getX(tail + j),
|
|
22941
22982
|
value: null
|
|
22942
22983
|
});
|
|
22943
22984
|
}
|
|
@@ -22946,6 +22987,7 @@ let exportApi = () => {
|
|
|
22946
22987
|
});
|
|
22947
22988
|
if ($$.data.targets.length) {
|
|
22948
22989
|
targets.forEach((t) => {
|
|
22990
|
+
var _a2;
|
|
22949
22991
|
const firstIndex = $$.data.targets[0].values[0].index;
|
|
22950
22992
|
const values = t.values;
|
|
22951
22993
|
const valueLength = values.length;
|
|
@@ -22960,7 +23002,7 @@ let exportApi = () => {
|
|
|
22960
23002
|
values[i] = {
|
|
22961
23003
|
id: t.id,
|
|
22962
23004
|
index,
|
|
22963
|
-
x:
|
|
23005
|
+
x: isCustomX ? (_a2 = $$.data.targets[0].values[i]) == null ? void 0 : _a2.x : getX(index),
|
|
22964
23006
|
value: null
|
|
22965
23007
|
};
|
|
22966
23008
|
}
|
|
@@ -22968,8 +23010,8 @@ let exportApi = () => {
|
|
|
22968
23010
|
for (let i = missingLength; i < values.length; i++) {
|
|
22969
23011
|
const v = values[i];
|
|
22970
23012
|
v.index += tail;
|
|
22971
|
-
if (!
|
|
22972
|
-
v.x
|
|
23013
|
+
if (!hasDataX) {
|
|
23014
|
+
v.x = getX(v.index);
|
|
22973
23015
|
}
|
|
22974
23016
|
}
|
|
22975
23017
|
});
|
|
@@ -23002,7 +23044,7 @@ let exportApi = () => {
|
|
|
23002
23044
|
domain && $$.updateXDomain(null, true, true, false, domain);
|
|
23003
23045
|
if ($$.state.isCanvasMode) {
|
|
23004
23046
|
const duration = isValue(args.duration) ? args.duration : $$.config.transition_duration;
|
|
23005
|
-
const animated = (
|
|
23047
|
+
const animated = (_c = $$.animateCanvasFlow) == null ? void 0 : _c.call($$, {
|
|
23006
23048
|
done: args.done,
|
|
23007
23049
|
duration,
|
|
23008
23050
|
length,
|
|
@@ -23027,7 +23069,8 @@ let exportApi = () => {
|
|
|
23027
23069
|
withUpdateXDomain: true
|
|
23028
23070
|
});
|
|
23029
23071
|
$$.updateTypesElements();
|
|
23030
|
-
(
|
|
23072
|
+
(_d = $$.updateCanvasFlowFocus) == null ? void 0 : _d.call($$);
|
|
23073
|
+
(_e = args.done) == null ? void 0 : _e.call($$.api);
|
|
23031
23074
|
return;
|
|
23032
23075
|
}
|
|
23033
23076
|
$$.updateTargets($$.data.targets);
|
|
@@ -23035,7 +23078,6 @@ let exportApi = () => {
|
|
|
23035
23078
|
$$.state._eventRectFingerprint = null;
|
|
23036
23079
|
$$.redraw({
|
|
23037
23080
|
flow: {
|
|
23038
|
-
index: baseValue.index,
|
|
23039
23081
|
length,
|
|
23040
23082
|
duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
|
|
23041
23083
|
done: args.done,
|
|
@@ -23063,9 +23105,12 @@ let exportApi = () => {
|
|
|
23063
23105
|
*/
|
|
23064
23106
|
generateFlow(args) {
|
|
23065
23107
|
const $$ = this;
|
|
23066
|
-
const { data, state, $el } = $$;
|
|
23108
|
+
const { config, data, state, $el } = $$;
|
|
23067
23109
|
return function() {
|
|
23068
23110
|
var _a;
|
|
23111
|
+
if (!$$.$el) {
|
|
23112
|
+
return;
|
|
23113
|
+
}
|
|
23069
23114
|
const flowLength = args.flow.length;
|
|
23070
23115
|
state.flowing = true;
|
|
23071
23116
|
data.targets.forEach((d) => {
|
|
@@ -23096,7 +23141,15 @@ let exportApi = () => {
|
|
|
23096
23141
|
elements[v] = node;
|
|
23097
23142
|
}
|
|
23098
23143
|
});
|
|
23099
|
-
(
|
|
23144
|
+
if (config.axis_rotated) {
|
|
23145
|
+
(_a = $$.hideGridFocus) == null ? void 0 : _a.call($$);
|
|
23146
|
+
} else {
|
|
23147
|
+
const xFocus = $el.main.selectAll(
|
|
23148
|
+
`line.${config_classes.xgridFocus}:not(.${config_classes.xgridFocusContinuous})`
|
|
23149
|
+
);
|
|
23150
|
+
xFocus.size() && (elements["gridFocus.x"] = xFocus);
|
|
23151
|
+
$el.main.selectAll(`line.${config_classes.ygridFocus}`).style("visibility", "hidden");
|
|
23152
|
+
}
|
|
23100
23153
|
$$.setFlowList(elements, args);
|
|
23101
23154
|
};
|
|
23102
23155
|
},
|
|
@@ -23111,11 +23164,9 @@ let exportApi = () => {
|
|
|
23111
23164
|
const { flow, targets } = args;
|
|
23112
23165
|
const {
|
|
23113
23166
|
duration = args.duration,
|
|
23114
|
-
index: flowIndex,
|
|
23115
|
-
length: flowLength,
|
|
23116
23167
|
orgDataCount
|
|
23117
23168
|
} = flow;
|
|
23118
|
-
const transform = $$.getFlowTransform(targets, orgDataCount
|
|
23169
|
+
const transform = $$.getFlowTransform(targets, orgDataCount);
|
|
23119
23170
|
const wait = generateWait();
|
|
23120
23171
|
let n;
|
|
23121
23172
|
wait.add(Object.keys(elements).map((v) => {
|
|
@@ -23142,7 +23193,11 @@ let exportApi = () => {
|
|
|
23142
23193
|
* @private
|
|
23143
23194
|
*/
|
|
23144
23195
|
cleanUpFlow(elements, args) {
|
|
23196
|
+
var _a, _b;
|
|
23145
23197
|
const $$ = this;
|
|
23198
|
+
if (!$$.$el) {
|
|
23199
|
+
return;
|
|
23200
|
+
}
|
|
23146
23201
|
const { config, state, $el: { svg } } = $$;
|
|
23147
23202
|
const isRotated = config.axis_rotated;
|
|
23148
23203
|
const { flow, shape, xv } = args;
|
|
@@ -23153,12 +23208,18 @@ let exportApi = () => {
|
|
|
23153
23208
|
length: flowLength
|
|
23154
23209
|
} = flow;
|
|
23155
23210
|
if (flowLength) {
|
|
23211
|
+
const isFocusCircle = $$.isPointFocusOnly() ? (node) => {
|
|
23212
|
+
var _a2;
|
|
23213
|
+
return (_a2 = node.parentElement) == null ? void 0 : _a2.classList.contains(config_classes.circles);
|
|
23214
|
+
} : () => false;
|
|
23156
23215
|
["circle", "text", "shape", "eventRect"].forEach((v) => {
|
|
23157
23216
|
const target = [];
|
|
23158
23217
|
for (let i = 0; i < flowLength; i++) {
|
|
23159
23218
|
target.push(`.${config_classes[v]}-${i}`);
|
|
23160
23219
|
}
|
|
23161
|
-
svg.selectAll(`.${config_classes[`${v}s`]}`).selectAll(target).
|
|
23220
|
+
svg.selectAll(`.${config_classes[`${v}s`]}`).selectAll(target).filter(function() {
|
|
23221
|
+
return !isFocusCircle(this);
|
|
23222
|
+
}).remove();
|
|
23162
23223
|
});
|
|
23163
23224
|
svg.select(`.${config_classes.xgrid}`).remove();
|
|
23164
23225
|
}
|
|
@@ -23189,24 +23250,25 @@ let exportApi = () => {
|
|
|
23189
23250
|
}
|
|
23190
23251
|
});
|
|
23191
23252
|
config.interaction_enabled && $$.redrawEventRect();
|
|
23192
|
-
done.call($$.api);
|
|
23193
23253
|
state.flowing = false;
|
|
23254
|
+
if (((_a = $$.$el.tooltip) == null ? void 0 : _a.style("display")) === "block") {
|
|
23255
|
+
$$.updateTooltipOnRedraw();
|
|
23256
|
+
} else {
|
|
23257
|
+
(_b = $$.hideGridFocus) == null ? void 0 : _b.call($$);
|
|
23258
|
+
}
|
|
23259
|
+
done.call($$.api);
|
|
23194
23260
|
},
|
|
23195
23261
|
/**
|
|
23196
23262
|
* Get flow transform value
|
|
23197
23263
|
* @param {object} targets target
|
|
23198
23264
|
* @param {number} orgDataCount original data count
|
|
23199
|
-
* @param {number} flowIndex flow index
|
|
23200
|
-
* @param {number} flowLength flow length
|
|
23201
23265
|
* @returns {string}
|
|
23202
23266
|
* @private
|
|
23203
23267
|
*/
|
|
23204
|
-
getFlowTransform(targets, orgDataCount
|
|
23268
|
+
getFlowTransform(targets, orgDataCount) {
|
|
23205
23269
|
const $$ = this;
|
|
23206
23270
|
const { data, scale: { x } } = $$;
|
|
23207
23271
|
const dataValues = data.targets[0].values;
|
|
23208
|
-
let flowStart = $$.getValueOnIndex(dataValues, flowIndex);
|
|
23209
|
-
let flowEnd = $$.getValueOnIndex(dataValues, flowIndex + flowLength);
|
|
23210
23272
|
let translateX;
|
|
23211
23273
|
const orgDomain = x.domain();
|
|
23212
23274
|
const domain = $$.updateXDomain(targets, true, true);
|
|
@@ -23215,17 +23277,15 @@ let exportApi = () => {
|
|
|
23215
23277
|
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
23216
23278
|
} else {
|
|
23217
23279
|
if ($$.axis.isTimeSeries()) {
|
|
23218
|
-
flowStart = $$.getValueOnIndex(dataValues, 0);
|
|
23219
|
-
flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
|
|
23280
|
+
const flowStart = $$.getValueOnIndex(dataValues, 0);
|
|
23281
|
+
const flowEnd = $$.getValueOnIndex(dataValues, dataValues.length - 1);
|
|
23220
23282
|
translateX = x(flowStart.x) - x(flowEnd.x);
|
|
23221
23283
|
} else {
|
|
23222
23284
|
translateX = diffDomain(domain) / 2;
|
|
23223
23285
|
}
|
|
23224
23286
|
}
|
|
23225
|
-
} else if (orgDataCount === 1 || (flowStart == null ? void 0 : flowStart.x) === (flowEnd == null ? void 0 : flowEnd.x)) {
|
|
23226
|
-
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
23227
23287
|
} else {
|
|
23228
|
-
translateX =
|
|
23288
|
+
translateX = x(orgDomain[0]) - x(domain[0]);
|
|
23229
23289
|
}
|
|
23230
23290
|
const scaleX = diffDomain(orgDomain) / diffDomain(domain);
|
|
23231
23291
|
return `translate(${translateX},0) scale(${scaleX},1)`;
|
|
@@ -25049,6 +25109,10 @@ function dispatchSubchartEvent($$, type, event, context) {
|
|
|
25049
25109
|
* - **NOTE:** for ESM imports, needs to import 'subchart' exports and instantiate it by calling `subchart()`.
|
|
25050
25110
|
* - `show: subchart()`
|
|
25051
25111
|
* @property {string} [subchart.type] Set chart type for the subchart. Defaults to data.type.
|
|
25112
|
+
* - **NOTE:** When candlestick data is rendered as another type in the subchart, the subchart takes one value of the data:
|
|
25113
|
+
* - `bar`: the `volume` of the data. Without `volume`, the close value for a rise and the open value for a fall, from zero.
|
|
25114
|
+
* - other types (`line`, `area`, etc.): the close value.
|
|
25115
|
+
* - The y axis domain of the subchart follows the taken values. The `volume` is not part of the main chart's y axis domain.
|
|
25052
25116
|
* @property {object} [subchart.types] Set chart type for each data in the subchart. Defaults to data.types.
|
|
25053
25117
|
* @property {boolean} [subchart.brush.enabled=true] Enable subchart brush interaction.
|
|
25054
25118
|
* @property {boolean} [subchart.showHandle=false] Show sub chart's handle.
|
|
@@ -26735,7 +26799,7 @@ function getPointBBox(node) {
|
|
|
26735
26799
|
});
|
|
26736
26800
|
});
|
|
26737
26801
|
},
|
|
26738
|
-
updateCircle(isSub = false) {
|
|
26802
|
+
updateCircle(isSub = false, withFlow = false) {
|
|
26739
26803
|
const $$ = this;
|
|
26740
26804
|
const { config, state, $el } = $$;
|
|
26741
26805
|
const focusOnly = $$.isPointFocusOnly();
|
|
@@ -26750,8 +26814,9 @@ function getPointBBox(node) {
|
|
|
26750
26814
|
const pointR = $$.pointR.bind($$);
|
|
26751
26815
|
const updateCircleColor = $$.generateUpdateCircleColor();
|
|
26752
26816
|
const initialOpacityForCircle = $$.initialOpacityForCircle.bind($$);
|
|
26753
|
-
circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
|
|
26754
|
-
$root.circle = $root.main.selectAll(`.${$CIRCLE.circles} .${$CIRCLE.circle}`).style("stroke", $$.getStylePropValue($$.color))
|
|
26817
|
+
const entered = circles.enter().filter(Boolean).append($$.point("create", this, pointR, updateCircleColor));
|
|
26818
|
+
$root.circle = $root.main.selectAll(`.${$CIRCLE.circles} .${$CIRCLE.circle}`).style("stroke", $$.getStylePropValue($$.color));
|
|
26819
|
+
(focusOnly && withFlow ? entered : $root.circle).style("opacity", initialOpacityForCircle);
|
|
26755
26820
|
}
|
|
26756
26821
|
},
|
|
26757
26822
|
/**
|
|
@@ -27642,7 +27707,7 @@ class AxisRendererHelper {
|
|
|
27642
27707
|
transitionise(selection) {
|
|
27643
27708
|
const { config } = this;
|
|
27644
27709
|
let transitionSelection = selection;
|
|
27645
|
-
if (config.withoutTransition) {
|
|
27710
|
+
if (config.withoutTransition && !config.transition) {
|
|
27646
27711
|
transitionSelection = selection.interrupt();
|
|
27647
27712
|
} else if (config.transition || !this.owner.params.noTransition) {
|
|
27648
27713
|
try {
|
|
@@ -27990,26 +28055,28 @@ class AxisRenderer {
|
|
|
27990
28055
|
if (!tickWidth || tickWidth <= 0) {
|
|
27991
28056
|
tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
|
|
27992
28057
|
}
|
|
27993
|
-
|
|
27994
|
-
|
|
28058
|
+
const text = String(tickText);
|
|
28059
|
+
const result = [];
|
|
28060
|
+
let start = 0;
|
|
28061
|
+
while (true) {
|
|
27995
28062
|
let spaceIndex;
|
|
27996
|
-
let
|
|
27997
|
-
for (let i = 1; i < text.length; i++) {
|
|
27998
|
-
if (text.charAt(i) === " ") {
|
|
28063
|
+
let splitAt = -1;
|
|
28064
|
+
for (let i = 1; start + i < text.length; i++) {
|
|
28065
|
+
if (text.charAt(start + i) === " ") {
|
|
27999
28066
|
spaceIndex = i;
|
|
28000
28067
|
}
|
|
28001
|
-
|
|
28002
|
-
|
|
28003
|
-
|
|
28004
|
-
return split(
|
|
28005
|
-
splitted2.concat(text.substr(0, spaceIndex || i)),
|
|
28006
|
-
text.slice(spaceIndex ? spaceIndex + 1 : i)
|
|
28007
|
-
);
|
|
28068
|
+
if (tickWidth < charWidth * (i + 1)) {
|
|
28069
|
+
splitAt = i;
|
|
28070
|
+
break;
|
|
28008
28071
|
}
|
|
28009
28072
|
}
|
|
28010
|
-
|
|
28073
|
+
if (splitAt === -1) {
|
|
28074
|
+
result.push(text.slice(start));
|
|
28075
|
+
return result;
|
|
28076
|
+
}
|
|
28077
|
+
result.push(text.substr(start, spaceIndex || splitAt));
|
|
28078
|
+
start += spaceIndex ? spaceIndex + 1 : splitAt;
|
|
28011
28079
|
}
|
|
28012
|
-
return split(splitted, String(tickText));
|
|
28013
28080
|
}
|
|
28014
28081
|
scale(x) {
|
|
28015
28082
|
if (!arguments.length) {
|
|
@@ -36294,7 +36361,7 @@ const bb = {
|
|
|
36294
36361
|
* bb.version; // "1.0.0"
|
|
36295
36362
|
* @memberof bb
|
|
36296
36363
|
*/
|
|
36297
|
-
version: "4.1.
|
|
36364
|
+
version: "4.1.5",
|
|
36298
36365
|
/**
|
|
36299
36366
|
* Generate chart
|
|
36300
36367
|
* - **NOTE:** Bear in mind for the possibility of ***throwing an error***, during the generation when:
|
package/dist/billboard.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.
|
|
8
|
+
* @version 4.1.5
|
|
9
9
|
*/.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle,.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-arc .bb-arc-label-line{fill:none;stroke-width:1px;pointer-events:none}.bb-chart-arc .bb-arc-label-line{stroke:#7f7f7f}.bb-chart-arc>text.bb-arc-label-line-text{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{font-size:13px;fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:1em;fill:#fff;white-space:nowrap}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:gray;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}div.bb-canvas-legend{position:absolute;z-index:1;box-sizing:border-box;display:block;overflow:visible;pointer-events:auto;font-family:sans-serif;font-size:12px;color:#000}div.bb-canvas-legend.bb-canvas-legend-bottom{right:0;bottom:6px;left:0}div.bb-canvas-legend.bb-canvas-legend-right{overflow:visible}button.bb-legend-item{position:absolute;display:block;box-sizing:border-box;margin:0;padding:0;border:0;background:transparent;color:inherit;font-family:inherit;font-size:inherit;line-height:normal;text-align:left}button.bb-legend-item.bb-legend-item-interactive{cursor:pointer}.bb-canvas-legend .bb-legend-item-title{position:absolute;white-space:nowrap;pointer-events:none}.bb-canvas-legend .bb-legend-item-tile{position:absolute;display:block;box-sizing:border-box;width:10px;height:10px}.bb-canvas-legend .bb-legend-item-tile.bb-legend-item-tile-circle{border-radius:50%}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;user-select:none;transform:translateZ(0)}.bb-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;opacity:.9;box-shadow:7px 7px 12px -9px #777;white-space:nowrap}.bb-tooltip tr{border:1px solid #CCC}.bb-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#fff}.bb-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{font-size:11px;border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|