@visactor/vchart-types 1.13.20 → 1.13.21-alpha.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/chart/index.d.ts +2 -2
- package/types/chart/interface/common.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/types/mark/index.d.ts +3 -2
- package/types/plugin/chart/interface.d.ts +4 -0
- package/types/plugin/chart/plugin-service.d.ts +2 -0
- package/types/plugin/chart/scroll/index.d.ts +2 -0
- package/types/plugin/chart/scroll/interface.d.ts +11 -0
- package/types/plugin/chart/scroll/scroll.d.ts +27 -0
- package/types/series/sankey/sankey.d.ts +7 -7
package/types/chart/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ import { RangeColumnChart, RangeColumn3dChart, registerRangeColumnChart, registe
|
|
|
35
35
|
import type { IRoseChartSpec } from './rose';
|
|
36
36
|
import { RoseChart, registerRoseChart } from './rose';
|
|
37
37
|
import type { ISankeyChartSpec } from './sankey';
|
|
38
|
-
import { SankeyChart, registerSankeyChart } from './sankey';
|
|
38
|
+
import { SankeyChart, registerSankeyChart, SankeyChartSpecTransformer } from './sankey';
|
|
39
39
|
import type { IScatterChartSpec } from './scatter';
|
|
40
40
|
import { ScatterChart, registerScatterChart } from './scatter';
|
|
41
41
|
import type { ISequenceChartSpec } from './sequence';
|
|
@@ -61,6 +61,6 @@ import type { IMosaicChartSpec } from './mosaic';
|
|
|
61
61
|
import { MosaicChart, registerMosaicChart } from './mosaic';
|
|
62
62
|
import type { IPictogramChartSpec } from './pictogram/interface';
|
|
63
63
|
import { PictogramChart, registerPictogramChart } from './pictogram/pictogram';
|
|
64
|
-
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, WordCloudChart, WordCloud3dChart, TreemapChart, VennChart, BaseChart, MosaicChart, PictogramChart };
|
|
64
|
+
export { AreaChart, BarChart, Bar3dChart, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChart, Funnel3dChart, GaugeChart, HeatmapChart, HistogramChart, Histogram3dChart, LineChart, MapChart, PieChart, Pie3dChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeColumn3dChart, RangeAreaChart, RoseChart, SankeyChart, SankeyChartSpecTransformer, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, WordCloudChart, WordCloud3dChart, TreemapChart, VennChart, BaseChart, MosaicChart, PictogramChart };
|
|
65
65
|
export { registerLineChart, registerAreaChart, registerBarChart, registerBar3dChart, registerBoxplotChart, registerCirclePackingChart, registerCircularProgressChart, registerCommonChart, registerFunnelChart, registerFunnel3dChart, registerGaugeChart, registerHeatmapChart, registerHistogramChart, registerHistogram3dChart, registerLinearProgressChart, registerMapChart, registerPie3dChart, registerPieChart, registerRadarChart, registerRangeAreaChart, registerRangeColumn3dChart, registerRangeColumnChart, registerRoseChart, registerSankeyChart, registerScatterChart, registerSequenceChart, registerSunburstChart, registerTreemapChart, registerWaterfallChart, registerWordCloud3dChart, registerWordCloudChart, registerCorrelationChart, registerLiquidChart, registerWordCloudShapeChart, registerVennChart, registerMosaicChart, registerPictogramChart };
|
|
66
66
|
export type { IAreaChartSpec, IBarChartSpec, IBar3dChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IFunnel3dChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, IHistogram3dChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, IPie3dChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeColumn3dChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloud3dChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, IVennChartSpec, IMosaicChartSpec, IPictogramChartSpec };
|
|
@@ -5,6 +5,7 @@ import type { IView } from '@visactor/vgrammar-core';
|
|
|
5
5
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
6
6
|
import type { ISeriesSpecInfo } from '../../series/interface';
|
|
7
7
|
import type { IRegionSpecInfo } from '../../region/interface';
|
|
8
|
+
import type { IChartPluginService } from '../../plugin/chart/interface';
|
|
8
9
|
export interface ILayoutParams {
|
|
9
10
|
srView?: IView;
|
|
10
11
|
group?: any;
|
|
@@ -20,6 +21,7 @@ export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'g
|
|
|
20
21
|
viewBox?: IBoundsLike;
|
|
21
22
|
layout?: LayoutCallBack;
|
|
22
23
|
disableTriggerEvent?: boolean;
|
|
24
|
+
chartPluginApply?: (funcName: keyof IChartPluginService, ...args: any[]) => any;
|
|
23
25
|
}
|
|
24
26
|
export interface IChartSpecTransformerOption extends Partial<IChartOption> {
|
|
25
27
|
seriesType?: string;
|
package/types/index.d.ts
CHANGED
package/types/mark/index.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { PathMark, registerPathMark } from './path';
|
|
|
10
10
|
import { ArcMark, registerArcMark } from './arc';
|
|
11
11
|
import { Arc3dMark, registerArc3dMark } from './arc-3d';
|
|
12
12
|
import { ComponentMark, registerComponentMark } from './component';
|
|
13
|
+
import { LinkPathMark, registerLinkPathMark } from './link-path';
|
|
13
14
|
import { RippleMark, registerRippleMark } from './ripple';
|
|
14
15
|
import { BaseMark } from './base';
|
|
15
16
|
import { PolygonMark, registerPolygonMark } from './polygon/polygon';
|
|
16
17
|
import { Pyramid3dMark, registerPyramid3dMark } from './polygon/pyramid-3d';
|
|
17
18
|
import { ImageMark, registerImageMark } from './image';
|
|
18
19
|
export type { IBoxPlotMarkSpec, ILineMarkSpec, ISymbolMarkSpec, IGroupMarkSpec, IRuleMarkSpec, ITextMarkSpec, IAreaMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IPathMarkSpec, IArcMarkSpec, IArc3dMarkSpec, ICommonSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, ILinkPathMarkSpec, IRippleMarkSpec, ICellMarkSpec, ILiquidMarkSpec, ConvertToMarkStyleSpec } from '../typings/visual';
|
|
19
|
-
export { LineMark, SymbolMark, GroupMark, RuleMark, TextMark, AreaMark, Rect3dMark, RectMark, PathMark, Arc3dMark, ArcMark, ComponentMark, PolygonMark, Pyramid3dMark, RippleMark, ImageMark, BaseMark };
|
|
20
|
-
export { registerLineMark, registerSymbolMark, registerGroupMark, registerRuleMark, registerTextMark, registerAreaMark, registerRectMark, registerRect3dMark, registerPathMark, registerArcMark, registerArc3dMark, registerPolygonMark, registerPyramid3dMark, registerRippleMark, registerImageMark, registerComponentMark };
|
|
20
|
+
export { LineMark, SymbolMark, GroupMark, RuleMark, TextMark, AreaMark, Rect3dMark, RectMark, PathMark, Arc3dMark, ArcMark, ComponentMark, PolygonMark, Pyramid3dMark, RippleMark, ImageMark, BaseMark, LinkPathMark };
|
|
21
|
+
export { registerLineMark, registerSymbolMark, registerGroupMark, registerRuleMark, registerTextMark, registerAreaMark, registerRectMark, registerRect3dMark, registerPathMark, registerArcMark, registerArc3dMark, registerPolygonMark, registerPyramid3dMark, registerRippleMark, registerImageMark, registerComponentMark, registerLinkPathMark };
|
|
21
22
|
export declare const registerAllMarks: () => void;
|
|
@@ -8,6 +8,8 @@ export interface IChartPlugin<T extends IChartPluginService = any> extends IBase
|
|
|
8
8
|
onAfterChartSpecTransform?: (service: T, chartSpec: any, actionSource: VChartRenderActionSource) => MaybePromise<void>;
|
|
9
9
|
onAfterModelSpecTransform?: (service: T, chartSpec: any, chartSpecInfo: IChartSpecInfo, actionSource: VChartRenderActionSource) => MaybePromise<void>;
|
|
10
10
|
onBeforeInitChart?: (service: T, chartSpec: any, actionSource: VChartRenderActionSource) => MaybePromise<void>;
|
|
11
|
+
onLayoutRectUpdate?: (service: T) => void;
|
|
12
|
+
onAfterRender?: (service: T) => void;
|
|
11
13
|
}
|
|
12
14
|
export interface IChartPluginConstructor {
|
|
13
15
|
readonly pluginType: 'chart';
|
|
@@ -22,4 +24,6 @@ export interface IChartPluginService<T extends IChartPlugin = any> extends IBase
|
|
|
22
24
|
onAfterChartSpecTransform?: (chartSpec: any, actionSource: VChartRenderActionSource) => MaybePromise<void>;
|
|
23
25
|
onAfterModelSpecTransform?: (chartSpec: any, chartSpecInfo: IChartSpecInfo, actionSource: VChartRenderActionSource) => MaybePromise<void>;
|
|
24
26
|
onBeforeInitChart?: (chartSpec: any, actionSource: VChartRenderActionSource) => MaybePromise<void>;
|
|
27
|
+
onLayoutRectUpdate?: () => void;
|
|
28
|
+
onAfterRender?: () => void;
|
|
25
29
|
}
|
|
@@ -11,5 +11,7 @@ export declare class ChartPluginService<T extends IChartPlugin = IChartPlugin> e
|
|
|
11
11
|
onAfterChartSpecTransform(chartSpec: any, actionSource: VChartRenderActionSource): void;
|
|
12
12
|
onAfterModelSpecTransform(chartSpec: any, chartSpecInfo: IChartSpecInfo, actionSource: VChartRenderActionSource): void;
|
|
13
13
|
onBeforeInitChart(chartSpec: any, actionSource: VChartRenderActionSource): void;
|
|
14
|
+
onLayoutRectUpdate(): void;
|
|
15
|
+
onAfterRender(): void;
|
|
14
16
|
releaseAll(): void;
|
|
15
17
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ScrollBarAttributes } from '@visactor/vrender-components';
|
|
2
|
+
import type { IChartPlugin } from '../interface';
|
|
3
|
+
export type IScrollPlugin = IChartPlugin;
|
|
4
|
+
export interface IScrollPluginSpec {
|
|
5
|
+
x?: {
|
|
6
|
+
enable: boolean;
|
|
7
|
+
} & Omit<ScrollBarAttributes, 'direction' | 'range'>;
|
|
8
|
+
y?: {
|
|
9
|
+
enable: boolean;
|
|
10
|
+
} & Omit<ScrollBarAttributes, 'direction' | 'range'>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IGroup } from '@visactor/vrender-core';
|
|
2
|
+
import { BasePlugin } from '../../base/base-plugin';
|
|
3
|
+
import type { IChartPluginService } from '../interface';
|
|
4
|
+
import type { IScrollPlugin } from './interface';
|
|
5
|
+
export declare class ScrollPlugin extends BasePlugin implements IScrollPlugin {
|
|
6
|
+
static readonly pluginType: 'chart';
|
|
7
|
+
static readonly type: string;
|
|
8
|
+
readonly type: string;
|
|
9
|
+
private _service;
|
|
10
|
+
private _spec;
|
|
11
|
+
private _scrollLimit;
|
|
12
|
+
private _xScrollComponent;
|
|
13
|
+
private _yScrollComponent;
|
|
14
|
+
constructor();
|
|
15
|
+
onInit(service: IChartPluginService, chartSpec: any): void;
|
|
16
|
+
onLayoutRectUpdate(service: IChartPluginService): void;
|
|
17
|
+
onAfterRender(): void;
|
|
18
|
+
release(): void;
|
|
19
|
+
protected _bindEvent(service: IChartPluginService): void;
|
|
20
|
+
protected getRootMark(): IGroup;
|
|
21
|
+
protected onWheel: (e: WheelEvent) => void;
|
|
22
|
+
private _updateScrollY;
|
|
23
|
+
private _getYScrollComponent;
|
|
24
|
+
private _updateScrollX;
|
|
25
|
+
private _getXScrollComponent;
|
|
26
|
+
}
|
|
27
|
+
export declare const registerScrollPlugin: () => void;
|
|
@@ -6,7 +6,7 @@ import { SeriesData } from '../base/series-data';
|
|
|
6
6
|
import type { ISankeySeriesSpec } from './interface';
|
|
7
7
|
import type { ExtendEventParam } from '../../event/interface';
|
|
8
8
|
import type { IElement, IGlyphElement, IMark as IVgrammarMark } from '@visactor/vgrammar-core';
|
|
9
|
-
import type { IMark, ITextMark } from '../../mark/interface';
|
|
9
|
+
import type { ILinkPathMark, IMark, IRectMark, ITextMark } from '../../mark/interface';
|
|
10
10
|
import { SankeySeriesSpecTransformer } from './sankey-transformer';
|
|
11
11
|
import type { ILabelSpec } from '../../component';
|
|
12
12
|
export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpec> extends CartesianSeries<T> {
|
|
@@ -15,8 +15,8 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
15
15
|
static readonly transformerConstructor: any;
|
|
16
16
|
readonly transformerConstructor: typeof SankeySeriesSpecTransformer;
|
|
17
17
|
static readonly mark: SeriesMarkMap;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
protected _nodeMark: IRectMark;
|
|
19
|
+
protected _linkMark: ILinkPathMark;
|
|
20
20
|
private _nodeLayoutZIndex;
|
|
21
21
|
private _labelLayoutZIndex;
|
|
22
22
|
protected _nodesSeriesData?: SeriesData;
|
|
@@ -25,7 +25,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
25
25
|
protected _categoryField: string;
|
|
26
26
|
private _colorScale;
|
|
27
27
|
private _nodeList;
|
|
28
|
-
|
|
28
|
+
protected _needClear: boolean;
|
|
29
29
|
get direction(): "vertical" | "horizontal";
|
|
30
30
|
getCategoryField(): string;
|
|
31
31
|
setCategoryField(f: string): string;
|
|
@@ -54,11 +54,11 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
|
|
|
54
54
|
private nodesSeriesDataUpdate;
|
|
55
55
|
private linksSeriesDataUpdate;
|
|
56
56
|
protected _handleEmphasisElement: (params: ExtendEventParam) => void;
|
|
57
|
-
protected _handleClearEmpty
|
|
57
|
+
protected _handleClearEmpty(highlightState: string, blurState: string): void;
|
|
58
58
|
protected _handleNodeAdjacencyClick: (element: IElement, highlightState: string, blurState: string) => void;
|
|
59
59
|
protected _handleLinkAdjacencyClick: (element: IGlyphElement, highlightState: string, blurState: string) => void;
|
|
60
|
-
protected _handleNodeRelatedClick
|
|
61
|
-
protected _handleLinkRelatedClick
|
|
60
|
+
protected _handleNodeRelatedClick(element: IElement, highlightState: string, blurState: string): void;
|
|
61
|
+
protected _handleLinkRelatedClick(element: IGlyphElement, highlightState: string, blurState: string): void;
|
|
62
62
|
protected _highLightElements(vGrammarElements: IVgrammarMark['elements'], highlightNodes: string[], highlightState: string, blurState: string): void;
|
|
63
63
|
protected initTooltip(): void;
|
|
64
64
|
_setNodeOrdinalColorScale(): void;
|