@visactor/vchart-types 1.10.5 → 1.10.6-alpha.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.
@@ -10,9 +10,9 @@ export declare function animationConfig<Preset extends string>(defaultConfig?: M
10
10
  dataIndex: (datum: any) => number;
11
11
  dataCount: () => number;
12
12
  }): MarkAnimationSpec;
13
- export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "exit" | "update" | "appear" | "enter" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
13
+ export declare function userAnimationConfig<M extends string, Preset extends string>(markName: SeriesMarkNameEnum | string, spec: IAnimationSpec<M, Preset>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "appear" | "enter" | "exit" | "disappear" | "update", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
14
14
  export declare function shouldMarkDoMorph(spec: ISeriesSpec & IAnimationSpec<string, string>, markName: string): boolean;
15
15
  export declare function isTimeLineAnimation(animationConfig: IAnimationConfig): boolean;
16
16
  export declare function isChannelAnimation(animationConfig: IAnimationConfig): boolean;
17
- export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "exit" | "update" | "appear" | "enter" | "disappear", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
17
+ export declare function uniformAnimationConfig<Preset extends string>(config: Partial<Record<IAnimationState, boolean | IStateAnimateSpec<Preset> | IAnimationConfig | IAnimationConfig[]>>, ctx: IModelMarkAttributeContext): Partial<Record<"none" | "normal" | "state" | "appear" | "enter" | "exit" | "disappear" | "update", boolean | IAnimationConfig | IAnimationConfig[] | IStateAnimateSpec<Preset>>>;
18
18
  export declare function isAnimationEnabledForSeries(series: ISeries): boolean;
@@ -1,3 +1,4 @@
1
+ import type { WaterfallSeries } from './../../series/waterfall/waterfall';
1
2
  import type { Datum } from '../../typings/common';
2
3
  import type { ILabelInfo } from './label';
3
4
  import type { LabelItem, Strategy } from '@visactor/vrender-components';
@@ -48,7 +49,9 @@ export declare function pieLabel(labelInfo: ILabelInfo): {
48
49
  position: import("@visactor/vrender-components").Functional<string>;
49
50
  smartInvert: boolean | import("@visactor/vrender-components").SmartInvertAttrs;
50
51
  };
51
- export declare function stackLabel(labelInfo: ILabelInfo): {
52
+ export declare function stackLabelX(datum2: Datum, series: WaterfallSeries, pos: string, offset: number): number;
53
+ export declare function stackLabelY(datum2: Datum, series: WaterfallSeries, pos: string, offset: number): number;
54
+ export declare function stackLabel(labelInfo: ILabelInfo, datumTransform?: (data: any) => any, attributeTransform?: (label: LabelItem, datum: Datum, att: any) => any): {
52
55
  customLayoutFunc: (labels: LabelItem[]) => import("@visactor/vrender-core").IText[];
53
56
  dataFilter: (labels: LabelItem[]) => LabelItem[];
54
57
  overlap: {
@@ -15,9 +15,9 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
15
15
  visible?: boolean;
16
16
  style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "visible" | "width" | "height">;
17
17
  };
18
- text?: string | number | string[] | number[] | {
18
+ text?: string | number | number[] | string[] | {
19
19
  type?: "text";
20
- text: string | number | string[] | number[];
20
+ text: string | number | number[] | string[];
21
21
  } | {
22
22
  type: "rich";
23
23
  text: import("@visactor/vrender-core").IRichTextCharacter[];
@@ -64,5 +64,5 @@ export declare class Factory {
64
64
  static getComponentPlugins(): IComponentPluginConstructor[];
65
65
  static getComponentPluginInType(type: string): IComponentPluginConstructor;
66
66
  static registerFormatter(func: typeof Factory['_formatter']): void;
67
- static getFormatter(): (text: string | number | string[] | number[], datum: any, formatter: string | string[]) => any;
67
+ static getFormatter(): (text: string | number | number[] | string[], datum: any, formatter: string | string[]) => any;
68
68
  }
@@ -59,7 +59,7 @@ export declare abstract class BaseTooltipHandler extends BasePlugin implements I
59
59
  };
60
60
  protected _isPointerMovingToTooltip(params: TooltipHandlerParams): boolean;
61
61
  protected _getParentElement(spec: ITooltipSpec): HTMLElement;
62
- getTooltipContainer(): IGroup | HTMLElement;
62
+ getTooltipContainer(): HTMLElement | IGroup;
63
63
  protected _initFromSpec(): void;
64
64
  reInit(): void;
65
65
  }
@@ -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';
@@ -92,6 +93,8 @@ export interface ISeries extends IModel {
92
93
  getInvalidType: () => IInvalidType;
93
94
  getDefaultShapeType: () => string;
94
95
  initLabelMarkStyle?: (labelMark: ILabelMark) => void;
96
+ initTotalLabelMarkStyle?: (labelMark: ILabelMark) => void;
97
+ getTotalLabelComponentStyle?: (info: Pick<ILabelInfo, 'baseMark' | 'labelMark'>) => any;
95
98
  getGroupFields: () => string[];
96
99
  getSpecInfo: () => ISeriesSpecInfo;
97
100
  getMarkAttributeContext: () => ISeriesMarkAttributeContext;
@@ -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,13 @@ 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
+ getTotalLabelComponentStyle(info: Pick<ILabelInfo, 'baseMark' | 'labelMark'>): {
38
+ customLayoutFunc: (labels: import("@visactor/vrender-components").LabelItem[]) => import("@visactor/vrender-core").IText[];
39
+ dataFilter: (labels: import("@visactor/vrender-components").LabelItem[]) => import("@visactor/vrender-components").LabelItem[];
40
+ overlap: {
41
+ strategy: any;
42
+ };
43
+ };
36
44
  totalPositionX(datum: Datum, field: string, pos?: number): number;
37
45
  totalPositionY(datum: Datum, field: string, pos?: number): number;
38
46
  initMarkStyle(): void;