@visactor/vchart-types 2.0.11-alpha.6 → 2.0.11
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/.rush/temp/shrinkwrap-deps.json +2 -2
- package/package.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/types/component/axis/cartesian/axis.d.ts +6 -0
- package/types/component/label/util.d.ts +6 -1
- package/types/component/tooltip/tooltip.d.ts +2 -1
- package/types/data/transforms/box-plot.d.ts +1 -0
- package/types/mark/box-plot.d.ts +1 -0
- package/types/series/box-plot/box-plot-transformer.d.ts +5 -0
- package/types/series/box-plot/box-plot.d.ts +9 -4
- package/types/typings/visual.d.ts +15 -6
|
@@ -52,6 +52,12 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
52
52
|
left: number;
|
|
53
53
|
right: number;
|
|
54
54
|
};
|
|
55
|
+
getInnerOffset(): {
|
|
56
|
+
top: number;
|
|
57
|
+
bottom: number;
|
|
58
|
+
left: number;
|
|
59
|
+
right: number;
|
|
60
|
+
};
|
|
55
61
|
constructor(spec: T, options: IComponentOption);
|
|
56
62
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
57
63
|
static createComponent(specInfo: IModelSpecInfo, options: IComponentOption): IAxis;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WaterfallSeries } from './../../series/waterfall/waterfall';
|
|
2
2
|
import type { Datum } from '../../typings/common';
|
|
3
3
|
import type { LabelItem, OverlapAttrs, Strategy } from '@visactor/vrender-components';
|
|
4
|
+
import type { IGraphic, IText } from '@visactor/vrender-core';
|
|
4
5
|
import type { ILabelInfo, ILabelSpec } from './interface';
|
|
5
6
|
export declare const labelRuleMap: {
|
|
6
7
|
rect: typeof barLabel;
|
|
@@ -15,6 +16,7 @@ export declare const labelRuleMap: {
|
|
|
15
16
|
arc3d: typeof pieLabel;
|
|
16
17
|
treemap: typeof treemapLabel;
|
|
17
18
|
venn: typeof vennLabel;
|
|
19
|
+
boxPlot: typeof boxPlotLabel;
|
|
18
20
|
};
|
|
19
21
|
export declare function defaultLabelConfig(rule: string, labelInfo: ILabelInfo): any;
|
|
20
22
|
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']): Partial<import("../../core").IComposedTextMarkSpec>;
|
|
@@ -47,7 +49,7 @@ export declare function pieLabel(labelInfo: ILabelInfo): {
|
|
|
47
49
|
export declare function stackLabelX(datum2: Datum, series: WaterfallSeries, pos: string, offset: number): number;
|
|
48
50
|
export declare function stackLabelY(datum2: Datum, series: WaterfallSeries, pos: string, offset: number): number;
|
|
49
51
|
export declare function stackLabel(labelInfo: ILabelInfo, datumTransform?: (data: any) => any, attributeTransform?: (label: LabelItem, datum: Datum, att: any) => any): {
|
|
50
|
-
customLayoutFunc: (labels: LabelItem[]) =>
|
|
52
|
+
customLayoutFunc: (labels: LabelItem[]) => IText[];
|
|
51
53
|
dataFilter: (labels: LabelItem[]) => LabelItem[];
|
|
52
54
|
overlap: {
|
|
53
55
|
strategy: any;
|
|
@@ -78,3 +80,6 @@ export declare function sankeyLabel(labelInfo: ILabelInfo): {
|
|
|
78
80
|
offset: number;
|
|
79
81
|
syncState: boolean;
|
|
80
82
|
};
|
|
83
|
+
export declare function boxPlotLabel(labelInfo: ILabelInfo): {
|
|
84
|
+
customLayoutFunc: (labels: LabelItem[], texts: IText[], getRelatedGraphic: (item: LabelItem) => IGraphic) => IText[];
|
|
85
|
+
};
|
|
@@ -57,7 +57,8 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
57
57
|
protected _handleChartMouseOut: (params?: BaseEventParams) => void;
|
|
58
58
|
protected _getMouseMoveHandler: (isClick: boolean) => (params: BaseEventParams) => void;
|
|
59
59
|
protected _handleChartMouseMove: (params: BaseEventParams, isClick: boolean) => void;
|
|
60
|
-
protected
|
|
60
|
+
protected _showContentByEvent(activeType: TooltipActiveType): boolean;
|
|
61
|
+
protected _showTooltipByMouseEvent: (activeType: TooltipActiveType, mouseEventData: TotalMouseEventData, params: BaseEventParams, isClick: boolean, useCache?: boolean) => boolean | 'unShowByOption';
|
|
61
62
|
protected _getMouseEventData: (params: BaseEventParams) => TotalMouseEventData;
|
|
62
63
|
protected _hideTooltipByHandler: (params: TooltipHandlerParams) => TooltipResult;
|
|
63
64
|
reInit(spec?: any): void;
|
package/types/mark/box-plot.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class BoxPlotMark extends GlyphMark<IBoxPlotMarkSpec, {
|
|
|
13
13
|
direction?: 'horizontal' | 'vertical';
|
|
14
14
|
shaftShape?: BoxPlotShaftShape;
|
|
15
15
|
}): void;
|
|
16
|
+
setDataLabelType(): string;
|
|
16
17
|
protected _getDefaultStyle(): IMarkStyle<IBoxPlotMarkSpec>;
|
|
17
18
|
}
|
|
18
19
|
export declare const registerBoxPlotMark: () => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseSeriesSpecTransformer } from '../base';
|
|
2
|
+
import type { IBoxPlotSeriesSpec, IBoxPlotSeriesTheme } from './interface';
|
|
3
|
+
export declare class BoxPlotSeriesSpecTransformer<T extends IBoxPlotSeriesSpec = IBoxPlotSeriesSpec, K extends IBoxPlotSeriesTheme = IBoxPlotSeriesTheme> extends BaseSeriesSpecTransformer<T, K> {
|
|
4
|
+
protected _transformLabelSpec(spec: T): void;
|
|
5
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IModelInitOption } from '../../model/interface';
|
|
2
2
|
import type { BoxPlotShaftShape, IOutlierMarkSpec, Datum, DirectionType } from '../../typings';
|
|
3
3
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
4
4
|
import type { SeriesMarkMap } from '../interface';
|
|
5
5
|
import { SeriesTypeEnum } from '../interface/type';
|
|
6
6
|
import type { IBoxPlotSeriesSpec } from './interface';
|
|
7
|
-
import
|
|
7
|
+
import { DataView } from '@visactor/vdataset';
|
|
8
|
+
import type { IMark, ITextMark } from '../../mark/interface';
|
|
8
9
|
import type { ICompilableData } from '../../compile/data';
|
|
10
|
+
import { BoxPlotSeriesSpecTransformer } from './box-plot-transformer';
|
|
9
11
|
export declare const DEFAULT_FILL_COLOR = "#FFF";
|
|
10
12
|
export declare const DEFAULT_STROKE_COLOR = "#000";
|
|
11
13
|
export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeriesSpec> extends CartesianSeries<T> {
|
|
@@ -15,6 +17,8 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
15
17
|
boxPlot: import("./interface").IBoxPlotSeriesTheme;
|
|
16
18
|
};
|
|
17
19
|
static readonly mark: SeriesMarkMap;
|
|
20
|
+
static readonly transformerConstructor: any;
|
|
21
|
+
readonly transformerConstructor: typeof BoxPlotSeriesSpecTransformer;
|
|
18
22
|
protected _bandPosition: number;
|
|
19
23
|
protected _minField: string;
|
|
20
24
|
getMinField(): string;
|
|
@@ -40,7 +44,7 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
40
44
|
protected _shaftFillOpacity: number;
|
|
41
45
|
protected _outliersStyle: IOutlierMarkSpec;
|
|
42
46
|
getOutliersStyle(): IOutlierMarkSpec;
|
|
43
|
-
protected
|
|
47
|
+
protected _outlierData: ICompilableData;
|
|
44
48
|
private _autoBoxWidth;
|
|
45
49
|
setAttrFromSpec(): void;
|
|
46
50
|
private _boxPlotMark?;
|
|
@@ -48,8 +52,10 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
48
52
|
initMark(): void;
|
|
49
53
|
initMarkStyle(): void;
|
|
50
54
|
initBoxPlotMarkStyle(): void;
|
|
55
|
+
initLabelMarkStyle(textMark: ITextMark): void;
|
|
51
56
|
initData(): void;
|
|
52
57
|
compileData(): void;
|
|
58
|
+
viewDataUpdate(d: DataView): void;
|
|
53
59
|
init(option: IModelInitOption): void;
|
|
54
60
|
private _getMarkWidth;
|
|
55
61
|
protected _getPosition(direction: DirectionType, datum: Datum): number;
|
|
@@ -61,7 +67,6 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
|
|
|
61
67
|
key: string;
|
|
62
68
|
operations: import("../../data/transforms/interface").StatisticOperations;
|
|
63
69
|
}[];
|
|
64
|
-
onEvaluateEnd(ctx: IModelEvaluateOption): void;
|
|
65
70
|
getDefaultShapeType(): string;
|
|
66
71
|
getActiveMarks(): IMark[];
|
|
67
72
|
}
|
|
@@ -158,17 +158,26 @@ export interface IRectMarkSpec extends IFillMarkSpec {
|
|
|
158
158
|
y1?: number;
|
|
159
159
|
}
|
|
160
160
|
export interface IBoxPlotMarkSpec extends ICommonSpec {
|
|
161
|
-
lineWidth?: number;
|
|
162
|
-
boxWidth?: number | string;
|
|
163
|
-
shaftWidth?: number | string;
|
|
164
|
-
shaftShape?: BoxPlotShaftShape;
|
|
165
|
-
boxFill?: string;
|
|
166
|
-
shaftFillOpacity?: number;
|
|
167
161
|
min?: (datum: Datum) => number;
|
|
168
162
|
q1?: (datum: Datum) => number;
|
|
169
163
|
median?: (datum: Datum) => number;
|
|
170
164
|
q3?: (datum: Datum) => number;
|
|
171
165
|
max?: (datum: Datum) => number;
|
|
166
|
+
shaftShape?: BoxPlotShaftShape;
|
|
167
|
+
boxWidth?: number | string;
|
|
168
|
+
boxHeight?: number | string;
|
|
169
|
+
shaftWidth?: number | string;
|
|
170
|
+
ruleWidth?: number | string;
|
|
171
|
+
ruleHeight?: number | string;
|
|
172
|
+
minMaxWidth?: number | string;
|
|
173
|
+
minMaxHeight?: number | string;
|
|
174
|
+
q1q3Width?: number | string;
|
|
175
|
+
q1q3Height?: number | string;
|
|
176
|
+
lineWidth?: number;
|
|
177
|
+
minMaxFillOpacity?: number;
|
|
178
|
+
boxStroke?: string;
|
|
179
|
+
medianStroke?: string;
|
|
180
|
+
boxCornerRadius?: number;
|
|
172
181
|
}
|
|
173
182
|
export interface IRippleMarkSpec extends ICommonSpec {
|
|
174
183
|
ripple?: number;
|