@visactor/vchart-types 1.15.5-alpha.8 → 2.0.0-alpha.1
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/package.json +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/animate-manager.d.ts +0 -12
- package/types/animation/animation-planner.d.ts +13 -0
- package/types/animation/config.d.ts +5 -5
- package/types/animation/grammar-dector.d.ts +22 -0
- package/types/animation/index.d.ts +7 -0
- package/types/animation/interface.d.ts +98 -7
- package/types/animation/sequential-animate.d.ts +1 -0
- package/types/animation/spec.d.ts +27 -3
- package/types/animation/state-transition.d.ts +1 -0
- package/types/animation/strategy/common.d.ts +17 -0
- package/types/animation/strategy/horizontal-bar-split.d.ts +11 -0
- package/types/animation/strategy/vertical-bar-split.d.ts +11 -0
- package/types/animation/utils.d.ts +3 -4
- package/types/chart/area/area.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +1 -0
- package/types/chart/bar/index.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +1 -5
- package/types/chart/base/base-chart.d.ts +22 -9
- package/types/chart/box-plot/box-plot.d.ts +1 -0
- package/types/chart/common/common.d.ts +1 -0
- package/types/chart/common/interface.d.ts +5 -5
- package/types/chart/funnel/index.d.ts +0 -1
- package/types/chart/funnel/interface.d.ts +1 -4
- package/types/chart/funnel/util.d.ts +2 -0
- package/types/chart/histogram/histogram.d.ts +1 -0
- package/types/chart/histogram/index.d.ts +0 -1
- package/types/chart/histogram/interface.d.ts +1 -4
- package/types/chart/index.d.ts +19 -17
- package/types/chart/interface/chart.d.ts +14 -5
- package/types/chart/interface/common.d.ts +2 -9
- package/types/chart/interface/type.d.ts +1 -8
- package/types/chart/line/line.d.ts +1 -0
- package/types/chart/mosaic/mosaic.d.ts +1 -0
- package/types/chart/pictogram/interface.d.ts +1 -1
- package/types/chart/pie/index.d.ts +0 -1
- package/types/chart/pie/interface.d.ts +1 -5
- package/types/chart/progress/circular/circular.d.ts +1 -0
- package/types/chart/progress/linear/linear.d.ts +1 -0
- package/types/chart/radar/radar.d.ts +1 -0
- package/types/chart/range-area/range-area.d.ts +1 -0
- package/types/chart/range-column/index.d.ts +0 -1
- package/types/chart/range-column/interface.d.ts +1 -5
- package/types/chart/range-column/range-column.d.ts +1 -0
- package/types/chart/rose/rose.d.ts +1 -0
- package/types/chart/sankey/sankey.d.ts +1 -1
- package/types/chart/scatter/scatter.d.ts +1 -0
- package/types/chart/waterfall/waterfall.d.ts +1 -0
- package/types/chart/word-cloud/index.d.ts +0 -1
- package/types/chart/word-cloud/interface.d.ts +1 -5
- package/types/chart/word-cloud/word-cloud.d.ts +4 -8
- package/types/compile/compilable-base.d.ts +1 -1
- package/types/compile/compiler.d.ts +35 -25
- package/types/compile/data/compilable-data.d.ts +7 -7
- package/types/compile/data/interface.d.ts +4 -1
- package/types/compile/grammar-item.d.ts +7 -13
- package/types/compile/interface/compilable-item.d.ts +22 -28
- package/types/compile/interface/compiler.d.ts +14 -4
- package/types/compile/mark/compilable-mark.d.ts +1 -0
- package/types/compile/mark/index.d.ts +0 -1
- package/types/compile/mark/interface.d.ts +48 -34
- package/types/compile/mark/mark-state-manager.d.ts +12 -13
- package/types/compile/mark/util.d.ts +1 -1
- package/types/compile/morph.d.ts +3 -0
- package/types/compile/state-manager.d.ts +11 -0
- package/types/compile/util.d.ts +14 -0
- package/types/component/axis/base-axis.d.ts +10 -3
- package/types/component/axis/cartesian/axis.d.ts +7 -14
- package/types/component/axis/cartesian/band-axis.d.ts +6 -0
- package/types/component/axis/cartesian/linear-axis.d.ts +2 -1
- package/types/component/axis/cartesian/log-axis.d.ts +6 -0
- package/types/component/axis/cartesian/symlog-axis.d.ts +6 -0
- package/types/component/axis/cartesian/time-axis.d.ts +6 -0
- package/types/component/axis/cartesian/util/common.d.ts +3 -1
- package/types/component/axis/interface/common.d.ts +8 -0
- package/types/component/axis/interface/spec.d.ts +7 -2
- package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
- package/types/component/axis/polar/band-axis.d.ts +6 -0
- package/types/component/axis/polar/linear-axis.d.ts +6 -0
- package/types/component/axis/polar/util/common.d.ts +4 -1
- package/types/component/axis/util.d.ts +2 -6
- package/types/component/base/base-component.d.ts +1 -5
- package/types/component/base/util.d.ts +1 -2
- package/types/component/brush/brush.d.ts +35 -30
- package/types/component/brush/interface.d.ts +2 -0
- package/types/component/common/trigger/desktop.d.ts +0 -2
- package/types/component/common/trigger/interface.d.ts +0 -2
- package/types/component/common/trigger/mobile.d.ts +0 -2
- package/types/component/crosshair/base.d.ts +25 -36
- package/types/component/crosshair/cartesian.d.ts +9 -29
- package/types/component/crosshair/interface/common.d.ts +67 -2
- package/types/component/crosshair/interface/index.d.ts +0 -2
- package/types/component/crosshair/interface/spec.d.ts +8 -4
- package/types/component/crosshair/polar.d.ts +10 -23
- package/types/component/crosshair/utils/cartesian.d.ts +10 -21
- package/types/component/crosshair/utils/common.d.ts +2 -3
- package/types/component/crosshair/utils/polar.d.ts +18 -11
- package/types/component/custom-mark/custom-mark.d.ts +1 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/types/component/data-zoom/interface.d.ts +11 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +4 -2
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/geo/interface.d.ts +1 -1
- package/types/component/index.d.ts +14 -8
- package/types/component/indicator/indicator.d.ts +3 -0
- package/types/component/interface/common.d.ts +0 -2
- package/types/component/interface/theme.d.ts +1 -3
- package/types/component/interface/type.d.ts +0 -1
- package/types/component/label/base-label.d.ts +9 -4
- package/types/component/label/interface.d.ts +14 -8
- package/types/component/label/label.d.ts +5 -3
- package/types/component/label/total-label.d.ts +4 -1
- package/types/component/label/util.d.ts +9 -10
- package/types/component/legend/continuous/legend.d.ts +4 -0
- package/types/component/legend/discrete/legend.d.ts +3 -0
- package/types/component/legend/util.d.ts +2 -2
- package/types/component/marker/base-marker.d.ts +1 -1
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +3 -0
- package/types/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-area/polar-mark-area.d.ts +3 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +3 -0
- package/types/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-line/polar-mark-line.d.ts +3 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/interface/theme.d.ts +5 -2
- package/types/component/marker/mark-point/polar-mark-point.d.ts +3 -0
- package/types/component/marker/utils.d.ts +12 -0
- package/types/component/player/player.d.ts +3 -0
- package/types/component/title/title.d.ts +3 -0
- package/types/component/tooltip/constant.d.ts +6 -2
- package/types/component/tooltip/interface/common.d.ts +2 -1
- package/types/component/tooltip/processor/base.d.ts +4 -5
- package/types/component/tooltip/processor/dimension-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/group-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +12 -1
- package/types/component/tooltip/processor/mark-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +8 -5
- package/types/component/util.d.ts +1 -2
- package/types/constant/data.d.ts +1 -0
- package/types/constant/event.d.ts +55 -2
- package/types/core/factory.d.ts +31 -2
- package/types/core/index.d.ts +18 -2
- package/types/core/interface.d.ts +19 -5
- package/types/core/vchart.d.ts +8 -7
- package/types/data/transforms/circle-packing.d.ts +1 -1
- package/types/data/transforms/data-key.d.ts +1 -1
- package/types/data/transforms/flatten.d.ts +1 -1
- package/types/data/transforms/funnel.d.ts +1 -6
- package/types/data/transforms/pictogram.d.ts +2 -10
- package/types/data/transforms/sankey-links.d.ts +1 -2
- package/types/data/transforms/sankey-nodes.d.ts +1 -2
- package/types/data/transforms/sankey.d.ts +4 -4
- package/types/data/transforms/sunburst.d.ts +1 -1
- package/types/data/transforms/treemap.d.ts +5 -6
- package/types/data/transforms/venn.d.ts +10 -0
- package/types/data/transforms/waterfall.d.ts +1 -0
- package/types/event/event-dispatcher.d.ts +4 -1
- package/types/event/event.d.ts +4 -1
- package/types/event/events/base.d.ts +1 -2
- package/types/event/events/dimension/util/cartesian.d.ts +2 -1
- package/types/event/events/index.d.ts +1 -5
- package/types/event/index.d.ts +1 -0
- package/types/event/interface.d.ts +19 -13
- package/types/index-harmony-simple.d.ts +4 -4
- package/types/index-harmony.d.ts +1 -1
- package/types/index.d.ts +11 -0
- package/types/interaction/config.d.ts +13 -0
- package/types/interaction/index.d.ts +10 -1
- package/types/interaction/interaction.d.ts +17 -25
- package/types/interaction/interface/common.d.ts +22 -0
- package/types/interaction/interface/spec.d.ts +53 -0
- package/types/interaction/interface/trigger.d.ts +87 -0
- package/types/interaction/triggers/base.d.ts +28 -0
- package/types/interaction/triggers/dimension-hover.d.ts +22 -0
- package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
- package/types/interaction/triggers/element-active.d.ts +20 -0
- package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
- package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
- package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
- package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
- package/types/interaction/triggers/element-highlight.d.ts +25 -0
- package/types/interaction/triggers/element-select.d.ts +24 -0
- package/types/interaction/triggers/enum.d.ts +6 -0
- package/types/interaction/triggers/util.d.ts +12 -0
- package/types/interaction/zoom/zoomable.d.ts +5 -0
- package/types/layout/base-layout.d.ts +12 -9
- package/types/layout/index.d.ts +4 -4
- package/types/layout/interface.d.ts +8 -3
- package/types/layout/layout-item.d.ts +7 -3
- package/types/layout/util.d.ts +17 -4
- package/types/mark/arc.d.ts +3 -3
- package/types/mark/area.d.ts +2 -0
- package/types/mark/base/base-line.d.ts +25 -2
- package/types/mark/base/base-mark.d.ts +160 -13
- package/types/mark/box-plot.d.ts +11 -5
- package/types/mark/cell.d.ts +6 -3
- package/types/mark/component.d.ts +12 -3
- package/types/mark/glyph.d.ts +30 -0
- package/types/mark/group.d.ts +11 -6
- package/types/mark/index.d.ts +10 -7
- package/types/mark/interface/common.d.ts +81 -9
- package/types/mark/interface/enum.d.ts +6 -0
- package/types/mark/interface/index.d.ts +1 -0
- package/types/mark/interface/mark.d.ts +20 -5
- package/types/mark/interface/type.d.ts +1 -3
- package/types/mark/label.d.ts +4 -3
- package/types/mark/link-path.d.ts +35 -5
- package/types/mark/liquid.d.ts +47 -5
- package/types/mark/ripple.d.ts +39 -4
- package/types/mark/rule.d.ts +4 -1
- package/types/mark/symbol.d.ts +4 -5
- package/types/mark/text.d.ts +5 -3
- package/types/mark/transform/data-sampling.d.ts +10 -0
- package/types/mark/transform/filter.d.ts +1 -0
- package/types/mark/transform/map.d.ts +1 -0
- package/types/mark/transform/symbol-overlap.d.ts +13 -0
- package/types/mark/utils/common.d.ts +4 -1
- package/types/mark/utils/glyph.d.ts +2 -0
- package/types/mark/utils/index.d.ts +2 -0
- package/types/mark/utils/line.d.ts +3 -0
- package/types/model/base-model.d.ts +11 -10
- package/types/model/interface.d.ts +11 -10
- package/types/model/layout-model.d.ts +4 -3
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -14
- package/types/plugin/other.d.ts +3 -4
- package/types/region/interface.d.ts +0 -4
- package/types/region/region.d.ts +3 -11
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area.d.ts +3 -2
- package/types/series/bar/animation.d.ts +1 -2
- package/types/series/bar/bar.d.ts +9 -9
- package/types/series/bar/constant.d.ts +0 -1
- package/types/series/bar/interface.d.ts +1 -7
- package/types/series/base/base-series-transformer.d.ts +1 -1
- package/types/series/base/base-series.d.ts +23 -40
- package/types/series/base/tooltip-helper.d.ts +1 -2
- package/types/series/box-plot/animation.d.ts +52 -0
- package/types/series/box-plot/box-plot.d.ts +6 -3
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/animation.d.ts +1 -1
- package/types/series/circle-packing/circle-packing.d.ts +4 -1
- package/types/series/correlation/animation.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +6 -4
- package/types/series/dot/dot.d.ts +5 -2
- package/types/series/funnel/constant.d.ts +0 -1
- package/types/series/funnel/funnel.d.ts +10 -11
- package/types/series/funnel/interface.d.ts +2 -13
- package/types/series/funnel/tooltip-helper.d.ts +4 -2
- package/types/series/gauge/animation.d.ts +1 -1
- package/types/series/gauge/gauge-pointer.d.ts +7 -1
- package/types/series/gauge/gauge.d.ts +5 -2
- package/types/series/geo/geo.d.ts +3 -4
- package/types/series/heatmap/animation.d.ts +1 -1
- package/types/series/heatmap/heatmap.d.ts +7 -1
- package/types/series/index.d.ts +24 -19
- package/types/series/interface/common.d.ts +1 -4
- package/types/series/interface/series.d.ts +6 -1
- package/types/series/interface/theme.d.ts +5 -16
- package/types/series/interface/type.d.ts +1 -11
- package/types/series/line/animation.d.ts +1 -1
- package/types/series/line/line.d.ts +4 -1
- package/types/series/link/link.d.ts +8 -2
- package/types/series/liquid/animation.d.ts +1 -1
- package/types/series/liquid/liquid.d.ts +7 -1
- package/types/series/map/interface.d.ts +10 -0
- package/types/series/map/map.d.ts +3 -0
- package/types/series/mixin/line-mixin.d.ts +5 -5
- package/types/series/mosaic/mosaic.d.ts +2 -0
- package/types/series/pictogram/pictogram.d.ts +2 -0
- package/types/series/pictogram/tooltip-helper.d.ts +2 -2
- package/types/series/pie/animation/animation.d.ts +4 -4
- package/types/series/pie/animation/centerOffset.d.ts +1 -1
- package/types/series/pie/constant.d.ts +0 -1
- package/types/series/pie/interface.d.ts +3 -13
- package/types/series/pie/pie.d.ts +13 -11
- package/types/series/polar/animation.d.ts +2 -4
- package/types/series/polar/progress-like/animation.d.ts +1 -1
- package/types/series/polar/progress-like/interface.d.ts +1 -0
- package/types/series/polar/progress-like/progress-like.d.ts +1 -2
- package/types/series/progress/circular/circular.d.ts +7 -1
- package/types/series/progress/linear/animation.d.ts +2 -2
- package/types/series/progress/linear/interface.d.ts +1 -0
- package/types/series/progress/linear/linear.d.ts +7 -1
- package/types/series/radar/animation.d.ts +12 -10
- package/types/series/radar/radar.d.ts +5 -2
- package/types/series/range-column/animation.d.ts +1 -1
- package/types/series/range-column/constant.d.ts +0 -1
- package/types/series/range-column/interface.d.ts +0 -3
- package/types/series/range-column/range-column.d.ts +5 -4
- package/types/series/rose/animation.d.ts +1 -1
- package/types/series/rose/rose.d.ts +3 -0
- package/types/series/sankey/animation.d.ts +14 -1
- package/types/series/sankey/interface.d.ts +0 -1
- package/types/series/sankey/sankey.d.ts +14 -12
- package/types/series/sankey/tooltip-helper.d.ts +1 -1
- package/types/series/scatter/animation.d.ts +1 -1
- package/types/series/scatter/scatter.d.ts +3 -0
- package/types/series/sunburst/animation/enter.d.ts +1 -1
- package/types/series/sunburst/animation/exit.d.ts +1 -1
- package/types/series/sunburst/animation/preset.d.ts +1 -1
- package/types/series/sunburst/animation/utils.d.ts +2 -2
- package/types/series/sunburst/interface.d.ts +1 -1
- package/types/series/sunburst/sunburst.d.ts +4 -1
- package/types/series/treemap/animation.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +4 -2
- package/types/series/venn/animation.d.ts +12 -1
- package/types/series/venn/venn.d.ts +5 -1
- package/types/series/waterfall/animation.d.ts +1 -1
- package/types/series/waterfall/waterfall.d.ts +6 -2
- package/types/series/word-cloud/animation.d.ts +2 -4
- package/types/series/word-cloud/base.d.ts +4 -3
- package/types/series/word-cloud/interface.d.ts +2 -20
- package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +0 -1
- package/types/theme/builtin/common/series/funnel.d.ts +2 -2
- package/types/theme/builtin/common/series/word-cloud.d.ts +1 -2
- package/types/theme/builtin/index.d.ts +3 -1
- package/types/theme/color-scheme/util.d.ts +1 -1
- package/types/typings/common.d.ts +13 -0
- package/types/typings/spec/chart.d.ts +6 -12
- package/types/typings/spec/common.d.ts +40 -41
- package/types/typings/tooltip/position.d.ts +1 -1
- package/types/typings/visual.d.ts +11 -13
- package/types/util/array.d.ts +1 -0
- package/types/util/index.d.ts +1 -0
- package/types/util/mark.d.ts +5 -0
- package/types/util/math.d.ts +1 -1
- package/types/util/region.d.ts +5 -0
- package/types/util/scale.d.ts +1 -0
- package/types/util/theme/common.d.ts +1 -1
- package/types/util/theme/merge-theme.d.ts +2 -2
- package/types/util/theme/preprocess.d.ts +1 -2
- package/types/vrender-tools.d.ts +1 -0
|
@@ -6,13 +6,16 @@ import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
|
6
6
|
import type { IRegion } from '../../region/interface';
|
|
7
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
8
|
import type { ISeries } from '../../series/interface';
|
|
9
|
-
import type {
|
|
9
|
+
import type { IMark, IMarkGraphic } from '../../mark/interface';
|
|
10
10
|
import type { BrushInteractiveRangeAttr, IBrush, IBrushSpec } from './interface';
|
|
11
11
|
export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseComponent<T> implements IBrush {
|
|
12
12
|
layoutType: 'none';
|
|
13
13
|
static type: ComponentTypeEnum;
|
|
14
14
|
type: ComponentTypeEnum;
|
|
15
15
|
name: string;
|
|
16
|
+
static readonly builtInTheme: {
|
|
17
|
+
brush: import("./interface").IBrushTheme;
|
|
18
|
+
};
|
|
16
19
|
static specKey: string;
|
|
17
20
|
specKey: string;
|
|
18
21
|
layoutZIndex: number;
|
|
@@ -23,59 +26,37 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
23
26
|
private _linkedItemMap;
|
|
24
27
|
protected _inBrushElementsMap: {
|
|
25
28
|
[brushName: string]: {
|
|
26
|
-
[elementKey: string]:
|
|
29
|
+
[elementKey: string]: IMarkGraphic;
|
|
27
30
|
};
|
|
28
31
|
};
|
|
29
32
|
protected _outOfBrushElementsMap: {
|
|
30
|
-
[elementKey: string]:
|
|
33
|
+
[elementKey: string]: IMarkGraphic;
|
|
31
34
|
};
|
|
32
35
|
protected _linkedInBrushElementsMap: {
|
|
33
36
|
[brushName: string]: {
|
|
34
|
-
[elementKey: string]:
|
|
37
|
+
[elementKey: string]: IMarkGraphic;
|
|
35
38
|
};
|
|
36
39
|
};
|
|
37
40
|
protected _linkedOutOfBrushElementsMap: {
|
|
38
|
-
[elementKey: string]:
|
|
41
|
+
[elementKey: string]: IMarkGraphic;
|
|
39
42
|
};
|
|
40
|
-
private _needInitOutState;
|
|
41
43
|
private _cacheInteractiveRangeAttrs;
|
|
42
44
|
private _needDisablePickable;
|
|
43
45
|
private _releatedAxes;
|
|
44
46
|
private _regionAxisMap;
|
|
45
47
|
private _axisDataZoomMap;
|
|
46
48
|
private _zoomRecord;
|
|
47
|
-
init(): void;
|
|
48
49
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
50
|
+
init(): void;
|
|
51
|
+
private _initNeedOperatedItem;
|
|
49
52
|
created(): void;
|
|
50
|
-
protected _extendDataInBrush(elementsMap: {
|
|
51
|
-
[brushName: string]: {
|
|
52
|
-
[elementKey: string]: IElement;
|
|
53
|
-
};
|
|
54
|
-
}): any[];
|
|
55
|
-
protected _extendDatumOutOfBrush(elementsMap: {
|
|
56
|
-
[elementKey: string]: IElement;
|
|
57
|
-
}): any[];
|
|
58
|
-
protected _getBrushInteractiveAttr(region: IRegion): BrushInteractiveRangeAttr;
|
|
59
|
-
protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
|
|
60
|
-
protected _createBrushComponent(region: IRegion, componentIndex: number): void;
|
|
61
|
-
private _handleBrushChange;
|
|
62
|
-
private _emitEvent;
|
|
63
|
-
private _transformBrushedMarkAttr;
|
|
64
|
-
private _reconfigItem;
|
|
65
|
-
private _reconfigLinkedItem;
|
|
66
|
-
private _isBrushContainItem;
|
|
67
|
-
private _stateClamp;
|
|
68
|
-
private _setAxisAndDataZoom;
|
|
69
53
|
protected _bindRegions(): void;
|
|
70
54
|
protected _bindLinkedSeries(): void;
|
|
71
55
|
private _initRegionAxisMap;
|
|
72
56
|
private _initAxisDataZoomMap;
|
|
73
|
-
private _initNeedOperatedItem;
|
|
74
|
-
protected _initMarkBrushState(componentIndex: number, stateName: string): void;
|
|
75
57
|
protected initEvent(): void;
|
|
76
58
|
onRender(ctx: IModelRenderOption): void;
|
|
77
59
|
changeRegions(regions: IRegion[]): void;
|
|
78
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
79
60
|
_compareSpec(spec: T, prevSpec: T): {
|
|
80
61
|
change: boolean;
|
|
81
62
|
reMake: boolean;
|
|
@@ -83,7 +64,31 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
83
64
|
reSize: boolean;
|
|
84
65
|
reCompile: boolean;
|
|
85
66
|
};
|
|
86
|
-
onLayoutEnd(
|
|
67
|
+
onLayoutEnd(): void;
|
|
68
|
+
protected _updateBrushComponent(region: IRegion, componentIndex: number): void;
|
|
69
|
+
protected _createBrushComponent(region: IRegion, componentIndex: number): void;
|
|
70
|
+
protected _getBrushInteractiveAttr(region: IRegion): BrushInteractiveRangeAttr;
|
|
71
|
+
private _transformBrushedMarkAttr;
|
|
72
|
+
private _handleBrushChange;
|
|
73
|
+
protected _extendDataInBrush(elementsMap: {
|
|
74
|
+
[brushName: string]: {
|
|
75
|
+
[elementKey: string]: IMarkGraphic;
|
|
76
|
+
};
|
|
77
|
+
}): {
|
|
78
|
+
[x: string]: any;
|
|
79
|
+
}[];
|
|
80
|
+
protected _extendDatumOutOfBrush(elementsMap: {
|
|
81
|
+
[elementKey: string]: IMarkGraphic;
|
|
82
|
+
}): import("../..").Datum[];
|
|
83
|
+
private _emitEvent;
|
|
84
|
+
private _reconfigItem;
|
|
85
|
+
private _reconfigLinkedItem;
|
|
86
|
+
private _isBrushContainItem;
|
|
87
|
+
protected _initItemMap(itemMap: Record<string, IMark[]>, elementMap: Record<string, IMarkGraphic>, stateName: string): void;
|
|
88
|
+
protected _initMarkBrushState(componentIndex: number, stateName: string): void;
|
|
89
|
+
private _stateClamp;
|
|
90
|
+
private _setAxisAndDataZoom;
|
|
91
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
87
92
|
clearGraphic(): void;
|
|
88
93
|
clear(): void;
|
|
89
94
|
}
|
|
@@ -27,6 +27,8 @@ export interface IBrushTheme {
|
|
|
27
27
|
delayType?: IDelayType;
|
|
28
28
|
delayTime?: number;
|
|
29
29
|
sizeThreshold?: number;
|
|
30
|
+
markTypeFilter?: string[];
|
|
31
|
+
onBrushEnd?: (e: any) => boolean;
|
|
30
32
|
}
|
|
31
33
|
export interface IBrushSpec extends IBrushTheme, IBrushDataBindSpec {
|
|
32
34
|
id?: string;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { IZoomTrigger } from './interface';
|
|
2
2
|
export declare class DeskTopTrigger implements IZoomTrigger {
|
|
3
|
-
pointerId: number;
|
|
4
3
|
parserScrollEvent(e: any): any;
|
|
5
4
|
parserZoomEvent(e: any): any;
|
|
6
5
|
clearZoom(): void;
|
|
7
6
|
clearScroll(): void;
|
|
8
7
|
clearDrag(): void;
|
|
9
|
-
parserDragEvent(): boolean;
|
|
10
8
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { IZoomTrigger } from './interface';
|
|
2
2
|
export declare class MobileTrigger implements IZoomTrigger {
|
|
3
3
|
private _lastScale;
|
|
4
|
-
pointerId: number;
|
|
5
4
|
clearZoom(): void;
|
|
6
|
-
parserDragEvent(event: any): boolean;
|
|
7
5
|
parserZoomEvent(event: any): any;
|
|
8
6
|
parserScrollEvent(event: any): any;
|
|
9
7
|
clearScroll(): void;
|
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
1
|
+
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
|
+
import { Tag } from '@visactor/vrender-components';
|
|
3
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
4
|
+
import type { IModelRenderOption } from '../../model/interface';
|
|
3
5
|
import type { IRegion } from '../../region/interface';
|
|
4
6
|
import { BaseComponent } from '../base/base-component';
|
|
5
|
-
import type {
|
|
7
|
+
import type { IPoint, StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
6
8
|
import type { IComponentOption } from '../interface';
|
|
7
|
-
import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairCategoryFieldSpec } from './interface';
|
|
9
|
+
import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairCategoryFieldSpec, IAxisInfo, CrossHairStateByField } from './interface';
|
|
8
10
|
import type { IAxis } from '../axis/interface';
|
|
9
|
-
export type IBound = {
|
|
10
|
-
x1: number;
|
|
11
|
-
y1: number;
|
|
12
|
-
x2: number;
|
|
13
|
-
y2: number;
|
|
14
|
-
};
|
|
15
|
-
export type IAxisInfo<T> = Map<number, IBound & {
|
|
16
|
-
axis: T;
|
|
17
|
-
}>;
|
|
18
|
-
export interface IHair {
|
|
19
|
-
visible: boolean;
|
|
20
|
-
type: 'rect' | 'line';
|
|
21
|
-
style?: Dict<any>;
|
|
22
|
-
label?: {
|
|
23
|
-
visible: boolean;
|
|
24
|
-
formatMethod?: (text: StringOrNumber | string[], position: string) => string | string[];
|
|
25
|
-
formatter?: string | string[];
|
|
26
|
-
textStyle?: Dict<any>;
|
|
27
|
-
minWidth?: number;
|
|
28
|
-
maxWidth?: number;
|
|
29
|
-
padding?: IPadding | number | number[];
|
|
30
|
-
panel?: Dict<any>;
|
|
31
|
-
zIndex?: number;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export interface IHairRadius extends IHair {
|
|
35
|
-
smooth?: boolean;
|
|
36
|
-
}
|
|
37
11
|
export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec | IPolarCrosshairSpec> extends BaseComponent<T> implements ICrossHair {
|
|
38
12
|
static specKey: string;
|
|
39
13
|
specKey: string;
|
|
@@ -44,6 +18,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
44
18
|
enable: boolean;
|
|
45
19
|
showDefault: boolean;
|
|
46
20
|
triggerOff: 'none' | number;
|
|
21
|
+
protected _stateByField: CrossHairStateByField;
|
|
47
22
|
private _timer?;
|
|
48
23
|
private _clickLock?;
|
|
49
24
|
private _hasActive?;
|
|
@@ -51,11 +26,20 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
51
26
|
get enableRemain(): boolean;
|
|
52
27
|
private _limitBounds;
|
|
53
28
|
constructor(spec: T, options: IComponentOption);
|
|
54
|
-
protected abstract _showDefaultCrosshairBySpec(): void;
|
|
55
29
|
protected abstract _layoutCrosshair(x: number, y: number, tooltipData?: TooltipData, activeType?: TooltipActiveType): void;
|
|
56
|
-
|
|
57
|
-
abstract
|
|
30
|
+
abstract setAxisValue(v: StringOrNumber, axis: IAxis): void;
|
|
31
|
+
abstract layoutByValue(enableRemain?: boolean): void;
|
|
32
|
+
protected abstract _getDatumAtPoint(axis: IAxis, point: IPoint): number | string;
|
|
33
|
+
protected _setAllAxisValues(axisMap: IAxisInfo<IAxis>, point: IPoint, field: string): boolean;
|
|
34
|
+
clearAxisValue(): void;
|
|
35
|
+
hideCrosshair(): void;
|
|
36
|
+
showCrosshair(dimInfo: {
|
|
37
|
+
axis: IAxis;
|
|
38
|
+
value: string | number;
|
|
39
|
+
}[]): void;
|
|
58
40
|
protected _getLimitBounds(): IBoundsLike;
|
|
41
|
+
protected _showDefaultCrosshairBySpec(): void;
|
|
42
|
+
protected _updateVisibleCrosshair(): void;
|
|
59
43
|
protected _showDefaultCrosshair(): void;
|
|
60
44
|
setAttrFromSpec(): void;
|
|
61
45
|
created(): void;
|
|
@@ -84,11 +68,16 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
84
68
|
private _handleTooltipHideOrRelease;
|
|
85
69
|
protected _getAxisInfoByField<T = IAxis>(field: 'x' | 'y' | 'category' | 'value'): IAxisInfo<T>;
|
|
86
70
|
changeRegions(regions: IRegion[]): void;
|
|
87
|
-
onLayoutEnd(
|
|
71
|
+
onLayoutEnd(): void;
|
|
88
72
|
onRender(ctx: IModelRenderOption): void;
|
|
89
73
|
protected _releaseEvent(): void;
|
|
74
|
+
protected _parseFieldInfo(): void;
|
|
90
75
|
protected _parseCrosshairSpec(): void;
|
|
91
76
|
protected _parseField(field: ICrosshairCategoryFieldSpec, fieldName: string): any;
|
|
92
77
|
protected _filterAxisByPoint<T>(axisMap: IAxisInfo<T>, relativeX: number, relativeY: number): IAxisInfo<T>;
|
|
78
|
+
protected _updateCrosshairLabel(label: Tag, labelAttrs: any, callback: (label: Tag) => void): void;
|
|
93
79
|
protected clearOutEvent(): void;
|
|
80
|
+
protected _hideByField(field: string): void;
|
|
81
|
+
hide(): void;
|
|
82
|
+
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
94
83
|
}
|
|
@@ -3,45 +3,25 @@ import type { IComponentOption } from '../interface';
|
|
|
3
3
|
import { ComponentTypeEnum } from '../interface/type';
|
|
4
4
|
import type { ICartesianCrosshairSpec } from './interface';
|
|
5
5
|
import { BaseCrossHair } from './base';
|
|
6
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
6
|
import type { IAxis } from '../axis/interface';
|
|
8
|
-
import type { StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
7
|
+
import type { IPoint, StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
9
8
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
10
9
|
export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICartesianCrosshairSpec> extends BaseCrossHair<T> {
|
|
11
10
|
static specKey: string;
|
|
11
|
+
static readonly builtInTheme: {
|
|
12
|
+
crosshair: import("./interface").ICrosshairTheme;
|
|
13
|
+
};
|
|
12
14
|
static type: ComponentTypeEnum;
|
|
13
15
|
type: ComponentTypeEnum;
|
|
14
16
|
name: string;
|
|
15
|
-
private _xHair;
|
|
16
|
-
private _yHair;
|
|
17
|
-
private _cacheXCrossHairInfo;
|
|
18
|
-
private _cacheYCrossHairInfo;
|
|
19
|
-
private _xCrosshair;
|
|
20
|
-
private _xTopLabel;
|
|
21
|
-
private _xBottomLabel;
|
|
22
|
-
private _yCrosshair;
|
|
23
|
-
private _yLeftLabel;
|
|
24
|
-
private _yRightLabel;
|
|
25
|
-
private _currValueX;
|
|
26
|
-
private _currValueY;
|
|
27
17
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
28
18
|
constructor(spec: T, options: IComponentOption);
|
|
29
|
-
protected _showDefaultCrosshairBySpec(): void;
|
|
30
|
-
private _defaultCrosshair;
|
|
31
19
|
private _findAllAxisContains;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
setAxisValue(value: StringOrNumber, axis: IAxis): void;
|
|
35
|
-
private _getAllAxisValues;
|
|
20
|
+
protected _getDatumAtPoint(axis: IAxis, point: IPoint): number | string;
|
|
21
|
+
setAxisValue(datum: StringOrNumber, axis: IAxis): void;
|
|
36
22
|
protected _layoutCrosshair(relativeX: number, relativeY: number, tooltipData?: TooltipData, activeType?: TooltipActiveType): void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
private
|
|
40
|
-
private _layoutHorizontal;
|
|
41
|
-
protected _parseFieldInfo(): void;
|
|
42
|
-
private _parseAndSetCrosshair;
|
|
43
|
-
private _updateCrosshair;
|
|
44
|
-
private _updateCrosshairLabel;
|
|
45
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
23
|
+
layoutByValue(enableRemain?: boolean): void;
|
|
24
|
+
private _layoutByField;
|
|
25
|
+
private _updateCrosshairByField;
|
|
46
26
|
}
|
|
47
27
|
export declare const registerCartesianCrossHair: () => void;
|
|
@@ -1,7 +1,72 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Dict } from '@visactor/vutils';
|
|
2
|
+
import type { IPadding, StringOrNumber } from '../../../typings';
|
|
2
3
|
import type { IAxis } from '../../axis/interface';
|
|
4
|
+
import type { LineCrosshair, RectCrosshair, Tag } from '@visactor/vrender-components';
|
|
5
|
+
import type { IGroup, IRichTextGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender-core';
|
|
3
6
|
export type AxisCurrentValueMap = Map<number, {
|
|
4
|
-
|
|
7
|
+
datum: StringOrNumber;
|
|
5
8
|
axis: IAxis;
|
|
6
9
|
[key: string]: any;
|
|
7
10
|
}>;
|
|
11
|
+
export type IBound = {
|
|
12
|
+
x1: number;
|
|
13
|
+
y1: number;
|
|
14
|
+
x2: number;
|
|
15
|
+
y2: number;
|
|
16
|
+
};
|
|
17
|
+
export type IAxisInfo<T> = Map<number, IBound & {
|
|
18
|
+
axis: T;
|
|
19
|
+
}>;
|
|
20
|
+
export interface IHair {
|
|
21
|
+
visible: boolean;
|
|
22
|
+
type: 'rect' | 'line';
|
|
23
|
+
style?: Dict<any>;
|
|
24
|
+
label?: {
|
|
25
|
+
visible: boolean;
|
|
26
|
+
formatMethod?: (text: StringOrNumber | string[], position: string) => string | string[];
|
|
27
|
+
formatter?: string | string[];
|
|
28
|
+
textStyle?: Dict<any>;
|
|
29
|
+
minWidth?: number;
|
|
30
|
+
maxWidth?: number;
|
|
31
|
+
padding?: IPadding | number | number[];
|
|
32
|
+
panel?: Dict<any>;
|
|
33
|
+
zIndex?: number;
|
|
34
|
+
};
|
|
35
|
+
smooth?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface IHairRadius extends IHair {
|
|
38
|
+
smooth?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface ICrosshairLabelInfo {
|
|
41
|
+
visible: boolean;
|
|
42
|
+
text: StringOrNumber;
|
|
43
|
+
dx?: number;
|
|
44
|
+
dy?: number;
|
|
45
|
+
x?: number;
|
|
46
|
+
y?: number;
|
|
47
|
+
offset?: number;
|
|
48
|
+
defaultFormatter?: (value: StringOrNumber) => StringOrNumber;
|
|
49
|
+
}
|
|
50
|
+
export interface ICrosshairInfo {
|
|
51
|
+
coordRange: [number, number];
|
|
52
|
+
sizeRange: [number, number];
|
|
53
|
+
coord: number;
|
|
54
|
+
labels: Record<string, ICrosshairLabelInfo>;
|
|
55
|
+
labelsTextStyle?: Record<string, Partial<ITextGraphicAttribute> | Partial<IRichTextGraphicAttribute>>;
|
|
56
|
+
visible: boolean;
|
|
57
|
+
_isCache?: boolean;
|
|
58
|
+
axis: IAxis;
|
|
59
|
+
sides?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface CrossHairStateItem {
|
|
62
|
+
coordKey: string;
|
|
63
|
+
anotherAxisKey: string;
|
|
64
|
+
currentValue: AxisCurrentValueMap;
|
|
65
|
+
attributes?: IHair | undefined;
|
|
66
|
+
cacheInfo?: ICrosshairInfo | undefined;
|
|
67
|
+
crosshairComp?: LineCrosshair | RectCrosshair | IGroup;
|
|
68
|
+
labelsComp?: Record<string, Tag>;
|
|
69
|
+
bandSize?: number;
|
|
70
|
+
offsetSize?: number;
|
|
71
|
+
}
|
|
72
|
+
export type CrossHairStateByField = Record<string, CrossHairStateItem>;
|
|
@@ -4,10 +4,14 @@ import type { IAxis } from '../../axis/interface';
|
|
|
4
4
|
import type { IComponentSpec } from '../../base/interface';
|
|
5
5
|
import type { IComponent } from '../../interface';
|
|
6
6
|
export interface ICrossHair extends IComponent {
|
|
7
|
-
clearAxisValue
|
|
8
|
-
setAxisValue
|
|
9
|
-
layoutByValue
|
|
10
|
-
|
|
7
|
+
clearAxisValue: () => void;
|
|
8
|
+
setAxisValue: (v: StringOrNumber, axis: IAxis) => void;
|
|
9
|
+
layoutByValue: (enableRemain?: boolean) => void;
|
|
10
|
+
hideCrosshair: () => any;
|
|
11
|
+
showCrosshair: (dimInfo: {
|
|
12
|
+
axis: IAxis;
|
|
13
|
+
value: string | number;
|
|
14
|
+
}[]) => any;
|
|
11
15
|
}
|
|
12
16
|
export type CrossHairTrigger = 'click' | 'hover' | ['click', 'hover'];
|
|
13
17
|
export interface ICommonCrosshairSpec extends IComponentSpec {
|
|
@@ -1,40 +1,27 @@
|
|
|
1
1
|
import type { IComponentOption } from '../interface';
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { IPolarCrosshairSpec } from './interface';
|
|
4
|
-
import type {
|
|
4
|
+
import type { IPolarAxis } from '../axis/polar/interface';
|
|
5
|
+
import type { IPoint, StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
5
6
|
import { BaseCrossHair } from './base';
|
|
6
7
|
import type { Maybe } from '@visactor/vutils';
|
|
7
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
8
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
9
|
+
import type { IAxis } from '../axis';
|
|
9
10
|
export declare class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrosshairSpec> extends BaseCrossHair<T> {
|
|
10
11
|
static specKey: string;
|
|
12
|
+
static readonly builtInTheme: {
|
|
13
|
+
crosshair: import("./interface").ICrosshairTheme;
|
|
14
|
+
};
|
|
11
15
|
static type: ComponentTypeEnum;
|
|
12
16
|
type: ComponentTypeEnum;
|
|
13
17
|
name: string;
|
|
14
|
-
private _currValueAngle;
|
|
15
|
-
private _currValueRadius;
|
|
16
|
-
private _angleHair;
|
|
17
|
-
private _radiusHair;
|
|
18
|
-
private _cacheAngleCrossHairInfo;
|
|
19
|
-
private _cacheRadiusCrossHairInfo;
|
|
20
|
-
private _radiusCrosshair;
|
|
21
|
-
private _radiusLabelCrosshair;
|
|
22
|
-
private _angleCrosshair;
|
|
23
|
-
private _angleLabelCrosshair;
|
|
24
18
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
25
19
|
constructor(spec: T, options: IComponentOption);
|
|
26
|
-
|
|
27
|
-
private _defaultCrosshair;
|
|
28
|
-
hide(): void;
|
|
20
|
+
setAxisValue(datum: StringOrNumber, axis: IAxis): void;
|
|
29
21
|
private _findAllAxisContains;
|
|
30
|
-
|
|
31
|
-
private _getValueByAxis;
|
|
22
|
+
protected _getDatumAtPoint(axis: IPolarAxis, point: IPoint): any;
|
|
32
23
|
protected _layoutCrosshair(relativeX: number, relativeY: number, tooltipData?: TooltipData, activeType?: TooltipActiveType): void;
|
|
33
|
-
layoutByValue(
|
|
34
|
-
private
|
|
35
|
-
private _layoutRadius;
|
|
36
|
-
protected _parseFieldInfo(): void;
|
|
37
|
-
private _updateCrosshairLabel;
|
|
38
|
-
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
24
|
+
layoutByValue(enableRemain?: boolean): void;
|
|
25
|
+
private _layoutByField;
|
|
39
26
|
}
|
|
40
27
|
export declare const registerPolarCrossHair: () => void;
|
|
@@ -1,34 +1,23 @@
|
|
|
1
1
|
import type { ICartesianSeries } from '../../../series';
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
export declare const layoutByValue: (
|
|
6
|
-
|
|
7
|
-
y: ICrosshairInfoY;
|
|
8
|
-
offsetWidth: number;
|
|
9
|
-
offsetHeight: number;
|
|
10
|
-
bandWidth: number;
|
|
11
|
-
bandHeight: number;
|
|
12
|
-
};
|
|
13
|
-
export declare const layoutVerticalCrosshair: (xHair: IHair, crosshairInfo: ICrosshairInfoX, bandWidth: number, offsetWidth: number) => {
|
|
2
|
+
import { type ILayoutPoint } from '../../../typings';
|
|
3
|
+
import type { CrossHairStateByField, CrossHairStateItem } from '../interface';
|
|
4
|
+
import type { IDimensionData } from '../../../event/events/dimension/interface';
|
|
5
|
+
export declare const layoutByValue: (stateByField: CrossHairStateByField, series: ICartesianSeries, layoutStartPoint: ILayoutPoint, enableRemain?: boolean) => CrossHairStateByField;
|
|
6
|
+
export declare const layoutCrosshair: (stateItem: CrossHairStateItem) => {
|
|
14
7
|
visible: boolean;
|
|
15
8
|
start: {
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
9
|
+
[x: string]: number;
|
|
18
10
|
};
|
|
19
11
|
end: {
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
12
|
+
[x: string]: number;
|
|
22
13
|
};
|
|
23
14
|
};
|
|
24
|
-
export declare const
|
|
15
|
+
export declare const getCartesianCrosshairRect: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => {
|
|
25
16
|
visible: boolean;
|
|
26
17
|
start: {
|
|
27
|
-
x: number;
|
|
28
|
-
y: number;
|
|
18
|
+
[x: string]: number;
|
|
29
19
|
};
|
|
30
20
|
end: {
|
|
31
|
-
x: number;
|
|
32
|
-
y: number;
|
|
21
|
+
[x: string]: number;
|
|
33
22
|
};
|
|
34
23
|
};
|
|
@@ -2,8 +2,7 @@ import type { Tag } from '@visactor/vrender-components';
|
|
|
2
2
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
3
3
|
import type { Datum } from '../../../typings';
|
|
4
4
|
import type { ICrosshairTheme } from '../interface';
|
|
5
|
-
import type { ITheme } from '../../../theme';
|
|
6
5
|
export declare function limitTagInBounds(shape: Tag, bounds: IBoundsLike): void;
|
|
7
6
|
export declare function getDatumByValue(data: Datum[], value: number, startField: string, endField?: string): Datum | null;
|
|
8
|
-
export declare const getCartesianCrosshairTheme: (
|
|
9
|
-
export declare const getPolarCrosshairTheme: (
|
|
7
|
+
export declare const getCartesianCrosshairTheme: (getTheme: (...keys: string[]) => any, chartSpec: any) => ICrosshairTheme;
|
|
8
|
+
export declare const getPolarCrosshairTheme: (getTheme: (...keys: string[]) => any, chartSpec: any) => ICrosshairTheme;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { IPolarSeries } from '../../../series';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
export declare const layoutByValue: (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import type { CrossHairStateByField, CrossHairStateItem } from '../interface';
|
|
3
|
+
import type { ILayoutPoint } from '../../../typings/layout';
|
|
4
|
+
export declare const layoutByValue: (stateByField: CrossHairStateByField, series: IPolarSeries, enableRemain?: boolean) => void;
|
|
5
|
+
export declare const layoutCrosshair: (stateItem: CrossHairStateItem, layoutStartPoint: ILayoutPoint, smooth?: boolean) => {
|
|
6
|
+
center: {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
10
|
innerRadius: number;
|
|
11
11
|
radius: number;
|
|
12
12
|
startAngle: number;
|
|
13
13
|
endAngle: number;
|
|
14
14
|
start?: undefined;
|
|
15
15
|
end?: undefined;
|
|
16
|
+
sides?: undefined;
|
|
16
17
|
} | {
|
|
17
18
|
start: {
|
|
18
19
|
x: number;
|
|
@@ -27,11 +28,17 @@ export declare const layoutAngleCrosshair: (angleHair: IHair, crosshairInfo: IPo
|
|
|
27
28
|
radius?: undefined;
|
|
28
29
|
startAngle?: undefined;
|
|
29
30
|
endAngle?: undefined;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
center:
|
|
31
|
+
sides?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
center: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
};
|
|
33
37
|
startAngle: number;
|
|
34
38
|
endAngle: number;
|
|
35
39
|
radius: number;
|
|
36
40
|
sides: number;
|
|
41
|
+
innerRadius?: undefined;
|
|
42
|
+
start?: undefined;
|
|
43
|
+
end?: undefined;
|
|
37
44
|
};
|
|
@@ -79,7 +79,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
79
79
|
protected _initEvent(): void;
|
|
80
80
|
protected _initData(): void;
|
|
81
81
|
setAttrFromSpec(): void;
|
|
82
|
-
|
|
82
|
+
statePointToData(state: number): any;
|
|
83
83
|
dataToStatePoint(data: number | string): number;
|
|
84
84
|
protected _modeCheck(statePoint: 'start' | 'end', mode: string): any;
|
|
85
85
|
protected _setStateFromSpec(): void;
|
|
@@ -105,7 +105,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
105
105
|
zoomDelta: number;
|
|
106
106
|
zoomX?: number;
|
|
107
107
|
zoomY?: number;
|
|
108
|
-
}) => void;
|
|
108
|
+
}, e?: BaseEventParams['event']) => void;
|
|
109
109
|
protected _handleChartScroll: (params: {
|
|
110
110
|
scrollX: number;
|
|
111
111
|
scrollY: number;
|
|
@@ -115,8 +115,8 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
115
115
|
protected _initCommonEvent(): void;
|
|
116
116
|
updateLayoutAttribute(): void;
|
|
117
117
|
protected _autoVisible(isShown: boolean): void;
|
|
118
|
-
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect
|
|
119
|
-
onLayoutEnd(
|
|
118
|
+
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
|
|
119
|
+
onLayoutEnd(): void;
|
|
120
120
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
121
121
|
hide(): void;
|
|
122
122
|
show(): void;
|
|
@@ -13,6 +13,9 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
13
13
|
type: ComponentTypeEnum;
|
|
14
14
|
name: string;
|
|
15
15
|
readonly transformerConstructor: typeof DataZoomSpecTransformer;
|
|
16
|
+
static readonly builtInTheme: {
|
|
17
|
+
dataZoom: import("./interface").IDataZoomTheme;
|
|
18
|
+
};
|
|
16
19
|
static specKey: string;
|
|
17
20
|
specKey: string;
|
|
18
21
|
layoutZIndex: number;
|
|
@@ -28,7 +31,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
28
31
|
constructor(spec: T, options: IComponentOption);
|
|
29
32
|
created(): void;
|
|
30
33
|
setAttrFromSpec(): void;
|
|
31
|
-
onLayoutEnd(
|
|
34
|
+
onLayoutEnd(): void;
|
|
32
35
|
protected _initValueScale(): void;
|
|
33
36
|
protected _updateScaleRange(): void;
|
|
34
37
|
protected _computeDomainOfValueScale(): unknown[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { IMarkSpec } from '../../../typings/spec';
|
|
2
1
|
import type { IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec } from '../../../typings/visual';
|
|
3
2
|
import type { IComponentSpec } from '../../base/interface';
|
|
4
3
|
import type { ComponentThemeWithDirection, IComponent } from '../../interface';
|
|
@@ -41,13 +40,13 @@ export interface IDataZoomSpec extends IDataZoomStyle, IDataFilterComponentSpec
|
|
|
41
40
|
valueField?: string;
|
|
42
41
|
startText?: {
|
|
43
42
|
padding?: number;
|
|
44
|
-
style?:
|
|
43
|
+
style?: ITextMarkSpec;
|
|
45
44
|
formatMethod?: (text: string | number) => string | string[];
|
|
46
45
|
formatter?: string | string[];
|
|
47
46
|
};
|
|
48
47
|
endText?: {
|
|
49
48
|
padding?: number;
|
|
50
|
-
style?:
|
|
49
|
+
style?: ITextMarkSpec;
|
|
51
50
|
formatMethod?: (text: string | number) => string | string[];
|
|
52
51
|
formatter?: string | string[];
|
|
53
52
|
};
|