@visactor/vchart-types 1.12.4 → 1.12.5
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/mark/compilable-mark.d.ts +0 -3
- package/types/compile/mark/interface.d.ts +0 -2
- package/types/component/axis/cartesian/axis.d.ts +1 -0
- package/types/component/custom-mark/custom-mark.d.ts +1 -3
- 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/interface.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/series/dot/dot.d.ts +0 -1
- package/types/series/polar/animation.d.ts +1 -0
- package/types/typings/spec/common.d.ts +1 -0
- package/types/util/math.d.ts +1 -0
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -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;
|
|
@@ -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>[];
|
|
@@ -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'>;
|
|
@@ -37,5 +37,6 @@ export declare class PolarTagPointsUpdate extends TagPointsUpdate {
|
|
|
37
37
|
coordToPoint: IPolarAxisHelper['coordToPoint'];
|
|
38
38
|
});
|
|
39
39
|
onUpdate(end: boolean, ratio: number, out: Record<string, any>): void;
|
|
40
|
+
private _interpolationSinglePoint;
|
|
40
41
|
private polarPointInterpolation;
|
|
41
42
|
}
|
|
@@ -261,6 +261,7 @@ export type IBuildinMarkSpec = {
|
|
|
261
261
|
export type EnableMarkType = keyof IBuildinMarkSpec;
|
|
262
262
|
export interface ICustomMarkSpec<T extends EnableMarkType> extends IModelSpec, IMarkSpec<IBuildinMarkSpec[T]>, IAnimationSpec<string, string> {
|
|
263
263
|
type: T;
|
|
264
|
+
name?: string;
|
|
264
265
|
dataIndex?: number;
|
|
265
266
|
dataKey?: string | ((datum: any) => string);
|
|
266
267
|
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;
|