@visactor/vchart-types 2.0.1-alpha.2 → 2.0.1-alpha.4
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/compile/compiler.d.ts +1 -0
- package/types/compile/interface/compilable-item.d.ts +1 -0
- package/types/component/axis/cartesian/band-axis.d.ts +8 -0
- package/types/component/axis/mixin/band-axis-mixin.d.ts +2 -0
- package/types/core/vchart.d.ts +1 -0
- package/types/mark/base/base-mark.d.ts +4 -2
- package/types/mark/group.d.ts +3 -2
- package/types/mark/interface/common.d.ts +4 -1
- package/types/model/base-model.d.ts +4 -1
- package/types/model/interface.d.ts +3 -1
|
@@ -34,6 +34,7 @@ export declare class Compiler implements ICompiler {
|
|
|
34
34
|
private _layoutState?;
|
|
35
35
|
private _compileChart;
|
|
36
36
|
constructor(container: IRenderContainer, option: IRenderOption);
|
|
37
|
+
getChart(): IChart;
|
|
37
38
|
getCanvas(): HTMLCanvasElement | undefined;
|
|
38
39
|
_gestureController?: Gesture;
|
|
39
40
|
getStage(): IStage | undefined;
|
|
@@ -43,5 +43,13 @@ export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICarte
|
|
|
43
43
|
maxBandSize: number;
|
|
44
44
|
minBandSize: number;
|
|
45
45
|
};
|
|
46
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
47
|
+
change: boolean;
|
|
48
|
+
reMake: boolean;
|
|
49
|
+
reRender: boolean;
|
|
50
|
+
reSize: boolean;
|
|
51
|
+
reCompile: boolean;
|
|
52
|
+
};
|
|
53
|
+
reInit(spec?: T): void;
|
|
46
54
|
}
|
|
47
55
|
export declare const registerCartesianBandAxis: () => void;
|
|
@@ -33,10 +33,12 @@ export interface BandAxisMixin {
|
|
|
33
33
|
_forceLayout: () => void;
|
|
34
34
|
_getNormalizedValue: (values: any[], length: number) => number;
|
|
35
35
|
_onTickDataChange: (compilableData: CompilableData) => void;
|
|
36
|
+
registerTicksTransform: () => string;
|
|
36
37
|
}
|
|
37
38
|
export declare class BandAxisMixin {
|
|
38
39
|
private _tickDataMap;
|
|
39
40
|
protected _initData(): void;
|
|
41
|
+
protected _updateData(): void;
|
|
40
42
|
protected _rawDomainIndex: {
|
|
41
43
|
[key: string | number | symbol]: number;
|
|
42
44
|
}[];
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ export declare class VChart implements IVChart {
|
|
|
179
179
|
getScale(scaleId: string): import("@visactor/vscale").IBaseScale;
|
|
180
180
|
setDimensionIndex(value: StringOrNumber, opt?: DimensionIndexOption): void;
|
|
181
181
|
stopAnimation(): void;
|
|
182
|
+
reRunNormalAnimation(): void;
|
|
182
183
|
pauseAnimation(): void;
|
|
183
184
|
resumeAnimation(): void;
|
|
184
185
|
convertDatumToPosition(datum: Datum, dataLinkInfo?: DataLinkSeries, isRelativeToCanvas?: boolean, checkInViewData?: boolean): IPoint | null;
|
|
@@ -44,6 +44,9 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
44
44
|
protected _animationConfig: Partial<MarkAnimationSpec>;
|
|
45
45
|
getAnimationConfig(): Partial<MarkAnimationSpec>;
|
|
46
46
|
setAnimationConfig(config: Partial<MarkAnimationSpec>): void;
|
|
47
|
+
protected _disabledAnimationStates?: string[];
|
|
48
|
+
disableAnimationByState(state: string | string[]): void;
|
|
49
|
+
enableAnimationByState(state: string | string[]): void;
|
|
47
50
|
private _skipBeforeLayouted;
|
|
48
51
|
setSkipBeforeLayouted(skip: boolean): void;
|
|
49
52
|
protected _groupKey?: string;
|
|
@@ -123,6 +126,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
123
126
|
protected _attrsByGroup?: Record<string, T>;
|
|
124
127
|
protected _getDataByKey(data: Datum[]): GroupedData<Datum>;
|
|
125
128
|
protected _getCommonContext(): {
|
|
129
|
+
compiler: import("../../compile/interface").ICompiler;
|
|
126
130
|
markType: MarkTypeEnum;
|
|
127
131
|
markId: number;
|
|
128
132
|
modelId: number;
|
|
@@ -180,8 +184,6 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
|
|
|
180
184
|
protected _runProgressiveApplyGraphic(graphics: IMarkGraphic[]): void;
|
|
181
185
|
protected _runProgressiveStep(): void;
|
|
182
186
|
renderProgressive(): void;
|
|
183
|
-
protected _aniamtionStateCallback: (g: IMarkGraphic) => AnimationStateValues;
|
|
184
|
-
updateAnimationState(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
|
|
185
187
|
hasAnimationByState(state: AnimationStateValues): boolean;
|
|
186
188
|
hasAnimation(): boolean;
|
|
187
189
|
runAnimation(): void;
|
package/types/mark/group.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Maybe } from '../typings';
|
|
2
2
|
import type { IGroupMarkSpec } from '../typings/visual';
|
|
3
3
|
import { BaseMark } from './base/base-mark';
|
|
4
|
-
import {
|
|
4
|
+
import { DiffState, type IGroupMark, type IMark, type IMarkGraphic, type MarkType } from './interface';
|
|
5
5
|
import { MarkTypeEnum } from './interface/type';
|
|
6
6
|
import { type IMarkCompileOption } from '../compile/mark';
|
|
7
7
|
import type { IGroup, IGroupGraphicAttribute } from '@visactor/vrender-core';
|
|
@@ -10,6 +10,7 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
|
|
|
10
10
|
readonly type = MarkTypeEnum.group;
|
|
11
11
|
protected _marks: IMark[];
|
|
12
12
|
getMarks(): IMark[];
|
|
13
|
+
protected _diffState: DiffState;
|
|
13
14
|
protected _product: Maybe<IGroup>;
|
|
14
15
|
getProduct: () => Maybe<IGroup>;
|
|
15
16
|
protected isMarkExist(mark: IMark): boolean;
|
|
@@ -23,8 +24,8 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
|
|
|
23
24
|
protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
|
|
24
25
|
getGraphics(): IMarkGraphic[];
|
|
25
26
|
renderInner(): void;
|
|
27
|
+
clearExitGraphics(): void;
|
|
26
28
|
render(): void;
|
|
27
|
-
updateAnimationState(callback: (g: IMarkGraphic) => AnimationStateValues): void;
|
|
28
29
|
release(): void;
|
|
29
30
|
}
|
|
30
31
|
export declare const registerGroupMark: () => void;
|
|
@@ -8,6 +8,7 @@ import type { Datum, StringOrNumber } from '../../typings';
|
|
|
8
8
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
9
9
|
import type { IGroupMark } from './mark';
|
|
10
10
|
import type { IAnimationConfig } from '../../animation/interface';
|
|
11
|
+
import type { ICompiler } from '../../compile/interface';
|
|
11
12
|
export interface VisualScaleType {
|
|
12
13
|
scale: IBaseScale;
|
|
13
14
|
field: StringOrNumber;
|
|
@@ -37,6 +38,7 @@ export type IMarkStyle<T extends ICommonSpec> = {
|
|
|
37
38
|
export type DiffStateValues = 'update' | 'enter' | 'exit';
|
|
38
39
|
export type AnimationStateValues = 'appear' | 'enter' | 'update' | 'exit' | 'disappear' | 'none' | 'state';
|
|
39
40
|
export interface IGraphicContext {
|
|
41
|
+
compiler: ICompiler;
|
|
40
42
|
markType: MarkTypeEnum;
|
|
41
43
|
markId: number;
|
|
42
44
|
modelId: number;
|
|
@@ -92,9 +94,10 @@ export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
|
|
|
92
94
|
restartProgressive: () => void;
|
|
93
95
|
renderProgressive: () => void;
|
|
94
96
|
canAnimateAfterProgressive: () => boolean;
|
|
95
|
-
updateAnimationState: (callback: (graphic: IMarkGraphic) => AnimationStateValues) => void;
|
|
96
97
|
runAnimation: () => void;
|
|
97
98
|
needClear?: boolean;
|
|
99
|
+
disableAnimationByState: (state: string | string[]) => void;
|
|
100
|
+
enableAnimationByState: (state: string | string[]) => void;
|
|
98
101
|
}
|
|
99
102
|
export type IMark = IMarkRaw<ICommonSpec>;
|
|
100
103
|
export interface ICompileMarkConfig extends IMarkConfig {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IEvent } from '../event/interface';
|
|
2
2
|
import type { IEffect, IModel, IModelInitOption, IModelOption, IModelEvaluateOption, IModelSpec, IModelMarkInfo, IModelSpecInfo } from './interface';
|
|
3
3
|
import type { CoordinateType } from '../typings/coordinate';
|
|
4
|
-
import type { ICompileMarkConfig, IMark, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
|
|
4
|
+
import type { AnimationStateValues, ICompileMarkConfig, IMark, IMarkGraphic, IMarkOption, IMarkRaw, IMarkStyle } from '../mark/interface';
|
|
5
5
|
import type { Datum, StateValueType, ConvertToMarkStyleSpec, ICommonSpec, StringOrNumber, IRect, ILayoutRect } from '../typings';
|
|
6
6
|
import { MarkSet } from '../mark/mark-set';
|
|
7
7
|
import type { ILayoutItem } from '../layout/interface';
|
|
@@ -78,4 +78,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
|
|
|
78
78
|
getColorScheme(): any;
|
|
79
79
|
getSpecInfo(): IModelSpecInfo<any>;
|
|
80
80
|
getSpecIndex(): number;
|
|
81
|
+
private _aniamtionStateCallback;
|
|
82
|
+
updateAnimateStateCallback(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
|
|
83
|
+
getAnimationStateCallback(): (graphic: IMarkGraphic) => AnimationStateValues;
|
|
81
84
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
2
|
import type { DataSet, DataView } from '@visactor/vdataset';
|
|
3
3
|
import type { IEvent, IEventDispatcher } from '../event/interface';
|
|
4
|
-
import type { IMark, IMarkRaw, IMarkStyle, MarkTypeEnum } from '../mark/interface';
|
|
4
|
+
import type { AnimationStateValues, IMark, IMarkGraphic, IMarkRaw, IMarkStyle, MarkTypeEnum } from '../mark/interface';
|
|
5
5
|
import type { RenderMode } from '../typings/spec/common';
|
|
6
6
|
import type { StringOrNumber } from '../typings/common';
|
|
7
7
|
import type { IGroupMarkSpec, ConvertToMarkStyleSpec, ICommonSpec } from '../typings/visual';
|
|
@@ -87,6 +87,8 @@ export interface IModel extends ICompilable {
|
|
|
87
87
|
setMarkStyle: <T extends ICommonSpec>(mark?: IMarkRaw<T>, style?: Partial<IMarkStyle<T> | ConvertToMarkStyleSpec<T>>, state?: StateValueType, level?: number) => void;
|
|
88
88
|
initMarkStyleWithSpec: (mark?: IMark, spec?: any) => void;
|
|
89
89
|
getSpecInfo: () => IModelSpecInfo;
|
|
90
|
+
updateAnimateStateCallback: (callback: (graphic: IMarkGraphic) => AnimationStateValues) => void;
|
|
91
|
+
getAnimationStateCallback: () => (graphic: IMarkGraphic) => AnimationStateValues;
|
|
90
92
|
}
|
|
91
93
|
export interface ILayoutModel extends IModel {
|
|
92
94
|
getLayoutStartPoint: () => IPoint;
|