@visactor/vchart-types 1.12.13 → 1.12.14
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/interface/compiler.d.ts +1 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +3 -0
- package/types/component/data-zoom/util.d.ts +3 -0
- package/types/component/marker/base-marker.d.ts +4 -1
- package/types/component/marker/interface.d.ts +9 -2
- package/types/component/marker/utils.d.ts +4 -4
- package/types/core/index.d.ts +2 -0
- package/types/series/bar/bar.d.ts +2 -2
- package/types/series/sankey/interface.d.ts +3 -1
- package/types/util/scale.d.ts +1 -1
|
@@ -36,6 +36,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
36
36
|
protected _maxSpan: number;
|
|
37
37
|
protected _spanCache: number;
|
|
38
38
|
protected _shouldChange: boolean;
|
|
39
|
+
protected _domainCache: any;
|
|
39
40
|
protected _field: string | undefined;
|
|
40
41
|
protected _stateField: string;
|
|
41
42
|
protected _valueField?: string;
|
|
@@ -113,7 +114,9 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
113
114
|
protected _handleChartMove: (value: number, rate: number) => boolean;
|
|
114
115
|
protected _initCommonEvent(): void;
|
|
115
116
|
updateLayoutAttribute(): void;
|
|
117
|
+
protected _autoVisible(isShown: boolean): void;
|
|
116
118
|
onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
|
|
119
|
+
onLayoutEnd(ctx: any): void;
|
|
117
120
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
118
121
|
hide(): void;
|
|
119
122
|
show(): void;
|
|
@@ -3,6 +3,9 @@ export interface IDataFilterWithNewDomainOption {
|
|
|
3
3
|
isContinuous: () => boolean;
|
|
4
4
|
field: () => string;
|
|
5
5
|
}
|
|
6
|
+
export declare const lockStatisticsFilter: (statisticsData: any, op: IDataFilterWithNewDomainOption & {
|
|
7
|
+
originalFields: () => Record<string, any>;
|
|
8
|
+
}) => any;
|
|
6
9
|
export declare const dataFilterWithNewDomain: (data: Array<any>, op: IDataFilterWithNewDomainOption) => any[];
|
|
7
10
|
export interface IDataFilterComputeDomainOption {
|
|
8
11
|
input: {
|
|
@@ -4,7 +4,7 @@ import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
|
4
4
|
import type { IRegion } from '../../region/interface';
|
|
5
5
|
import type { CoordinateType, ILayoutRect, ILayoutType, IRect } from '../../typings';
|
|
6
6
|
import { BaseComponent } from '../base/base-component';
|
|
7
|
-
import type { IDataPos, IDataPosCallback, IMarkerSpec, IMarkerSupportSeries } from './interface';
|
|
7
|
+
import type { IDataPos, IDataPosCallback, IMarkerAttributeContext, IMarkerSpec, IMarkerSupportSeries } from './interface';
|
|
8
8
|
import type { IGraphic, IGroup } from '@visactor/vrender-core';
|
|
9
9
|
import type { IOptionWithCoordinates } from '../../data/transforms/aggregation';
|
|
10
10
|
export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComponent<T> {
|
|
@@ -29,6 +29,9 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
29
29
|
protected abstract _markerLayout(): void;
|
|
30
30
|
static _getMarkerCoordinateType(markerSpec: any): string;
|
|
31
31
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
32
|
+
protected _markAttributeContext: IMarkerAttributeContext;
|
|
33
|
+
getMarkAttributeContext(): IMarkerAttributeContext;
|
|
34
|
+
protected _buildMarkerAttributeContext(): void;
|
|
32
35
|
created(): void;
|
|
33
36
|
protected _getAllRelativeSeries(): {
|
|
34
37
|
getRelativeSeries: () => IMarkerSupportSeries;
|
|
@@ -7,6 +7,7 @@ import type { Datum } from '@visactor/vrender-components';
|
|
|
7
7
|
import type { ICartesianSeries, IGeoSeries, IPolarSeries } from '../../series/interface';
|
|
8
8
|
import type { IOptionAggr, IOptionAggrField, IOptionSeries, IOptionWithCoordinates } from '../../data/transforms/aggregation';
|
|
9
9
|
import type { IOptionRegr } from '../../data/transforms/regression';
|
|
10
|
+
import type { VChart } from '../../vchart-all';
|
|
10
11
|
export type IMarkerSupportSeries = ICartesianSeries | IPolarSeries | IGeoSeries;
|
|
11
12
|
export type IPolarPoint = {
|
|
12
13
|
angle: number;
|
|
@@ -98,8 +99,8 @@ export type IMarkerSymbol = IMarkerRef & {
|
|
|
98
99
|
symbolType?: SymbolType;
|
|
99
100
|
size?: number;
|
|
100
101
|
} & Partial<IMarkerState<Omit<ISymbolMarkSpec, 'visible'>>>;
|
|
101
|
-
export type MarkerStyleCallback<T> = (markerData: DataView) => T;
|
|
102
|
-
export type MarkerStateCallback<T> = (markerData: DataView) => T;
|
|
102
|
+
export type MarkerStyleCallback<T> = (markerData: DataView, context: IMarkerAttributeContext) => T;
|
|
103
|
+
export type MarkerStateCallback<T> = (markerData: DataView, context: IMarkerAttributeContext) => T;
|
|
103
104
|
export type MarkerStateValue = 'hover' | 'hover_reverse' | 'selected' | 'selected_reverse';
|
|
104
105
|
export type IMarkerState<T> = {
|
|
105
106
|
style?: T | MarkerStyleCallback<T>;
|
|
@@ -112,3 +113,9 @@ export type IMarkProcessOptions = {
|
|
|
112
113
|
needRegr?: boolean;
|
|
113
114
|
processData?: DataView;
|
|
114
115
|
};
|
|
116
|
+
export type IMarkerAttributeContext = {
|
|
117
|
+
vchart: VChart;
|
|
118
|
+
relativeSeries: IMarkerSupportSeries;
|
|
119
|
+
startRelativeSeries: IMarkerSupportSeries;
|
|
120
|
+
endRelativeSeries: IMarkerSupportSeries;
|
|
121
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
import { type IPointLike } from '@visactor/vutils';
|
|
3
3
|
import type { Datum, IPoint } from '../../typings';
|
|
4
|
-
import type { IDataPos, IMarkerLabelSpec, IMarkerState, IMarkerSupportSeries, IPolarPoint, MarkerPositionPoint, MarkerStateValue } from './interface';
|
|
4
|
+
import type { IDataPos, IMarkerAttributeContext, IMarkerLabelSpec, IMarkerState, IMarkerSupportSeries, IPolarPoint, MarkerPositionPoint, MarkerStateValue } from './interface';
|
|
5
5
|
import type { IRegion } from '../../region/interface';
|
|
6
6
|
import type { OffsetPoint } from './interface';
|
|
7
7
|
export declare function isAggrSpec(spec: IDataPos): boolean;
|
|
@@ -17,9 +17,9 @@ export declare function computeClipRange(regions: IRegion[]): {
|
|
|
17
17
|
minY: number;
|
|
18
18
|
maxY: number;
|
|
19
19
|
};
|
|
20
|
-
export declare function transformLabelAttributes(label: IMarkerLabelSpec, markerData: any): any;
|
|
21
|
-
export declare function transformState(state: {} | Record<MarkerStateValue, any | IMarkerState<any>>, markerData: DataView): {} | Record<MarkerStateValue, any>;
|
|
22
|
-
export declare function transformStyle(style: any, markerData: DataView): any;
|
|
20
|
+
export declare function transformLabelAttributes(label: IMarkerLabelSpec, markerData: any, markAttributeContext: IMarkerAttributeContext): any;
|
|
21
|
+
export declare function transformState(state: {} | Record<MarkerStateValue, any | IMarkerState<any>>, markerData: DataView, markerAttributeContext: IMarkerAttributeContext): {} | Record<MarkerStateValue, any>;
|
|
22
|
+
export declare function transformStyle(style: any, markerData: DataView, markerAttributeContext: IMarkerAttributeContext): any;
|
|
23
23
|
export declare function transformOffset(offset: string | number | Function, region: IRegion): any;
|
|
24
24
|
export declare function computeOffsetFromRegion(point: IPointLike, offset: string | number, region: IRegion): number;
|
|
25
25
|
export declare function getMarkLineProcessInfo(spec: any): {
|
package/types/core/index.d.ts
CHANGED
|
@@ -4,11 +4,13 @@ export { VChart, Factory };
|
|
|
4
4
|
export declare const version: string;
|
|
5
5
|
export type { IVChart } from './interface';
|
|
6
6
|
export type { IStateSpec, StateValueType } from '../compile/mark';
|
|
7
|
+
export type { IRegion } from '../region/interface';
|
|
7
8
|
export * from '../typings/spec/common';
|
|
8
9
|
export * from '../event/interface';
|
|
9
10
|
export * from '../theme/interface';
|
|
10
11
|
export * from './interface';
|
|
11
12
|
export * from '../constant/base';
|
|
13
|
+
export * from '../constant/data';
|
|
12
14
|
export * from '../typings/spec/index';
|
|
13
15
|
export * from '../typings/tooltip';
|
|
14
16
|
export * from '../theme/index';
|
|
@@ -40,8 +40,8 @@ export declare class BarSeries<T extends IBarSeriesSpec = IBarSeriesSpec> extend
|
|
|
40
40
|
protected _dataToPosX1(datum: Datum): number;
|
|
41
41
|
protected _dataToPosY(datum: Datum): number;
|
|
42
42
|
protected _dataToPosY1(datum: Datum): number;
|
|
43
|
-
protected _getBarXStart: (datum: Datum, scale: IBaseScale) => any;
|
|
44
|
-
protected _getBarXEnd: (datum: Datum, scale: IBaseScale) => any;
|
|
43
|
+
protected _getBarXStart: (datum: Datum, scale: IBaseScale, useWholeRange?: boolean) => any;
|
|
44
|
+
protected _getBarXEnd: (datum: Datum, scale: IBaseScale, useWholeRange?: boolean) => any;
|
|
45
45
|
protected _getBarYStart: (datum: Datum, scale: IBaseScale) => any;
|
|
46
46
|
protected _getBarYEnd: (datum: Datum, scale: IBaseScale) => any;
|
|
47
47
|
initBandRectMarkStyle(): void;
|
|
@@ -18,7 +18,7 @@ export interface ISankeySeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimation
|
|
|
18
18
|
targetField?: string;
|
|
19
19
|
direction?: DirectionType;
|
|
20
20
|
nodeAlign?: 'left' | 'right' | 'center' | 'justify' | 'start' | 'end';
|
|
21
|
-
crossNodeAlign?: 'start' | 'end' | 'middle';
|
|
21
|
+
crossNodeAlign?: 'start' | 'end' | 'middle' | 'parent';
|
|
22
22
|
inverse?: boolean;
|
|
23
23
|
nodeGap?: number;
|
|
24
24
|
nodeWidth?: string | number | ((node: SankeyNodeElement) => number);
|
|
@@ -26,6 +26,8 @@ export interface ISankeySeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimation
|
|
|
26
26
|
minStepWidth?: number;
|
|
27
27
|
minNodeHeight?: number;
|
|
28
28
|
minLinkHeight?: number;
|
|
29
|
+
maxNodeHeight?: number;
|
|
30
|
+
maxLinkHeight?: number;
|
|
29
31
|
iterations?: number;
|
|
30
32
|
nodeKey?: string | number | ((datum: SankeyNodeDatum) => string | number);
|
|
31
33
|
linkSortBy?: (a: SankeyLinkElement, b: SankeyLinkElement) => number;
|
package/types/util/scale.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export declare function createScaleWithSpec(spec: IVisual<any>, context: {
|
|
|
16
16
|
globalScale: IGlobalScale;
|
|
17
17
|
seriesId: number;
|
|
18
18
|
}): IBaseScale | null;
|
|
19
|
-
export declare function valueInScaleRange(v: number, s?: IBaseScale): number;
|
|
19
|
+
export declare function valueInScaleRange(v: number, s?: IBaseScale, useWholeRange?: boolean): number;
|
|
20
20
|
export declare function isSpecValueWithScale(specValue: any): boolean;
|
|
21
21
|
export {};
|