@visactor/vchart-types 1.6.0 → 1.6.1
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 +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/component/axis/base-axis.d.ts +1 -1
- package/types/component/axis/cartesian/time-axis.d.ts +1 -1
- package/types/component/axis/polar/axis.d.ts +1 -1
- package/types/component/axis/polar/band-axis.d.ts +1 -1
- package/types/component/label/interface.d.ts +5 -1
- package/types/component/label/util.d.ts +2 -1
- package/types/component/tooltip/handler/base.d.ts +1 -1
|
@@ -62,7 +62,7 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
62
62
|
protected computeStatisticsDomain: () => void;
|
|
63
63
|
protected initEvent(): void;
|
|
64
64
|
protected updateScaleDomain(): void;
|
|
65
|
-
protected computeData(): void;
|
|
65
|
+
protected computeData(updateType?: 'domain' | 'range' | 'force'): void;
|
|
66
66
|
protected initScales(): void;
|
|
67
67
|
_compareSpec(): {
|
|
68
68
|
change: boolean;
|
|
@@ -14,7 +14,7 @@ export declare class CartesianTimeAxis<T extends ICartesianTimeAxisSpec = ICarte
|
|
|
14
14
|
effect: IEffect;
|
|
15
15
|
setAttrFromSpec(): void;
|
|
16
16
|
protected _initData(): void;
|
|
17
|
-
protected computeData(): void;
|
|
17
|
+
protected computeData(updateType?: 'range' | 'domain' | 'force'): void;
|
|
18
18
|
protected getLabelFormatMethod(): any;
|
|
19
19
|
protected getLabelItems(length: number): any[];
|
|
20
20
|
transformScaleDomain(): void;
|
|
@@ -43,7 +43,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
43
43
|
changeRegions(): void;
|
|
44
44
|
protected _initData(): void;
|
|
45
45
|
afterCompile(): void;
|
|
46
|
-
protected updateScaleRange():
|
|
46
|
+
protected updateScaleRange(): boolean;
|
|
47
47
|
protected collectData(depth: number): {
|
|
48
48
|
min: number;
|
|
49
49
|
max: number;
|
|
@@ -16,7 +16,7 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
16
16
|
max: number;
|
|
17
17
|
values: any[];
|
|
18
18
|
}[]): StringOrNumber[];
|
|
19
|
-
protected updateScaleRange():
|
|
19
|
+
protected updateScaleRange(): boolean;
|
|
20
20
|
protected axisHelper(): {
|
|
21
21
|
getBandwidth: (depth: number) => number;
|
|
22
22
|
isContinuous: boolean;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
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
|
+
import type { ISeries } from '../..';
|
|
5
|
+
export interface ILabelFormatMethodContext {
|
|
6
|
+
series?: ISeries;
|
|
7
|
+
}
|
|
4
8
|
export interface ILabelSpec extends IComponentSpec {
|
|
5
9
|
visible?: boolean;
|
|
6
10
|
interactive?: boolean;
|
|
7
|
-
formatMethod?: (text: string | string[], datum?: Datum) => string | string[];
|
|
11
|
+
formatMethod?: (text: string | string[], datum?: Datum, ctx?: ILabelFormatMethodContext) => string | string[];
|
|
8
12
|
offset?: number;
|
|
9
13
|
position?: string;
|
|
10
14
|
style?: ConvertToMarkStyleSpec<ITextMarkSpec>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Datum } from '../../typings/common';
|
|
2
2
|
import type { ILabelInfo } from './label';
|
|
3
3
|
import type { LabelItem, Strategy } from '@visactor/vrender-components';
|
|
4
|
+
import type { ILabelSpec } from './interface';
|
|
4
5
|
export declare const labelRuleMap: {
|
|
5
6
|
rect: typeof barLabel;
|
|
6
7
|
symbol: typeof symbolLabel;
|
|
@@ -16,7 +17,7 @@ export declare enum LabelRule {
|
|
|
16
17
|
point = "point",
|
|
17
18
|
stackLabel = "stackLabel"
|
|
18
19
|
}
|
|
19
|
-
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?:
|
|
20
|
+
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod']): any;
|
|
20
21
|
export declare function symbolLabel(labelInfo: ILabelInfo): {
|
|
21
22
|
position: string | ((datum: Datum) => any);
|
|
22
23
|
overlap: boolean | {
|
|
@@ -9,7 +9,7 @@ import type { Compiler } from '../../../compile/compiler';
|
|
|
9
9
|
import type { IContainerSize, TooltipAttributes } from '@visactor/vrender-components';
|
|
10
10
|
import type { IChartOption } from '../../../chart/interface';
|
|
11
11
|
type ChangeTooltipFunc = (visible: boolean, params: TooltipHandlerParams, changePositionOnly?: boolean, activeType?: TooltipActiveType, data?: TooltipData) => TooltipResult;
|
|
12
|
-
type ChangeTooltipPositionFunc = (changePositionOnly: boolean,
|
|
12
|
+
type ChangeTooltipPositionFunc = (changePositionOnly: boolean, data: TooltipData, params: TooltipHandlerParams) => TooltipResult;
|
|
13
13
|
export declare abstract class BaseTooltipHandler implements ITooltipHandler {
|
|
14
14
|
readonly type: string;
|
|
15
15
|
protected _visible: boolean;
|