@visactor/vchart-types 2.0.4-alpha.5 → 2.0.4-alpha.7

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.
@@ -15,6 +15,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
15
15
  protected _component: AbstractComponent;
16
16
  protected _orient: IOrientType;
17
17
  protected _isHorizontal: boolean;
18
+ protected _throttledHide: () => void;
18
19
  protected _auto?: boolean;
19
20
  protected _fixedBandSize?: number;
20
21
  protected _cacheRect?: ILayoutRect;
@@ -123,4 +124,5 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
123
124
  };
124
125
  protected _autoUpdate(rect?: ILayoutRect): boolean;
125
126
  protected _getNeedClearVRenderComponents(): IGraphic[];
127
+ clear(): void;
126
128
  }
@@ -37,6 +37,7 @@ export interface IDataFilterComponentSpec extends Omit<IComponentSpec, 'width' |
37
37
  export interface IRoamDragSpec extends IRoamSpec {
38
38
  reverse?: boolean;
39
39
  filter?: (delta: [number, number], e?: BaseEventParams['event']) => boolean;
40
+ autoVisible?: boolean;
40
41
  }
41
42
  export interface IRoamScrollSpec extends IRoamSpec {
42
43
  reverse?: boolean;
@@ -95,7 +95,8 @@ export declare enum ChartEvent {
95
95
  afterResize = "afterResize",
96
96
  afterRender = "afterRender",
97
97
  afterLayout = "afterLayout",
98
- afterMarkLayoutEnd = "afterMarkLayoutEnd"
98
+ afterMarkLayoutEnd = "afterMarkLayoutEnd",
99
+ afterWordcloudShapeDraw = "afterWordcloudShapeDraw"
99
100
  }
100
101
  export declare enum Event_Source_Type {
101
102
  chart = "chart",
@@ -15,6 +15,7 @@ import type { IBaseTriggerOptions, ITriggerConstructor } from '../interaction/in
15
15
  import type { IComposedEventConstructor } from '../index-harmony-simple';
16
16
  import type { ITooltipProcessorConstructor } from '../component/tooltip/processor/interface';
17
17
  import type { ITooltip } from '../component';
18
+ import type { IVChartPluginConstructor } from '../plugin/vchart';
18
19
  export declare class Factory {
19
20
  private static _charts;
20
21
  private static _series;
@@ -25,6 +26,7 @@ export declare class Factory {
25
26
  private static _animations;
26
27
  private static _implements;
27
28
  private static _chartPlugin;
29
+ private static _vChartPlugin;
28
30
  private static _componentPlugin;
29
31
  private static _formatter;
30
32
  static transforms: {
@@ -51,6 +53,7 @@ export declare class Factory {
51
53
  static registerAnimation(key: string, animation: (params?: any, preset?: any) => MarkAnimationSpec): void;
52
54
  static registerImplement(key: string, implement: (...args: any) => void): void;
53
55
  static registerChartPlugin(key: string, plugin: IChartPluginConstructor): void;
56
+ static registerVChartPlugin(key: string, plugin: IVChartPluginConstructor): void;
54
57
  static registerComponentPlugin(key: string, plugin: IComponentPluginConstructor): void;
55
58
  static createChart(chartType: string, spec: any, options: IChartOption): IChart | null;
56
59
  static getChart(chartType: string): IChartConstructor;
@@ -77,6 +80,7 @@ export declare class Factory {
77
80
  static getSeriesBuiltInTheme(themeKey: string): Record<string, any>;
78
81
  static getComponentBuiltInTheme(themeKey: string): Record<string, any>;
79
82
  static getChartPlugins(): IChartPluginConstructor[];
83
+ static getVChartPlugins(): IVChartPluginConstructor[];
80
84
  static getComponentPlugins(): IComponentPluginConstructor[];
81
85
  static getComponentPluginInType(type: string): IComponentPluginConstructor;
82
86
  static registerFormatter(func: typeof Factory['_formatter']): void;
@@ -114,6 +114,8 @@ export interface IVChart {
114
114
  setRuntimeSpec: (spec: any) => void;
115
115
  getSpec: () => any;
116
116
  getCurrentSize: () => IContainerSize;
117
+ rotate90WithTransform?: (rotateDom: HTMLElement) => void;
118
+ cancelTransform?: (rotateDom: HTMLElement) => void;
117
119
  }
118
120
  export interface IGlobalConfig {
119
121
  uniqueTooltip?: boolean;
@@ -5,7 +5,7 @@ import { RenderModeEnum } from '../typings/spec/common';
5
5
  import type { ISeriesConstructor } from '../series/interface';
6
6
  import { type DimensionIndexOption, type IChart, type IChartConstructor, type IChartOption, type IChartSpecInfo } from '../chart/interface';
7
7
  import type { IComponentConstructor } from '../component/interface';
8
- import type { EventCallback, EventQuery, EventType, ExtendEventParam } from '../event/interface';
8
+ import type { EventCallback, EventQuery, EventType, ExtendEventParam, IEvent } from '../event/interface';
9
9
  import type { IParserOptions, Transform } from '@visactor/vdataset';
10
10
  import { DataSet, DataView } from '@visactor/vdataset';
11
11
  import type { IStage } from '@visactor/vrender-core';
@@ -59,6 +59,7 @@ export declare class VChart implements IVChart {
59
59
  private _chartSpecTransformer;
60
60
  private _compiler;
61
61
  private _event;
62
+ get event(): IEvent;
62
63
  private _userEvents;
63
64
  private _eventDispatcher;
64
65
  private _dataSet;
@@ -77,6 +78,7 @@ export declare class VChart implements IVChart {
77
78
  private _context;
78
79
  private _isReleased;
79
80
  private _chartPlugin?;
81
+ private _vChartPlugin?;
80
82
  private _onResize?;
81
83
  constructor(spec: ISpec, options: IInitOption);
82
84
  private _setNewSpec;
@@ -123,6 +123,7 @@ export interface IModelOption extends ICompilableInitOption {
123
123
  getDimensionInfo?: (chart: IChart | undefined, pos: ILayoutPoint, isTooltip?: boolean) => IDimensionInfo[] | null;
124
124
  getDimensionInfoByValue?: (axis: IAxis, value: any) => IDimensionInfo | null;
125
125
  getRectByDimensionData?: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => any;
126
+ dispatchEvent?: (key: string, params?: any) => void;
126
127
  }
127
128
  export interface IModelSpecInfo<T extends Record<string, unknown> = any> {
128
129
  type: string | ComponentTypeEnum | SeriesTypeEnum;
@@ -38,6 +38,6 @@ export declare class DomTooltipHandler extends BaseTooltipHandler {
38
38
  protected _getParentElement(spec: ITooltipSpec): HTMLElement;
39
39
  isTooltipShown(): boolean;
40
40
  reInit(): void;
41
- protected _updatePosition({ x, y }: ITooltipPositionActual): void;
41
+ protected _updatePosition({ x, y }: ITooltipPositionActual, resetTransition?: boolean): void;
42
42
  }
43
43
  export declare const registerDomTooltipHandler: () => void;
@@ -0,0 +1,2 @@
1
+ export * from './register';
2
+ export * from './interface';
@@ -0,0 +1,16 @@
1
+ import type { IVChart } from '../../core/interface';
2
+ import type { IBasePlugin, IBasePluginService, MaybePromise } from '../base/interface';
3
+ export interface IVChartPlugin<T extends IVChartPluginService = any> extends IBasePlugin<T> {
4
+ specKey?: string;
5
+ onInit?: (service: T) => MaybePromise<void>;
6
+ }
7
+ export interface IVChartPluginConstructor {
8
+ readonly pluginType: 'vchart';
9
+ readonly specKey?: string;
10
+ readonly type: string;
11
+ new (): IVChartPlugin;
12
+ }
13
+ export interface IVChartPluginService<T extends IVChartPlugin = any> extends IBasePluginService<T> {
14
+ globalInstance: IVChart;
15
+ onInit?: () => MaybePromise<void>;
16
+ }
@@ -0,0 +1,9 @@
1
+ import type { IVChartPlugin, IVChartPluginService } from './interface';
2
+ import type { IVChart } from '../../core';
3
+ import { BasePluginService } from '../base/base-plugin-service';
4
+ export declare class VChartPluginService<T extends IVChartPlugin = IVChartPlugin> extends BasePluginService<T> implements IVChartPluginService<T> {
5
+ globalInstance: IVChart;
6
+ constructor(globalInstance: IVChart);
7
+ onInit(): void;
8
+ releaseAll(): void;
9
+ }
@@ -0,0 +1,2 @@
1
+ import type { IVChartPluginConstructor } from './interface';
2
+ export declare const registerVChartPlugin: (plugin: IVChartPluginConstructor) => void;
@@ -0,0 +1 @@
1
+ export * from './rotate';
@@ -0,0 +1,18 @@
1
+ import { BasePlugin } from '../../base/base-plugin';
2
+ import type { IVChartPlugin, IVChartPluginService } from '../interface';
3
+ export declare class RotatePlugin extends BasePlugin implements IVChartPlugin {
4
+ static readonly pluginType: 'vchart';
5
+ static readonly specKey = "rotate";
6
+ static readonly type: string;
7
+ readonly type: string;
8
+ private rotateDegree;
9
+ private matrix;
10
+ private vglobal_mapToCanvasPoint;
11
+ private _vchart;
12
+ constructor();
13
+ onInit(service: IVChartPluginService): void;
14
+ rotate90WithTransform: (rotateDom: HTMLElement) => void;
15
+ cancelTransform: (rotateDom: HTMLElement) => void;
16
+ release(): void;
17
+ }
18
+ export declare const registerRotatePlugin: () => void;
@@ -255,6 +255,7 @@ export interface IPerformanceHook {
255
255
  beforeDoRender?: (vchart?: IVChart) => void;
256
256
  beforeVRenderDraw?: (vchart?: IVChart) => void;
257
257
  afterVRenderDraw?: (vchart?: IVChart) => void;
258
+ afterWordcloudShapeDraw?: (vchart?: IVChart) => void;
258
259
  }
259
260
  export type IBuildinMarkSpec = {
260
261
  group: IGroupMarkSpec;