@visactor/vchart-types 1.12.4 → 1.12.6
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/chart/mosaic/mosaic.d.ts +0 -1
- package/types/chart/pie/interface.d.ts +2 -2
- package/types/chart/polar/interface.d.ts +2 -0
- package/types/compile/mark/compilable-mark.d.ts +1 -4
- package/types/compile/mark/interface.d.ts +1 -2
- package/types/component/axis/base-axis.d.ts +1 -2
- package/types/component/axis/cartesian/axis.d.ts +1 -0
- package/types/component/axis/polar/axis.d.ts +0 -1
- package/types/component/axis/polar/interface/spec.d.ts +3 -1
- package/types/component/custom-mark/custom-mark.d.ts +1 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +0 -3
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +0 -3
- package/types/component/interface/common.d.ts +1 -1
- package/types/component/label/base-label.d.ts +1 -2
- package/types/component/label/interface.d.ts +2 -2
- package/types/component/label/label.d.ts +0 -1
- package/types/component/label/total-label.d.ts +1 -1
- package/types/component/label/util.d.ts +1 -1
- package/types/component/legend/util.d.ts +2 -2
- package/types/component/player/player.d.ts +1 -3
- package/types/component/tooltip/tooltip.d.ts +1 -3
- package/types/component/util.d.ts +3 -0
- package/types/core/vchart.d.ts +1 -1
- package/types/series/base/base-series.d.ts +6 -5
- package/types/series/dot/dot.d.ts +0 -1
- package/types/series/gauge/interface.d.ts +1 -1
- package/types/series/polar/animation.d.ts +9 -11
- package/types/series/radar/animation.d.ts +0 -3
- package/types/typings/spec/common.d.ts +6 -2
- package/types/util/math.d.ts +1 -0
|
@@ -12,7 +12,6 @@ export declare class MosaicChart<T extends IMosaicChartSpec = IMosaicChartSpec>
|
|
|
12
12
|
readonly type: string;
|
|
13
13
|
readonly seriesType: string;
|
|
14
14
|
protected _stack: Stack;
|
|
15
|
-
afterCompile(): void;
|
|
16
15
|
protected _beforeInit(): void;
|
|
17
16
|
protected _initStack(): void;
|
|
18
17
|
handleAfterStackRegion: (region: IRegion, stackValueGroup: {
|
|
@@ -3,9 +3,9 @@ import type { IIndicatorSpec } from '../../component/indicator/interface';
|
|
|
3
3
|
import type { IChartExtendsSeriesSpec, IChartSpec } from '../../typings/spec/common';
|
|
4
4
|
export interface IPieChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IPieSeriesSpec> {
|
|
5
5
|
type: 'pie';
|
|
6
|
-
indicator?: IIndicatorSpec;
|
|
6
|
+
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
7
7
|
}
|
|
8
8
|
export interface IPie3dChartSpec extends IChartSpec, IChartExtendsSeriesSpec<IPie3dSeriesSpec> {
|
|
9
9
|
type: 'pie3d';
|
|
10
|
-
indicator?: IIndicatorSpec;
|
|
10
|
+
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
11
11
|
}
|
|
@@ -2,8 +2,10 @@ import type { IPointLike } from '@visactor/vutils';
|
|
|
2
2
|
import type { IPolarAxisSpec } from '../../component/axis/polar/interface';
|
|
3
3
|
import type { IPolarCrosshairSpec } from '../../component/crosshair/interface';
|
|
4
4
|
import type { IChartSpec, ILayoutRect } from '../../typings';
|
|
5
|
+
import type { IIndicatorSpec } from '../../component';
|
|
5
6
|
export interface IPolarChartSpec extends IChartSpec {
|
|
6
7
|
axes?: IPolarAxisSpec[];
|
|
7
8
|
crosshair?: IPolarCrosshairSpec | IPolarCrosshairSpec[];
|
|
8
9
|
layoutRadius?: 'auto' | number | ((layoutRect: ILayoutRect, center: IPointLike) => number);
|
|
10
|
+
indicator?: IIndicatorSpec | IIndicatorSpec[];
|
|
9
11
|
}
|
|
@@ -21,9 +21,6 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
21
21
|
protected _support3d?: boolean;
|
|
22
22
|
getSupport3d(): boolean;
|
|
23
23
|
setSupport3d(support3d: boolean): void;
|
|
24
|
-
protected _facet?: string;
|
|
25
|
-
getFacet(): string;
|
|
26
|
-
setFacet(facet: string): void;
|
|
27
24
|
protected _interactive: boolean;
|
|
28
25
|
getInteractive(): boolean;
|
|
29
26
|
setInteractive(interactive: boolean): void;
|
|
@@ -101,7 +98,7 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
101
98
|
compileEncode(): void;
|
|
102
99
|
compileState(): void;
|
|
103
100
|
compileAnimation(): void;
|
|
104
|
-
compileContext(): void;
|
|
101
|
+
compileContext(extraContext?: any): void;
|
|
105
102
|
compileSignal(): void;
|
|
106
103
|
protected _computeAttribute(key: string, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => any;
|
|
107
104
|
protected compileCommonAttributeCallback(key: string, state: string): MarkFunctionCallback<any>;
|
|
@@ -28,8 +28,6 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
28
28
|
setData: (d: MarkData) => void;
|
|
29
29
|
getDataView: () => DataView | undefined;
|
|
30
30
|
setDataView: (d?: DataView, productId?: string) => void;
|
|
31
|
-
getFacet: () => string | undefined;
|
|
32
|
-
setFacet: (facet: string) => void;
|
|
33
31
|
state: MarkStateManager;
|
|
34
32
|
readonly stateStyle: IMarkStateStyle<any>;
|
|
35
33
|
hasState: (state: string) => boolean;
|
|
@@ -83,6 +81,7 @@ export interface IMarkDataInitOption extends ICompilableMarkOption {
|
|
|
83
81
|
export interface IMarkCompileOption extends GrammarItemCompileOption {
|
|
84
82
|
group?: string | IGroupMark;
|
|
85
83
|
ignoreChildren?: boolean;
|
|
84
|
+
context?: any;
|
|
86
85
|
}
|
|
87
86
|
export interface IStateInfo {
|
|
88
87
|
stateValue: StateValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ITickDataOpt } from '@visactor/vrender-components';
|
|
2
2
|
import type { IBaseScale } from '@visactor/vscale';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
4
4
|
import type { IOrientType, IPolarOrientType, StringOrNumber, CoordinateType } from '../../typings';
|
|
5
5
|
import { BaseComponent } from '../base/base-component';
|
|
6
6
|
import { CompilableData } from '../../compile/data';
|
|
@@ -77,7 +77,6 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
77
77
|
reSize: boolean;
|
|
78
78
|
reCompile: boolean;
|
|
79
79
|
};
|
|
80
|
-
protected _delegateAxisContainerEvent(component: IGroup): void;
|
|
81
80
|
protected _getAxisAttributes(): any;
|
|
82
81
|
protected _getGridAttributes(): {
|
|
83
82
|
alternateColor: any;
|
|
@@ -47,7 +47,6 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
47
47
|
onRender(ctx: any): void;
|
|
48
48
|
changeRegions(): void;
|
|
49
49
|
protected _tickTransformOption(): IPolarTickDataOpt;
|
|
50
|
-
afterCompile(): void;
|
|
51
50
|
protected updateScaleRange(): boolean;
|
|
52
51
|
protected collectSeriesField(depth: number, series: IPolarSeries): string | string[];
|
|
53
52
|
protected abstract computeDomain(data: {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { IPointLike } from '@visactor/vutils';
|
|
2
|
+
import type { AxisLabelOverlap } from '@visactor/vrender-components';
|
|
2
3
|
import type { ILayoutRect, IPolarOrientType } from '../../../../typings';
|
|
3
4
|
import type { IBandAxisSpec, IDomainLine, ILinearAxisSpec, ITitle, ILabel, ICommonAxisSpec } from '../../interface';
|
|
4
5
|
import type { IPolarGrid } from './common';
|
|
5
6
|
export type IPolarAxisSpec = IPolarLinearAxisSpec | IPolarBandAxisSpec;
|
|
7
|
+
export type IPolarAxisLabel = ILabel & Pick<AxisLabelOverlap, 'autoHide' | 'autoHideMethod' | 'autoHideSeparation' | 'autoLimit' | 'limitEllipsis' | 'layoutFunc' | 'autoWrap'>;
|
|
6
8
|
export type IPolarAxisCommonSpec = Omit<ICommonAxisSpec, 'center'> & {
|
|
7
9
|
layoutRadius?: 'auto' | number | ((layoutRect: ILayoutRect, center: IPointLike) => number);
|
|
8
10
|
inside?: boolean;
|
|
@@ -11,7 +13,7 @@ export type IPolarAxisCommonSpec = Omit<ICommonAxisSpec, 'center'> & {
|
|
|
11
13
|
radius?: number;
|
|
12
14
|
subGrid?: IPolarGrid;
|
|
13
15
|
domainLine?: IDomainLine;
|
|
14
|
-
label?:
|
|
16
|
+
label?: IPolarAxisLabel;
|
|
15
17
|
title?: ITitle;
|
|
16
18
|
innerRadius?: number;
|
|
17
19
|
outerRadius?: number;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
2
|
import { ComponentTypeEnum } from '../interface/type';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
|
-
import type { IModelRenderOption
|
|
4
|
+
import type { IModelRenderOption } from '../../model/interface';
|
|
5
5
|
import type { EnableMarkType, ICustomMarkGroupSpec, ICustomMarkSpec, ILayoutRect } from '../../typings';
|
|
6
|
-
import type { Maybe } from '@visactor/vutils';
|
|
7
6
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
7
|
import type { IModelMarkAttributeContext } from '../../compile/mark/interface';
|
|
9
8
|
export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMarkType>> {
|
|
@@ -15,7 +14,6 @@ export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMark
|
|
|
15
14
|
layoutZIndex: number;
|
|
16
15
|
layoutLevel: number;
|
|
17
16
|
protected _spec: ICustomMarkSpec<Exclude<EnableMarkType, 'group'>> | ICustomMarkGroupSpec;
|
|
18
|
-
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
19
17
|
created(): void;
|
|
20
18
|
protected _markAttributeContext: IModelMarkAttributeContext;
|
|
21
19
|
getMarkAttributeContext(): IModelMarkAttributeContext;
|
|
@@ -33,7 +31,6 @@ export declare class CustomMark extends BaseComponent<ICustomMarkSpec<EnableMark
|
|
|
33
31
|
changeRegions(regions: IRegion[]): void;
|
|
34
32
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
35
33
|
onRender(ctx: IModelRenderOption): void;
|
|
36
|
-
afterCompile(): void;
|
|
37
34
|
private _getMarkAttributeContext;
|
|
38
35
|
private _getLayoutRect;
|
|
39
36
|
getBoundsInRect(rect: ILayoutRect): {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Maybe } from '@visactor/vutils';
|
|
2
1
|
import type { IComponentOption } from '../../interface';
|
|
3
2
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
4
3
|
import { DataFilterBaseComponent } from '../data-filter-base-component';
|
|
@@ -7,7 +6,6 @@ import type { IRectGraphicAttribute, ISymbolGraphicAttribute, IGraphic } from '@
|
|
|
7
6
|
import type { Datum, ILayoutType } from '../../../typings';
|
|
8
7
|
import type { ILinearScale, IBaseScale } from '@visactor/vscale';
|
|
9
8
|
import type { IDataZoomSpec } from './interface';
|
|
10
|
-
import type { IModelSpecInfo } from '../../../model/interface';
|
|
11
9
|
import { DataZoomSpecTransformer } from './data-zoom-transformer';
|
|
12
10
|
export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends DataFilterBaseComponent<T> {
|
|
13
11
|
static type: ComponentTypeEnum;
|
|
@@ -27,7 +25,6 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
27
25
|
protected _startHandlerSize: number;
|
|
28
26
|
protected _endHandlerSize: number;
|
|
29
27
|
protected _isReverseCache: boolean;
|
|
30
|
-
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
31
28
|
constructor(spec: T, options: IComponentOption);
|
|
32
29
|
created(): void;
|
|
33
30
|
setAttrFromSpec(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Maybe } from '@visactor/vutils';
|
|
2
1
|
import type { IComponentOption } from '../../interface';
|
|
3
2
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
4
3
|
import { DataFilterBaseComponent } from '../data-filter-base-component';
|
|
@@ -7,7 +6,6 @@ import { ScrollBar as ScrollBarComponent } from '@visactor/vrender-components';
|
|
|
7
6
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
7
|
import type { IScrollBarSpec } from './interface';
|
|
9
8
|
import type { ILayoutType } from '../../../typings/layout';
|
|
10
|
-
import type { IModelSpecInfo } from '../../../model/interface';
|
|
11
9
|
export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extends DataFilterBaseComponent<T> {
|
|
12
10
|
static type: ComponentTypeEnum;
|
|
13
11
|
type: ComponentTypeEnum;
|
|
@@ -18,7 +16,6 @@ export declare class ScrollBar<T extends IScrollBarSpec = IScrollBarSpec> extend
|
|
|
18
16
|
layoutLevel: number;
|
|
19
17
|
layoutType: ILayoutType;
|
|
20
18
|
protected _component: ScrollBarComponent;
|
|
21
|
-
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
22
19
|
constructor(spec: T, options: IComponentOption);
|
|
23
20
|
setAttrFromSpec(): void;
|
|
24
21
|
onLayoutEnd(ctx: any): void;
|
|
@@ -33,7 +33,7 @@ export interface IComponent extends ILayoutModel {
|
|
|
33
33
|
export interface IComponentConstructor extends IModelConstructor {
|
|
34
34
|
type: string;
|
|
35
35
|
specKey?: string;
|
|
36
|
-
getSpecInfo
|
|
36
|
+
getSpecInfo?: (chartSpec: any, chartSpecInfo?: IChartSpecInfo) => Maybe<IModelSpecInfo[]>;
|
|
37
37
|
createComponent: (specInfo: IModelSpecInfo, options: IComponentOption) => IComponent;
|
|
38
38
|
new (spec: any, options: IComponentOption): IComponent;
|
|
39
39
|
}
|
|
@@ -4,7 +4,7 @@ import { ComponentTypeEnum } from '../interface/type';
|
|
|
4
4
|
import type { IRegion } from '../../region/interface';
|
|
5
5
|
import type { IModelRenderOption } from '../../model/interface';
|
|
6
6
|
import type { ILabelSpec } from './interface';
|
|
7
|
-
import type { IGraphic
|
|
7
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
8
8
|
export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<T> {
|
|
9
9
|
static type: ComponentTypeEnum;
|
|
10
10
|
type: ComponentTypeEnum;
|
|
@@ -32,5 +32,4 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
32
32
|
onRender(ctx: IModelRenderOption): void;
|
|
33
33
|
changeRegions(regions: IRegion[]): void;
|
|
34
34
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
35
|
-
protected _delegateLabelEvent(component: IGroup): void;
|
|
36
35
|
}
|
|
@@ -6,7 +6,7 @@ import type { ISeries } from '../../series';
|
|
|
6
6
|
export interface ILabelFormatMethodContext {
|
|
7
7
|
series?: ISeries;
|
|
8
8
|
}
|
|
9
|
-
export interface ILabelSpec extends IComponentSpec {
|
|
9
|
+
export interface ILabelSpec extends IComponentSpec, ILabelAnimationSpec {
|
|
10
10
|
visible?: boolean;
|
|
11
11
|
interactive?: boolean;
|
|
12
12
|
textType?: 'text' | 'rich';
|
|
@@ -18,7 +18,6 @@ export interface ILabelSpec extends IComponentSpec {
|
|
|
18
18
|
state?: LabelStateStyle<Partial<IComposedTextMarkSpec>>;
|
|
19
19
|
overlap?: BaseLabelAttrs['overlap'];
|
|
20
20
|
smartInvert?: BaseLabelAttrs['smartInvert'];
|
|
21
|
-
animation?: BaseLabelAttrs['animation'];
|
|
22
21
|
stackDataFilterType?: 'min' | 'max';
|
|
23
22
|
dataFilter?: BaseLabelAttrs['dataFilter'];
|
|
24
23
|
customLayoutFunc?: BaseLabelAttrs['customLayoutFunc'];
|
|
@@ -27,6 +26,7 @@ export interface ILabelSpec extends IComponentSpec {
|
|
|
27
26
|
support3d?: boolean;
|
|
28
27
|
syncState?: boolean;
|
|
29
28
|
}
|
|
29
|
+
export type ILabelAnimationSpec = Pick<BaseLabelAttrs, 'animation' | 'animationEnter' | 'animationUpdate' | 'animationExit'>;
|
|
30
30
|
export type IMultiLabelSpec<T extends Omit<ILabelSpec, 'position'>> = T | T[];
|
|
31
31
|
type LabelStateStyle<T> = {
|
|
32
32
|
hover?: T;
|
|
@@ -40,7 +40,6 @@ export declare class Label<T extends IChartSpec = any> extends BaseLabelComponen
|
|
|
40
40
|
init(option: IModelInitOption): void;
|
|
41
41
|
reInit(spec?: T): void;
|
|
42
42
|
initEvent(): void;
|
|
43
|
-
afterCompile(): void;
|
|
44
43
|
protected _initTextMark(): void;
|
|
45
44
|
protected _initLabelComponent(): void;
|
|
46
45
|
protected _initTextMarkStyle(): void;
|
|
@@ -16,10 +16,10 @@ export declare class TotalLabel extends BaseLabelComponent {
|
|
|
16
16
|
private _baseMark?;
|
|
17
17
|
static getSpecInfo(chartSpec: any, chartSpecInfo?: IChartSpecInfo): Maybe<IModelSpecInfo[]>;
|
|
18
18
|
init(option: IModelInitOption): void;
|
|
19
|
+
reInit(spec?: any): void;
|
|
19
20
|
protected _initTextMark(): void;
|
|
20
21
|
_initTextMarkStyle(): void;
|
|
21
22
|
protected _initLabelComponent(): void;
|
|
22
|
-
afterCompile(): void;
|
|
23
23
|
updateLayoutAttribute(): void;
|
|
24
24
|
compileMarks(): void;
|
|
25
25
|
getVRenderComponents(): any[];
|
|
@@ -34,7 +34,7 @@ export declare function lineDataLabel(labelInfo: ILabelInfo): {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
export declare function barLabel(labelInfo: ILabelInfo): {
|
|
37
|
-
position:
|
|
37
|
+
position: (data: any) => string;
|
|
38
38
|
overlap: boolean | {
|
|
39
39
|
strategy: Strategy[];
|
|
40
40
|
};
|
|
@@ -13,7 +13,7 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
13
13
|
};
|
|
14
14
|
background?: {
|
|
15
15
|
visible?: boolean;
|
|
16
|
-
style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "
|
|
16
|
+
style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "width" | "height" | "visible">;
|
|
17
17
|
};
|
|
18
18
|
text?: string | number | number[] | string[] | {
|
|
19
19
|
type?: "text";
|
|
@@ -33,9 +33,9 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
33
33
|
} & import("@visactor/vrender-core").SimpleDomStyleOptions & import("@visactor/vrender-core").CommonDomOptions;
|
|
34
34
|
};
|
|
35
35
|
padding?: import("@visactor/vrender-components").Padding;
|
|
36
|
-
visible?: boolean;
|
|
37
36
|
maxWidth?: number;
|
|
38
37
|
minWidth?: number;
|
|
38
|
+
visible?: boolean;
|
|
39
39
|
space?: number;
|
|
40
40
|
align?: "start" | "end" | "center";
|
|
41
41
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
2
|
-
import type {
|
|
3
|
-
import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
2
|
+
import type { IModelRenderOption } from '../../model/interface';
|
|
4
3
|
import type { IRegion } from '../../region/interface';
|
|
5
4
|
import type { IPlayer } from './interface';
|
|
6
5
|
import type { IComponent } from '../interface';
|
|
@@ -28,7 +27,6 @@ export declare class Player extends BaseComponent<IPlayer> implements IComponent
|
|
|
28
27
|
private _position;
|
|
29
28
|
get orient(): IOrientType;
|
|
30
29
|
set layoutOrient(v: IOrientType);
|
|
31
|
-
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
32
30
|
setAttrFromSpec(): void;
|
|
33
31
|
afterSetLayoutStartPoint(pos: IPoint): void;
|
|
34
32
|
getBoundsInRect(rect: ILayoutRect, fullSpace: ILayoutRect): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../interface/type';
|
|
2
|
-
import type { IModelLayoutOption, IModelRenderOption
|
|
2
|
+
import type { IModelLayoutOption, IModelRenderOption } from '../../model/interface';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import { BaseComponent } from '../base/base-component';
|
|
5
5
|
import type { BaseEventParams, EventCallback, EventQuery, EventType } from '../../event/interface';
|
|
@@ -8,7 +8,6 @@ import type { Datum, IShowTooltipOption } from '../../typings';
|
|
|
8
8
|
import type { ITooltip, ITooltipActiveTypeAsKeys, ITooltipSpec, TooltipHandlerParams, TotalMouseEventData } from './interface';
|
|
9
9
|
import { TooltipResult } from './interface/common';
|
|
10
10
|
import { GroupTooltipProcessor, DimensionTooltipProcessor, MarkTooltipProcessor } from './processor';
|
|
11
|
-
import type { Maybe } from '@visactor/vutils';
|
|
12
11
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
13
12
|
import { TooltipSpecTransformer } from './tooltip-transformer';
|
|
14
13
|
export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
@@ -23,7 +22,6 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
23
22
|
layoutType: 'none';
|
|
24
23
|
private _timer?;
|
|
25
24
|
protected _spec: ITooltipSpec;
|
|
26
|
-
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
27
25
|
tooltipHandler?: ITooltipHandler;
|
|
28
26
|
processor: ITooltipActiveTypeAsKeys<MarkTooltipProcessor, DimensionTooltipProcessor, GroupTooltipProcessor>;
|
|
29
27
|
private _alwaysShow;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { Maybe } from '@visactor/vutils';
|
|
1
2
|
import type { ITheme } from '../theme';
|
|
2
3
|
import type { Datum } from '../typings';
|
|
4
|
+
import type { IModelSpecInfo } from '../model/interface';
|
|
3
5
|
export declare function getComponentThemeFromOption(type: string, chartTheme: ITheme): any;
|
|
4
6
|
export declare function getFormatFunction(formatMethod?: any, formatter?: string | string[], text?: string | number, datum?: Datum): {
|
|
5
7
|
formatFunc: any;
|
|
@@ -8,3 +10,4 @@ export declare function getFormatFunction(formatMethod?: any, formatter?: string
|
|
|
8
10
|
formatFunc?: undefined;
|
|
9
11
|
args?: undefined;
|
|
10
12
|
};
|
|
13
|
+
export declare const getSpecInfo: <T extends Record<string, any>>(chartSpec: any, specKey: string, compType: string, filter?: (spec: T) => boolean) => IModelSpecInfo<T>[];
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare class VChart implements IVChart {
|
|
|
74
74
|
private _context;
|
|
75
75
|
private _isReleased;
|
|
76
76
|
private _chartPlugin?;
|
|
77
|
+
private _onResize?;
|
|
77
78
|
constructor(spec: ISpec, options: IInitOption);
|
|
78
79
|
private _setNewSpec;
|
|
79
80
|
private _getSpecFromOriginalSpec;
|
|
@@ -89,7 +90,6 @@ export declare class VChart implements IVChart {
|
|
|
89
90
|
height: number;
|
|
90
91
|
};
|
|
91
92
|
private _doResize;
|
|
92
|
-
private _onResize;
|
|
93
93
|
private _initDataSet;
|
|
94
94
|
updateCustomConfigAndRerender(updateSpecResult: IUpdateSpecResult | (() => IUpdateSpecResult), sync?: boolean, option?: IVChartRenderOption): IVChart | Promise<IVChart>;
|
|
95
95
|
protected _updateCustomConfigAndRecompile(updateSpecResult: IUpdateSpecResult, option?: IVChartRenderOption): boolean;
|
|
@@ -2,10 +2,10 @@ import { DataView } from '@visactor/vdataset';
|
|
|
2
2
|
import type { DataSet, ITransformOptions } from '@visactor/vdataset';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import type { IMark } from '../../mark/interface';
|
|
5
|
-
import type { CoordinateType, IInvalidType, IPoint, DataKeyType, Datum, Maybe, ISeriesSpec, IGroup, ILayoutType, ILayoutPoint, ILayoutRect } from '../../typings';
|
|
5
|
+
import type { CoordinateType, IInvalidType, IPoint, DataKeyType, Datum, Maybe, ISeriesSpec, IExtensionMarkSpec, IExtensionGroupMarkSpec, EnableMarkType, IGroup, ILayoutType, ILayoutPoint, ILayoutRect } from '../../typings';
|
|
6
6
|
import { BaseModel } from '../../model/base-model';
|
|
7
7
|
import type { ISeriesOption, ISeries, ISeriesMarkInitOption, ISeriesStackData, ISeriesTooltipHelper, SeriesMarkMap, ISeriesMarkInfo, ISeriesSpecInfo, ISeriesStackDataLeaf, ISeriesStackDataMeta, ISeriesSeriesInfo } from '../interface';
|
|
8
|
-
import type { IModelEvaluateOption, IModelRenderOption } from '../../model/interface';
|
|
8
|
+
import type { IModelEvaluateOption, IModelRenderOption, IUpdateSpecResult } from '../../model/interface';
|
|
9
9
|
import type { AddVChartPropertyContext } from '../../data/transforms/add-property';
|
|
10
10
|
import type { IBaseInteractionSpec } from '../../interaction/interface';
|
|
11
11
|
import type { StatisticOperations } from '../../data/transforms/dimension-statistics';
|
|
@@ -15,6 +15,7 @@ import type { ISeriesMarkAttributeContext } from '../../compile/mark';
|
|
|
15
15
|
import { STATE_VALUE_ENUM } from '../../compile/mark';
|
|
16
16
|
import { BaseSeriesSpecTransformer } from './base-series-transformer';
|
|
17
17
|
import type { EventType } from '@visactor/vgrammar-core';
|
|
18
|
+
import type { ILabelSpec } from '../../component/label/interface';
|
|
18
19
|
export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel<T> implements ISeries {
|
|
19
20
|
readonly specKey: string;
|
|
20
21
|
readonly type: string;
|
|
@@ -169,9 +170,9 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
169
170
|
protected initEvent(): void;
|
|
170
171
|
protected _releaseEvent(): void;
|
|
171
172
|
protected initTooltip(): void;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
_compareExtensionMarksSpec(newMarks: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[], prevMarks: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[], compareResult: IUpdateSpecResult): void;
|
|
174
|
+
_compareLabelSpec(newLabels: ILabelSpec[], prevLabels: ILabelSpec[], compareResult: IUpdateSpecResult): void;
|
|
175
|
+
_compareSpec(spec: T, prevSpec: T, ignoreCheckKeys?: Record<string, boolean>): {
|
|
175
176
|
change: boolean;
|
|
176
177
|
reMake: boolean;
|
|
177
178
|
reRender: boolean;
|
|
@@ -29,7 +29,6 @@ export declare class DotSeries<T extends IDotSeriesSpec = IDotSeriesSpec> extend
|
|
|
29
29
|
protected _gridBackground?: IFillMarkSpec;
|
|
30
30
|
setGridBackground(gridBackground: IFillMarkSpec): void;
|
|
31
31
|
initData(): void;
|
|
32
|
-
setSeriesField(field: string): void;
|
|
33
32
|
getStatisticFields(): {
|
|
34
33
|
key: string;
|
|
35
34
|
operations: Array<'max' | 'min' | 'values'>;
|
|
@@ -15,7 +15,7 @@ export interface IGaugePointerSeriesSpec extends IProgressLikeSeriesSpec, IAnima
|
|
|
15
15
|
[SeriesMarkNameEnum.pointer]?: IMarkSpec<IPathMarkSpec | IRectMarkSpec> & PointerMarkSpec;
|
|
16
16
|
}
|
|
17
17
|
export type PointerMarkSpec = {
|
|
18
|
-
type
|
|
18
|
+
type?: 'path' | 'rect';
|
|
19
19
|
width?: number;
|
|
20
20
|
height?: number;
|
|
21
21
|
innerPadding?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EasingType } from '@visactor/vrender-core';
|
|
2
|
+
import type { IPointLike } from '@visactor/vutils';
|
|
2
3
|
import { ACustomAnimate, TagPointsUpdate } from '@visactor/vrender-core';
|
|
3
|
-
import type { IPolarAxisHelper } from '../../component/axis';
|
|
4
4
|
export declare class PolarPointUpdate extends ACustomAnimate<{
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
@@ -10,18 +10,17 @@ export declare class PolarPointUpdate extends ACustomAnimate<{
|
|
|
10
10
|
private _fromRadius;
|
|
11
11
|
private _toAngle;
|
|
12
12
|
private _toRadius;
|
|
13
|
-
private
|
|
14
|
-
private
|
|
13
|
+
private _center;
|
|
14
|
+
private _prevCenter;
|
|
15
15
|
constructor(from: {
|
|
16
16
|
x: number;
|
|
17
17
|
y: number;
|
|
18
|
+
center: IPointLike;
|
|
18
19
|
}, to: {
|
|
19
20
|
x: number;
|
|
20
21
|
y: number;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
coordToPoint: IPolarAxisHelper['coordToPoint'];
|
|
24
|
-
});
|
|
22
|
+
center: IPointLike;
|
|
23
|
+
}, duration: number, easing: EasingType, params: any);
|
|
25
24
|
getEndProps(): Record<string, any>;
|
|
26
25
|
onBind(): void;
|
|
27
26
|
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
@@ -29,13 +28,12 @@ export declare class PolarPointUpdate extends ACustomAnimate<{
|
|
|
29
28
|
export declare class PolarTagPointsUpdate extends TagPointsUpdate {
|
|
30
29
|
private points;
|
|
31
30
|
private interpolatePoints;
|
|
32
|
-
private
|
|
33
|
-
private
|
|
31
|
+
private _center;
|
|
32
|
+
private _prevCenter;
|
|
34
33
|
constructor(from: any, to: any, duration: number, easing: EasingType, params?: {
|
|
35
34
|
newPointAnimateType?: 'grow' | 'appear';
|
|
36
|
-
pointToCoord: IPolarAxisHelper['pointToCoord'];
|
|
37
|
-
coordToPoint: IPolarAxisHelper['coordToPoint'];
|
|
38
35
|
});
|
|
39
36
|
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
37
|
+
private _interpolationSinglePoint;
|
|
40
38
|
private polarPointInterpolation;
|
|
41
39
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { Datum, IAnimationTypeConfig, IElement } from '@visactor/vgrammar-core';
|
|
2
2
|
import type { IPoint, Maybe } from '../../typings';
|
|
3
|
-
import type { IPolarAxisHelper } from '../../component/axis';
|
|
4
3
|
export interface IRadarAnimationParams {
|
|
5
4
|
center: () => Maybe<IPoint>;
|
|
6
5
|
radius: () => number;
|
|
7
6
|
startAngle: number;
|
|
8
|
-
pointToCoord: IPolarAxisHelper['pointToCoord'];
|
|
9
|
-
coordToPoint: IPolarAxisHelper['coordToPoint'];
|
|
10
7
|
}
|
|
11
8
|
export type RadarAppearPreset = 'grow' | 'fadeIn' | 'clipIn';
|
|
12
9
|
export declare const radarFadeAnimation: (animationType: 'in' | 'out') => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IVChart } from './../../core/interface';
|
|
1
2
|
import type { IFillMarkSpec, IImageMarkSpec } from '../visual';
|
|
2
3
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
4
|
import type { IElement, srIOption3DType } from '@visactor/vgrammar-core';
|
|
@@ -41,6 +42,7 @@ export interface IInitOption extends Omit<IRenderOption, 'pluginList'> {
|
|
|
41
42
|
onError?: (...args: any[]) => void;
|
|
42
43
|
theme?: string | ITheme;
|
|
43
44
|
disableTriggerEvent?: boolean;
|
|
45
|
+
resizeDelay?: number;
|
|
44
46
|
}
|
|
45
47
|
export declare enum RenderModeEnum {
|
|
46
48
|
'desktop-browser' = "desktop-browser",
|
|
@@ -208,8 +210,9 @@ export type IMarkTheme<T> = {
|
|
|
208
210
|
interactive?: boolean;
|
|
209
211
|
};
|
|
210
212
|
export interface IPerformanceHook {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
afterCreateVChart?: (vchart?: IVChart) => void;
|
|
214
|
+
beforeInitializeChart?: (vchart?: IVChart) => void;
|
|
215
|
+
afterInitializeChart?: (vchart?: IVChart) => void;
|
|
213
216
|
beforeCompileToVGrammar?: () => void;
|
|
214
217
|
afterCompileToVGrammar?: () => void;
|
|
215
218
|
beforeRegionCompile?: () => void;
|
|
@@ -261,6 +264,7 @@ export type IBuildinMarkSpec = {
|
|
|
261
264
|
export type EnableMarkType = keyof IBuildinMarkSpec;
|
|
262
265
|
export interface ICustomMarkSpec<T extends EnableMarkType> extends IModelSpec, IMarkSpec<IBuildinMarkSpec[T]>, IAnimationSpec<string, string> {
|
|
263
266
|
type: T;
|
|
267
|
+
name?: string;
|
|
264
268
|
dataIndex?: number;
|
|
265
269
|
dataKey?: string | ((datum: any) => string);
|
|
266
270
|
dataId?: StringOrNumber;
|
package/types/util/math.d.ts
CHANGED
|
@@ -24,3 +24,4 @@ export declare function radiusLabelOrientAttribute(angle: number): {
|
|
|
24
24
|
export declare function vectorAngle(v1: IPoint, v2: IPoint): number;
|
|
25
25
|
export declare function distance(p1: IPoint, p2?: IPoint): number;
|
|
26
26
|
export declare function getPercentValue(valueList: number[], precision?: number): number[] | 0;
|
|
27
|
+
export declare function isValidPoint(p: IPoint): boolean;
|