@visactor/vchart-types 1.11.0-alpha.2 → 1.11.0
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/utils.d.ts +2 -2
- package/types/chart/base/base-chart.d.ts +7 -2
- package/types/chart/common/interface.d.ts +2 -2
- package/types/chart/index.d.ts +6 -4
- package/types/chart/interface/chart.d.ts +9 -1
- package/types/chart/interface/type.d.ts +2 -1
- package/types/chart/sankey/sankey.d.ts +5 -0
- 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 +14 -0
- package/types/compile/compiler.d.ts +3 -3
- package/types/compile/interface/compiler.d.ts +1 -0
- package/types/compile/mark/compilable-mark.d.ts +2 -1
- package/types/compile/mark/interface.d.ts +4 -1
- package/types/component/axis/base-axis.d.ts +2 -0
- package/types/component/axis/cartesian/axis.d.ts +1 -2
- package/types/component/axis/cartesian/interface/common.d.ts +1 -0
- package/types/component/axis/interface/spec.d.ts +2 -0
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +12 -3
- package/types/component/axis/polar/axis.d.ts +0 -1
- package/types/component/axis/polar/interface/common.d.ts +1 -0
- package/types/component/axis/polar/linear-axis.d.ts +5 -1
- package/types/component/base/base-component.d.ts +1 -0
- package/types/component/crosshair/base.d.ts +1 -2
- package/types/component/crosshair/interface/cartesian.d.ts +11 -24
- package/types/component/crosshair/interface/polar.d.ts +7 -5
- package/types/component/custom-mark/custom-mark.d.ts +11 -4
- package/types/component/data-zoom/data-filter-base-component.d.ts +3 -2
- package/types/component/data-zoom/interface.d.ts +1 -4
- package/types/component/index.d.ts +7 -7
- package/types/component/interface/theme.d.ts +4 -0
- package/types/component/interface/type.d.ts +4 -0
- package/types/component/label/util.d.ts +9 -1
- package/types/component/legend/continuous/interface.d.ts +1 -0
- package/types/component/legend/discrete/interface.d.ts +1 -0
- package/types/component/legend/discrete/legend.d.ts +4 -1
- package/types/component/legend/util.d.ts +12 -2
- package/types/component/marker/base-marker.d.ts +30 -44
- package/types/component/marker/interface.d.ts +40 -13
- 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 +18 -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 +11 -16
- 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/player.d.ts +2 -1
- package/types/component/tooltip/tooltip.d.ts +2 -6
- package/types/component/tooltip/utils/compose.d.ts +2 -2
- package/types/component/tooltip/utils/index.d.ts +1 -0
- package/types/component/tooltip/utils/pattern.d.ts +4 -0
- package/types/component/tooltip/utils/show-tooltip.d.ts +20 -3
- package/types/core/factory.d.ts +1 -1
- package/types/core/interface.d.ts +8 -1
- package/types/core/vchart.d.ts +5 -2
- package/types/data/transforms/aggregation.d.ts +12 -7
- package/types/data/transforms/invalid-travel.d.ts +1 -1
- package/types/data/transforms/legend-data/discrete/interface.d.ts +2 -0
- package/types/event/interface.d.ts +2 -0
- package/types/layout/grid-layout/grid-layout.d.ts +1 -1
- package/types/mark/index.d.ts +20 -20
- package/types/model/interface.d.ts +1 -0
- package/types/plugin/base/base-plugin-service.d.ts +2 -0
- package/types/plugin/base/interface.d.ts +3 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +1 -1
- package/types/plugin/components/tooltip-handler/utils/index.d.ts +0 -1
- package/types/region/interface.d.ts +2 -0
- package/types/region/region.d.ts +1 -0
- package/types/series/base/base-series.d.ts +9 -17
- package/types/series/base/tooltip-helper.d.ts +8 -5
- package/types/series/box-plot/tooltip-helper.d.ts +1 -1
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/tooltip-helper.d.ts +1 -1
- package/types/series/funnel/tooltip-helper.d.ts +3 -3
- package/types/series/geo/geo.d.ts +1 -0
- package/types/series/index.d.ts +7 -3
- package/types/series/interface/common.d.ts +3 -2
- package/types/series/interface/series.d.ts +7 -0
- package/types/series/interface/theme.d.ts +2 -0
- package/types/series/interface/tooltip-helper.d.ts +8 -5
- package/types/series/interface/type.d.ts +6 -2
- package/types/series/map/geo-source.d.ts +3 -1
- package/types/series/map/tooltip-helper.d.ts +1 -1
- package/types/series/polar/polar.d.ts +2 -2
- package/types/series/range-area/range-area.d.ts +0 -2
- package/types/series/sankey/interface.d.ts +5 -0
- package/types/series/sankey/sankey.d.ts +10 -4
- package/types/series/sunburst/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/tooltip-helper.d.ts +1 -1
- 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.d.ts +9 -0
- package/types/series/word-cloud/base.d.ts +2 -0
- package/types/theme/builtin/common/series/venn.d.ts +2 -0
- package/types/typings/spec/chart.d.ts +2 -0
- package/types/typings/spec/common.d.ts +5 -2
- package/types/typings/tooltip/line.d.ts +4 -0
- package/types/typings/tooltip/tooltip.d.ts +1 -0
- package/types/util/data.d.ts +21 -4
- package/types/util/index.d.ts +1 -0
- package/types/util/math.d.ts +1 -1
- package/types/util/spec/index.d.ts +0 -5
|
@@ -4,7 +4,7 @@ import type { IRegion } from '../../region/interface';
|
|
|
4
4
|
import type { IMark } from '../../mark/interface';
|
|
5
5
|
import type { CoordinateType, IInvalidType, IPoint, DataKeyType, Datum, Maybe, ISeriesSpec, IGroup, ILayoutType, ILayoutPoint, ILayoutRect } from '../../typings';
|
|
6
6
|
import { BaseModel } from '../../model/base-model';
|
|
7
|
-
import type { ISeriesOption, ISeries, ISeriesMarkInitOption, ISeriesStackData, ISeriesTooltipHelper, SeriesMarkMap, ISeriesMarkInfo, ISeriesSpecInfo, ISeriesStackDataLeaf, ISeriesStackDataMeta } from '../interface';
|
|
7
|
+
import type { ISeriesOption, ISeries, ISeriesMarkInitOption, ISeriesStackData, ISeriesTooltipHelper, SeriesMarkMap, ISeriesMarkInfo, ISeriesSpecInfo, ISeriesStackDataLeaf, ISeriesStackDataMeta, ISeriesSeriesInfo } from '../interface';
|
|
8
8
|
import type { IModelEvaluateOption, IModelRenderOption } from '../../model/interface';
|
|
9
9
|
import type { AddVChartPropertyContext } from '../../data/transforms/add-property';
|
|
10
10
|
import type { IBaseInteractionSpec } from '../../interaction/interface';
|
|
@@ -78,6 +78,8 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
78
78
|
created(): void;
|
|
79
79
|
protected _buildMarkAttributeContext(): void;
|
|
80
80
|
setAttrFromSpec(): void;
|
|
81
|
+
protected getInvalidCheckFields(): string[];
|
|
82
|
+
protected initInvalidDataTransform(): void;
|
|
81
83
|
protected initData(): void;
|
|
82
84
|
protected initGroups(): void;
|
|
83
85
|
protected initStatisticalData(): void;
|
|
@@ -120,12 +122,13 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
120
122
|
setValueFieldToStackOffsetSilhouette(): void;
|
|
121
123
|
abstract getActiveMarks(): IMark[];
|
|
122
124
|
initRootMark(): void;
|
|
125
|
+
private _getExtensionMarkNamePrefix;
|
|
123
126
|
protected _initExtensionMark(options: {
|
|
124
127
|
hasAnimation: boolean;
|
|
125
128
|
depend?: IMark[];
|
|
126
129
|
}): void;
|
|
127
130
|
private _createExtensionMark;
|
|
128
|
-
protected _updateExtensionMarkSpec(
|
|
131
|
+
protected _updateExtensionMarkSpec(): void;
|
|
129
132
|
getStackData(): ISeriesStackData;
|
|
130
133
|
protected _parseSelectorOfInteraction(interactionSpec: IBaseInteractionSpec, marks: IMark[]): string[];
|
|
131
134
|
protected _parseDefaultInteractionConfig(mainMarks?: IMark[]): ({
|
|
@@ -184,21 +187,9 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
184
187
|
setLayoutRect({ width, height }: Partial<ILayoutRect>, levelMap?: Partial<ILayoutRect>): void;
|
|
185
188
|
getSeriesKeys(): string[];
|
|
186
189
|
getSeriesStyle(datum: Datum): (attribute: string) => unknown;
|
|
187
|
-
protected _getSeriesInfo(field: string, keys: string[]):
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
shapeType: string;
|
|
191
|
-
}[];
|
|
192
|
-
getSeriesInfoInField(field: string): {
|
|
193
|
-
key: string;
|
|
194
|
-
style: (attribute: string) => unknown;
|
|
195
|
-
shapeType: string;
|
|
196
|
-
}[];
|
|
197
|
-
getSeriesInfoList(): {
|
|
198
|
-
key: string;
|
|
199
|
-
style: (attribute: string) => unknown;
|
|
200
|
-
shapeType: string;
|
|
201
|
-
}[];
|
|
190
|
+
protected _getSeriesInfo(field: string, keys: string[]): ISeriesSeriesInfo[];
|
|
191
|
+
getSeriesInfoInField(field: string): ISeriesSeriesInfo[];
|
|
192
|
+
getSeriesInfoList(): ISeriesSeriesInfo[];
|
|
202
193
|
protected _getDefaultColorScale(): any;
|
|
203
194
|
protected _getDataScheme(): import("../..").ColorSchemeItem[] | import("../..").ProgressiveDataScheme<import("../..").ColorSchemeItem>;
|
|
204
195
|
getDefaultColorDomain(): any[];
|
|
@@ -226,4 +217,5 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
226
217
|
protected _getRelatedComponentSpecInfo(specKey: string): import("../../model/interface").IModelSpecInfo<any>[];
|
|
227
218
|
protected _forEachStackGroup(callback: (node: ISeriesStackDataLeaf) => void, node?: ISeriesStackDataMeta): void;
|
|
228
219
|
isDatumInViewData(datum: Datum): any;
|
|
220
|
+
getSeriesFieldValue(datum: Datum, seriesField?: string): any;
|
|
229
221
|
}
|
|
@@ -20,11 +20,14 @@ export declare class BaseSeriesTooltipHelper extends BaseTooltipHelper implement
|
|
|
20
20
|
protected _getMeasureData: (datum: any) => any;
|
|
21
21
|
protected _getSeriesFieldData: (datum: any) => any;
|
|
22
22
|
protected _getSeriesStyle: (datum: any, styleKey: string | string[], defaultValue?: any) => any;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
markTooltipKeyCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
24
|
+
markTooltipValueCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
25
|
+
shapeTypeCallback: (datum: Datum, params?: TooltipHandlerParams) => ShapeType | undefined;
|
|
26
|
+
shapeColorCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
27
|
+
shapeStrokeCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
28
|
+
dimensionTooltipTitleCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
29
|
+
groupTooltipTitleCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
30
|
+
groupTooltipKeyCallback: (datum: Datum, params?: TooltipHandlerParams) => string | undefined;
|
|
28
31
|
getDefaultTooltipPattern(activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]): ITooltipPattern | null;
|
|
29
32
|
}
|
|
30
33
|
export declare const addExtraInfoToTooltipTitlePattern: <T>(pattern: ITooltipPattern['title'], extraInfo: T | ((line: ITooltipLinePattern) => T), overwrite?: boolean) => ITooltipPattern['title'] | undefined;
|
|
@@ -6,7 +6,7 @@ export declare class BoxPlotSeriesTooltipHelper extends BaseSeriesTooltipHelper
|
|
|
6
6
|
getDefaultTooltipPattern(activeType: TooltipActiveType): ITooltipPattern | null;
|
|
7
7
|
getContentKey: (contentType: BOX_PLOT_TOOLTIP_KEYS) => (datum: any) => string;
|
|
8
8
|
getContentValue: (contentType: BOX_PLOT_TOOLTIP_KEYS) => (datum: any) => any;
|
|
9
|
-
|
|
9
|
+
shapeColorCallback: (datum: Datum) => any;
|
|
10
10
|
getOutlierFillColor: (datum: Datum) => any;
|
|
11
11
|
isOutlierMark: (datum: Datum) => boolean;
|
|
12
12
|
}
|
|
@@ -99,6 +99,6 @@ export declare abstract class CartesianSeries<T extends ICartesianSeriesSpec = I
|
|
|
99
99
|
getMeasureField(): string[];
|
|
100
100
|
protected initEvent(): void;
|
|
101
101
|
_sortDataInAxisDomain(): void;
|
|
102
|
-
protected
|
|
102
|
+
protected getInvalidCheckFields(): string[];
|
|
103
103
|
reInit(spec: T): void;
|
|
104
104
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Datum } from '../../typings';
|
|
2
2
|
import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
|
|
3
3
|
export declare class CirclePackingTooltipHelper extends BaseSeriesTooltipHelper {
|
|
4
|
-
|
|
4
|
+
markTooltipKeyCallback: (datum: Datum) => any;
|
|
5
5
|
}
|
|
@@ -3,7 +3,7 @@ import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
|
|
|
3
3
|
import type { TooltipHandlerParams } from '../../component/tooltip/interface';
|
|
4
4
|
import type { Datum } from '@visactor/vgrammar-core';
|
|
5
5
|
export declare class FunnelSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
dimensionTooltipTitleCallback: (datum: Datum, params?: TooltipHandlerParams) => any;
|
|
7
|
+
markTooltipValueCallback: (datum: Datum, params?: TooltipHandlerParams) => any;
|
|
8
|
+
markTooltipKeyCallback: (datum: Datum, params?: TooltipHandlerParams) => any;
|
|
9
9
|
}
|
|
@@ -33,6 +33,7 @@ export declare abstract class GeoSeries<T extends IGeoSeriesSpec = IGeoSeriesSpe
|
|
|
33
33
|
getGroupFields(): string[];
|
|
34
34
|
dataToPosition(datum: any, checkInViewData?: boolean): IPoint | null;
|
|
35
35
|
protected nameToPosition(datum: any): IPoint | null;
|
|
36
|
+
nameValueToPosition(name: string): IPoint | null;
|
|
36
37
|
abstract getDatumCenter(datum: any): [number, number];
|
|
37
38
|
abstract getDatumName(datum: any): string;
|
|
38
39
|
dataToLatitude(latValue: number): number;
|
package/types/series/index.d.ts
CHANGED
|
@@ -63,8 +63,12 @@ import type { IProgressLikeSeriesSpec } from './polar/progress-like';
|
|
|
63
63
|
import { ProgressLikeSeries } from './polar/progress-like';
|
|
64
64
|
import type { IRoseLikeSeriesSpec } from './polar/rose-like';
|
|
65
65
|
import { RoseLikeSeries } from './polar/rose-like';
|
|
66
|
+
import type { ILiquidSeriesSpec } from './liquid/interface';
|
|
67
|
+
import { LiquidSeries, registerLiquidSeries } from './liquid/liquid';
|
|
68
|
+
import type { IVennSeriesSpec } from './venn/interface';
|
|
69
|
+
import { VennSeries, registerVennSeries } from './venn/venn';
|
|
66
70
|
import type { ISeries, ICartesianSeries, IPolarSeries, IGeoSeries } from './interface';
|
|
67
|
-
export { WaterfallSeries, Bar3dSeries, BarSeries, BoxPlotSeries, LineSeries, RadarSeries, RangeAreaSeries, RangeColumn3dSeries, RangeColumnSeries, MapSeries, Pie3dSeries, PieSeries, SankeySeries, ScatterSeries, SunburstSeries, RoseLikeSeries, RoseSeries, AreaSeries, DotSeries, LinearProgressSeries, LinkSeries, CirclePackingSeries, CircularProgressSeries, WordCloud3dSeries, WordCloudSeries, Funnel3dSeries, FunnelSeries, TreemapSeries, GaugePointerSeries, GaugeSeries, HeatmapSeries, BaseSeries, CartesianSeries, PolarSeries, ProgressLikeSeries, CorrelationSeries };
|
|
68
|
-
export { registerAreaSeries, registerBar3dSeries, registerBarSeries, registerBoxplotSeries, registerCirclePackingSeries, registerCircularProgressSeries, registerDotSeries, registerFunnel3dSeries, registerFunnelSeries, registerGaugePointerSeries, registerGaugeSeries, registerHeatmapSeries, registerLineSeries, registerLinearProgressSeries, registerLinkSeries, registerMapSeries, registerPie3dSeries, registerPieSeries, registerRadarSeries, registerRangeAreaSeries, registerRangeColumn3dSeries, registerRangeColumnSeries, registerRoseSeries, registerSankeySeries, registerScatterSeries, registerSunBurstSeries, registerTreemapSeries, registerWaterfallSeries, registerWordCloud3dSeries, registerWordCloudSeries };
|
|
69
|
-
export type { ISeries, ICartesianSeries, IPolarSeries, IGeoSeries, IRoseLikeSeriesSpec, IAreaSeriesSpec, IBar3dSeriesSpec, IBarSeriesSpec, IBoxPlotSeriesSpec, ICartesianSeriesSpec, ICirclePackingSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnel3dSeriesSpec, IFunnelSeriesSpec, IGaugePointerSeriesSpec, IGaugeSeriesSpec, IHeatmapSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPie3dSeriesSpec, IPieSeriesSpec, IPolarSeriesSpec, IProgressLikeSeriesSpec, IRadarSeriesSpec, IRangeAreaSeriesSpec, IRangeColumn3dSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, ISankeySeriesSpec, IScatterSeriesSpec, ISunburstSeriesSpec, ITreemapSeriesSpec, IWaterfallSeriesSpec, IWordCloud3dSeriesSpec, IWordCloudSeriesSpec, ICorrelationSeriesSpec };
|
|
71
|
+
export { WaterfallSeries, Bar3dSeries, BarSeries, BoxPlotSeries, LineSeries, RadarSeries, RangeAreaSeries, RangeColumn3dSeries, RangeColumnSeries, MapSeries, Pie3dSeries, PieSeries, SankeySeries, ScatterSeries, SunburstSeries, RoseLikeSeries, RoseSeries, AreaSeries, DotSeries, LinearProgressSeries, LinkSeries, CirclePackingSeries, CircularProgressSeries, WordCloud3dSeries, WordCloudSeries, Funnel3dSeries, FunnelSeries, TreemapSeries, GaugePointerSeries, GaugeSeries, HeatmapSeries, BaseSeries, CartesianSeries, PolarSeries, ProgressLikeSeries, CorrelationSeries, LiquidSeries, VennSeries };
|
|
72
|
+
export { registerAreaSeries, registerBar3dSeries, registerBarSeries, registerBoxplotSeries, registerCirclePackingSeries, registerCircularProgressSeries, registerDotSeries, registerFunnel3dSeries, registerFunnelSeries, registerGaugePointerSeries, registerGaugeSeries, registerHeatmapSeries, registerLineSeries, registerLinearProgressSeries, registerLinkSeries, registerMapSeries, registerPie3dSeries, registerPieSeries, registerRadarSeries, registerRangeAreaSeries, registerRangeColumn3dSeries, registerRangeColumnSeries, registerRoseSeries, registerSankeySeries, registerScatterSeries, registerSunBurstSeries, registerTreemapSeries, registerWaterfallSeries, registerWordCloud3dSeries, registerWordCloudSeries, registerLiquidSeries, registerVennSeries };
|
|
73
|
+
export type { ISeries, ICartesianSeries, IPolarSeries, IGeoSeries, IRoseLikeSeriesSpec, IAreaSeriesSpec, IBar3dSeriesSpec, IBarSeriesSpec, IBoxPlotSeriesSpec, ICartesianSeriesSpec, ICirclePackingSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnel3dSeriesSpec, IFunnelSeriesSpec, IGaugePointerSeriesSpec, IGaugeSeriesSpec, IHeatmapSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPie3dSeriesSpec, IPieSeriesSpec, IPolarSeriesSpec, IProgressLikeSeriesSpec, IRadarSeriesSpec, IRangeAreaSeriesSpec, IRangeColumn3dSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, ISankeySeriesSpec, IScatterSeriesSpec, ISunburstSeriesSpec, ITreemapSeriesSpec, IWaterfallSeriesSpec, IWordCloud3dSeriesSpec, IWordCloudSeriesSpec, ICorrelationSeriesSpec, ILiquidSeriesSpec, IVennSeriesSpec };
|
|
70
74
|
export * from './interface';
|
|
@@ -5,7 +5,7 @@ import type { IBaseModelSpecTransformerResult, IModelConstructor, IModelMarkInfo
|
|
|
5
5
|
import type { IRegion } from '../../region/interface';
|
|
6
6
|
import type { RenderMode } from '../../typings/spec/common';
|
|
7
7
|
import type { ISeries } from './series';
|
|
8
|
-
import type { IMarkProgressiveConfig } from '../../mark/interface';
|
|
8
|
+
import type { IMarkOption, IMarkProgressiveConfig } from '../../mark/interface';
|
|
9
9
|
import type { ISeriesSpec, StringOrNumber } from '../../typings';
|
|
10
10
|
import type { TransformedLabelSpec } from '../../component/label';
|
|
11
11
|
import type { SeriesMarkNameEnum, SeriesTypeEnum } from './type';
|
|
@@ -13,6 +13,7 @@ import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
|
13
13
|
import type { MarkClip } from '../../compile/mark';
|
|
14
14
|
export interface ISeriesSeriesInfo {
|
|
15
15
|
key: string;
|
|
16
|
+
originalKey: any;
|
|
16
17
|
index?: number;
|
|
17
18
|
style: (attribute: string) => any;
|
|
18
19
|
shapeType: string;
|
|
@@ -51,7 +52,7 @@ export type ISeriesStyleItem = {
|
|
|
51
52
|
style?: any;
|
|
52
53
|
};
|
|
53
54
|
};
|
|
54
|
-
export interface ISeriesMarkInitOption {
|
|
55
|
+
export interface ISeriesMarkInitOption extends Partial<IMarkOption> {
|
|
55
56
|
themeSpec?: any;
|
|
56
57
|
markSpec?: any;
|
|
57
58
|
skipBeforeLayouted?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ILabelInfo } from './../../component/label/label';
|
|
1
2
|
import type { PanEventParam, ZoomEventParam } from '../../event/interface';
|
|
2
3
|
import type { IModel } from '../../model/interface';
|
|
3
4
|
import type { DataSet, DataView, ITransformOptions } from '@visactor/vdataset';
|
|
@@ -15,6 +16,7 @@ import type { StatisticOperations } from '../../data/transforms/dimension-statis
|
|
|
15
16
|
import type { IGroupMark } from '../../mark/group';
|
|
16
17
|
import type { IGeoCoordinateHelper } from '../../component/geo/interface';
|
|
17
18
|
import type { ILabelMark } from '../../mark/label';
|
|
19
|
+
import type { BaseLegend } from '../../component/legend/base-legend';
|
|
18
20
|
export interface ISeries extends IModel {
|
|
19
21
|
readonly type: string;
|
|
20
22
|
readonly name?: string;
|
|
@@ -92,9 +94,13 @@ export interface ISeries extends IModel {
|
|
|
92
94
|
getInvalidType: () => IInvalidType;
|
|
93
95
|
getDefaultShapeType: () => string;
|
|
94
96
|
initLabelMarkStyle?: (labelMark: ILabelMark) => void;
|
|
97
|
+
initTotalLabelMarkStyle?: (labelMark: ILabelMark) => void;
|
|
98
|
+
getTotalLabelComponentStyle?: (info: Pick<ILabelInfo, 'baseMark' | 'labelMark'>) => any;
|
|
95
99
|
getGroupFields: () => string[];
|
|
96
100
|
getSpecInfo: () => ISeriesSpecInfo;
|
|
97
101
|
getMarkAttributeContext: () => ISeriesMarkAttributeContext;
|
|
102
|
+
getSeriesFieldValue: (datum: Datum, seriesField?: string) => any;
|
|
103
|
+
legendSelectedFilter?: (component: BaseLegend<any>, selectedKeys: StringOrNumber[]) => StringOrNumber[];
|
|
98
104
|
}
|
|
99
105
|
export interface ICartesianSeries extends ISeries {
|
|
100
106
|
readonly coordinate: 'cartesian';
|
|
@@ -158,6 +164,7 @@ export interface IGeoSeries extends ISeries {
|
|
|
158
164
|
dataToPosition: (datum: any, checkInViewData?: boolean) => IPoint | null;
|
|
159
165
|
dataToLatitude: (latValue: any) => number | null;
|
|
160
166
|
dataToLongitude: (lonValue: any) => number | null;
|
|
167
|
+
nameValueToPosition: (name: string) => IPoint | null;
|
|
161
168
|
positionToData: (p: IPoint) => any;
|
|
162
169
|
latitudeToData: (lat: number) => any;
|
|
163
170
|
longitudeToData: (lon: number) => any;
|
|
@@ -26,6 +26,7 @@ import { SeriesTypeEnum } from './type';
|
|
|
26
26
|
import type { SeriesMarkMap } from './common';
|
|
27
27
|
import type { IRangeAreaSeriesTheme } from '../range-area/interface';
|
|
28
28
|
import type { ILiquidSeriesTheme } from '../liquid/interface';
|
|
29
|
+
import type { IVennSeriesTheme } from '../venn/interface';
|
|
29
30
|
export interface ISeriesTheme {
|
|
30
31
|
[SeriesTypeEnum.bar]?: IBarSeriesTheme;
|
|
31
32
|
[SeriesTypeForThemeEnum.bar_vertical]?: IBarSeriesTheme;
|
|
@@ -86,6 +87,7 @@ export interface ISeriesTheme {
|
|
|
86
87
|
[SeriesTypeEnum.heatmap]?: IHeatmapSeriesTheme;
|
|
87
88
|
[SeriesTypeEnum.correlation]?: ICorrelationSeriesTheme;
|
|
88
89
|
[SeriesTypeEnum.liquid]?: ILiquidSeriesTheme;
|
|
90
|
+
[SeriesTypeEnum.venn]?: IVennSeriesTheme;
|
|
89
91
|
}
|
|
90
92
|
export declare enum SeriesTypeForThemeEnum {
|
|
91
93
|
area_horizontal = "area_horizontal",
|
|
@@ -5,9 +5,12 @@ import type { IDimensionInfo } from '../../event/events/dimension/interface';
|
|
|
5
5
|
export interface ISeriesTooltipHelper extends ITooltipHelper {
|
|
6
6
|
series: ISeries;
|
|
7
7
|
getDefaultTooltipPattern: (activeType: TooltipActiveType, dimensionInfo?: IDimensionInfo[]) => ITooltipPattern | null;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
markTooltipKeyCallback: TooltipContentCallback<string>;
|
|
9
|
+
markTooltipValueCallback: TooltipContentCallback<string>;
|
|
10
|
+
shapeTypeCallback: TooltipContentCallback<ShapeType>;
|
|
11
|
+
shapeColorCallback: TooltipContentCallback<string>;
|
|
12
|
+
shapeStrokeCallback: TooltipContentCallback<string>;
|
|
13
|
+
dimensionTooltipTitleCallback: TooltipContentCallback<string>;
|
|
14
|
+
groupTooltipTitleCallback: TooltipContentCallback<string>;
|
|
15
|
+
groupTooltipKeyCallback: TooltipContentCallback<string>;
|
|
13
16
|
}
|
|
@@ -32,7 +32,8 @@ export declare enum SeriesTypeEnum {
|
|
|
32
32
|
waterfall = "waterfall",
|
|
33
33
|
heatmap = "heatmap",
|
|
34
34
|
correlation = "correlation",
|
|
35
|
-
liquid = "liquid"
|
|
35
|
+
liquid = "liquid",
|
|
36
|
+
venn = "venn"
|
|
36
37
|
}
|
|
37
38
|
export declare const enum SeriesMarkNameEnum {
|
|
38
39
|
label = "label",
|
|
@@ -92,5 +93,8 @@ export declare const enum SeriesMarkNameEnum {
|
|
|
92
93
|
areaLabel = "areaLabel",
|
|
93
94
|
liquid = "liquid",
|
|
94
95
|
liquidBackground = "liquidBackground",
|
|
95
|
-
liquidOutline = "liquidOutline"
|
|
96
|
+
liquidOutline = "liquidOutline",
|
|
97
|
+
circle = "circle",
|
|
98
|
+
overlap = "overlap",
|
|
99
|
+
overlapLabel = "overlapLabel"
|
|
96
100
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ISeriesTooltipHelper } from '../interface';
|
|
2
2
|
import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
|
|
3
3
|
export declare class MapSeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
|
|
4
|
-
|
|
4
|
+
dimensionTooltipTitleCallback: (datum: any) => any;
|
|
5
5
|
}
|
|
@@ -54,7 +54,7 @@ export declare abstract class PolarSeries<T extends IPolarSeriesSpec = IPolarSer
|
|
|
54
54
|
onAngleAxisHelperUpdate(): void;
|
|
55
55
|
afterInitMark(): void;
|
|
56
56
|
protected _computeLayoutRadius(): number;
|
|
57
|
-
|
|
57
|
+
protected initEvent(): void;
|
|
58
58
|
_sortDataInAxisDomain(): void;
|
|
59
|
-
protected
|
|
59
|
+
protected getInvalidCheckFields(): string[];
|
|
60
60
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AreaSeries } from '../area/area';
|
|
2
2
|
import type { SeriesMarkMap } from '../interface';
|
|
3
3
|
import { SeriesTypeEnum } from '../interface/type';
|
|
4
|
-
import type { Datum } from '../../typings';
|
|
5
4
|
import type { IAreaSeriesSpec } from '../area/interface';
|
|
6
5
|
export declare class RangeAreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec> extends AreaSeries<T> {
|
|
7
6
|
static readonly type: string;
|
|
@@ -12,6 +11,5 @@ export declare class RangeAreaSeries<T extends IAreaSeriesSpec = IAreaSeriesSpec
|
|
|
12
11
|
initAreaMarkStyle(): void;
|
|
13
12
|
protected initTooltip(): void;
|
|
14
13
|
protected _isFieldAllValid(): boolean;
|
|
15
|
-
protected _getInvalidDefined(datum: Datum): boolean;
|
|
16
14
|
}
|
|
17
15
|
export declare const registerRangeAreaSeries: () => void;
|
|
@@ -25,6 +25,11 @@ export interface ISankeySeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimation
|
|
|
25
25
|
linkSortBy?: (a: SankeyLinkElement, b: SankeyLinkElement) => number;
|
|
26
26
|
nodeSortBy?: (a: SankeyNodeElement, b: SankeyNodeElement) => number;
|
|
27
27
|
setNodeLayer?: (datum: SankeyNodeDatum) => number;
|
|
28
|
+
dropIsolatedNode?: boolean;
|
|
29
|
+
nodeHeight?: number | ((node: SankeyNodeElement) => number);
|
|
30
|
+
linkHeight?: number | ((link: SankeyLinkElement, sourceNode: SankeyNodeElement, sourceNodeHeight: number) => number);
|
|
31
|
+
equalNodeHeight?: boolean;
|
|
32
|
+
linkOverlap?: 'start' | 'center' | 'end';
|
|
28
33
|
[SeriesMarkNameEnum.node]?: IMarkSpec<IRectMarkSpec>;
|
|
29
34
|
[SeriesMarkNameEnum.link]?: IMarkSpec<ILinkPathMarkSpec>;
|
|
30
35
|
emphasis?: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
2
2
|
import type { SeriesMarkMap } from '../interface';
|
|
3
3
|
import { SeriesTypeEnum } from '../interface/type';
|
|
4
|
-
import type { Datum } from '../../typings';
|
|
4
|
+
import type { Datum, StringOrNumber } from '../../typings';
|
|
5
5
|
import { SeriesData } from '../base/series-data';
|
|
6
6
|
import type { ISankeySeriesSpec } from './interface';
|
|
7
7
|
import type { ExtendEventParam } from '../../event/interface';
|
|
8
|
-
import type { IElement, IGlyphElement } from '@visactor/vgrammar-core';
|
|
8
|
+
import type { IElement, IGlyphElement, IMark as IVgrammarMark } from '@visactor/vgrammar-core';
|
|
9
9
|
import type { IMark } from '../../mark/interface';
|
|
10
10
|
export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpec> extends CartesianSeries<T> {
|
|
11
11
|
static readonly type: string;
|
|
@@ -30,6 +30,11 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
30
30
|
setAttrFromSpec(): void;
|
|
31
31
|
initData(): void;
|
|
32
32
|
initMark(): void;
|
|
33
|
+
protected _buildMarkAttributeContext(): void;
|
|
34
|
+
valueToNode(value: StringOrNumber | StringOrNumber[]): any;
|
|
35
|
+
valueToLink(value: StringOrNumber | StringOrNumber[]): any;
|
|
36
|
+
valueToPositionX(value: StringOrNumber | StringOrNumber[]): any;
|
|
37
|
+
valueToPositionY(value: StringOrNumber | StringOrNumber[]): any;
|
|
33
38
|
initMarkStyle(): void;
|
|
34
39
|
protected _initNodeMarkStyle(): void;
|
|
35
40
|
protected _initLinkMarkStyle(): void;
|
|
@@ -39,18 +44,19 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
39
44
|
protected initEvent(): void;
|
|
40
45
|
private nodesSeriesDataUpdate;
|
|
41
46
|
private linksSeriesDataUpdate;
|
|
42
|
-
protected
|
|
43
|
-
protected _handleRelatedClick: (params: ExtendEventParam) => void;
|
|
47
|
+
protected _handleEmphasisElement: (params: ExtendEventParam) => void;
|
|
44
48
|
protected _handleClearEmpty: () => void;
|
|
45
49
|
protected _handleNodeAdjacencyClick: (element: IElement) => void;
|
|
46
50
|
protected _handleLinkAdjacencyClick: (element: IGlyphElement) => void;
|
|
47
51
|
protected _handleNodeRelatedClick: (element: IElement) => void;
|
|
48
52
|
protected _handleLinkRelatedClick: (element: IGlyphElement) => void;
|
|
53
|
+
protected _highLightElements(vGrammarElements: IVgrammarMark['elements'], highlightNodes: string[]): void;
|
|
49
54
|
protected initTooltip(): void;
|
|
50
55
|
_setNodeOrdinalColorScale(): void;
|
|
51
56
|
getNodeList(): any;
|
|
52
57
|
_getNodeNameFromData(datum: Datum): any;
|
|
53
58
|
extractNamesFromTree(tree: any, categoryName: string): Set<unknown>;
|
|
59
|
+
extractNamesFromLink(links: any[]): Set<unknown>;
|
|
54
60
|
getDimensionField(): string[];
|
|
55
61
|
getMeasureField(): string[];
|
|
56
62
|
getRawDataStatisticsByField(field: string, isNumeric?: boolean): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Datum } from '../../typings';
|
|
2
2
|
import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
|
|
3
3
|
export declare class SunburstTooltipHelper extends BaseSeriesTooltipHelper {
|
|
4
|
-
|
|
4
|
+
markTooltipKeyCallback: (datum: Datum) => any;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
|
|
2
2
|
export declare class TreemapTooltipHelper extends BaseSeriesTooltipHelper {
|
|
3
3
|
get defaultShapeType(): string;
|
|
4
|
-
|
|
4
|
+
markTooltipKeyCallback: (datum: any) => any;
|
|
5
5
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';
|
|
2
|
+
export type VennMark = 'circle' | 'overlap';
|
|
3
|
+
export type VennAppearPreset = 'growIn' | 'fadeIn' | 'scaleIn';
|
|
4
|
+
export declare const vennCirclePresetAnimation: (preset: VennAppearPreset) => IAnimationTypeConfig;
|
|
5
|
+
export declare const vennOverlapPresetAnimation: (preset: VennAppearPreset) => IAnimationTypeConfig;
|
|
6
|
+
export declare const registerVennAnimation: () => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IArcMarkSpec, IPathMarkSpec } from '../../typings';
|
|
2
|
+
import type { IMarkSpec, IMarkTheme, ISeriesSpec } from '../../typings/spec';
|
|
3
|
+
import type { IAnimationSpec } from '../../animation/spec';
|
|
4
|
+
import type { VennAppearPreset, VennMark } from './animation';
|
|
5
|
+
import type { SeriesMarkNameEnum } from '../interface/type';
|
|
6
|
+
import type { ILabelSpec } from '../../component';
|
|
7
|
+
export interface IVennSeriesSpec extends ISeriesSpec, IAnimationSpec<VennMark, VennAppearPreset> {
|
|
8
|
+
type: 'venn';
|
|
9
|
+
categoryField?: string;
|
|
10
|
+
valueField: string;
|
|
11
|
+
[SeriesMarkNameEnum.circle]?: IMarkSpec<IArcMarkSpec>;
|
|
12
|
+
[SeriesMarkNameEnum.overlap]?: IMarkSpec<IPathMarkSpec>;
|
|
13
|
+
[SeriesMarkNameEnum.label]?: Omit<ILabelSpec, 'position'>;
|
|
14
|
+
[SeriesMarkNameEnum.overlapLabel]?: Omit<ILabelSpec, 'position'>;
|
|
15
|
+
}
|
|
16
|
+
export interface IVennSeriesTheme {
|
|
17
|
+
[SeriesMarkNameEnum.circle]?: Partial<IMarkTheme<IArcMarkSpec>>;
|
|
18
|
+
[SeriesMarkNameEnum.overlap]?: Partial<IMarkTheme<IPathMarkSpec>>;
|
|
19
|
+
[SeriesMarkNameEnum.label]?: Omit<ILabelSpec, 'position'>;
|
|
20
|
+
[SeriesMarkNameEnum.overlapLabel]?: Omit<ILabelSpec, 'position'>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getVennSeriesDataKey: (sets: string | string[]) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ISeriesSpec } from '../../typings';
|
|
2
|
+
import { BaseSeriesSpecTransformer } from '../base';
|
|
3
|
+
import type { IVennSeriesSpec, IVennSeriesTheme } from './interface';
|
|
4
|
+
export declare class VennSeriesSpecTransformer<T extends ISeriesSpec = Omit<IVennSeriesSpec, 'data'>, K extends IVennSeriesTheme = IVennSeriesTheme> extends BaseSeriesSpecTransformer<T, K> {
|
|
5
|
+
protected _transformLabelSpec(spec: T): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { IMark } from '../../mark/interface';
|
|
2
|
+
import type { Datum, IPoint, StringOrNumber } from '../../typings';
|
|
3
|
+
import type { SeriesMarkMap } from '../interface';
|
|
4
|
+
import { SeriesTypeEnum } from '../interface/type';
|
|
5
|
+
import type { IVennSeriesSpec } from './interface';
|
|
6
|
+
import type { ILabelMark } from '../../mark/label';
|
|
7
|
+
import { VennSeriesSpecTransformer } from './venn-transform';
|
|
8
|
+
import { BaseSeries } from '../base';
|
|
9
|
+
import type { BaseLegend } from '../../component/legend/base-legend';
|
|
10
|
+
export declare class VennSeries<T extends IVennSeriesSpec = IVennSeriesSpec> extends BaseSeries<T> {
|
|
11
|
+
static readonly type: string;
|
|
12
|
+
type: SeriesTypeEnum;
|
|
13
|
+
static readonly mark: SeriesMarkMap;
|
|
14
|
+
static readonly transformerConstructor: typeof VennSeriesSpecTransformer;
|
|
15
|
+
readonly transformerConstructor: typeof VennSeriesSpecTransformer;
|
|
16
|
+
private _circleMark;
|
|
17
|
+
private _overlapMark;
|
|
18
|
+
private _labelMark;
|
|
19
|
+
protected _spec: T;
|
|
20
|
+
private _viewBox;
|
|
21
|
+
protected _categoryField: string;
|
|
22
|
+
getCategoryField(): string;
|
|
23
|
+
setCategoryField(f: string): string;
|
|
24
|
+
protected _valueField: string;
|
|
25
|
+
getValueField(): string;
|
|
26
|
+
setValueField(f: string): string;
|
|
27
|
+
setAttrFromSpec(): void;
|
|
28
|
+
compile(): void;
|
|
29
|
+
protected _runVennTransform(render?: boolean): void;
|
|
30
|
+
initMark(): void;
|
|
31
|
+
initMarkStyle(): void;
|
|
32
|
+
protected _initCircleMarkStyle(): void;
|
|
33
|
+
protected _initOverlapMarkStyle(): void;
|
|
34
|
+
initLabelMarkStyle(labelMark: ILabelMark): void;
|
|
35
|
+
initOverlapLabelMarkStyle(labelMark: ILabelMark): void;
|
|
36
|
+
protected initTooltip(): void;
|
|
37
|
+
getDimensionField(): string[];
|
|
38
|
+
getMeasureField(): string[];
|
|
39
|
+
onLayoutEnd(ctx: any): void;
|
|
40
|
+
getDefaultShapeType(): string;
|
|
41
|
+
getActiveMarks(): IMark[];
|
|
42
|
+
getStatisticFields(): {
|
|
43
|
+
key: string;
|
|
44
|
+
operations: Array<'max' | 'min' | 'values'>;
|
|
45
|
+
}[];
|
|
46
|
+
getGroupFields(): string[];
|
|
47
|
+
dataToPosition(data: Datum, checkInViewData?: boolean): IPoint;
|
|
48
|
+
dataToPositionX(data: Datum): number;
|
|
49
|
+
dataToPositionY(data: Datum): number;
|
|
50
|
+
valueToPosition(value1: any, value2?: any): IPoint;
|
|
51
|
+
getStackGroupFields(): string[];
|
|
52
|
+
getStackValueField(): string;
|
|
53
|
+
protected _getSeriesInfo(field: string, keys: string[]): {
|
|
54
|
+
key: string;
|
|
55
|
+
originalKey: string;
|
|
56
|
+
style: (attribute: string) => unknown;
|
|
57
|
+
shapeType: string;
|
|
58
|
+
}[];
|
|
59
|
+
getSeriesFieldValue(datum: Datum, seriesField?: string): string;
|
|
60
|
+
legendSelectedFilter(component: BaseLegend<any>, selectedKeys: StringOrNumber[]): StringOrNumber[];
|
|
61
|
+
initAnimation(): void;
|
|
62
|
+
}
|
|
63
|
+
export declare const registerVennSeries: () => void;
|
|
@@ -2,7 +2,7 @@ import type { Datum, IMarkSpec, IMarkTheme, IRuleMarkSpec, ITextMarkSpec } from
|
|
|
2
2
|
import type { IAnimationSpec } from '../../animation/spec';
|
|
3
3
|
import type { WaterfallAppearPreset } from './animation';
|
|
4
4
|
import type { IBarSeriesSpec, IBarSeriesTheme } from '../bar/interface';
|
|
5
|
-
import type { ILabelSpec } from '../../component/label';
|
|
5
|
+
import type { ILabelSpec, ITotalLabelSpec } from '../../component/label';
|
|
6
6
|
import type { SeriesMarkNameEnum } from '../interface/type';
|
|
7
7
|
type WaterfallMarks = 'bar';
|
|
8
8
|
export interface IWaterfallTotalText {
|
|
@@ -40,6 +40,11 @@ export interface IWaterfallSeriesSpec extends Omit<IBarSeriesSpec, 'type' | 'lab
|
|
|
40
40
|
offset?: number;
|
|
41
41
|
valueType?: IWaterfallStackLabelValueType;
|
|
42
42
|
};
|
|
43
|
+
totalLabel?: ITotalLabelSpec & {
|
|
44
|
+
position?: IWaterfallStackLabelPosition;
|
|
45
|
+
offset?: number;
|
|
46
|
+
valueType?: IWaterfallStackLabelValueType;
|
|
47
|
+
};
|
|
43
48
|
[SeriesMarkNameEnum.label]?: ILabelSpec & {
|
|
44
49
|
visible: boolean;
|
|
45
50
|
offset?: number;
|
|
@@ -9,6 +9,7 @@ import type { ITextMark } from '../../mark/text';
|
|
|
9
9
|
import type { IModelEvaluateOption } from '../../model/interface';
|
|
10
10
|
import type { Datum } from '../../typings';
|
|
11
11
|
import type { ILabelMark } from '../../mark/label';
|
|
12
|
+
import type { ILabelInfo } from '../../component/label/label';
|
|
12
13
|
export declare const DefaultBandWidth = 6;
|
|
13
14
|
export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfallSeriesSpec> extends BarSeries<any> {
|
|
14
15
|
static readonly type: string;
|
|
@@ -33,6 +34,14 @@ export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfall
|
|
|
33
34
|
onEvaluateEnd(ctx: IModelEvaluateOption): void;
|
|
34
35
|
initMark(): void;
|
|
35
36
|
initLabelMarkStyle(labelMark: ILabelMark): void;
|
|
37
|
+
initTotalLabelMarkStyle(labelMark: ILabelMark): void;
|
|
38
|
+
getTotalLabelComponentStyle(info: Pick<ILabelInfo, 'baseMark' | 'labelMark'>): {
|
|
39
|
+
customLayoutFunc: (labels: import("@visactor/vrender-components").LabelItem[]) => import("@visactor/vrender-core").IText[];
|
|
40
|
+
dataFilter: (labels: import("@visactor/vrender-components").LabelItem[]) => import("@visactor/vrender-components").LabelItem[];
|
|
41
|
+
overlap: {
|
|
42
|
+
strategy: any;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
36
45
|
totalPositionX(datum: Datum, field: string, pos?: number): number;
|
|
37
46
|
totalPositionY(datum: Datum, field: string, pos?: number): number;
|
|
38
47
|
initMarkStyle(): void;
|
|
@@ -36,7 +36,9 @@ export declare class BaseWordCloudSeries<T extends IBaseWordCloudSeriesSpec = IB
|
|
|
36
36
|
protected _defaultFontFamily: string;
|
|
37
37
|
protected _keyWordColorCallback: (datum: Datum) => string;
|
|
38
38
|
protected _fillingColorCallback: (datum: Datum) => string;
|
|
39
|
+
protected _dataChange: boolean;
|
|
39
40
|
setAttrFromSpec(): void;
|
|
41
|
+
protected initData(): void;
|
|
40
42
|
protected _wordMark: ITextMark;
|
|
41
43
|
initMark(): void;
|
|
42
44
|
initMarkStyle(): void;
|
|
@@ -25,6 +25,7 @@ import type { IWaterfallChartSpec } from '../../chart/waterfall';
|
|
|
25
25
|
import type { ICorrelationChartSpec } from '../../chart/correlation';
|
|
26
26
|
import type { IWordCloudChartSpec, IWordCloud3dChartSpec } from '../../chart/word-cloud';
|
|
27
27
|
import type { IChartSpec } from './common';
|
|
28
|
+
import type { ILiquidChartSpec } from '../../chart/liquid/interface';
|
|
28
29
|
export interface ChartSpecMap {
|
|
29
30
|
readonly common: ICommonChartSpec;
|
|
30
31
|
readonly area: IAreaChartSpec;
|
|
@@ -58,5 +59,6 @@ export interface ChartSpecMap {
|
|
|
58
59
|
readonly circlePacking: ICirclePackingChartSpec;
|
|
59
60
|
readonly heatmap: IHeatmapChartSpec;
|
|
60
61
|
readonly correlation: ICorrelationChartSpec;
|
|
62
|
+
readonly liquid: ILiquidChartSpec;
|
|
61
63
|
}
|
|
62
64
|
export type ISpec = ChartSpecMap[keyof ChartSpecMap] | IChartSpec;
|