@visactor/vchart-types 2.0.2 → 2.0.3-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, registerRangeColumnChart } from './range-column';
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';
@@ -63,6 +63,6 @@ import type { IChart } from './interface/chart';
63
63
  import { BaseWordCloudChart } from './word-cloud/base/base';
64
64
  import { BaseWordCloudChartSpecTransformer } from './word-cloud/base/word-cloud-base-transformer';
65
65
  import { BaseHistogramChart } from './histogram/base/base';
66
- export { AreaChart, BarChart, BarChartSpecTransformer, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChartSpecTransformer, FunnelChart, GaugeChart, HeatmapChart, HistogramChartSpecTransformer, BaseHistogramChart, HistogramChart, LineChart, MapChart, BasePieChartSpecTransformer, BasePieChart, PieChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeAreaChart, RoseChart, SankeyChart, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, BaseWordCloudChartSpecTransformer, BaseWordCloudChart, WordCloudChart, TreemapChart, VennChart, BaseChart, MosaicChart };
66
+ export { AreaChart, BarChart, BarChartSpecTransformer, BoxPlotChart, CirclePackingChart, CommonChart, FunnelChartSpecTransformer, FunnelChart, GaugeChart, HeatmapChart, HistogramChartSpecTransformer, BaseHistogramChart, HistogramChart, LineChart, MapChart, BasePieChartSpecTransformer, BasePieChart, PieChart, CircularProgressChart, LinearProgressChart, RadarChart, RangeColumnChart, RangeAreaChart, RoseChart, SankeyChart, SankeyChartSpecTransformer, ScatterChart, SunburstChart, SequenceChart, WaterfallChart, CorrelationChart, LiquidChart, BaseWordCloudChartSpecTransformer, BaseWordCloudChart, WordCloudChart, TreemapChart, VennChart, BaseChart, MosaicChart };
67
67
  export { registerLineChart, registerAreaChart, registerBarChart, registerBoxplotChart, registerCirclePackingChart, registerCircularProgressChart, registerCommonChart, registerFunnelChart, registerGaugeChart, registerHeatmapChart, registerHistogramChart, registerLinearProgressChart, registerMapChart, registerPieChart, registerRadarChart, registerRangeAreaChart, registerRangeColumnChart, registerRoseChart, registerSankeyChart, registerScatterChart, registerSequenceChart, registerSunburstChart, registerTreemapChart, registerWaterfallChart, registerWordCloudChart, registerCorrelationChart, registerLiquidChart, registerWordCloudShapeChart, registerVennChart, registerMosaicChart };
68
68
  export type { IChart, IAreaChartSpec, IBarChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, IVennChartSpec, IMosaicChartSpec };
@@ -5,7 +5,7 @@ import type { IBoundsLike } from '@visactor/vutils';
5
5
  import type { ISeriesSpecInfo } from '../../series/interface';
6
6
  import type { IRegionSpecInfo } from '../../region/interface';
7
7
  import type { IPerformanceHook } from '../../typings';
8
- export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'getChartLayoutRect' | 'globalScale' | 'getChart' | 'getSeriesData'> {
8
+ export interface IChartOption extends Omit<IModelOption, 'getChartViewRect' | 'getChartLayoutRect' | 'globalScale' | 'getChart' | 'getSeriesData' | 'animation'> {
9
9
  container: HTMLElement | null;
10
10
  canvas?: HTMLCanvasElement | OffscreenCanvas | string;
11
11
  modeParams?: IRenderOption['modeParams'];
@@ -102,6 +102,7 @@ export interface IVChart {
102
102
  x: number;
103
103
  y: number;
104
104
  }) => void;
105
+ isAnimationEnable: () => boolean;
105
106
  stopAnimation: () => void;
106
107
  pauseAnimation: () => void;
107
108
  resumeAnimation: () => void;
@@ -208,6 +208,7 @@ export declare class VChart implements IVChart {
208
208
  private _chartPluginApply;
209
209
  protected _getMode(): (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
210
210
  protected getTheme: (...keys: string[]) => any;
211
+ isAnimationEnable(): boolean;
211
212
  protected _getChartOption(type: string): IChartOption;
212
213
  }
213
214
  export declare const registerVChartCore: () => void;
@@ -15,7 +15,7 @@ export declare abstract class BaseLineMark<T extends ILineLikeMarkSpec = ILineLi
15
15
  setStyle<T>(style: Partial<ConvertToMarkStyleSpec<T>> | Partial<IMarkStyle<T>>, state?: StateValueType, level?: number): void;
16
16
  _isValidPointChannel: (channel: string) => boolean;
17
17
  _getLineSegments(items: any[], points: IPointLike[]): any[];
18
- _getPrevPoints(g: ILine): IPointLike[];
18
+ _getPrevPoints(g: ILine): IPointLike[] | null;
19
19
  _runPointsEncoder(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
20
20
  _runEncoderOfGraphic(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
21
21
  protected _getDataByKey(data: Datum[]): import("../interface").GroupedData<Datum>;
@@ -117,7 +117,7 @@ export interface IModelOption extends ICompilableInitOption {
117
117
  getChart: () => IChart;
118
118
  getSeriesData: (id: StringOrNumber | undefined, index: number | undefined) => DataView | undefined;
119
119
  globalScale: IGlobalScale;
120
- animation: boolean;
120
+ animation?: boolean;
121
121
  onError: (...args: any[]) => void;
122
122
  disableTriggerEvent?: boolean;
123
123
  getDimensionInfo?: (chart: IChart | undefined, pos: ILayoutPoint, isTooltip?: boolean) => IDimensionInfo[] | null;
@@ -34,7 +34,7 @@ export declare class DomTooltipHandler extends BaseTooltipHandler {
34
34
  protected _updateTooltip(visible: boolean, params: TooltipHandlerParams): void;
35
35
  protected _initStyle(): void;
36
36
  protected _updateDomStringByCol(actualTooltip?: ITooltipActual): void;
37
- protected _updateDomStyle(sizeKey?: 'width' | 'height'): void;
37
+ protected _updateDomStyle(sizeKey: 'width' | 'height', refreshSize: boolean): void;
38
38
  protected _getParentElement(spec: ITooltipSpec): HTMLElement;
39
39
  isTooltipShown(): boolean;
40
40
  reInit(): void;
@@ -5,7 +5,7 @@ import type { Datum, StringOrNumber } from '../../typings';
5
5
  import { DataView } from '@visactor/vdataset';
6
6
  import type { ISankeySeriesSpec } from './interface';
7
7
  import type { ExtendEventParam } from '../../event/interface';
8
- import type { IMark, IMarkGraphic, ITextMark } from '../../mark/interface';
8
+ import type { ILinkPathMark, IMark, IMarkGraphic, IRectMark, ITextMark } from '../../mark/interface';
9
9
  import { SankeySeriesSpecTransformer } from './sankey-transformer';
10
10
  import type { ILabelSpec } from '../../component';
11
11
  export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpec> extends CartesianSeries<T> {
@@ -17,8 +17,8 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
17
17
  static readonly builtInTheme: {
18
18
  sankey: import("./interface").ISankeySeriesTheme;
19
19
  };
20
- private _nodeMark;
21
- private _linkMark;
20
+ protected _nodeMark: IRectMark;
21
+ protected _linkMark: ILinkPathMark;
22
22
  private _nodeLayoutZIndex;
23
23
  private _labelLayoutZIndex;
24
24
  protected _nodesSeriesData?: DataView;
@@ -27,7 +27,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
27
27
  protected _categoryField: string;
28
28
  private _colorScale;
29
29
  private _nodeList;
30
- private _needClear;
30
+ protected _needClear: boolean;
31
31
  get direction(): "horizontal" | "vertical";
32
32
  getCategoryField(): string;
33
33
  setCategoryField(f: string): string;
@@ -55,12 +55,12 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
55
55
  private nodesSeriesDataUpdate;
56
56
  private linksSeriesDataUpdate;
57
57
  protected _handleEmphasisElement: (params: ExtendEventParam) => void;
58
- protected _handleClearEmpty: () => void;
59
- protected _handleNodeAdjacencyClick: (graphic: IMarkGraphic) => void;
60
- protected _handleLinkAdjacencyClick: (graphic: IMarkGraphic) => void;
61
- protected _handleNodeRelatedClick: (graphic: IMarkGraphic) => void;
62
- protected _handleLinkRelatedClick: (graphic: IMarkGraphic) => void;
63
- protected _highLightElements(graphics: IMarkGraphic[], highlightNodes: string[]): void;
58
+ protected _handleClearEmpty(): void;
59
+ protected _handleNodeAdjacencyClick(graphic: IMarkGraphic): void;
60
+ protected _handleLinkAdjacencyClick(graphic: IMarkGraphic): void;
61
+ protected _handleNodeRelatedClick(graphic: IMarkGraphic): void;
62
+ protected _handleLinkRelatedClick(graphic: IMarkGraphic): void;
63
+ protected _highLightElements(graphics: IMarkGraphic[], highlightNodes: (string | number)[]): void;
64
64
  protected initTooltip(): void;
65
65
  _setNodeOrdinalColorScale(): void;
66
66
  getNodeList(): any;
@@ -1,3 +1,4 @@
1
1
  import { get, pick, cloneDeep } from '@visactor/vutils';
2
2
  export { get, pick, cloneDeep };
3
3
  export declare function field(f: string | string[]): (datum: any) => any;
4
+ export declare function removeUndefined(obj: any, deep?: boolean): void;