@visactor/vchart-types 0.10.0-alpha.2 → 0.11.6-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 +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/animation/config.d.ts +1 -0
- package/types/animation/utils.d.ts +4 -4
- package/types/chart/area/area.d.ts +0 -1
- package/types/chart/bar/3d/bar-3d.d.ts +0 -1
- package/types/chart/bar/bar-transformer.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +3 -0
- package/types/chart/base/base-chart-transformer.d.ts +9 -1
- package/types/chart/base/base-chart.d.ts +9 -4
- package/types/chart/base/util.d.ts +2 -2
- package/types/chart/box-plot/box-plot.d.ts +0 -1
- package/types/chart/cartesian/cartesian-transformer.d.ts +1 -0
- package/types/chart/circle-packing/circle-packing.d.ts +0 -1
- package/types/chart/common/common-transformer.d.ts +1 -0
- package/types/chart/common/common.d.ts +0 -1
- package/types/chart/common/interface.d.ts +5 -2
- package/types/chart/correlation/correlation.d.ts +0 -1
- package/types/chart/funnel/3d/funnel-3d.d.ts +0 -1
- package/types/chart/funnel/funnel.d.ts +0 -1
- package/types/chart/gauge/gauge.d.ts +0 -1
- package/types/chart/heatmap/heatmap.d.ts +0 -1
- package/types/chart/histogram/3d/histogram-3d.d.ts +0 -1
- package/types/chart/histogram/histogram.d.ts +0 -1
- package/types/chart/index.d.ts +6 -4
- package/types/chart/interface/chart.d.ts +10 -3
- package/types/chart/interface/common.d.ts +1 -5
- package/types/chart/interface/type.d.ts +2 -1
- package/types/chart/line/line.d.ts +0 -1
- package/types/chart/liquid/liquid.d.ts +0 -1
- package/types/chart/map/map.d.ts +0 -1
- package/types/chart/pie/3d/pie-3d.d.ts +0 -1
- package/types/chart/pie/pie.d.ts +0 -1
- package/types/chart/polar/interface.d.ts +2 -1
- package/types/chart/progress/circular/circular.d.ts +0 -1
- package/types/chart/progress/linear/linear.d.ts +0 -1
- package/types/chart/radar/radar.d.ts +0 -1
- package/types/chart/range-area/range-area.d.ts +0 -1
- package/types/chart/range-column/3d/range-column-3d.d.ts +0 -1
- package/types/chart/range-column/range-column.d.ts +0 -1
- package/types/chart/rose/rose.d.ts +0 -1
- package/types/chart/sankey/sankey.d.ts +5 -1
- package/types/chart/scatter/scatter.d.ts +0 -1
- package/types/chart/sequence/interface.d.ts +2 -2
- package/types/chart/sequence/sequence.d.ts +0 -1
- package/types/chart/sunburst/sunburst.d.ts +0 -1
- package/types/chart/treemap/treemap.d.ts +0 -1
- package/types/chart/venn/index.d.ts +3 -0
- package/types/chart/venn/interface.d.ts +6 -0
- package/types/chart/venn/venn-transformer.d.ts +7 -0
- package/types/chart/venn/venn.d.ts +13 -0
- package/types/chart/waterfall/waterfall.d.ts +0 -1
- package/types/chart/word-cloud/3d/word-cloud-3d.d.ts +0 -1
- package/types/chart/word-cloud/word-cloud.d.ts +0 -1
- package/types/compile/compiler.d.ts +5 -3
- package/types/compile/interface/compiler.d.ts +1 -0
- package/types/compile/mark/compilable-mark.d.ts +6 -2
- package/types/compile/mark/interface.d.ts +8 -2
- package/types/component/axis/base-axis.d.ts +13 -60
- package/types/component/axis/cartesian/axis.d.ts +3 -8
- package/types/component/axis/cartesian/band-axis.d.ts +7 -2
- package/types/component/axis/cartesian/interface/common.d.ts +1 -0
- package/types/component/axis/cartesian/interface/spec.d.ts +5 -0
- package/types/component/axis/cartesian/time-axis.d.ts +1 -1
- package/types/component/axis/cartesian/util/index.d.ts +0 -1
- package/types/component/axis/interface/common.d.ts +2 -1
- package/types/component/axis/interface/spec.d.ts +9 -6
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +12 -3
- package/types/component/axis/polar/axis.d.ts +13 -10
- package/types/component/axis/polar/band-axis.d.ts +2 -1
- package/types/component/axis/polar/interface/common.d.ts +2 -0
- package/types/component/axis/polar/interface/spec.d.ts +6 -2
- package/types/component/axis/polar/linear-axis.d.ts +5 -1
- package/types/component/axis/polar/util/common.d.ts +1 -0
- package/types/component/base/base-component.d.ts +2 -1
- package/types/component/base/util.d.ts +5 -0
- package/types/component/brush/brush.d.ts +8 -3
- package/types/component/brush/interface.d.ts +4 -3
- package/types/component/crosshair/base.d.ts +14 -5
- package/types/component/crosshair/cartesian.d.ts +3 -9
- package/types/component/crosshair/interface/cartesian.d.ts +33 -0
- package/types/component/crosshair/interface/common.d.ts +7 -0
- package/types/component/crosshair/interface/index.d.ts +3 -0
- package/types/component/crosshair/interface/polar.d.ts +25 -0
- package/types/component/crosshair/interface/spec.d.ts +3 -0
- package/types/component/crosshair/polar.d.ts +4 -3
- package/types/component/crosshair/utils/cartesian.d.ts +34 -0
- package/types/component/crosshair/utils/common.d.ts +9 -0
- package/types/component/crosshair/utils/index.d.ts +1 -0
- package/types/component/crosshair/utils/polar.d.ts +37 -0
- package/types/component/custom-mark/custom-mark.d.ts +16 -5
- package/types/component/data-zoom/data-filter-base-component.d.ts +7 -9
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +6 -8
- package/types/component/data-zoom/index.d.ts +1 -0
- package/types/component/data-zoom/interface.d.ts +3 -0
- package/types/component/data-zoom/scroll-bar/interface.d.ts +3 -5
- package/types/component/data-zoom/util.d.ts +0 -4
- package/types/component/index.d.ts +8 -7
- package/types/component/indicator/interface.d.ts +5 -5
- package/types/component/interface/theme.d.ts +12 -0
- package/types/component/interface/type.d.ts +4 -0
- package/types/component/label/base-label.d.ts +6 -5
- package/types/component/label/interface.d.ts +9 -10
- package/types/component/label/label.d.ts +1 -2
- package/types/component/label/total-label.d.ts +1 -0
- package/types/component/label/util.d.ts +10 -2
- package/types/component/legend/continuous/interface.d.ts +7 -12
- package/types/component/legend/discrete/interface.d.ts +21 -6
- package/types/component/legend/discrete/legend.d.ts +5 -1
- package/types/component/legend/util.d.ts +14 -5
- package/types/component/marker/base-marker.d.ts +37 -44
- package/types/component/marker/interface.d.ts +45 -18
- package/types/component/marker/mark-area/base-mark-area.d.ts +18 -0
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +19 -0
- package/types/component/marker/mark-area/index.d.ts +2 -1
- package/types/component/marker/mark-area/interface/spec.d.ts +16 -1
- package/types/component/marker/mark-area/interface/theme.d.ts +5 -7
- package/types/component/marker/mark-area/polar-mark-area.d.ts +25 -0
- package/types/component/marker/mark-line/base-mark-line.d.ts +19 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +20 -0
- package/types/component/marker/mark-line/index.d.ts +2 -1
- package/types/component/marker/mark-line/interface/spec.d.ts +26 -2
- package/types/component/marker/mark-line/interface/theme.d.ts +5 -7
- package/types/component/marker/mark-line/polar-mark-line.d.ts +23 -0
- package/types/component/marker/mark-point/base-mark-point.d.ts +17 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +16 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +14 -0
- package/types/component/marker/mark-point/index.d.ts +3 -1
- package/types/component/marker/mark-point/interface/spec.d.ts +9 -1
- package/types/component/marker/mark-point/interface/theme.d.ts +19 -18
- package/types/component/marker/mark-point/polar-mark-point.d.ts +18 -0
- package/types/component/marker/utils.d.ts +40 -5
- package/types/component/player/interface/theme.d.ts +1 -1
- package/types/component/player/player.d.ts +2 -1
- package/types/component/poptip/interface.d.ts +5 -2
- package/types/component/title/interface/spec.d.ts +18 -7
- package/types/component/title/interface/theme.d.ts +2 -1
- package/types/component/tooltip/constant.d.ts +8 -0
- package/types/component/tooltip/index.d.ts +1 -0
- package/types/component/tooltip/interface/common.d.ts +13 -8
- package/types/component/tooltip/interface/event.d.ts +1 -2
- package/types/component/tooltip/interface/index.d.ts +1 -0
- package/types/component/tooltip/interface/spec.d.ts +6 -5
- package/types/component/tooltip/interface/theme.d.ts +7 -5
- package/types/component/tooltip/processor/base.d.ts +10 -5
- package/types/component/tooltip/processor/group-tooltip.d.ts +11 -0
- package/types/component/tooltip/processor/index.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +4 -3
- package/types/component/tooltip/processor/mark-tooltip.d.ts +2 -2
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip-transformer.d.ts +2 -0
- package/types/component/tooltip/tooltip.d.ts +7 -11
- package/types/component/tooltip/utils/compose.d.ts +4 -0
- package/types/component/tooltip/utils/get-spec.d.ts +5 -0
- package/types/component/tooltip/utils/get-value.d.ts +6 -0
- package/types/component/tooltip/utils/index.d.ts +4 -0
- package/types/component/tooltip/utils/pattern.d.ts +4 -0
- package/types/component/tooltip/utils/show-tooltip.d.ts +21 -3
- package/types/component/util.d.ts +8 -0
- package/types/constant/index.d.ts +1 -0
- package/types/core/factory.d.ts +3 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +10 -3
- package/types/core/vchart.d.ts +12 -5
- package/types/data/transforms/aggregation.d.ts +12 -7
- package/types/data/transforms/dimension-statistics.d.ts +2 -0
- package/types/data/transforms/funnel.d.ts +1 -1
- package/types/data/transforms/invalid-travel.d.ts +1 -1
- package/types/data/transforms/legend-data/continuous/interface.d.ts +1 -0
- package/types/data/transforms/legend-data/discrete/interface.d.ts +2 -0
- package/types/env/env.d.ts +2 -0
- package/types/event/event-dispatcher.d.ts +3 -0
- package/types/event/events/dimension/interface.d.ts +4 -2
- package/types/event/interface.d.ts +14 -2
- package/types/index.d.ts +2 -0
- package/types/interaction/dimension-trigger.d.ts +1 -6
- package/types/interaction/index.d.ts +1 -0
- package/types/interaction/interaction.d.ts +5 -0
- package/types/interaction/interface.d.ts +12 -9
- package/types/layout/grid-layout/grid-layout.d.ts +1 -1
- package/types/mark/base/base-mark.d.ts +3 -3
- package/types/mark/index.d.ts +20 -21
- package/types/mark/interface/type.d.ts +0 -1
- package/types/mark/label.d.ts +2 -2
- package/types/mark/text.d.ts +16 -7
- package/types/model/interface.d.ts +4 -8
- package/types/model/tooltip-helper.d.ts +4 -2
- package/types/plugin/base/base-plugin-service.d.ts +4 -2
- package/types/plugin/base/base-plugin.d.ts +1 -0
- package/types/plugin/base/interface.d.ts +6 -3
- package/types/plugin/chart/formatter/formatter.d.ts +28 -0
- package/types/plugin/chart/formatter/index.d.ts +1 -0
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/chart/media-query/media-query.d.ts +1 -1
- package/types/plugin/chart/plugin-service.d.ts +1 -0
- package/types/plugin/components/index.d.ts +2 -5
- package/types/plugin/components/plugin-service.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +8 -13
- package/types/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.d.ts +1 -2
- package/types/plugin/components/tooltip-handler/constants.d.ts +0 -8
- package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +8 -4
- package/types/plugin/components/tooltip-handler/dom/interface.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/dom/model/base-tooltip-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-column-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -3
- package/types/plugin/components/tooltip-handler/dom/model/interface.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/interface/style.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/common.d.ts +1 -7
- package/types/plugin/components/tooltip-handler/utils/compose.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/index.d.ts +0 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +19 -3
- package/types/plugin/index.d.ts +1 -0
- package/types/region/interface.d.ts +4 -1
- package/types/region/region.d.ts +1 -0
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area-transformer.d.ts +1 -0
- package/types/series/area/area.d.ts +1 -1
- package/types/series/area/interface.d.ts +7 -1
- package/types/series/bar/bar-transformer.d.ts +1 -0
- package/types/series/bar/bar.d.ts +11 -3
- package/types/series/bar/interface.d.ts +4 -3
- package/types/series/base/base-series-transformer.d.ts +9 -3
- package/types/series/base/base-series.d.ts +16 -23
- package/types/series/base/tooltip-helper.d.ts +12 -8
- package/types/series/box-plot/tooltip-helper.d.ts +1 -1
- package/types/series/cartesian/cartesian.d.ts +3 -4
- package/types/series/circle-packing/tooltip-helper.d.ts +1 -1
- package/types/series/correlation/interface.d.ts +3 -3
- package/types/series/dot/interface.d.ts +2 -2
- package/types/series/funnel/funnel.d.ts +1 -1
- package/types/series/funnel/interface.d.ts +6 -4
- package/types/series/funnel/tooltip-helper.d.ts +3 -3
- package/types/series/gauge/gauge-pointer-transformer.d.ts +5 -0
- package/types/series/gauge/gauge-pointer.d.ts +3 -1
- package/types/series/gauge/gauge-transformer.d.ts +1 -0
- package/types/series/gauge/gauge.d.ts +0 -1
- package/types/series/gauge/interface.d.ts +3 -3
- package/types/series/geo/geo.d.ts +2 -1
- package/types/series/index.d.ts +7 -3
- package/types/series/interface/common.d.ts +12 -5
- package/types/series/interface/series.d.ts +12 -3
- package/types/series/interface/theme.d.ts +19 -1
- package/types/series/interface/tooltip-helper.d.ts +8 -5
- package/types/series/interface/type.d.ts +6 -2
- package/types/series/line/interface.d.ts +3 -2
- package/types/series/map/geo-source.d.ts +4 -2
- package/types/series/map/interface.d.ts +3 -5
- package/types/series/map/tooltip-helper.d.ts +1 -1
- package/types/series/mixin/line-mixin.d.ts +1 -0
- package/types/series/pie/3d/pie-3d.d.ts +1 -1
- package/types/series/pie/interface.d.ts +5 -4
- package/types/series/pie/pie-transformer.d.ts +1 -0
- package/types/series/pie/pie.d.ts +2 -4
- package/types/series/polar/interface.d.ts +2 -2
- package/types/series/polar/polar.d.ts +3 -3
- package/types/series/polar/progress-like/progress-like.d.ts +0 -1
- package/types/series/progress/circular/circular-transformer.d.ts +5 -0
- package/types/series/progress/circular/circular.d.ts +3 -0
- package/types/series/progress/circular/interface.d.ts +5 -5
- package/types/series/radar/interface.d.ts +2 -1
- package/types/series/range-area/range-area.d.ts +2 -2
- package/types/series/range-column/interface.d.ts +5 -5
- package/types/series/range-column/range-column-transformer.d.ts +1 -0
- package/types/series/range-column/range-column.d.ts +0 -1
- package/types/series/rose/interface.d.ts +2 -1
- package/types/series/rose/rose-transformer.d.ts +1 -0
- package/types/series/rose/rose.d.ts +0 -1
- package/types/series/sankey/interface.d.ts +7 -2
- package/types/series/sankey/sankey.d.ts +13 -4
- package/types/series/scatter/interface.d.ts +2 -1
- package/types/series/sunburst/sunburst.d.ts +1 -1
- package/types/series/sunburst/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +3 -2
- package/types/series/treemap/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +3 -0
- package/types/series/venn/animation.d.ts +6 -0
- package/types/series/venn/constant.d.ts +2 -0
- package/types/series/venn/interface.d.ts +21 -0
- package/types/series/venn/tooltip-helper.d.ts +5 -0
- package/types/series/venn/util.d.ts +1 -0
- package/types/series/venn/venn-transform.d.ts +6 -0
- package/types/series/venn/venn.d.ts +63 -0
- package/types/series/waterfall/interface.d.ts +6 -1
- package/types/series/waterfall/waterfall-transformer.d.ts +1 -0
- package/types/series/waterfall/waterfall.d.ts +9 -1
- package/types/series/word-cloud/base.d.ts +2 -0
- package/types/series/word-cloud/interface.d.ts +2 -6
- package/types/theme/builtin/common/series/venn.d.ts +2 -0
- package/types/theme/index.d.ts +1 -0
- package/types/theme/interface.d.ts +3 -19
- package/types/theme/theme-manager.d.ts +1 -1
- package/types/theme/token/builtin/default.d.ts +2 -0
- package/types/theme/token/builtin/index.d.ts +2 -0
- package/types/theme/token/builtin/interface.d.ts +17 -0
- package/types/theme/token/index.d.ts +3 -0
- package/types/theme/token/interface.d.ts +6 -0
- package/types/theme/token/util.d.ts +3 -0
- package/types/typings/spec/chart.d.ts +2 -0
- package/types/typings/spec/common.d.ts +41 -26
- package/types/typings/spec/index.d.ts +1 -1
- package/types/typings/tooltip/handler.d.ts +1 -1
- package/types/typings/tooltip/line.d.ts +9 -2
- package/types/typings/tooltip/position.d.ts +18 -24
- package/types/typings/tooltip/shape.d.ts +2 -2
- package/types/typings/tooltip/tooltip.d.ts +13 -8
- package/types/typings/visual.d.ts +15 -11
- package/types/util/data.d.ts +22 -4
- package/types/util/hierarchy.d.ts +2 -0
- package/types/util/index.d.ts +2 -2
- package/types/util/math.d.ts +4 -5
- package/types/util/space.d.ts +1 -1
- package/types/util/spec/common.d.ts +0 -2
- package/types/util/spec/index.d.ts +0 -5
- package/types/util/theme/common.d.ts +2 -0
- package/types/util/theme/index.d.ts +3 -0
- package/types/util/theme/merge-theme.d.ts +6 -0
- package/types/util/theme/preprocess.d.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IGraphic, type IGroup } from '@visactor/vrender-core';
|
|
2
2
|
import type { IRegion } from '../../region/interface';
|
|
3
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
4
4
|
import type { IComponentPluginService, IComponentPlugin } from '../../plugin/components/interface';
|
|
@@ -42,6 +42,7 @@ export declare class BaseComponent<T extends IComponentSpec = IComponentSpec> ex
|
|
|
42
42
|
clear(): void;
|
|
43
43
|
compile(): void;
|
|
44
44
|
compileMarks(group?: string | IGroupMark): void;
|
|
45
|
+
reAppendComponents(): void;
|
|
45
46
|
protected _delegateEvent: (component: IGraphic, event: any, type: string, item?: any, datum?: Datum) => void;
|
|
46
47
|
getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike;
|
|
47
48
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ITheme } from '../../theme';
|
|
2
|
+
import { type IOrientType } from '../../typings';
|
|
3
|
+
import type { ComponentThemeWithDirection } from '../interface';
|
|
2
4
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
5
|
export declare function getComponentThemeFromGlobalTheme(type: ComponentTypeEnum, chartTheme: ITheme, componentSpec: any, chartSpec: any): any;
|
|
6
|
+
export declare const getComponentThemeWithDirection: <T>(componentSpec: {
|
|
7
|
+
orient?: IOrientType;
|
|
8
|
+
}, originalTheme: ComponentThemeWithDirection<T>) => T;
|
|
@@ -40,7 +40,10 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
40
40
|
private _needInitOutState;
|
|
41
41
|
private _cacheInteractiveRangeAttrs;
|
|
42
42
|
private _needDisablePickable;
|
|
43
|
-
private
|
|
43
|
+
private _releatedAxes;
|
|
44
|
+
private _regionAxisMap;
|
|
45
|
+
private _axisDataZoomMap;
|
|
46
|
+
private _zoomRecord;
|
|
44
47
|
init(): void;
|
|
45
48
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
46
49
|
created(): void;
|
|
@@ -61,10 +64,12 @@ export declare class Brush<T extends IBrushSpec = IBrushSpec> extends BaseCompon
|
|
|
61
64
|
private _reconfigItem;
|
|
62
65
|
private _reconfigLinkedItem;
|
|
63
66
|
private _isBrushContainItem;
|
|
64
|
-
private
|
|
67
|
+
private _stateClamp;
|
|
68
|
+
private _setAxisAndDataZoom;
|
|
65
69
|
protected _bindRegions(): void;
|
|
66
70
|
protected _bindLinkedSeries(): void;
|
|
67
|
-
private
|
|
71
|
+
private _initRegionAxisMap;
|
|
72
|
+
private _initAxisDataZoomMap;
|
|
68
73
|
private _initNeedOperatedItem;
|
|
69
74
|
protected _initMarkBrushState(componentIndex: number, stateName: string): void;
|
|
70
75
|
protected initEvent(): void;
|
|
@@ -10,9 +10,10 @@ interface IBrushDataBindSpec {
|
|
|
10
10
|
seriesId?: string | string[];
|
|
11
11
|
brushLinkSeriesIndex?: number | number[];
|
|
12
12
|
brushLinkSeriesId?: string | string[];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
zoomAfterBrush?: boolean;
|
|
14
|
+
axisId?: string | string[];
|
|
15
|
+
axisIndex?: number | number[];
|
|
16
|
+
axisRangeExpand?: number;
|
|
16
17
|
}
|
|
17
18
|
export interface IBrushTheme {
|
|
18
19
|
style?: Partial<IPolygonMarkSpec>;
|
|
@@ -2,7 +2,7 @@ import type { Dict, IBoundsLike } from '@visactor/vutils';
|
|
|
2
2
|
import type { IModelLayoutOption, IModelRenderOption } from '../../model/interface';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import { BaseComponent } from '../base/base-component';
|
|
5
|
-
import type { IPadding, StringOrNumber } from '../../typings';
|
|
5
|
+
import type { IPadding, StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
6
6
|
import type { IComponentOption } from '../interface';
|
|
7
7
|
import type { ICrossHair, CrossHairTrigger, ICartesianCrosshairSpec, IPolarCrosshairSpec, ICrosshairCategoryFieldSpec } from './interface';
|
|
8
8
|
import type { IAxis } from '../axis/interface';
|
|
@@ -22,6 +22,7 @@ export interface IHair {
|
|
|
22
22
|
label?: {
|
|
23
23
|
visible: boolean;
|
|
24
24
|
formatMethod?: (text: StringOrNumber | string[], position: string) => string | string[];
|
|
25
|
+
formatter?: string | string[];
|
|
25
26
|
textStyle?: Dict<any>;
|
|
26
27
|
minWidth?: number;
|
|
27
28
|
maxWidth?: number;
|
|
@@ -30,6 +31,9 @@ export interface IHair {
|
|
|
30
31
|
zIndex?: number;
|
|
31
32
|
};
|
|
32
33
|
}
|
|
34
|
+
export interface IHairRadius extends IHair {
|
|
35
|
+
smooth?: boolean;
|
|
36
|
+
}
|
|
33
37
|
export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec | IPolarCrosshairSpec> extends BaseComponent<T> implements ICrossHair {
|
|
34
38
|
static specKey: string;
|
|
35
39
|
specKey: string;
|
|
@@ -47,7 +51,7 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
47
51
|
private _limitBounds;
|
|
48
52
|
constructor(spec: T, options: IComponentOption);
|
|
49
53
|
protected abstract _showDefaultCrosshairBySpec(): void;
|
|
50
|
-
protected abstract _layoutCrosshair(x: number, y: number): void;
|
|
54
|
+
protected abstract _layoutCrosshair(x: number, y: number, tooltipData?: TooltipData, activeType?: TooltipActiveType): void;
|
|
51
55
|
protected abstract _parseFieldInfo(): void;
|
|
52
56
|
abstract hide(): void;
|
|
53
57
|
protected _getLimitBounds(): IBoundsLike;
|
|
@@ -65,20 +69,25 @@ export declare abstract class BaseCrossHair<T extends ICartesianCrosshairSpec |
|
|
|
65
69
|
private _registerEvent;
|
|
66
70
|
private _eventOff;
|
|
67
71
|
updateLayoutAttribute(): void;
|
|
72
|
+
protected calculateTriggerPoint(params: any): {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
};
|
|
68
76
|
private _handleIn;
|
|
69
77
|
private _handleClickInEvent;
|
|
70
78
|
private _handleHoverInEvent;
|
|
71
79
|
private _handleOutEvent;
|
|
72
80
|
private _getTriggerEvent;
|
|
81
|
+
private _registerTooltipEvent;
|
|
82
|
+
private _handleTooltipShow;
|
|
83
|
+
private _handleTooltipHideOrRelease;
|
|
73
84
|
protected _getAxisInfoByField<T = IAxis>(field: 'x' | 'y' | 'category' | 'value'): IAxisInfo<T>;
|
|
74
85
|
changeRegions(regions: IRegion[]): void;
|
|
75
86
|
onLayoutEnd(ctx: IModelLayoutOption): void;
|
|
76
87
|
onRender(ctx: IModelRenderOption): void;
|
|
77
88
|
protected _releaseEvent(): void;
|
|
78
|
-
protected _firstSeries<T>(): T | null;
|
|
79
89
|
protected _parseCrosshairSpec(): void;
|
|
80
90
|
protected _parseField(field: ICrosshairCategoryFieldSpec, fieldName: string): any;
|
|
81
91
|
protected _filterAxisByPoint<T>(axisMap: IAxisInfo<T>, relativeX: number, relativeY: number): IAxisInfo<T>;
|
|
82
|
-
protected
|
|
83
|
-
clear(): void;
|
|
92
|
+
protected clearOutEvent(): void;
|
|
84
93
|
}
|
|
@@ -2,11 +2,10 @@ import type { Maybe } from '@visactor/vutils';
|
|
|
2
2
|
import type { IComponentOption } from '../interface';
|
|
3
3
|
import { ComponentTypeEnum } from '../interface/type';
|
|
4
4
|
import type { ICartesianCrosshairSpec } from './interface';
|
|
5
|
-
import type { IBound } from './base';
|
|
6
5
|
import { BaseCrossHair } from './base';
|
|
7
6
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
7
|
import type { IAxis } from '../axis/interface';
|
|
9
|
-
import type { StringOrNumber } from '../../typings';
|
|
8
|
+
import type { StringOrNumber, TooltipActiveType, TooltipData } from '../../typings';
|
|
10
9
|
import type { IModelSpecInfo } from '../../model/interface';
|
|
11
10
|
export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICartesianCrosshairSpec> extends BaseCrossHair<T> {
|
|
12
11
|
static specKey: string;
|
|
@@ -32,18 +31,13 @@ export declare class CartesianCrossHair<T extends ICartesianCrosshairSpec = ICar
|
|
|
32
31
|
private _findAllAxisContains;
|
|
33
32
|
private _getValueAt;
|
|
34
33
|
clearAxisValue(): void;
|
|
35
|
-
setAxisValue(
|
|
34
|
+
setAxisValue(value: StringOrNumber, axis: IAxis): void;
|
|
36
35
|
private _getAllAxisValues;
|
|
37
|
-
protected _layoutCrosshair(relativeX: number, relativeY: number): void;
|
|
36
|
+
protected _layoutCrosshair(relativeX: number, relativeY: number, tooltipData?: TooltipData, activeType?: TooltipActiveType): void;
|
|
38
37
|
hide(): void;
|
|
39
|
-
_setRegionArea(outRegion: IBound, currentValue: Map<number, {
|
|
40
|
-
v: StringOrNumber;
|
|
41
|
-
axis: IAxis;
|
|
42
|
-
}>): void;
|
|
43
38
|
layoutByValue(tag?: number): void;
|
|
44
39
|
private _layoutVertical;
|
|
45
40
|
private _layoutHorizontal;
|
|
46
|
-
private _getRectSize;
|
|
47
41
|
protected _parseFieldInfo(): void;
|
|
48
42
|
private _updateCrosshair;
|
|
49
43
|
private _updateCrosshairLabel;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { StringOrNumber } from '../../../typings';
|
|
2
|
+
import type { IAxis } from '../../axis';
|
|
3
|
+
export interface ICrosshairLabelInfo {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
text: StringOrNumber;
|
|
6
|
+
dx: number;
|
|
7
|
+
dy: number;
|
|
8
|
+
defaultFormatter?: (value: StringOrNumber) => StringOrNumber;
|
|
9
|
+
}
|
|
10
|
+
export interface ICrosshairInfoX {
|
|
11
|
+
height: number;
|
|
12
|
+
leftPos: number;
|
|
13
|
+
rightPos: number;
|
|
14
|
+
topPos: number;
|
|
15
|
+
x: number;
|
|
16
|
+
bottom: ICrosshairLabelInfo;
|
|
17
|
+
top: ICrosshairLabelInfo;
|
|
18
|
+
visible: boolean;
|
|
19
|
+
_isCache?: boolean;
|
|
20
|
+
axis: IAxis;
|
|
21
|
+
}
|
|
22
|
+
export interface ICrosshairInfoY {
|
|
23
|
+
width: number;
|
|
24
|
+
leftPos: number;
|
|
25
|
+
topPos: number;
|
|
26
|
+
bottomPos: number;
|
|
27
|
+
y: number;
|
|
28
|
+
left: ICrosshairLabelInfo;
|
|
29
|
+
right: ICrosshairLabelInfo;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
_isCache?: boolean;
|
|
32
|
+
axis: IAxis;
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IPoint, StringOrNumber } from '../../../typings';
|
|
2
|
+
import type { IPolarAxis } from '../../axis';
|
|
3
|
+
export interface IPolarCrosshairInfo {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
center: IPoint;
|
|
7
|
+
radius: number;
|
|
8
|
+
distance: number;
|
|
9
|
+
startAngle: number;
|
|
10
|
+
endAngle: number;
|
|
11
|
+
innerRadius: number;
|
|
12
|
+
visible: boolean;
|
|
13
|
+
sides: number;
|
|
14
|
+
angle: number;
|
|
15
|
+
point: IPoint;
|
|
16
|
+
_isCache?: boolean;
|
|
17
|
+
label?: IPolarCrosshairLabelInfo;
|
|
18
|
+
axis?: IPolarAxis;
|
|
19
|
+
}
|
|
20
|
+
export interface IPolarCrosshairLabelInfo {
|
|
21
|
+
visible: boolean;
|
|
22
|
+
text: StringOrNumber;
|
|
23
|
+
offset: number;
|
|
24
|
+
defaultFormatter?: (value: StringOrNumber) => StringOrNumber;
|
|
25
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ITooltipActiveTypeAsKeys } from '../../tooltip/interface/common';
|
|
1
2
|
import type { IPadding, StringOrNumber, ILineMarkSpec, IRectMarkSpec, ITextMarkSpec } from '../../../typings';
|
|
2
3
|
import type { IAxis } from '../../axis/interface';
|
|
3
4
|
import type { IComponentSpec } from '../../base/interface';
|
|
@@ -10,6 +11,7 @@ export interface ICrossHair extends IComponent {
|
|
|
10
11
|
}
|
|
11
12
|
export type CrossHairTrigger = 'click' | 'hover' | ['click', 'hover'];
|
|
12
13
|
export interface ICommonCrosshairSpec extends IComponentSpec {
|
|
14
|
+
followTooltip?: boolean | Partial<ITooltipActiveTypeAsKeys<boolean, boolean, boolean>>;
|
|
13
15
|
trigger?: CrossHairTrigger;
|
|
14
16
|
triggerOff?: CrossHairTrigger | 'none' | number;
|
|
15
17
|
lockAfterClick?: boolean;
|
|
@@ -56,6 +58,7 @@ export interface ICrosshairRectSpec {
|
|
|
56
58
|
export interface ICrosshairLabelSpec {
|
|
57
59
|
visible?: boolean;
|
|
58
60
|
formatMethod?: (text: StringOrNumber | string[]) => string | string[];
|
|
61
|
+
formatter?: string | string[];
|
|
59
62
|
style?: Partial<ITextMarkSpec>;
|
|
60
63
|
labelBackground?: ICrosshairLabelBackgroundSpec;
|
|
61
64
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IComponentOption } from '../interface';
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { IPolarCrosshairSpec } from './interface';
|
|
4
|
+
import type { TooltipActiveType, TooltipData } from '../../typings';
|
|
4
5
|
import { BaseCrossHair } from './base';
|
|
5
6
|
import type { Maybe } from '@visactor/vutils';
|
|
6
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
@@ -28,10 +29,10 @@ export declare class PolarCrossHair<T extends IPolarCrosshairSpec = IPolarCrossh
|
|
|
28
29
|
private _findAllAxisContains;
|
|
29
30
|
private _getAllAxisValues;
|
|
30
31
|
private _getValueByAxis;
|
|
31
|
-
protected _layoutCrosshair(relativeX: number, relativeY: number): void;
|
|
32
|
+
protected _layoutCrosshair(relativeX: number, relativeY: number, tooltipData?: TooltipData, activeType?: TooltipActiveType): void;
|
|
32
33
|
layoutByValue(tag?: number): void;
|
|
33
|
-
private
|
|
34
|
-
private
|
|
34
|
+
private _layoutAngle;
|
|
35
|
+
private _layoutRadius;
|
|
35
36
|
protected _parseFieldInfo(): void;
|
|
36
37
|
private _updateCrosshairLabel;
|
|
37
38
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ICartesianSeries } from '../../../series';
|
|
2
|
+
import type { ILayoutPoint } from '../../../typings';
|
|
3
|
+
import type { IHair } from '../base';
|
|
4
|
+
import type { AxisCurrentValueMap, ICrosshairInfoX, ICrosshairInfoY } from '../interface';
|
|
5
|
+
export declare const layoutByValue: (tag: number, series: ICartesianSeries, layoutStartPoint: ILayoutPoint, currValueX: AxisCurrentValueMap, currValueY: AxisCurrentValueMap, xHair: IHair, yHair: IHair, enableRemain?: boolean, cacheXCrossHairInfo?: ICrosshairInfoX, cacheYCrossHairInfo?: ICrosshairInfoY) => {
|
|
6
|
+
x: ICrosshairInfoX;
|
|
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) => {
|
|
14
|
+
visible: boolean;
|
|
15
|
+
start: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
end: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const layoutHorizontalCrosshair: (yHair: IHair, crosshairInfo: ICrosshairInfoY, bandHeight: number, offsetHeight: number) => {
|
|
25
|
+
visible: boolean;
|
|
26
|
+
start: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
};
|
|
30
|
+
end: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Tag } from '@visactor/vrender-components';
|
|
2
|
+
import type { IBoundsLike } from '@visactor/vutils';
|
|
3
|
+
import type { Datum } from '../../../typings';
|
|
4
|
+
import type { ICrosshairTheme } from '../interface';
|
|
5
|
+
import type { ITheme } from '../../../theme';
|
|
6
|
+
export declare function limitTagInBounds(shape: Tag, bounds: IBoundsLike): void;
|
|
7
|
+
export declare function getDatumByValue(data: Datum[], value: number, startField: string, endField?: string): Datum | null;
|
|
8
|
+
export declare const getCartesianCrosshairTheme: (chartTheme: ITheme, chartSpec: any) => ICrosshairTheme;
|
|
9
|
+
export declare const getPolarCrosshairTheme: (chartTheme: ITheme, chartSpec: any) => ICrosshairTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './common';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IPolarSeries } from '../../../series';
|
|
2
|
+
import type { IHair, IHairRadius } from '../base';
|
|
3
|
+
import type { AxisCurrentValueMap, IPolarCrosshairInfo } from '../interface';
|
|
4
|
+
export declare const layoutByValue: (series: IPolarSeries, currValueAngle: AxisCurrentValueMap, currValueRadius: AxisCurrentValueMap, angleHair: IHair, radiusHair: IHair, enableRemain?: boolean, cacheAngleCrossHairInfo?: IPolarCrosshairInfo, cacheRadiusCrossHairInfo?: IPolarCrosshairInfo) => {
|
|
5
|
+
angle: IPolarCrosshairInfo;
|
|
6
|
+
radius: IPolarCrosshairInfo;
|
|
7
|
+
};
|
|
8
|
+
export declare const layoutAngleCrosshair: (angleHair: IHair, crosshairInfo: IPolarCrosshairInfo) => {
|
|
9
|
+
center: import("../../../typings").IPoint;
|
|
10
|
+
innerRadius: number;
|
|
11
|
+
radius: number;
|
|
12
|
+
startAngle: number;
|
|
13
|
+
endAngle: number;
|
|
14
|
+
start?: undefined;
|
|
15
|
+
end?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
start: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
end: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
center?: undefined;
|
|
26
|
+
innerRadius?: undefined;
|
|
27
|
+
radius?: undefined;
|
|
28
|
+
startAngle?: undefined;
|
|
29
|
+
endAngle?: undefined;
|
|
30
|
+
};
|
|
31
|
+
export declare const layoutRadiusCrosshair: (radiusHair: IHairRadius, crosshairInfo: IPolarCrosshairInfo) => {
|
|
32
|
+
center: import("../../../typings").IPoint;
|
|
33
|
+
startAngle: number;
|
|
34
|
+
endAngle: number;
|
|
35
|
+
radius: number;
|
|
36
|
+
sides: number;
|
|
37
|
+
};
|
|
@@ -2,11 +2,11 @@ import { BaseComponent } from '../base/base-component';
|
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
5
|
-
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec } from '../../typings';
|
|
6
|
-
import type { MarkTypeEnum } from '../../mark/interface';
|
|
5
|
+
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec, ILayoutRect } from '../../typings';
|
|
7
6
|
import type { Maybe } from '@visactor/vutils';
|
|
8
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
9
|
-
|
|
8
|
+
import type { IModelMarkAttributeContext } from '../../compile/mark/interface';
|
|
9
|
+
export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMarkType>> {
|
|
10
10
|
static type: ComponentTypeEnum;
|
|
11
11
|
type: ComponentTypeEnum;
|
|
12
12
|
static specKey: string;
|
|
@@ -14,13 +14,16 @@ export declare class CustomMark<T = any> extends BaseComponent<any> {
|
|
|
14
14
|
layoutType: 'none';
|
|
15
15
|
layoutZIndex: number;
|
|
16
16
|
layoutLevel: number;
|
|
17
|
-
protected _spec:
|
|
17
|
+
protected _spec: ICustomMarkSpec<Exclude<EnableMarkType, 'group'>> | ICustomMarkGroupSpec;
|
|
18
18
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
19
19
|
created(): void;
|
|
20
|
+
protected _markAttributeContext: IModelMarkAttributeContext;
|
|
21
|
+
getMarkAttributeContext(): IModelMarkAttributeContext;
|
|
22
|
+
protected _buildMarkAttributeContext(): void;
|
|
20
23
|
protected initMarks(): void;
|
|
21
24
|
private _createExtensionMark;
|
|
22
25
|
initEvent(): void;
|
|
23
|
-
_compareSpec(spec:
|
|
26
|
+
_compareSpec(spec: ICustomMarkSpec<EnableMarkType>, prevSpec: ICustomMarkSpec<EnableMarkType>): {
|
|
24
27
|
change: boolean;
|
|
25
28
|
reMake: boolean;
|
|
26
29
|
reRender: boolean;
|
|
@@ -30,6 +33,14 @@ export declare class CustomMark<T = any> extends BaseComponent<any> {
|
|
|
30
33
|
changeRegions(regions: IRegion[]): void;
|
|
31
34
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
32
35
|
onRender(ctx: IModelRenderOption): void;
|
|
36
|
+
afterCompile(): void;
|
|
33
37
|
private _getMarkAttributeContext;
|
|
38
|
+
private _getLayoutRect;
|
|
39
|
+
getBoundsInRect(rect: ILayoutRect): {
|
|
40
|
+
x1: number;
|
|
41
|
+
y1: number;
|
|
42
|
+
x2: number;
|
|
43
|
+
y2: number;
|
|
44
|
+
};
|
|
34
45
|
}
|
|
35
46
|
export declare const registerCustomMark: () => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
2
|
import type { IEffect, IModelInitOption } from '../../model/interface';
|
|
3
|
-
import type
|
|
3
|
+
import { type IComponent, type IComponentOption } from '../interface';
|
|
4
4
|
import type { AdaptiveSpec, ILayoutRect, ILayoutType, IOrientType, IRect, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IBaseScale } from '@visactor/vscale';
|
|
6
6
|
import type { ICartesianBandAxisSpec } from '../axis/cartesian';
|
|
7
7
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
8
|
-
import { IFilterMode } from './
|
|
8
|
+
import type { IFilterMode } from './interface';
|
|
9
9
|
import type { IDataFilterComponent, IDataFilterComponentSpec, IRoamDragSpec, IRoamScrollSpec, IRoamZoomSpec } from './interface';
|
|
10
10
|
import type { BaseEventParams } from '../../event/interface';
|
|
11
11
|
import type { AbstractComponent } from '@visactor/vrender-components';
|
|
@@ -19,6 +19,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
19
19
|
protected _fixedBandSize?: number;
|
|
20
20
|
protected _cacheRect?: ILayoutRect;
|
|
21
21
|
protected _cacheVisibility?: boolean;
|
|
22
|
+
protected _dataUpdating: boolean;
|
|
22
23
|
protected _stateScale: IBaseScale;
|
|
23
24
|
protected _relatedAxisComponent: IComponent;
|
|
24
25
|
protected _originalStateFields: Record<number, string | number>;
|
|
@@ -33,6 +34,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
33
34
|
protected _end: number;
|
|
34
35
|
protected _minSpan: number;
|
|
35
36
|
protected _maxSpan: number;
|
|
37
|
+
protected _spanCache: number;
|
|
36
38
|
protected _shouldChange: boolean;
|
|
37
39
|
protected _field: string | undefined;
|
|
38
40
|
protected _stateField: string;
|
|
@@ -44,9 +46,6 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
44
46
|
protected _zoomAttr: IRoamZoomSpec;
|
|
45
47
|
protected _dragAttr: IRoamDragSpec;
|
|
46
48
|
protected _scrollAttr: IRoamScrollSpec;
|
|
47
|
-
get orient(): IOrientType;
|
|
48
|
-
get isHorizontal(): boolean;
|
|
49
|
-
get stateScale(): IBaseScale;
|
|
50
49
|
get relatedAxisComponent(): IComponent;
|
|
51
50
|
setStartAndEnd(start: number | string, end: number | string, rangeMode?: ['percent' | 'value', 'percent' | 'value']): void;
|
|
52
51
|
enableInteraction(): void;
|
|
@@ -59,14 +58,13 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
59
58
|
x: number;
|
|
60
59
|
y: number;
|
|
61
60
|
}): void;
|
|
62
|
-
protected abstract _getComponentAttrs(): any;
|
|
63
61
|
protected abstract _createOrUpdateComponent(): void;
|
|
64
62
|
protected abstract _computeWidth(): number;
|
|
65
63
|
protected abstract _computeHeight(): number;
|
|
66
64
|
protected abstract _handleDataCollectionChange(): void;
|
|
67
65
|
protected _handleChange(start: number, end: number, updateComponent?: boolean): void;
|
|
68
66
|
protected _isReverse(): boolean;
|
|
69
|
-
protected _updateRangeFactor(tag?:
|
|
67
|
+
protected _updateRangeFactor(tag?: 'startHandler' | 'endHandler'): void;
|
|
70
68
|
effect: IEffect;
|
|
71
69
|
protected _visible: boolean;
|
|
72
70
|
get visible(): boolean;
|
|
@@ -81,7 +79,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
81
79
|
protected _initData(): void;
|
|
82
80
|
setAttrFromSpec(): void;
|
|
83
81
|
protected _statePointToData(state: number): any;
|
|
84
|
-
|
|
82
|
+
dataToStatePoint(data: number | string): number;
|
|
85
83
|
protected _modeCheck(statePoint: 'start' | 'end', mode: string): any;
|
|
86
84
|
protected _setStateFromSpec(): void;
|
|
87
85
|
private _parseFieldOfSeries;
|
|
@@ -112,7 +110,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
112
110
|
scrollY: number;
|
|
113
111
|
}, e: BaseEventParams['event']) => boolean;
|
|
114
112
|
protected _handleChartDrag: (delta: [number, number], e: BaseEventParams['event']) => void;
|
|
115
|
-
protected _handleChartMove: (value: number, rate: number) =>
|
|
113
|
+
protected _handleChartMove: (value: number, rate: number) => boolean;
|
|
116
114
|
protected _initCommonEvent(): void;
|
|
117
115
|
updateLayoutAttribute(): void;
|
|
118
116
|
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
|
|
@@ -26,6 +26,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
26
26
|
protected _middleHandlerSize: number;
|
|
27
27
|
protected _startHandlerSize: number;
|
|
28
28
|
protected _endHandlerSize: number;
|
|
29
|
+
protected _isReverseCache: boolean;
|
|
29
30
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
30
31
|
constructor(spec: T, options: IComponentOption);
|
|
31
32
|
created(): void;
|
|
@@ -46,7 +47,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
46
47
|
protected _createOrUpdateComponent(): void;
|
|
47
48
|
protected _handleChange(start: number, end: number, updateComponent?: boolean, tag?: string): void;
|
|
48
49
|
protected _handleDataCollectionChange(): void;
|
|
49
|
-
protected _getComponentAttrs(): {
|
|
50
|
+
protected _getComponentAttrs(isNeedPreview: boolean): {
|
|
50
51
|
backgroundStyle: IRectGraphicAttribute;
|
|
51
52
|
startHandlerStyle: ISymbolGraphicAttribute;
|
|
52
53
|
middleHandlerStyle: {
|
|
@@ -73,6 +74,8 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
73
74
|
};
|
|
74
75
|
disableTriggerEvent: boolean;
|
|
75
76
|
};
|
|
77
|
+
protected _getHandlerTextFormatMethod(spec: IDataZoomSpec['startText']): (text: any) => any;
|
|
76
78
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
79
|
+
clear(): void;
|
|
77
80
|
}
|
|
78
81
|
export declare const registerDataZoom: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IMarkSpec } from '../../../typings/spec';
|
|
2
2
|
import type { IAreaMarkSpec, ILineMarkSpec, IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec } from '../../../typings/visual';
|
|
3
3
|
import type { IComponentSpec } from '../../base/interface';
|
|
4
|
-
import type { IComponent } from '../../interface';
|
|
5
|
-
import type { IFilterMode } from '../
|
|
4
|
+
import type { ComponentThemeWithDirection, IComponent } from '../../interface';
|
|
5
|
+
import type { IFilterMode } from '../interface';
|
|
6
6
|
import type { IDataFilterComponent, IDataFilterComponentSpec } from '../interface';
|
|
7
7
|
export type IDataZoom = IComponent & IDataFilterComponent;
|
|
8
8
|
export interface IDataZoomStyle {
|
|
@@ -37,22 +37,23 @@ export interface IDataZoomStyle {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
export interface IDataZoomSpec extends IDataZoomStyle, IDataFilterComponentSpec {
|
|
40
|
+
showBackgroundChart?: boolean;
|
|
40
41
|
filterMode?: IFilterMode;
|
|
41
42
|
valueField?: string;
|
|
42
43
|
startText?: {
|
|
43
44
|
padding?: number;
|
|
44
45
|
style?: IMarkSpec<ITextMarkSpec>;
|
|
45
46
|
formatMethod?: (text: string | number) => string | string[];
|
|
47
|
+
formatter?: string | string[];
|
|
46
48
|
};
|
|
47
49
|
endText?: {
|
|
48
50
|
padding?: number;
|
|
49
51
|
style?: IMarkSpec<ITextMarkSpec>;
|
|
50
52
|
formatMethod?: (text: string | number) => string | string[];
|
|
53
|
+
formatter?: string | string[];
|
|
51
54
|
};
|
|
52
55
|
brushSelect?: boolean;
|
|
53
56
|
ignoreBandSize?: boolean;
|
|
54
|
-
customDomain?: any[];
|
|
55
|
-
updateDataAfterChange?: (start: number, end: number, startValue: any, endValue: any) => void;
|
|
56
57
|
tolerance?: number;
|
|
57
58
|
}
|
|
58
59
|
export type IDataZoomCommonTheme = IComponentSpec & IDataZoomStyle & {
|
|
@@ -61,7 +62,4 @@ export type IDataZoomCommonTheme = IComponentSpec & IDataZoomStyle & {
|
|
|
61
62
|
height?: IDataZoomSpec['height'];
|
|
62
63
|
brushSelect?: boolean;
|
|
63
64
|
};
|
|
64
|
-
export type IDataZoomTheme = IDataZoomCommonTheme
|
|
65
|
-
horizontal?: Omit<IDataZoomCommonTheme, 'orient'>;
|
|
66
|
-
vertical?: Omit<IDataZoomCommonTheme, 'orient'>;
|
|
67
|
-
};
|
|
65
|
+
export type IDataZoomTheme = ComponentThemeWithDirection<IDataZoomCommonTheme>;
|
|
@@ -30,6 +30,8 @@ export interface IDataFilterComponentSpec extends Omit<IComponentSpec, 'width' |
|
|
|
30
30
|
roamDrag?: IRoamDragSpec | boolean;
|
|
31
31
|
roamScroll?: IRoamScrollSpec | boolean;
|
|
32
32
|
realTime?: boolean;
|
|
33
|
+
customDomain?: any[];
|
|
34
|
+
updateDataAfterChange?: (start: number, end: number, startValue: any, endValue: any) => void;
|
|
33
35
|
}
|
|
34
36
|
export interface IRoamDragSpec extends IRoamSpec {
|
|
35
37
|
reverse?: boolean;
|
|
@@ -57,3 +59,4 @@ export interface IDataFilterComponent extends IComponent {
|
|
|
57
59
|
y: number;
|
|
58
60
|
}) => void;
|
|
59
61
|
}
|
|
62
|
+
export type IFilterMode = 'filter' | 'axis';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ILayoutItemSpec } from '../../../layout/interface';
|
|
2
2
|
import type { IPadding } from '../../../typings';
|
|
3
3
|
import type { IRectMarkSpec } from '../../../typings/visual';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ComponentThemeWithDirection } from '../../interface';
|
|
5
|
+
import type { IFilterMode } from '../interface';
|
|
5
6
|
import type { IDataFilterComponentSpec } from '../interface';
|
|
6
7
|
export interface IScrollBarStyle {
|
|
7
8
|
rail?: Omit<IRectMarkSpec, 'width' | 'height'>;
|
|
@@ -21,7 +22,4 @@ export type IScrollBarCommonTheme = ILayoutItemSpec & IScrollBarStyle & {
|
|
|
21
22
|
round?: IScrollBarSpec['round'];
|
|
22
23
|
innerPadding?: IScrollBarSpec['innerPadding'];
|
|
23
24
|
};
|
|
24
|
-
export type IScrollBarTheme = IScrollBarCommonTheme
|
|
25
|
-
horizontal?: Omit<IScrollBarCommonTheme, 'orient'>;
|
|
26
|
-
vertical?: Omit<IScrollBarCommonTheme, 'orient'>;
|
|
27
|
-
};
|
|
25
|
+
export type IScrollBarTheme = ComponentThemeWithDirection<IScrollBarCommonTheme>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { IOrientType } from '../../typings';
|
|
2
|
-
import type { ComponentTypeEnum } from '../interface';
|
|
3
|
-
import type { ITheme } from '../../theme';
|
|
4
1
|
export interface IDataFilterWithNewDomainOption {
|
|
5
2
|
getNewDomain: () => any[];
|
|
6
3
|
isContinuous: () => boolean;
|
|
@@ -20,4 +17,3 @@ export interface IDataFilterComputeDomainOption {
|
|
|
20
17
|
};
|
|
21
18
|
}
|
|
22
19
|
export declare const dataFilterComputeDomain: (data: Array<any>, op: IDataFilterComputeDomainOption) => any[];
|
|
23
|
-
export declare const getDataFilterTheme: (orient: IOrientType, type: ComponentTypeEnum, chartTheme: ITheme) => any;
|