@visactor/vchart-types 1.12.4-alpha.0 → 1.12.4-alpha.2
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/chart/base/base-chart.d.ts +2 -0
- package/types/chart/chart-meta/data.d.ts +1 -2
- package/types/chart/gauge/interface.d.ts +1 -1
- package/types/chart/interface/chart.d.ts +1 -0
- package/types/chart/mosaic/mosaic.d.ts +0 -1
- package/types/chart/pie/interface.d.ts +2 -2
- package/types/chart/polar/interface.d.ts +2 -0
- package/types/chart/treemap/interface.d.ts +1 -1
- package/types/chart/venn/interface.d.ts +2 -2
- package/types/compile/interface/compiler.d.ts +15 -0
- package/types/compile/mark/compilable-mark.d.ts +7 -39
- package/types/compile/mark/interface.d.ts +5 -25
- package/types/component/axis/base-axis.d.ts +2 -2
- package/types/component/axis/cartesian/axis.d.ts +2 -0
- package/types/component/axis/cartesian/interface/common.d.ts +1 -0
- package/types/component/axis/interface/spec.d.ts +1 -0
- package/types/component/axis/mixin/util/break-data.d.ts +1 -1
- package/types/component/axis/polar/axis.d.ts +1 -1
- package/types/component/axis/polar/interface/spec.d.ts +3 -1
- package/types/component/axis/util.d.ts +3 -0
- package/types/component/custom-mark/custom-mark.d.ts +1 -4
- package/types/component/data-zoom/data-filter-base-component.d.ts +3 -0
- 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/geo/geo-coordinate.d.ts +7 -0
- package/types/component/interface/common.d.ts +1 -1
- package/types/component/interface/index.d.ts +0 -1
- package/types/component/label/base-label.d.ts +1 -2
- package/types/component/label/interface.d.ts +2 -2
- package/types/component/label/label.d.ts +0 -1
- package/types/component/label/total-label.d.ts +1 -1
- package/types/component/label/util.d.ts +5 -5
- package/types/component/legend/util.d.ts +2 -2
- 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/component/player/player.d.ts +1 -3
- package/types/component/title/interface/spec.d.ts +3 -3
- package/types/component/title/interface/theme.d.ts +1 -1
- package/types/component/tooltip/constant.d.ts +5 -4
- package/types/component/tooltip/interface/common.d.ts +1 -1
- package/types/component/tooltip/interface/spec.d.ts +23 -3
- package/types/component/tooltip/interface/theme.d.ts +2 -2
- package/types/component/tooltip/processor/base.d.ts +4 -6
- package/types/component/tooltip/tooltip.d.ts +13 -6
- package/types/component/tooltip/utils/common.d.ts +6 -4
- package/types/component/tooltip/utils/get-spec.d.ts +4 -4
- package/types/component/tooltip/utils/get-value.d.ts +1 -2
- package/types/component/tooltip/utils/index.d.ts +0 -1
- package/types/component/util.d.ts +3 -0
- package/types/constant/layout.d.ts +1 -0
- package/types/core/vchart.d.ts +2 -1
- package/types/data/initialize.d.ts +1 -2
- package/types/data/transforms/pie.d.ts +3 -0
- package/types/interaction/interaction.d.ts +2 -0
- package/types/interaction/interface.d.ts +2 -0
- package/types/mark/interface/common.d.ts +10 -0
- package/types/model/base-model.d.ts +2 -2
- package/types/model/interface.d.ts +14 -0
- package/types/model/tooltip-helper.d.ts +8 -6
- package/types/plugin/chart/media-query/media-query.d.ts +1 -0
- package/types/plugin/chart/plugin-service.d.ts +2 -0
- package/types/plugin/components/axis-sync/zero-align-transform.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +1 -16
- package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +0 -1
- package/types/plugin/components/tooltip-handler/interface/style.d.ts +1 -2
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +3 -5
- package/types/region/interface.d.ts +3 -1
- package/types/series/area/area.d.ts +2 -0
- package/types/series/bar/bar.d.ts +4 -4
- package/types/series/bar/interface.d.ts +5 -1
- package/types/series/base/base-series.d.ts +8 -7
- package/types/series/base/tooltip-helper.d.ts +30 -6
- package/types/series/box-plot/box-plot.d.ts +1 -0
- package/types/series/box-plot/tooltip-helper.d.ts +2 -2
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +1 -0
- package/types/series/dot/dot.d.ts +0 -1
- package/types/series/dot/tooltip-helper.d.ts +8 -2
- package/types/series/funnel/funnel.d.ts +2 -0
- package/types/series/funnel/interface.d.ts +3 -1
- package/types/series/gauge/interface.d.ts +1 -1
- package/types/series/gauge/pointer-tooltip-helper.d.ts +6 -0
- package/types/series/heatmap/tooltip-helper.d.ts +2 -3
- package/types/series/interface/common.d.ts +1 -9
- package/types/series/interface/tooltip-helper.d.ts +5 -4
- package/types/series/link/tooltip-helper.d.ts +5 -2
- package/types/series/liquid/tooltip-helper.d.ts +4 -5
- package/types/series/map/map.d.ts +1 -0
- package/types/series/mixin/line-mixin.d.ts +2 -2
- package/types/series/pie/interface.d.ts +3 -3
- package/types/series/pie/pie.d.ts +1 -0
- package/types/series/polar/animation.d.ts +9 -11
- package/types/series/progress/linear/tooltip-helper.d.ts +2 -3
- package/types/series/radar/animation.d.ts +0 -3
- package/types/series/range-area/tooltip-helper.d.ts +1 -3
- package/types/series/range-column/tooltip-helper.d.ts +1 -2
- package/types/series/sankey/interface.d.ts +1 -0
- package/types/series/sankey/sankey.d.ts +2 -2
- package/types/series/sankey/tooltip-helper.d.ts +3 -3
- package/types/series/waterfall/waterfall.d.ts +1 -0
- package/types/typings/spec/common.d.ts +10 -5
- package/types/typings/tooltip/position.d.ts +1 -0
- package/types/typings/tooltip/shape.d.ts +0 -1
- package/types/typings/tooltip/tooltip.d.ts +7 -0
- package/types/util/array.d.ts +1 -1
- package/types/util/math.d.ts +1 -0
- package/types/util/scale.d.ts +1 -1
|
@@ -20,7 +20,6 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
20
20
|
private _linkMark;
|
|
21
21
|
private _nodeLayoutZIndex;
|
|
22
22
|
private _labelLayoutZIndex;
|
|
23
|
-
private _labelLimit;
|
|
24
23
|
protected _nodesSeriesData?: SeriesData;
|
|
25
24
|
protected _linksSeriesData?: SeriesData;
|
|
26
25
|
private _viewBox;
|
|
@@ -28,7 +27,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
28
27
|
private _colorScale;
|
|
29
28
|
private _nodeList;
|
|
30
29
|
private _needClear;
|
|
31
|
-
get direction(): "
|
|
30
|
+
get direction(): "horizontal" | "vertical";
|
|
32
31
|
getCategoryField(): string;
|
|
33
32
|
setCategoryField(f: string): string;
|
|
34
33
|
protected _valueField: string;
|
|
@@ -36,6 +35,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
36
35
|
setValueField(f: string): string;
|
|
37
36
|
setAttrFromSpec(): void;
|
|
38
37
|
initData(): void;
|
|
38
|
+
compileData(): void;
|
|
39
39
|
initMark(): void;
|
|
40
40
|
protected _buildMarkAttributeContext(): void;
|
|
41
41
|
valueToNode(value: StringOrNumber | StringOrNumber[]): any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ISeriesTooltipHelper } from '../interface';
|
|
2
2
|
import { BaseSeriesTooltipHelper } from '../base/tooltip-helper';
|
|
3
|
-
import type {
|
|
4
|
-
import type { IDimensionInfo } from '../../event/events/dimension/interface';
|
|
3
|
+
import type { Datum } from '@visactor/vgrammar-core';
|
|
5
4
|
export declare class SankeySeriesTooltipHelper extends BaseSeriesTooltipHelper implements ISeriesTooltipHelper {
|
|
6
|
-
|
|
5
|
+
protected _getDimensionData: (datum: any) => any;
|
|
6
|
+
markTooltipValueCallback: (datum: Datum) => string | undefined;
|
|
7
7
|
}
|
|
@@ -27,6 +27,7 @@ export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfall
|
|
|
27
27
|
setAttrFromSpec(): void;
|
|
28
28
|
getSeriesKeys(): string[];
|
|
29
29
|
protected initData(): void;
|
|
30
|
+
compileData(): void;
|
|
30
31
|
initAnimation(): void;
|
|
31
32
|
viewDataUpdate(d: DataView): void;
|
|
32
33
|
addViewDataFilter(_option: ITransformOptions): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IVChart } from './../../core/interface';
|
|
1
2
|
import type { IFillMarkSpec, IImageMarkSpec } from '../visual';
|
|
2
3
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
4
|
import type { IElement, srIOption3DType } from '@visactor/vgrammar-core';
|
|
@@ -5,7 +6,7 @@ import type { DataSet, DataView, ISimplifyOptions, IFieldsOptions, IFilterOption
|
|
|
5
6
|
import type { RegionSpec } from '../../region/interface';
|
|
6
7
|
import type { IHoverSpec, ISelectSpec, IInteractionSpec } from '../../interaction/interface';
|
|
7
8
|
import type { IRenderOption } from '../../compile/interface';
|
|
8
|
-
import type { ITooltipSpec } from '../../component/tooltip/interface';
|
|
9
|
+
import type { ISeriesTooltipSpec, ITooltipSpec } from '../../component/tooltip/interface';
|
|
9
10
|
import type { ILayoutSpec } from '../../layout/interface';
|
|
10
11
|
import type { ConvertToMarkStyleSpec, IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICommonSpec, IGroupMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IRuleMarkSpec, ISymbolMarkSpec, IRippleMarkSpec, ITextMarkSpec, IVisualSpecScale } from '../visual';
|
|
11
12
|
import type { StateValue } from '../../compile/mark';
|
|
@@ -41,6 +42,7 @@ export interface IInitOption extends Omit<IRenderOption, 'pluginList'> {
|
|
|
41
42
|
onError?: (...args: any[]) => void;
|
|
42
43
|
theme?: string | ITheme;
|
|
43
44
|
disableTriggerEvent?: boolean;
|
|
45
|
+
resizeDelay?: number;
|
|
44
46
|
}
|
|
45
47
|
export declare enum RenderModeEnum {
|
|
46
48
|
'desktop-browser' = "desktop-browser",
|
|
@@ -158,14 +160,15 @@ export interface ISeriesSpec extends IInteractionSpec {
|
|
|
158
160
|
percent?: boolean;
|
|
159
161
|
stackOffsetSilhouette?: boolean;
|
|
160
162
|
invalidType?: IInvalidType;
|
|
161
|
-
tooltip?:
|
|
163
|
+
tooltip?: ISeriesTooltipSpec;
|
|
162
164
|
animation?: boolean;
|
|
163
165
|
animationThreshold?: number;
|
|
164
166
|
support3d?: boolean;
|
|
165
167
|
morph?: IMorphSeriesSpec;
|
|
166
168
|
extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[];
|
|
169
|
+
zIndex?: number;
|
|
167
170
|
}
|
|
168
|
-
export type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph' | 'stackValue'>;
|
|
171
|
+
export type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph' | 'stackValue' | 'tooltip'>;
|
|
169
172
|
export type AdaptiveSpec<T, K extends keyof any> = {
|
|
170
173
|
[key in Exclude<keyof T, K>]: T[key];
|
|
171
174
|
} & {
|
|
@@ -208,8 +211,9 @@ export type IMarkTheme<T> = {
|
|
|
208
211
|
interactive?: boolean;
|
|
209
212
|
};
|
|
210
213
|
export interface IPerformanceHook {
|
|
211
|
-
|
|
212
|
-
|
|
214
|
+
afterCreateVChart?: (vchart?: IVChart) => void;
|
|
215
|
+
beforeInitializeChart?: (vchart?: IVChart) => void;
|
|
216
|
+
afterInitializeChart?: (vchart?: IVChart) => void;
|
|
213
217
|
beforeCompileToVGrammar?: () => void;
|
|
214
218
|
afterCompileToVGrammar?: () => void;
|
|
215
219
|
beforeRegionCompile?: () => void;
|
|
@@ -261,6 +265,7 @@ export type IBuildinMarkSpec = {
|
|
|
261
265
|
export type EnableMarkType = keyof IBuildinMarkSpec;
|
|
262
266
|
export interface ICustomMarkSpec<T extends EnableMarkType> extends IModelSpec, IMarkSpec<IBuildinMarkSpec[T]>, IAnimationSpec<string, string> {
|
|
263
267
|
type: T;
|
|
268
|
+
name?: string;
|
|
264
269
|
dataIndex?: number;
|
|
265
270
|
dataKey?: string | ((datum: any) => string);
|
|
266
271
|
dataId?: StringOrNumber;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ITooltipHandlerSpec } from '../../component/tooltip/interface/spec';
|
|
1
2
|
import type { MaybeArray } from '../common';
|
|
2
3
|
import type { TooltipPatternProperty, TooltipUpdateCallback } from './common';
|
|
3
4
|
import type { TooltipActiveType, TooltipData } from './handler';
|
|
@@ -28,4 +29,10 @@ export interface ITooltipActual {
|
|
|
28
29
|
activeType?: TooltipActiveType;
|
|
29
30
|
position?: ITooltipPositionActual;
|
|
30
31
|
data?: TooltipData;
|
|
32
|
+
handler?: Partial<ITooltipHandlerSpec>;
|
|
33
|
+
maxLineCount?: number;
|
|
34
|
+
updateTitle?: TooltipUpdateCallback<ITooltipLineActual>;
|
|
35
|
+
updateContent?: TooltipUpdateCallback<ITooltipLineActual[]>;
|
|
36
|
+
updatePosition?: TooltipUpdateCallback<ITooltipPositionActual>;
|
|
37
|
+
othersLine?: ITooltipLineActual;
|
|
31
38
|
}
|
package/types/util/array.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { array, last as peek, maxInArray as maxInArr, minInArray as minInArr } from '@visactor/vutils';
|
|
2
2
|
export declare function shallowCompare<T, U>(arrA: T | T[], arrB: U | U[]): boolean;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function combineDomains(domains: number[][]): number[];
|
|
4
4
|
export { array, peek, maxInArr, minInArr };
|
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;
|
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 {};
|