@visactor/vchart-types 1.13.21-alpha.0 → 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.
@@ -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 };
@@ -22,7 +22,6 @@ import { Compiler } from '../compile/compiler';
22
22
  import type { IMorphConfig } from '../animation/spec';
23
23
  import type { DataLinkAxis, DataLinkSeries, IGlobalConfig, IVChart, IVChartRenderOption } from './interface';
24
24
  import { InstanceManager } from './instance-manager';
25
- import type { IChartPluginService } from '../plugin/chart/interface';
26
25
  export declare class VChart implements IVChart {
27
26
  readonly id: number;
28
27
  static useRegisters(comps: (() => void)[]): void;
@@ -78,7 +77,6 @@ export declare class VChart implements IVChart {
78
77
  private _context;
79
78
  private _isReleased;
80
79
  private _chartPlugin?;
81
- get chartPlugin(): IChartPluginService<any>;
82
80
  private _onResize?;
83
81
  constructor(spec: ISpec, options: IInitOption);
84
82
  private _setNewSpec;
@@ -1,5 +1,4 @@
1
1
  import type { SankeyOptions, SankeyData } from '@visactor/vgrammar-sankey';
2
- import { SankeyLayout } from '@visactor/vgrammar-sankey';
3
2
  export interface ISankeyOpt extends SankeyOptions {
4
3
  targetField: string;
5
4
  sourceField: string;
@@ -10,7 +9,6 @@ export interface ISankeyOpt extends SankeyOptions {
10
9
  y0: number;
11
10
  y1: number;
12
11
  };
13
- customLayout?: (layout: SankeyLayout, originalData: SankeyData, view: ReturnType<ISankeyOpt['view']>, option: ISankeyOpt) => ReturnType<SankeyLayout['layout']>;
14
12
  }
15
13
  export declare const collectHierarchyField: (set: Set<any>, data: any[], field: string) => void;
16
14
  export declare const sankeyFormat: (data: any[]) => SankeyData[];
package/types/index.d.ts CHANGED
@@ -18,3 +18,5 @@ export * from './plugin/other';
18
18
  export * from './vrender-tools';
19
19
  export * from './util/data';
20
20
  export * from './util/spec/transform';
21
+ export * from './constant/attribute';
22
+ export * from './data/register';
@@ -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;
@@ -6,7 +6,6 @@ import type { IChartSpecInfo } from '../../chart/interface/common';
6
6
  export declare class ChartPluginService<T extends IChartPlugin = IChartPlugin> extends BasePluginService<T> implements IChartPluginService<T> {
7
7
  globalInstance: IVChart;
8
8
  constructor(globalInstance: IVChart);
9
- getPlugin(name: string): T | undefined;
10
9
  onInit(chartSpec: any): void;
11
10
  onBeforeResize(width: number, height: number): void;
12
11
  onAfterChartSpecTransform(chartSpec: any, actionSource: VChartRenderActionSource): void;
@@ -1,4 +1,4 @@
1
- import type { IGroup, IRectGraphicAttribute } from '@visactor/vrender-core';
1
+ import type { IGroup } from '@visactor/vrender-core';
2
2
  import { BasePlugin } from '../../base/base-plugin';
3
3
  import type { IChartPluginService } from '../interface';
4
4
  import type { IScrollPlugin } from './interface';
@@ -6,15 +6,11 @@ export declare class ScrollPlugin extends BasePlugin implements IScrollPlugin {
6
6
  static readonly pluginType: 'chart';
7
7
  static readonly type: string;
8
8
  readonly type: string;
9
- readonly name: string;
10
9
  private _service;
11
10
  private _spec;
12
- private _lastScrollX;
13
- private _lastScrollY;
14
11
  private _scrollLimit;
15
12
  private _xScrollComponent;
16
13
  private _yScrollComponent;
17
- private _event;
18
14
  constructor();
19
15
  onInit(service: IChartPluginService, chartSpec: any): void;
20
16
  onLayoutRectUpdate(service: IChartPluginService): void;
@@ -23,19 +19,9 @@ export declare class ScrollPlugin extends BasePlugin implements IScrollPlugin {
23
19
  protected _bindEvent(service: IChartPluginService): void;
24
20
  protected getRootMark(): IGroup;
25
21
  protected onWheel: (e: WheelEvent) => void;
26
- private _computeFinalScrollY;
27
- private _computeFinalScrollX;
28
22
  private _updateScrollY;
29
23
  private _getYScrollComponent;
30
24
  private _updateScrollX;
31
25
  private _getXScrollComponent;
32
- scrollTo({ x, y }: {
33
- x?: number;
34
- y?: number;
35
- }): void;
36
26
  }
37
- export declare const registerScrollPlugin: (theme?: {
38
- size?: number;
39
- railStyle?: Omit<IRectGraphicAttribute, 'width' | 'height'>;
40
- sliderStyle?: Omit<IRectGraphicAttribute, 'width' | 'height'>;
41
- }) => void;
27
+ export declare const registerScrollPlugin: () => void;
@@ -4,8 +4,6 @@ import type { IRectMarkSpec, ILinkPathMarkSpec } from '../../typings/visual';
4
4
  import type { IAnimationSpec } from '../../animation/spec';
5
5
  import type { SeriesMarkNameEnum } from '../interface/type';
6
6
  import type { ILabelSpec } from '../../component/label/interface';
7
- import type { SankeyLayout } from '@visactor/vgrammar-sankey';
8
- import type { ISankeyOpt } from '../../data/transforms/sankey';
9
7
  export type SankeyMark = 'node' | 'link' | 'label';
10
8
  export type SankeyAppearPreset = 'growIn' | 'fadeIn';
11
9
  export interface ISankeyAnimationParams {
@@ -55,7 +53,6 @@ export interface ISankeySeriesSpec extends Omit<ISeriesSpec, 'data'>, IAnimation
55
53
  };
56
54
  [SeriesMarkNameEnum.label]?: ISankeyLabelSpec | ISankeyLabelSpec[];
57
55
  overflow?: 'scroll' | 'hidden' | 'scroll-x' | 'scroll-y';
58
- customLayout?: (layout: SankeyLayout, originalData: SankeyData, view: ReturnType<ISankeyOpt['view']>) => ReturnType<SankeyLayout['layout']>;
59
56
  }
60
57
  export interface SankeyLinkDatum {
61
58
  source: string | number;
@@ -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
- private _nodeMark;
19
- private _linkMark;
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
- private _needClear;
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: (highlightState: string, blurState: string) => void;
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: (element: IElement, highlightState: string, blurState: string) => void;
61
- protected _handleLinkRelatedClick: (element: IGlyphElement, highlightState: string, blurState: string) => void;
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;