@visactor/vchart-types 1.7.0-alpha.1 → 1.7.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/chart/util.d.ts +8 -0
- package/types/compile/mark/compilable-mark.d.ts +5 -0
- package/types/compile/mark/interface.d.ts +2 -0
- package/types/component/axis/base-axis.d.ts +1 -25
- package/types/component/axis/interface/spec.d.ts +6 -2
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +1 -1
- package/types/component/indicator/interface.d.ts +5 -1
- package/types/component/label/interface.d.ts +4 -1
- package/types/component/label/util.d.ts +1 -1
- package/types/component/marker/interface.d.ts +4 -3
- package/types/component/title/interface/spec.d.ts +4 -2
- package/types/component/title/title.d.ts +3 -3
- package/types/component/tooltip/handler/base.d.ts +1 -1
- package/types/component/tooltip/handler/utils/common.d.ts +3 -2
- package/types/mark/text.d.ts +3 -1
- package/types/series/interface/common.d.ts +2 -0
- package/types/typings/spec/common.d.ts +2 -0
- package/types/typings/tooltip/line.d.ts +3 -2
- package/types/typings/visual.d.ts +3 -2
package/types/chart/util.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IChartSpec } from '../typings';
|
|
1
2
|
import type { ICartesianChartSpec } from './cartesian/interface';
|
|
2
3
|
import type { IChartOption } from './interface/common';
|
|
3
4
|
import type { IUpdateSpecResult } from '../model/interface';
|
|
@@ -10,3 +11,10 @@ export declare function calculateChartSize(spec: {
|
|
|
10
11
|
height: number;
|
|
11
12
|
};
|
|
12
13
|
export declare function mergeUpdateResult(resultA: IUpdateSpecResult, resultB: IUpdateSpecResult): IUpdateSpecResult;
|
|
14
|
+
export declare function getTrimPaddingConfig(chartType: string, spec: IChartSpec): {
|
|
15
|
+
paddingInner: number;
|
|
16
|
+
paddingOuter: number;
|
|
17
|
+
} | {
|
|
18
|
+
paddingOuter: number;
|
|
19
|
+
paddingInner?: undefined;
|
|
20
|
+
};
|
|
@@ -10,6 +10,7 @@ import { MarkData } from './mark-data';
|
|
|
10
10
|
import { GrammarType } from '../interface/compilable-item';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
12
12
|
import type { TransformedLabelSpec } from '../../component/label';
|
|
13
|
+
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
13
14
|
export declare abstract class CompilableMark extends GrammarItem implements ICompilableMark {
|
|
14
15
|
readonly grammarType = GrammarType.mark;
|
|
15
16
|
readonly type: MarkType;
|
|
@@ -75,6 +76,10 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
75
76
|
protected _progressiveConfig: IMarkProgressiveConfig;
|
|
76
77
|
getProgressiveConfig(): IMarkProgressiveConfig;
|
|
77
78
|
setProgressiveConfig(config: IMarkProgressiveConfig): void;
|
|
79
|
+
protected _setCustomizedShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
|
|
80
|
+
setCustomizedShapeCallback(callback: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D): void;
|
|
81
|
+
protected _enableSegments: boolean;
|
|
82
|
+
setEnableSegments(enable: boolean): void;
|
|
78
83
|
protected _option: ICompilableMarkOption;
|
|
79
84
|
constructor(option: ICompilableMarkOption, name: string, model: IModel);
|
|
80
85
|
protected _product: Maybe<IMark>;
|
|
@@ -9,6 +9,7 @@ import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
|
9
9
|
import type { MarkData } from './mark-data';
|
|
10
10
|
import type { TransformedLabelSpec } from '../../component/label';
|
|
11
11
|
import type { IRegion } from '../../region/interface';
|
|
12
|
+
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
12
13
|
export interface ICompilableMarkOption extends GrammarItemInitOption {
|
|
13
14
|
key?: string | ((datum: Datum) => string);
|
|
14
15
|
groupKey?: string;
|
|
@@ -69,6 +70,7 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
69
70
|
getMarks: () => ICompilableMark[];
|
|
70
71
|
setSkipBeforeLayouted: (skip: boolean) => void;
|
|
71
72
|
getSkipBeforeLayouted: () => boolean;
|
|
73
|
+
setCustomizedShapeCallback: (callback: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D) => void;
|
|
72
74
|
runAnimationByState: (animationState?: string) => IAnimateArranger;
|
|
73
75
|
stopAnimationByState: (animationState?: string) => IAnimate;
|
|
74
76
|
pauseAnimationByState: (animationState: string) => IAnimate;
|
|
@@ -99,31 +99,7 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
99
99
|
style: any;
|
|
100
100
|
state: {};
|
|
101
101
|
};
|
|
102
|
-
title:
|
|
103
|
-
visible: any;
|
|
104
|
-
position: any;
|
|
105
|
-
space: any;
|
|
106
|
-
autoRotate: boolean;
|
|
107
|
-
angle: number;
|
|
108
|
-
textStyle: any;
|
|
109
|
-
padding: any;
|
|
110
|
-
shape: {
|
|
111
|
-
visible: any;
|
|
112
|
-
space: any;
|
|
113
|
-
style: any;
|
|
114
|
-
};
|
|
115
|
-
background: {
|
|
116
|
-
visible: any;
|
|
117
|
-
style: any;
|
|
118
|
-
};
|
|
119
|
-
state: {
|
|
120
|
-
text: {};
|
|
121
|
-
shape: {};
|
|
122
|
-
background: {};
|
|
123
|
-
};
|
|
124
|
-
pickable: boolean;
|
|
125
|
-
childrenPickable: boolean;
|
|
126
|
-
};
|
|
102
|
+
title: any;
|
|
127
103
|
panel: {
|
|
128
104
|
visible: any;
|
|
129
105
|
style: any;
|
|
@@ -3,6 +3,7 @@ import type { IAnimationSpec } from '../../../animation/spec';
|
|
|
3
3
|
import type { Datum, IPadding, IRectMarkSpec, IRuleMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';
|
|
4
4
|
import type { IComponentSpec } from '../../base/interface';
|
|
5
5
|
import type { AxisType, IAxisItem, ITickCallbackOption, StyleCallback } from './common';
|
|
6
|
+
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
6
7
|
export interface ICommonAxisSpec extends Omit<IComponentSpec, 'orient' | 'center'>, IAnimationSpec<string, string> {
|
|
7
8
|
type?: AxisType;
|
|
8
9
|
visible?: boolean;
|
|
@@ -31,6 +32,7 @@ export interface ILinearAxisSpec {
|
|
|
31
32
|
tooltipFilterRange?: number | [number, number];
|
|
32
33
|
}
|
|
33
34
|
export interface IBandAxisSpec {
|
|
35
|
+
trimPadding?: boolean;
|
|
34
36
|
bandPadding?: number | number[];
|
|
35
37
|
paddingInner?: number | number[];
|
|
36
38
|
paddingOuter?: number | number[];
|
|
@@ -63,7 +65,8 @@ export interface ISubTick extends IAxisItem<IRuleMarkSpec> {
|
|
|
63
65
|
state?: AxisItemStateStyle<IRuleMarkSpec>;
|
|
64
66
|
}
|
|
65
67
|
export interface ILabel extends IAxisItem<ITextMarkSpec> {
|
|
66
|
-
|
|
68
|
+
type?: 'text' | 'rich' | 'html';
|
|
69
|
+
formatMethod?: (text: string | string[], datum?: Datum) => string | string[] | IRichTextCharacter[];
|
|
67
70
|
space?: number;
|
|
68
71
|
inside?: boolean;
|
|
69
72
|
minGap?: number;
|
|
@@ -85,7 +88,8 @@ export interface ITitle extends IAxisItem<ITextMarkSpec> {
|
|
|
85
88
|
space?: number;
|
|
86
89
|
state?: AxisItemStateStyle<Partial<ISymbolMarkSpec>>;
|
|
87
90
|
};
|
|
88
|
-
|
|
91
|
+
type?: 'text' | 'rich' | 'html';
|
|
92
|
+
text?: string | string[] | IRichTextCharacter[];
|
|
89
93
|
angle?: number;
|
|
90
94
|
state?: AxisItemStateStyle<Partial<ITextMarkSpec>>;
|
|
91
95
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from '../base/base-component';
|
|
2
2
|
import type { IEffect, IModelInitOption } from '../../model/interface';
|
|
3
3
|
import type { IComponent, IComponentOption } from '../interface';
|
|
4
|
-
import type { AdaptiveSpec, ILayoutRect, ILayoutType, IOrientType, StringOrNumber } from '../../typings';
|
|
4
|
+
import type { AdaptiveSpec, ILayoutRect, ILayoutType, IOrientType, IRect, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IBaseScale } from '@visactor/vscale';
|
|
6
6
|
import type { ICartesianBandAxisSpec } from '../axis/cartesian';
|
|
7
7
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
@@ -61,6 +61,8 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
61
61
|
protected abstract _computeHeight(): number;
|
|
62
62
|
protected abstract _handleDataCollectionChange(): void;
|
|
63
63
|
protected _handleChange(start: number, end: number, updateComponent?: boolean): void;
|
|
64
|
+
protected _isReverse(): boolean;
|
|
65
|
+
protected _updateRangeFactor(tag?: string, label?: string): void;
|
|
64
66
|
effect: IEffect;
|
|
65
67
|
protected _visible: boolean;
|
|
66
68
|
get visible(): boolean;
|
|
@@ -109,6 +111,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
109
111
|
protected _handleChartMove: (value: number, rate: number) => void;
|
|
110
112
|
protected _initCommonEvent(): void;
|
|
111
113
|
updateLayoutAttribute(): void;
|
|
114
|
+
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
|
|
112
115
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
113
116
|
hide(): void;
|
|
114
117
|
show(): void;
|
|
@@ -27,7 +27,7 @@ export declare class DataZoom<T extends IDataZoomSpec = IDataZoomSpec> extends D
|
|
|
27
27
|
onLayoutEnd(ctx: any): void;
|
|
28
28
|
protected _initValueScale(): void;
|
|
29
29
|
protected _updateScaleRange(): void;
|
|
30
|
-
protected _computeDomainOfValueScale():
|
|
30
|
+
protected _computeDomainOfValueScale(): unknown[];
|
|
31
31
|
protected _computeMiddleHandlerSize(): number;
|
|
32
32
|
protected _computeWidth(): number;
|
|
33
33
|
protected _computeHeight(): number;
|
|
@@ -2,6 +2,7 @@ import type { IPercent } from '../../typings/layout';
|
|
|
2
2
|
import type { ConvertToMarkStyleSpec, ITextMarkSpec } from '../../typings/visual';
|
|
3
3
|
import type { IComponentSpec } from '../base/interface';
|
|
4
4
|
import type { IComponent } from '../interface';
|
|
5
|
+
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
5
6
|
export interface IIndicatorItemSpec {
|
|
6
7
|
visible?: boolean;
|
|
7
8
|
field?: string;
|
|
@@ -9,7 +10,10 @@ export interface IIndicatorItemSpec {
|
|
|
9
10
|
autoLimit?: boolean;
|
|
10
11
|
autoFit?: boolean;
|
|
11
12
|
fitPercent?: number;
|
|
12
|
-
style?: Omit<ConvertToMarkStyleSpec<ITextMarkSpec>, 'visible'
|
|
13
|
+
style?: Omit<ConvertToMarkStyleSpec<ITextMarkSpec>, 'visible' | 'text'> & {
|
|
14
|
+
type?: 'text' | 'rich' | 'html';
|
|
15
|
+
text?: string | string[] | number | number[] | IRichTextCharacter[];
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
18
|
export type IIndicator = IComponent;
|
|
15
19
|
export interface IIndicatorSpec extends IComponentSpec {
|
|
@@ -2,6 +2,7 @@ import type { BaseLabelAttrs } from '@visactor/vrender-components';
|
|
|
2
2
|
import type { ConvertToMarkStyleSpec, Datum, ITextMarkSpec } from '../../typings';
|
|
3
3
|
import type { IComponentSpec } from '../base/interface';
|
|
4
4
|
import type { ISeries } from '../..';
|
|
5
|
+
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
5
6
|
import type { ILabelMark } from '../../mark/label';
|
|
6
7
|
export interface ILabelFormatMethodContext {
|
|
7
8
|
series?: ISeries;
|
|
@@ -9,7 +10,9 @@ export interface ILabelFormatMethodContext {
|
|
|
9
10
|
export interface ILabelSpec extends IComponentSpec {
|
|
10
11
|
visible?: boolean;
|
|
11
12
|
interactive?: boolean;
|
|
12
|
-
|
|
13
|
+
textType?: string;
|
|
14
|
+
formatMethod?: (text: string | string[], datum?: Datum, ctx?: ILabelFormatMethodContext) => string | string[] | IRichTextCharacter[];
|
|
15
|
+
formatter?: string;
|
|
13
16
|
offset?: number;
|
|
14
17
|
position?: string;
|
|
15
18
|
style?: ConvertToMarkStyleSpec<ITextMarkSpec>;
|
|
@@ -20,7 +20,7 @@ export declare enum LabelRule {
|
|
|
20
20
|
stackLabel = "stackLabel",
|
|
21
21
|
line = "line"
|
|
22
22
|
}
|
|
23
|
-
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod']): any;
|
|
23
|
+
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']): any;
|
|
24
24
|
export declare function symbolLabel(labelInfo: ILabelInfo): {
|
|
25
25
|
position: string | ((datum: Datum) => any);
|
|
26
26
|
overlap: boolean | {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IPadding } from '@visactor/vutils';
|
|
2
|
-
import type { SymbolType } from '@visactor/vrender-core';
|
|
2
|
+
import type { SymbolType, IRichTextCharacter } from '@visactor/vrender-core';
|
|
3
3
|
import type { IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../typings';
|
|
4
4
|
import type { IComponentSpec } from '../base/interface';
|
|
5
5
|
import type { Datum } from '@visactor/vrender-components';
|
|
@@ -33,8 +33,9 @@ export type IMarkerLabelWithoutRefSpec = {
|
|
|
33
33
|
padding?: IPadding | number[] | number;
|
|
34
34
|
style?: Omit<IRectMarkSpec, 'visible'>;
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
type?: 'text' | 'rich' | 'html';
|
|
37
|
+
text?: string | string[] | number | number[] | IRichTextCharacter[];
|
|
38
|
+
formatMethod?: (markData: Datum[], seriesData: Datum[]) => string | string[] | number | number[] | IRichTextCharacter[];
|
|
38
39
|
style?: Omit<ITextMarkSpec, 'visible'>;
|
|
39
40
|
shape?: {
|
|
40
41
|
visible?: boolean;
|
|
@@ -5,8 +5,10 @@ import type { IComponentSpec } from '../../base/interface';
|
|
|
5
5
|
export interface ITitleSpec extends Omit<IComponentSpec, 'orient'> {
|
|
6
6
|
visible?: boolean;
|
|
7
7
|
orient?: IOrientType;
|
|
8
|
-
text
|
|
9
|
-
|
|
8
|
+
text?: string | number | string[] | number[] | IRichTextCharacter[];
|
|
9
|
+
textType?: string;
|
|
10
|
+
subtext?: string | number | string[] | number[] | IRichTextCharacter[];
|
|
11
|
+
subtextType?: string;
|
|
10
12
|
x?: number;
|
|
11
13
|
y?: number;
|
|
12
14
|
width?: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { IRegion } from '../../region/interface';
|
|
2
|
+
import type { IPoint, IOrientType, ILayoutType, ILayoutRect } from '../../typings';
|
|
1
3
|
import { BaseComponent } from '../base/base-component';
|
|
2
|
-
import { ComponentTypeEnum } from '../interface/type';
|
|
3
4
|
import type { IComponentOption } from '../interface';
|
|
5
|
+
import { ComponentTypeEnum } from '../interface/type';
|
|
4
6
|
import type { ITitle, ITitleSpec, ITitleTheme } from './interface';
|
|
5
|
-
import type { IRegion } from '../../region/interface';
|
|
6
7
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
|
-
import type { IPoint, IOrientType, ILayoutType, ILayoutRect } from '../../typings';
|
|
8
8
|
export declare class Title extends BaseComponent<ITitleSpec> implements ITitle {
|
|
9
9
|
static type: ComponentTypeEnum;
|
|
10
10
|
type: ComponentTypeEnum;
|
|
@@ -43,7 +43,7 @@ export declare abstract class BaseTooltipHandler implements ITooltipHandler {
|
|
|
43
43
|
protected _getActualTooltipPosition: (actualTooltip: IToolTipActual, params: TooltipHandlerParams, tooltipBoxSize: IContainerSize | undefined) => ITooltipPositionActual;
|
|
44
44
|
protected _getTooltipBoxSize(actualTooltip: IToolTipActual, changePositionOnly: boolean): IContainerSize | undefined;
|
|
45
45
|
protected _getParentElement(spec: ITooltipSpec): HTMLElement;
|
|
46
|
-
getTooltipContainer():
|
|
46
|
+
getTooltipContainer(): IGroup | HTMLElement;
|
|
47
47
|
protected _initFromSpec(): void;
|
|
48
48
|
reInit(): void;
|
|
49
49
|
}
|
|
@@ -2,6 +2,7 @@ import type { Datum } from '@visactor/vgrammar-core';
|
|
|
2
2
|
import type { MaybeArray, TooltipContentProperty, TooltipData, TooltipPatternProperty } from '../../../../typings';
|
|
3
3
|
import type { TooltipHandlerParams } from '../../interface';
|
|
4
4
|
import type { ITooltipTextStyle } from '../interface/style';
|
|
5
|
+
import type { TooltipRichTextAttrs } from '@visactor/vrender-components';
|
|
5
6
|
export declare function escapeHTML(value: any): string;
|
|
6
7
|
export declare const getTooltipContentValue: <T>(field?: TooltipContentProperty<T>, datum?: any, params?: TooltipHandlerParams) => T;
|
|
7
8
|
export declare const getTooltipPatternValue: <T>(field?: MaybeArray<TooltipPatternProperty<T>>, data?: TooltipData, params?: TooltipHandlerParams) => MaybeArray<TooltipPatternProperty<T>> extends TooltipPatternProperty<T>[] ? MaybeArray<T> : T;
|
|
@@ -12,7 +13,7 @@ export declare const getScale: (element: HTMLElement, boundingClientRect?: DOMRe
|
|
|
12
13
|
interface ITooltipTextInfo {
|
|
13
14
|
width: number;
|
|
14
15
|
height: number;
|
|
15
|
-
text: MaybeArray<number> | MaybeArray<string
|
|
16
|
+
text: MaybeArray<number> | MaybeArray<string> | TooltipRichTextAttrs;
|
|
16
17
|
}
|
|
17
|
-
export declare const measureTooltipText: (text: string, style: ITooltipTextStyle) => ITooltipTextInfo;
|
|
18
|
+
export declare const measureTooltipText: (text: string | TooltipRichTextAttrs, style: ITooltipTextStyle) => ITooltipTextInfo;
|
|
18
19
|
export {};
|
package/types/mark/text.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ITextMarkSpec } from '../typings/visual';
|
|
2
2
|
import { BaseMark } from './base/base-mark';
|
|
3
3
|
import type { IMarkRaw, IMarkStyle } from './interface';
|
|
4
|
-
import { MarkTypeEnum } from './interface
|
|
4
|
+
import { MarkTypeEnum } from './interface';
|
|
5
|
+
import type { IGroupMark } from '@visactor/vgrammar-core';
|
|
5
6
|
export type ITextMark = IMarkRaw<ITextMarkSpec>;
|
|
6
7
|
export declare class TextMark extends BaseMark<ITextMarkSpec> implements ITextMark {
|
|
7
8
|
static readonly type = MarkTypeEnum.text;
|
|
8
9
|
readonly type = MarkTypeEnum.text;
|
|
9
10
|
protected _getDefaultStyle(): IMarkStyle<ITextMarkSpec>;
|
|
11
|
+
protected _initProduct(group?: string | IGroupMark): void;
|
|
10
12
|
}
|
|
@@ -9,6 +9,7 @@ import type { IMarkProgressiveConfig } from '../../mark/interface';
|
|
|
9
9
|
import type { StringOrNumber } from '../../typings';
|
|
10
10
|
import type { TransformedLabelSpec } from '../../component/label';
|
|
11
11
|
import type { SeriesMarkNameEnum } from './type';
|
|
12
|
+
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
12
13
|
export interface ISeriesSeriesInfo {
|
|
13
14
|
key: string;
|
|
14
15
|
index?: number;
|
|
@@ -66,6 +67,7 @@ export interface ISeriesMarkInitOption {
|
|
|
66
67
|
progressive?: IMarkProgressiveConfig;
|
|
67
68
|
label?: TransformedLabelSpec;
|
|
68
69
|
support3d?: boolean;
|
|
70
|
+
customShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
|
|
69
71
|
}
|
|
70
72
|
export interface ISeriesMarkInfo extends IModelMarkInfo {
|
|
71
73
|
name: SeriesMarkNameEnum | string;
|
|
@@ -23,6 +23,7 @@ import type { IBrushSpec } from '../../component/brush';
|
|
|
23
23
|
import type { ITotalLabelSpec } from '../../component/label';
|
|
24
24
|
import type { ILegendSpec } from '../../component/legend';
|
|
25
25
|
import type { ILayoutOrientPadding, ILayoutPaddingSpec } from '../layout';
|
|
26
|
+
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
26
27
|
export type IChartPadding = ILayoutOrientPadding | number;
|
|
27
28
|
export interface IInitOption extends Omit<IRenderOption, 'pluginList'> {
|
|
28
29
|
dom?: string | HTMLElement;
|
|
@@ -169,6 +170,7 @@ export type IMarkSpec<T extends ICommonSpec = ICommonSpec> = {
|
|
|
169
170
|
style?: ConvertToMarkStyleSpec<T>;
|
|
170
171
|
state?: Record<StateValue, IMarkStateSpec<T> | IMarkStateStyleSpec<T>>;
|
|
171
172
|
support3d?: boolean;
|
|
173
|
+
customShape?: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D;
|
|
172
174
|
} & IMarkProgressiveConfig;
|
|
173
175
|
export type IMarkStateFilter = {
|
|
174
176
|
fields: {
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { TooltipContentProperty } from './common';
|
|
2
2
|
import type { ITooltipLabelActual, ITooltipLabelPattern } from './label';
|
|
3
3
|
import type { ITooltipShapeActual, ITooltipShapePattern } from './shape';
|
|
4
|
+
import type { TooltipRichTextAttrs } from '@visactor/vrender-components';
|
|
4
5
|
export interface IToolTipLinePattern extends ITooltipShapePattern, ITooltipLabelPattern {
|
|
5
6
|
key?: TooltipContentProperty<string>;
|
|
6
|
-
value?: TooltipContentProperty<string>;
|
|
7
|
+
value?: TooltipContentProperty<string | TooltipRichTextAttrs>;
|
|
7
8
|
visible?: TooltipContentProperty<boolean>;
|
|
8
9
|
isKeyAdaptive?: TooltipContentProperty<boolean>;
|
|
9
10
|
spaceRow?: TooltipContentProperty<number>;
|
|
10
11
|
}
|
|
11
12
|
export interface IToolTipLineActual extends ITooltipShapeActual, ITooltipLabelActual {
|
|
12
13
|
key?: string;
|
|
13
|
-
value?: string;
|
|
14
|
+
value?: string | TooltipRichTextAttrs;
|
|
14
15
|
visible?: boolean;
|
|
15
16
|
isKeyAdaptive?: boolean;
|
|
16
17
|
spaceRow?: number;
|
|
@@ -10,6 +10,7 @@ import type { Datum, StringOrNumber } from './common';
|
|
|
10
10
|
import type { IPadding } from '@visactor/vutils';
|
|
11
11
|
import type { IColorKey } from '../theme/color-scheme/interface';
|
|
12
12
|
import type { IRepeatType, TextAlignType, TextBaselineType } from '@visactor/vrender-core';
|
|
13
|
+
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
13
14
|
export interface IVisualSpecBase<D, T> {
|
|
14
15
|
type: ScaleType;
|
|
15
16
|
domain: D[];
|
|
@@ -98,7 +99,6 @@ export interface ISymbolMarkSpec extends IFillMarkSpec {
|
|
|
98
99
|
export interface ILineLikeMarkSpec extends IFillMarkSpec {
|
|
99
100
|
curveType?: InterpolateType;
|
|
100
101
|
defined?: boolean;
|
|
101
|
-
enableSegments?: boolean;
|
|
102
102
|
}
|
|
103
103
|
export interface IAreaMarkSpec extends ILineLikeMarkSpec {
|
|
104
104
|
x1?: number;
|
|
@@ -116,7 +116,8 @@ export interface IRuleMarkSpec extends ILineMarkSpec {
|
|
|
116
116
|
y1?: number;
|
|
117
117
|
}
|
|
118
118
|
export interface ITextMarkSpec extends IFillMarkSpec {
|
|
119
|
-
|
|
119
|
+
type?: 'html' | 'rich' | 'text';
|
|
120
|
+
text?: StringOrNumber | string[] | IRichTextCharacter[] | Function;
|
|
120
121
|
dx?: number;
|
|
121
122
|
dy?: number;
|
|
122
123
|
fontSize?: number;
|