@visactor/vchart-types 0.10.0-alpha.3 → 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 +3 -3
- 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,17 +1,24 @@
|
|
|
1
|
+
import type { DataView } from '@visactor/vdataset';
|
|
1
2
|
import type { IPadding } from '@visactor/vutils';
|
|
2
|
-
import type { SymbolType
|
|
3
|
-
import type { IRectMarkSpec,
|
|
3
|
+
import type { SymbolType } from '@visactor/vrender-core';
|
|
4
|
+
import type { IComposedTextMarkSpec, IFormatMethod, IRectMarkSpec, IRichTextFormatMethod, ISymbolMarkSpec, StringOrNumber } from '../../typings';
|
|
4
5
|
import type { IComponentSpec } from '../base/interface';
|
|
5
6
|
import type { Datum } from '@visactor/vrender-components';
|
|
6
|
-
import type { ICartesianSeries } from '../../series/interface';
|
|
7
|
-
import type { IOptionAggrField, IOptionSeries } from '../../data/transforms/aggregation';
|
|
7
|
+
import type { ICartesianSeries, IGeoSeries, IPolarSeries } from '../../series/interface';
|
|
8
|
+
import type { IOptionAggr, IOptionAggrField, IOptionSeries } from '../../data/transforms/aggregation';
|
|
9
|
+
import type { IOptionRegr } from '../../data/transforms/regression';
|
|
10
|
+
export type IMarkerSupportSeries = ICartesianSeries | IPolarSeries | IGeoSeries;
|
|
11
|
+
export type IPolarPoint = {
|
|
12
|
+
angle: number;
|
|
13
|
+
radius: number;
|
|
14
|
+
};
|
|
8
15
|
export type OffsetPoint = {
|
|
9
16
|
x?: number | string;
|
|
10
17
|
y?: number | string;
|
|
11
18
|
};
|
|
12
19
|
export type IAggrType = 'sum' | 'average' | 'min' | 'max' | 'variance' | 'standardDeviation' | 'median';
|
|
13
20
|
export type IDataPos = StringOrNumber | IAggrType;
|
|
14
|
-
export type IDataPosCallback = (relativeSeriesData: Datum[], startRelativeSeriesData: Datum[], endRelativeSeriesData: Datum[], relativeSeries:
|
|
21
|
+
export type IDataPosCallback = (relativeSeriesData: Datum[], startRelativeSeriesData: Datum[], endRelativeSeriesData: Datum[], relativeSeries: IMarkerSupportSeries, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries) => StringOrNumber;
|
|
15
22
|
export type IDataPointSpec = {
|
|
16
23
|
[key: string]: IDataPos | IDataPosCallback;
|
|
17
24
|
refRelativeSeriesIndex?: number;
|
|
@@ -20,6 +27,10 @@ export type IDataPointSpec = {
|
|
|
20
27
|
xFieldDim?: string;
|
|
21
28
|
yFieldIndex?: number;
|
|
22
29
|
yFieldDim?: string;
|
|
30
|
+
angleFieldIndex?: number;
|
|
31
|
+
angleFieldDim?: string;
|
|
32
|
+
radiusFieldIndex?: number;
|
|
33
|
+
radiusFieldDim?: string;
|
|
23
34
|
};
|
|
24
35
|
export type MarkerPositionPoint = {
|
|
25
36
|
x: StringOrNumber;
|
|
@@ -28,7 +39,9 @@ export type MarkerPositionPoint = {
|
|
|
28
39
|
export type ICoordinateOption = {
|
|
29
40
|
x?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];
|
|
30
41
|
y?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];
|
|
31
|
-
|
|
42
|
+
angle?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];
|
|
43
|
+
radius?: IOptionAggrField | (IDataPosCallback | StringOrNumber)[];
|
|
44
|
+
getRefRelativeSeries?: () => IMarkerSupportSeries;
|
|
32
45
|
} & IOptionSeries;
|
|
33
46
|
export type IMarkerPositionsSpec = {
|
|
34
47
|
positions: MarkerPositionPoint[];
|
|
@@ -42,12 +55,10 @@ export type IMarkerLabelWithoutRefSpec = {
|
|
|
42
55
|
labelBackground?: {
|
|
43
56
|
visible?: boolean;
|
|
44
57
|
padding?: IPadding | number[] | number;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
formatMethod?: (markData: Datum[], seriesData: Datum[]) => string | string[] | number | number[] | IRichTextCharacter[];
|
|
50
|
-
style?: Omit<ITextMarkSpec, 'visible'>;
|
|
58
|
+
} & Partial<IMarkerState<Omit<IRectMarkSpec, 'visible'>>>;
|
|
59
|
+
type?: 'rich' | 'text';
|
|
60
|
+
text?: string | string[] | number | number[] | ReturnType<IRichTextFormatMethod<[]>>;
|
|
61
|
+
formatMethod?: IFormatMethod<[markData: Datum[], seriesData: Datum[]]>;
|
|
51
62
|
shape?: {
|
|
52
63
|
visible?: boolean;
|
|
53
64
|
style: Omit<ISymbolMarkSpec, 'visible'>;
|
|
@@ -56,7 +67,7 @@ export type IMarkerLabelWithoutRefSpec = {
|
|
|
56
67
|
confine?: boolean;
|
|
57
68
|
dx?: number;
|
|
58
69
|
dy?: number;
|
|
59
|
-
}
|
|
70
|
+
} & Partial<IMarkerState<Omit<IComposedTextMarkSpec, 'visible'>>>;
|
|
60
71
|
export type IMarkerLabelSpec = IMarkerLabelWithoutRefSpec & IMarkerRef;
|
|
61
72
|
export interface IMarkerRef {
|
|
62
73
|
refX?: number;
|
|
@@ -68,8 +79,10 @@ export interface IMarkerCrossSeriesSpec {
|
|
|
68
79
|
endRelativeSeriesIndex?: number;
|
|
69
80
|
startRelativeSeriesId?: string;
|
|
70
81
|
endRelativeSeriesId?: string;
|
|
82
|
+
specifiedDataSeriesIndex?: 'all' | number | number[];
|
|
83
|
+
specifiedDataSeriesId?: 'all' | string | string[];
|
|
71
84
|
}
|
|
72
|
-
export
|
|
85
|
+
export type IMarkerSpec = IComponentSpec & {
|
|
73
86
|
relativeSeriesIndex?: number;
|
|
74
87
|
relativeSeriesId?: number | string;
|
|
75
88
|
visible?: boolean;
|
|
@@ -77,10 +90,24 @@ export interface IMarkerSpec extends IComponentSpec {
|
|
|
77
90
|
autoRange?: boolean;
|
|
78
91
|
clip?: boolean;
|
|
79
92
|
name?: string;
|
|
80
|
-
|
|
81
|
-
|
|
93
|
+
coordinateType?: string;
|
|
94
|
+
};
|
|
95
|
+
export type IMarkerSymbol = IMarkerRef & {
|
|
82
96
|
visible: boolean;
|
|
83
97
|
symbolType?: SymbolType;
|
|
84
98
|
size?: number;
|
|
85
|
-
|
|
86
|
-
|
|
99
|
+
} & Partial<IMarkerState<Omit<ISymbolMarkSpec, 'visible'>>>;
|
|
100
|
+
export type MarkerStyleCallback<T> = (markerData: DataView) => T;
|
|
101
|
+
export type MarkerStateCallback<T> = (markerData: DataView) => T;
|
|
102
|
+
export type MarkerStateValue = 'hover' | 'hover_reverse' | 'selected' | 'selected_reverse';
|
|
103
|
+
export type IMarkerState<T> = {
|
|
104
|
+
style?: T | MarkerStyleCallback<T>;
|
|
105
|
+
state?: Record<MarkerStateValue, T | MarkerStateCallback<T>>;
|
|
106
|
+
};
|
|
107
|
+
export type MarkCoordinateType = 'cartesian' | 'polar' | 'geo';
|
|
108
|
+
export type IMarkProcessOptions = {
|
|
109
|
+
options: IOptionAggr[] | IOptionRegr;
|
|
110
|
+
needAggr?: boolean;
|
|
111
|
+
needRegr?: boolean;
|
|
112
|
+
processData?: DataView;
|
|
113
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IMarkArea, IMarkAreaSpec } from './interface';
|
|
2
|
+
import type { MarkArcAreaAttrs, MarkAreaAttrs } from '@visactor/vrender-components';
|
|
3
|
+
import type { MarkArea as MarkAreaComponent, MarkArcArea as MarkArcAreaComponent } from '@visactor/vrender-components';
|
|
4
|
+
import { BaseMarker } from '../base-marker';
|
|
5
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
6
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
7
|
+
export declare abstract class BaseMarkArea extends BaseMarker<IMarkAreaSpec> implements IMarkArea {
|
|
8
|
+
static specKey: string;
|
|
9
|
+
specKey: string;
|
|
10
|
+
layoutZIndex: number;
|
|
11
|
+
protected abstract _newMarkAreaComponent(attr: MarkAreaAttrs | MarkArcAreaAttrs): MarkAreaComponent | MarkArcAreaComponent;
|
|
12
|
+
protected abstract _computePointsAttr(): any;
|
|
13
|
+
protected abstract _computeOptions(): IMarkProcessOptions;
|
|
14
|
+
static _getMarkerCoordinateType(markerSpec: any): string;
|
|
15
|
+
protected _createMarkerComponent(): IGroup;
|
|
16
|
+
protected _markerLayout(): void;
|
|
17
|
+
protected _initDataView(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import type { MarkAreaAttrs } from '@visactor/vrender-components';
|
|
3
|
+
import { MarkArea as MarkAreaComponent } from '@visactor/vrender-components';
|
|
4
|
+
import type { IPoint } from '../../../typings';
|
|
5
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
6
|
+
import { BaseMarkArea } from './base-mark-area';
|
|
7
|
+
export declare class CartesianMarkArea extends BaseMarkArea {
|
|
8
|
+
static type: ComponentTypeEnum;
|
|
9
|
+
type: ComponentTypeEnum;
|
|
10
|
+
name: string;
|
|
11
|
+
static coordinateType: string;
|
|
12
|
+
coordinateType: string;
|
|
13
|
+
protected _newMarkAreaComponent(attr: MarkAreaAttrs): MarkAreaComponent;
|
|
14
|
+
protected _computePointsAttr(): {
|
|
15
|
+
points: IPoint[];
|
|
16
|
+
};
|
|
17
|
+
protected _computeOptions(): IMarkProcessOptions;
|
|
18
|
+
}
|
|
19
|
+
export declare const registerMarkArea: () => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { BaseMarkerAnimation, CommonMarkAreaAnimationType } from '@visactor/vrender-components';
|
|
1
2
|
import type { IComponent } from '../../../interface';
|
|
2
3
|
import type { IMarkerPositionsSpec, IDataPointSpec, IDataPos, IMarkerSpec, IDataPosCallback, IMarkerCrossSeriesSpec, OffsetPoint } from '../../interface';
|
|
3
4
|
import type { IMarkAreaTheme } from './theme';
|
|
4
5
|
export type IMarkArea = IComponent;
|
|
5
6
|
export type IRegressType = 'regression';
|
|
6
|
-
export type IMarkAreaSpec = IMarkerSpec & (IMarkAreaXSpec | IMarkAreaYSpec | IMarkAreaXYSpec | IMarkAreaCoordinateSpec | IMarkerPositionsSpec) & IMarkAreaTheme
|
|
7
|
+
export type IMarkAreaSpec = IMarkerSpec & (IMarkAreaXSpec | IMarkAreaYSpec | IMarkAreaXYSpec | IMarkAreaAngleSpec | IMarkAreaRadiusSpec | IMarkAreaAngleRadiusSpec | IMarkAreaCoordinateSpec | IMarkerPositionsSpec) & IMarkAreaTheme & BaseMarkerAnimation<CommonMarkAreaAnimationType>;
|
|
7
8
|
export interface IMarkAreaXSpec extends IMarkerCrossSeriesSpec {
|
|
8
9
|
x: IDataPos | IDataPosCallback;
|
|
9
10
|
x1: IDataPos | IDataPosCallback;
|
|
@@ -18,6 +19,20 @@ export interface IMarkAreaXYSpec extends IMarkerCrossSeriesSpec {
|
|
|
18
19
|
y: IDataPos | IDataPosCallback;
|
|
19
20
|
y1: IDataPos | IDataPosCallback;
|
|
20
21
|
}
|
|
22
|
+
export interface IMarkAreaAngleSpec extends IMarkerCrossSeriesSpec {
|
|
23
|
+
angle: IDataPos | IDataPosCallback;
|
|
24
|
+
angle1: IDataPos | IDataPosCallback;
|
|
25
|
+
}
|
|
26
|
+
export interface IMarkAreaRadiusSpec extends IMarkerCrossSeriesSpec {
|
|
27
|
+
radius: IDataPos | IDataPosCallback;
|
|
28
|
+
radius1: IDataPos | IDataPosCallback;
|
|
29
|
+
}
|
|
30
|
+
export interface IMarkAreaAngleRadiusSpec extends IMarkerCrossSeriesSpec {
|
|
31
|
+
angle: IDataPos | IDataPosCallback;
|
|
32
|
+
angle1: IDataPos | IDataPosCallback;
|
|
33
|
+
radius: IDataPos | IDataPosCallback;
|
|
34
|
+
radius1: IDataPos | IDataPosCallback;
|
|
35
|
+
}
|
|
21
36
|
export type IMarkAreaCoordinateSpec = {
|
|
22
37
|
coordinates: IDataPointSpec[];
|
|
23
38
|
coordinatesOffset?: OffsetPoint[];
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { IMarkAreaLabelPosition } from '@visactor/vrender-components';
|
|
2
|
-
import type { IPolygonMarkSpec } from '../../../../typings';
|
|
3
|
-
import type { IMarkerLabelWithoutRefSpec } from '../../interface';
|
|
1
|
+
import type { IMarkAreaLabelPosition, IMarkCommonArcLabelPosition } from '@visactor/vrender-components';
|
|
2
|
+
import type { IArcMarkSpec, IPolygonMarkSpec } from '../../../../typings';
|
|
3
|
+
import type { IMarkerLabelWithoutRefSpec, IMarkerState } from '../../interface';
|
|
4
4
|
export interface IMarkAreaTheme {
|
|
5
|
-
area?:
|
|
6
|
-
style?: IPolygonMarkSpec;
|
|
7
|
-
};
|
|
5
|
+
area?: Partial<IMarkerState<IPolygonMarkSpec | IArcMarkSpec>>;
|
|
8
6
|
label?: {
|
|
9
|
-
position?: IMarkAreaLabelPosition;
|
|
7
|
+
position?: keyof typeof IMarkAreaLabelPosition | IMarkCommonArcLabelPosition;
|
|
10
8
|
} & IMarkerLabelWithoutRefSpec;
|
|
11
9
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import type { MarkArcAreaAttrs, MarkAreaAttrs } from '@visactor/vrender-components';
|
|
3
|
+
import { MarkArcArea as MarkArcAreaComponent, MarkArea as MarkAreaComponent } from '@visactor/vrender-components';
|
|
4
|
+
import type { IPoint, IPolarPoint } from '../../../typings';
|
|
5
|
+
import { BaseMarkArea } from './base-mark-area';
|
|
6
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
7
|
+
export declare class PolarMarkArea extends BaseMarkArea {
|
|
8
|
+
static type: ComponentTypeEnum;
|
|
9
|
+
type: ComponentTypeEnum;
|
|
10
|
+
name: string;
|
|
11
|
+
static coordinateType: string;
|
|
12
|
+
coordinateType: string;
|
|
13
|
+
protected _markerComponent: MarkArcAreaComponent;
|
|
14
|
+
protected _newMarkAreaComponent(attr: MarkArcAreaAttrs | MarkAreaAttrs): MarkArcAreaComponent | MarkAreaComponent;
|
|
15
|
+
protected _computePointsAttr(): {
|
|
16
|
+
points?: IPoint[] | IPolarPoint[];
|
|
17
|
+
innerRadius?: number;
|
|
18
|
+
outerRadius?: number;
|
|
19
|
+
startAngle?: number;
|
|
20
|
+
endAngle?: number;
|
|
21
|
+
center?: IPoint;
|
|
22
|
+
};
|
|
23
|
+
protected _computeOptions(): IMarkProcessOptions;
|
|
24
|
+
}
|
|
25
|
+
export declare const registerPolarMarkArea: () => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IMarkLine, IMarkLineSpec } from './interface';
|
|
2
|
+
import type { MarkArcLineAttrs, MarkLineAttrs } from '@visactor/vrender-components';
|
|
3
|
+
import type { MarkLine as MarkLineComponent, MarkArcLine as MarkArcLineComponent } from '@visactor/vrender-components';
|
|
4
|
+
import { BaseMarker } from '../base-marker';
|
|
5
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
6
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
7
|
+
export declare abstract class BaseMarkLine extends BaseMarker<IMarkLineSpec> implements IMarkLine {
|
|
8
|
+
static specKey: string;
|
|
9
|
+
specKey: string;
|
|
10
|
+
layoutZIndex: number;
|
|
11
|
+
protected abstract _newMarkLineComponent(attr: MarkLineAttrs | MarkArcLineAttrs): MarkLineComponent | MarkArcLineComponent;
|
|
12
|
+
protected abstract _computePointsAttr(): any;
|
|
13
|
+
protected abstract _computeOptions(): IMarkProcessOptions;
|
|
14
|
+
static _getMarkerCoordinateType(markerSpec: any): string;
|
|
15
|
+
protected _createMarkerComponent(): IGroup;
|
|
16
|
+
protected _getUpdateMarkerAttrs(): any;
|
|
17
|
+
protected _markerLayout(): void;
|
|
18
|
+
protected _initDataView(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import { type MarkLineAttrs, MarkLine as MarkLineComponent } from '@visactor/vrender-components';
|
|
3
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
4
|
+
import type { IPoint } from '../../../typings';
|
|
5
|
+
import { BaseMarkLine } from './base-mark-line';
|
|
6
|
+
export declare class CartesianMarkLine extends BaseMarkLine {
|
|
7
|
+
static type: ComponentTypeEnum;
|
|
8
|
+
type: ComponentTypeEnum;
|
|
9
|
+
name: string;
|
|
10
|
+
static coordinateType: string;
|
|
11
|
+
coordinateType: string;
|
|
12
|
+
protected _markerComponent: MarkLineComponent;
|
|
13
|
+
protected _newMarkLineComponent(attr: MarkLineAttrs): MarkLineComponent;
|
|
14
|
+
protected _computePointsAttr(): {
|
|
15
|
+
points: IPoint[];
|
|
16
|
+
};
|
|
17
|
+
protected _markerLayout(): void;
|
|
18
|
+
protected _computeOptions(): IMarkProcessOptions;
|
|
19
|
+
}
|
|
20
|
+
export declare const registerMarkLine: () => void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { IComponent } from '../../../interface';
|
|
2
|
-
import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint } from '../../interface';
|
|
2
|
+
import type { IAggrType, IMarkerPositionsSpec, IDataPointSpec, IMarkerSpec, IDataPos, IDataPosCallback, IMarkerLabelSpec, IMarkerCrossSeriesSpec, OffsetPoint, MarkerStateValue, MarkerStateCallback } from '../../interface';
|
|
3
3
|
import type { IRegressType } from '../../mark-area/interface';
|
|
4
4
|
import type { IMarkLineTheme } from './theme';
|
|
5
5
|
import type { ILineMarkSpec, IPoint } from '../../../../typings';
|
|
6
|
+
import type { BaseMarkerAnimation, MarkCommonLineAnimationType } from '@visactor/vrender-components/es/marker/type';
|
|
6
7
|
export type IMarkLine = IComponent;
|
|
7
|
-
export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineXYSpec | IMarkLineXYY1Spec | IMarkLineYXX1Spec | IMarkLineCoordinateSpec | IMarkerPositionsSpec) & IMarkLineTheme) | IStepMarkLineSpec;
|
|
8
|
+
export type IMarkLineSpec = (IMarkerSpec & (IMarkLineXSpec | IMarkLineYSpec | IMarkLineXYSpec | IMarkLineXYY1Spec | IMarkLineYXX1Spec | IMarkLineAngleSpec | IMarkLineRadiusSpec | IMarkLineAngRadRad1Spec | IMarkLineRadAngAng1Spec | IMarkLineAngRadSpec | IMarkLineCoordinateSpec | IMarkerPositionsSpec) & IMarkLineTheme & BaseMarkerAnimation<MarkCommonLineAnimationType>) | (IStepMarkLineSpec & BaseMarkerAnimation<MarkCommonLineAnimationType>);
|
|
8
9
|
export interface IMarkLineXSpec extends IMarkerCrossSeriesSpec {
|
|
9
10
|
x: IDataPos | IDataPosCallback;
|
|
10
11
|
}
|
|
@@ -27,6 +28,28 @@ export interface IMarkLineXYSpec extends IMarkerCrossSeriesSpec {
|
|
|
27
28
|
x1: IDataPos | IDataPosCallback;
|
|
28
29
|
y1: IDataPos | IDataPosCallback;
|
|
29
30
|
}
|
|
31
|
+
export interface IMarkLineAngleSpec extends IMarkerCrossSeriesSpec {
|
|
32
|
+
angle: IDataPos | IDataPosCallback;
|
|
33
|
+
}
|
|
34
|
+
export interface IMarkLineRadiusSpec extends IMarkerCrossSeriesSpec {
|
|
35
|
+
radius: IDataPos | IDataPosCallback;
|
|
36
|
+
}
|
|
37
|
+
export interface IMarkLineAngRadRad1Spec extends IMarkerCrossSeriesSpec {
|
|
38
|
+
angle: IDataPos | IDataPosCallback;
|
|
39
|
+
radius: IDataPos | IDataPosCallback;
|
|
40
|
+
radius1: IDataPos | IDataPosCallback;
|
|
41
|
+
}
|
|
42
|
+
export interface IMarkLineRadAngAng1Spec extends IMarkerCrossSeriesSpec {
|
|
43
|
+
angle: IDataPos | IDataPosCallback;
|
|
44
|
+
angle1: IDataPos | IDataPosCallback;
|
|
45
|
+
radius: IDataPos | IDataPosCallback;
|
|
46
|
+
}
|
|
47
|
+
export interface IMarkLineAngRadSpec extends IMarkerCrossSeriesSpec {
|
|
48
|
+
angle: IDataPos | IDataPosCallback;
|
|
49
|
+
angle1: IDataPos | IDataPosCallback;
|
|
50
|
+
radius: IDataPos | IDataPosCallback;
|
|
51
|
+
radius1: IDataPos | IDataPosCallback;
|
|
52
|
+
}
|
|
30
53
|
export type IMarkLineCoordinateSpec = {
|
|
31
54
|
coordinates: IDataPointSpec[];
|
|
32
55
|
coordinatesOffset?: OffsetPoint[];
|
|
@@ -47,6 +70,7 @@ export type IStepMarkLineSpec = IMarkerSpec & {
|
|
|
47
70
|
multiSegment?: boolean;
|
|
48
71
|
mainSegmentIndex?: number;
|
|
49
72
|
style?: ILineMarkSpec | ILineMarkSpec[];
|
|
73
|
+
state?: Record<MarkerStateValue, ILineMarkSpec | ILineMarkSpec[] | MarkerStateCallback<ILineMarkSpec | ILineMarkSpec[]>>;
|
|
50
74
|
};
|
|
51
75
|
} & Omit<IMarkLineTheme, 'label' | 'line'> & ({
|
|
52
76
|
coordinates: [IDataPointSpec, IDataPointSpec];
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { IMarkLineLabelPosition } from '@visactor/vrender-components';
|
|
2
|
-
import type { ILineMarkSpec } from '../../../../typings';
|
|
3
|
-
import type { IMarkerLabelSpec, IMarkerSymbol } from '../../interface';
|
|
1
|
+
import type { IMarkCommonArcLabelPosition, IMarkLineLabelPosition } from '@visactor/vrender-components';
|
|
2
|
+
import type { IArcMarkSpec, ILineMarkSpec } from '../../../../typings';
|
|
3
|
+
import type { IMarkerLabelSpec, IMarkerState, IMarkerSymbol } from '../../interface';
|
|
4
4
|
export interface IMarkLineTheme {
|
|
5
|
-
line?:
|
|
6
|
-
style?: ILineMarkSpec;
|
|
7
|
-
};
|
|
5
|
+
line?: Partial<IMarkerState<ILineMarkSpec | IArcMarkSpec>>;
|
|
8
6
|
label?: {
|
|
9
|
-
position?: IMarkLineLabelPosition;
|
|
7
|
+
position?: keyof typeof IMarkLineLabelPosition | IMarkCommonArcLabelPosition;
|
|
10
8
|
} & IMarkerLabelSpec;
|
|
11
9
|
startSymbol?: IMarkerSymbol;
|
|
12
10
|
endSymbol?: IMarkerSymbol;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import type { MarkArcLineAttrs, MarkLineAttrs } from '@visactor/vrender-components';
|
|
3
|
+
import { MarkArcLine as MarkArcLineComponent, MarkLine as MarkLineComponent } from '@visactor/vrender-components';
|
|
4
|
+
import type { IPoint } from '../../../typings';
|
|
5
|
+
import { BaseMarkLine } from './base-mark-line';
|
|
6
|
+
export declare class PolarMarkLine extends BaseMarkLine {
|
|
7
|
+
static type: ComponentTypeEnum;
|
|
8
|
+
type: ComponentTypeEnum;
|
|
9
|
+
name: string;
|
|
10
|
+
static coordinateType: string;
|
|
11
|
+
coordinateType: string;
|
|
12
|
+
protected _markerComponent: MarkArcLineComponent;
|
|
13
|
+
protected _newMarkLineComponent(attr: MarkArcLineAttrs | MarkLineAttrs): MarkArcLineComponent | MarkLineComponent;
|
|
14
|
+
protected _computePointsAttr(): {
|
|
15
|
+
points?: IPoint[];
|
|
16
|
+
radius?: number;
|
|
17
|
+
startAngle?: number;
|
|
18
|
+
endAngle?: number;
|
|
19
|
+
center?: IPoint;
|
|
20
|
+
};
|
|
21
|
+
protected _computeOptions(): any;
|
|
22
|
+
}
|
|
23
|
+
export declare const registerPolarMarkLine: () => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IMarkPoint, IMarkPointSpec } from './interface';
|
|
2
|
+
import { MarkPoint as MarkPointComponent } from '@visactor/vrender-components';
|
|
3
|
+
import { BaseMarker } from '../base-marker';
|
|
4
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
5
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
6
|
+
export declare abstract class BaseMarkPoint extends BaseMarker<IMarkPointSpec> implements IMarkPoint {
|
|
7
|
+
static specKey: string;
|
|
8
|
+
specKey: string;
|
|
9
|
+
layoutZIndex: number;
|
|
10
|
+
protected _markerComponent: MarkPointComponent;
|
|
11
|
+
protected abstract _computePointsAttr(): any;
|
|
12
|
+
protected abstract _computeOptions(): IMarkProcessOptions;
|
|
13
|
+
static _getMarkerCoordinateType(markerSpec: any): string;
|
|
14
|
+
protected _createMarkerComponent(): IGroup;
|
|
15
|
+
protected _markerLayout(): void;
|
|
16
|
+
protected _initDataView(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import type { IPoint } from '../../../typings';
|
|
3
|
+
import { BaseMarkPoint } from './base-mark-point';
|
|
4
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
5
|
+
export declare class CartesianMarkPoint extends BaseMarkPoint {
|
|
6
|
+
static type: ComponentTypeEnum;
|
|
7
|
+
type: ComponentTypeEnum;
|
|
8
|
+
name: string;
|
|
9
|
+
static coordinateType: string;
|
|
10
|
+
coordinateType: string;
|
|
11
|
+
protected _computePointsAttr(): {
|
|
12
|
+
point: IPoint;
|
|
13
|
+
};
|
|
14
|
+
protected _computeOptions(): IMarkProcessOptions;
|
|
15
|
+
}
|
|
16
|
+
export declare const registerMarkPoint: () => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import { BaseMarkPoint } from './base-mark-point';
|
|
3
|
+
export declare class GeoMarkPoint extends BaseMarkPoint {
|
|
4
|
+
static type: ComponentTypeEnum;
|
|
5
|
+
type: ComponentTypeEnum;
|
|
6
|
+
name: string;
|
|
7
|
+
static coordinateType: string;
|
|
8
|
+
coordinateType: string;
|
|
9
|
+
protected _computePointsAttr(): {
|
|
10
|
+
point: import("../../../typings").IPoint;
|
|
11
|
+
};
|
|
12
|
+
protected _computeOptions(): any;
|
|
13
|
+
}
|
|
14
|
+
export declare const registerGeoMarkPoint: () => void;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import type { IComponent } from '../../../interface';
|
|
2
2
|
import type { IDataPointSpec, IDataPos, IDataPosCallback, IMarkerSpec, IMarkerSymbol, MarkerPositionPoint, OffsetPoint } from '../../interface';
|
|
3
3
|
import type { IMarkPointTheme } from './theme';
|
|
4
|
+
import type { BaseMarkerAnimation, MarkPointAnimationType } from '@visactor/vrender-components';
|
|
4
5
|
export type IMarkPoint = IComponent;
|
|
5
|
-
export type IMarkPointSpec = IMarkerSpec & (IMarkPointXYSpec | IMarkPointCoordinateSpec | IMarkPointPositionsSpec) & IMarkPointTheme<IMarkerSymbol>;
|
|
6
|
+
export type IMarkPointSpec = IMarkerSpec & (IMarkPointXYSpec | IMarkPointAngleRadiusSpec | IMarkPointGeoNameSpec | IMarkPointCoordinateSpec | IMarkPointPositionsSpec) & IMarkPointTheme<IMarkerSymbol> & BaseMarkerAnimation<MarkPointAnimationType>;
|
|
6
7
|
export type IMarkPointXYSpec = {
|
|
7
8
|
y: IDataPos | IDataPosCallback;
|
|
8
9
|
x: IDataPos | IDataPosCallback;
|
|
9
10
|
};
|
|
11
|
+
export type IMarkPointAngleRadiusSpec = {
|
|
12
|
+
angle: IDataPos | IDataPosCallback;
|
|
13
|
+
radius: IDataPos | IDataPosCallback;
|
|
14
|
+
};
|
|
15
|
+
export type IMarkPointGeoNameSpec = {
|
|
16
|
+
areaName: string | IDataPosCallback;
|
|
17
|
+
};
|
|
10
18
|
export type IMarkPointCoordinateSpec = {
|
|
11
19
|
coordinates: IDataPointSpec;
|
|
12
20
|
coordinatesOffset?: OffsetPoint;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import type { IImageGraphicAttribute, IRichTextGraphicAttribute } from '@visactor/vrender-core';
|
|
1
|
+
import type { IImageGraphicAttribute, IRichTextGraphicAttribute, IGroupGraphicAttribute } from '@visactor/vrender-core';
|
|
2
2
|
import type { IMarkPointItemPosition } from '@visactor/vrender-components';
|
|
3
3
|
import type { ILineMarkSpec, ISymbolMarkSpec } from '../../../../typings';
|
|
4
|
-
import type { IMarkerLabelSpec, IMarkerRef, IMarkerSymbol } from '../../interface';
|
|
4
|
+
import type { IMarkerLabelSpec, IMarkerRef, IMarkerState, IMarkerSymbol } from '../../interface';
|
|
5
|
+
import type { IRegion } from 'src/region';
|
|
6
|
+
export type IOffsetCallback = (region: IRegion) => number;
|
|
5
7
|
export interface IItemContent extends IMarkerRef {
|
|
6
8
|
type?: 'symbol' | 'text' | 'image' | 'richText';
|
|
7
|
-
position?: IMarkPointItemPosition;
|
|
8
|
-
offsetX?: number;
|
|
9
|
-
offsetY?: number;
|
|
9
|
+
position?: keyof typeof IMarkPointItemPosition;
|
|
10
|
+
offsetX?: number | 'regionRight' | 'regionLeft' | IOffsetCallback;
|
|
11
|
+
offsetY?: number | 'regionTop' | 'regionBottom' | IOffsetCallback;
|
|
10
12
|
confine?: boolean;
|
|
11
|
-
symbol?:
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
image?: {
|
|
15
|
-
style?: IImageGraphicAttribute;
|
|
16
|
-
};
|
|
13
|
+
symbol?: Partial<IMarkerState<ISymbolMarkSpec>>;
|
|
14
|
+
image?: Partial<IMarkerState<IImageGraphicAttribute>>;
|
|
17
15
|
text?: IMarkerLabelSpec;
|
|
18
|
-
richText?:
|
|
19
|
-
|
|
20
|
-
};
|
|
16
|
+
richText?: Partial<IMarkerState<IRichTextGraphicAttribute>>;
|
|
17
|
+
customMark?: Partial<IMarkerState<IGroupGraphicAttribute>>;
|
|
21
18
|
}
|
|
22
19
|
export type IItemLine<T extends Partial<IMarkerSymbol> = IMarkerSymbol> = {
|
|
23
|
-
type?: 'type-s' | 'type-do' | 'type-po' | 'type-op';
|
|
20
|
+
type?: 'type-s' | 'type-do' | 'type-po' | 'type-op' | 'type-arc';
|
|
21
|
+
arcRatio?: number;
|
|
24
22
|
visible?: boolean;
|
|
25
23
|
decorativeLine?: {
|
|
26
24
|
visible?: boolean;
|
|
@@ -28,11 +26,14 @@ export type IItemLine<T extends Partial<IMarkerSymbol> = IMarkerSymbol> = {
|
|
|
28
26
|
};
|
|
29
27
|
startSymbol?: T;
|
|
30
28
|
endSymbol?: T;
|
|
31
|
-
line?:
|
|
32
|
-
style?: Omit<ILineMarkSpec, 'visible'>;
|
|
33
|
-
};
|
|
29
|
+
line?: Partial<IMarkerState<Omit<ILineMarkSpec, 'visible'>>>;
|
|
34
30
|
};
|
|
35
31
|
export interface IMarkPointTheme<T extends Partial<IMarkerSymbol> = Partial<IMarkerSymbol>> {
|
|
36
32
|
itemLine?: IItemLine<T>;
|
|
37
33
|
itemContent?: IItemContent;
|
|
34
|
+
targetSymbol?: {
|
|
35
|
+
offset?: number;
|
|
36
|
+
visible?: boolean;
|
|
37
|
+
size?: number;
|
|
38
|
+
} & Partial<IMarkerState<ISymbolMarkSpec>>;
|
|
38
39
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentTypeEnum } from '../../interface/type';
|
|
2
|
+
import { BaseMarkPoint } from './base-mark-point';
|
|
3
|
+
import type { IMarkProcessOptions } from '../interface';
|
|
4
|
+
export declare class PolarMarkPoint extends BaseMarkPoint {
|
|
5
|
+
static type: ComponentTypeEnum;
|
|
6
|
+
type: ComponentTypeEnum;
|
|
7
|
+
name: string;
|
|
8
|
+
static coordinateType: string;
|
|
9
|
+
coordinateType: string;
|
|
10
|
+
protected _computePointsAttr(): {
|
|
11
|
+
point: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
protected _computeOptions(): IMarkProcessOptions;
|
|
17
|
+
}
|
|
18
|
+
export declare const registerPolarMarkPoint: () => void;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ISeries } from '../../series/interface';
|
|
2
2
|
import type { DataView } from '@visactor/vdataset';
|
|
3
|
+
import { type IPointLike } from '@visactor/vutils';
|
|
3
4
|
import type { IPoint } from '../../typings';
|
|
4
|
-
import type { IDataPos, IMarkerLabelSpec, MarkerPositionPoint } from './interface';
|
|
5
|
+
import type { IDataPos, IMarkerLabelSpec, IMarkerState, IMarkerSupportSeries, IPolarPoint, MarkerPositionPoint, MarkerStateValue } from './interface';
|
|
5
6
|
import type { IRegion } from '../../region/interface';
|
|
6
7
|
import type { OffsetPoint } from './interface';
|
|
7
8
|
export declare function isAggrSpec(spec: IDataPos): boolean;
|
|
8
|
-
export declare function xyLayout(data: DataView, startRelativeSeries:
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function xyLayout(data: DataView, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries, relativeSeries: IMarkerSupportSeries, autoRange: boolean): IPoint[][];
|
|
10
|
+
export declare function polarLayout(data: DataView, startRelativeSeries: IMarkerSupportSeries, endRelativeSeries: IMarkerSupportSeries, relativeSeries: IMarkerSupportSeries, autoRange: boolean): IPolarPoint[][];
|
|
11
|
+
export declare function geoLayout(data: DataView, relativeSeries: IMarkerSupportSeries): IPoint[][];
|
|
12
|
+
export declare function cartesianCoordinateLayout(data: DataView, relativeSeries: IMarkerSupportSeries, autoRange: boolean, coordinatesOffset: OffsetPoint[] | OffsetPoint): IPoint[];
|
|
13
|
+
export declare function polarCoordinateLayout(data: DataView, relativeSeries: IMarkerSupportSeries, autoRange: boolean): IPolarPoint[];
|
|
10
14
|
export declare function positionLayout(positions: MarkerPositionPoint[], series: ISeries, regionRelative: boolean): IPoint[];
|
|
11
15
|
export declare function computeClipRange(regions: IRegion[]): {
|
|
12
16
|
minX: number;
|
|
@@ -14,4 +18,35 @@ export declare function computeClipRange(regions: IRegion[]): {
|
|
|
14
18
|
minY: number;
|
|
15
19
|
maxY: number;
|
|
16
20
|
};
|
|
17
|
-
export declare function transformLabelAttributes(label: IMarkerLabelSpec): any;
|
|
21
|
+
export declare function transformLabelAttributes(label: IMarkerLabelSpec, markerData: any): any;
|
|
22
|
+
export declare function transformState(state: {} | Record<MarkerStateValue, any | IMarkerState<any>>, markerData: DataView): {} | Record<MarkerStateValue, any>;
|
|
23
|
+
export declare function transformStyle(style: any, markerData: DataView): any;
|
|
24
|
+
export declare function transformOffset(offset: string | number | Function, region: IRegion): any;
|
|
25
|
+
export declare function computeOffsetFromRegion(point: IPointLike, offset: string | number, region: IRegion): number;
|
|
26
|
+
export declare function getMarkLineProcessInfo(spec: any): {
|
|
27
|
+
doXProcess: boolean;
|
|
28
|
+
doXYY1Process: boolean;
|
|
29
|
+
doYProcess: boolean;
|
|
30
|
+
doYXX1Process: boolean;
|
|
31
|
+
doXYProcess: boolean;
|
|
32
|
+
doAngleProcess: boolean;
|
|
33
|
+
doRadiusProcess: boolean;
|
|
34
|
+
doAngRadRad1Process: boolean;
|
|
35
|
+
doRadAngAng1Process: boolean;
|
|
36
|
+
doRadAngProcess: boolean;
|
|
37
|
+
doCoordinatesProcess: boolean;
|
|
38
|
+
};
|
|
39
|
+
export declare function getMarkAreaProcessInfo(spec: any): {
|
|
40
|
+
doXProcess: boolean;
|
|
41
|
+
doYProcess: boolean;
|
|
42
|
+
doXYProcess: boolean;
|
|
43
|
+
doAngleProcess: boolean;
|
|
44
|
+
doRadiusProcess: boolean;
|
|
45
|
+
doRadAngProcess: boolean;
|
|
46
|
+
doCoordinatesProcess: boolean;
|
|
47
|
+
};
|
|
48
|
+
export declare function getMarkPointProcessInfo(spec: any): {
|
|
49
|
+
doXYProcess: boolean;
|
|
50
|
+
doPolarProcess: boolean;
|
|
51
|
+
doGeoProcess: boolean;
|
|
52
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ControllerLayout, OrientType } from '@visactor/vrender-components';
|
|
2
2
|
import type { ISymbolMarkSpec, IRectMarkSpec } from '../../../typings';
|
|
3
|
-
import type { BaseGraphicAttributes } from '@visactor/vrender-components
|
|
3
|
+
import type { BaseGraphicAttributes } from '@visactor/vrender-components';
|
|
4
4
|
import type { ILayoutItemSpec } from '../../../layout/interface';
|
|
5
5
|
export interface IPlayerTheme extends ILayoutItemSpec {
|
|
6
6
|
visible?: boolean;
|
|
@@ -18,6 +18,7 @@ export declare class Player extends BaseComponent<IPlayer> implements IComponent
|
|
|
18
18
|
private _specs;
|
|
19
19
|
private _playerComponent;
|
|
20
20
|
private _cacheAttrs;
|
|
21
|
+
private _visible;
|
|
21
22
|
private _direction;
|
|
22
23
|
private _alternate;
|
|
23
24
|
private _dx;
|
|
@@ -32,8 +33,8 @@ export declare class Player extends BaseComponent<IPlayer> implements IComponent
|
|
|
32
33
|
afterSetLayoutStartPoint(pos: IPoint): void;
|
|
33
34
|
getBoundsInRect(rect: ILayoutRect, fullSpace: ILayoutRect): {
|
|
34
35
|
x1: number;
|
|
35
|
-
y1: number;
|
|
36
36
|
x2: number;
|
|
37
|
+
y1: number;
|
|
37
38
|
y2: number;
|
|
38
39
|
};
|
|
39
40
|
changeRegions(regions: IRegion[]): void;
|