@visactor/vchart-types 2.1.0-alpha.0 → 2.1.0-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.
Files changed (44) hide show
  1. package/package.json +3 -3
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/chart/base/base-chart-transformer.d.ts +3 -0
  4. package/types/chart/base/base-chart.d.ts +15 -9
  5. package/types/chart/interface/chart.d.ts +1 -0
  6. package/types/chart/util.d.ts +4 -1
  7. package/types/compile/data/compilable-data.d.ts +1 -1
  8. package/types/compile/grammar-item.d.ts +1 -1
  9. package/types/compile/interface/compilable-item.d.ts +1 -1
  10. package/types/component/axis/base-axis.d.ts +2 -7
  11. package/types/component/axis/cartesian/band-axis.d.ts +1 -7
  12. package/types/component/base/base-component.d.ts +7 -7
  13. package/types/component/base/release-vrender-component.d.ts +10 -0
  14. package/types/component/brush/brush.d.ts +2 -7
  15. package/types/component/crosshair/base.d.ts +1 -7
  16. package/types/component/custom-mark/custom-mark.d.ts +1 -7
  17. package/types/component/data-zoom/data-filter-base-component.d.ts +1 -7
  18. package/types/component/geo/geo-coordinate.d.ts +1 -7
  19. package/types/component/label/base-label.d.ts +1 -7
  20. package/types/component/legend/base-legend.d.ts +2 -7
  21. package/types/component/marker/base-marker.d.ts +7 -7
  22. package/types/component/title/title.d.ts +1 -7
  23. package/types/core/vchart.d.ts +5 -1
  24. package/types/data/data-view-utils.d.ts +5 -0
  25. package/types/mark/base/base-mark.d.ts +12 -2
  26. package/types/mark/component.d.ts +9 -0
  27. package/types/mark/interface/mark.d.ts +2 -0
  28. package/types/model/base-model.d.ts +3 -15
  29. package/types/model/interface.d.ts +13 -0
  30. package/types/region/region.d.ts +1 -7
  31. package/types/series/area/area.d.ts +2 -0
  32. package/types/series/bar/bar.d.ts +3 -0
  33. package/types/series/base/base-series.d.ts +8 -7
  34. package/types/series/base/constant.d.ts +3 -0
  35. package/types/series/box-plot/box-plot.d.ts +2 -0
  36. package/types/series/heatmap/heatmap.d.ts +2 -0
  37. package/types/series/line/line.d.ts +2 -0
  38. package/types/series/mixin/line-mixin.d.ts +1 -0
  39. package/types/series/pie/pie.d.ts +3 -7
  40. package/types/series/progress/circular/circular.d.ts +2 -0
  41. package/types/series/progress/linear/linear.d.ts +2 -0
  42. package/types/series/scatter/scatter.d.ts +2 -0
  43. package/types/series/waterfall/waterfall.d.ts +2 -0
  44. package/types/util/graphic-state.d.ts +1 -0
@@ -8,6 +8,7 @@ import { DataView } from '@visactor/vdataset';
8
8
  import type { IMark, ITextMark } from '../../mark/interface';
9
9
  import type { ICompilableData } from '../../compile/data';
10
10
  import { BoxPlotSeriesSpecTransformer } from './box-plot-transformer';
11
+ import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
11
12
  export declare const DEFAULT_FILL_COLOR = "#FFF";
12
13
  export declare const DEFAULT_STROKE_COLOR = "#000";
13
14
  export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeriesSpec> extends CartesianSeries<T> {
@@ -46,6 +47,7 @@ export declare class BoxPlotSeries<T extends IBoxPlotSeriesSpec = IBoxPlotSeries
46
47
  getOutliersStyle(): IOutlierMarkSpec;
47
48
  protected _outlierData: ICompilableData;
48
49
  private _autoBoxWidth;
50
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
49
51
  setAttrFromSpec(): void;
50
52
  private _boxPlotMark?;
51
53
  private _outlierMark?;
@@ -5,6 +5,7 @@ import type { SeriesMarkMap } from '../interface';
5
5
  import { SeriesTypeEnum } from '../interface/type';
6
6
  import type { ICellMark, IMark, ITextMark } from '../../mark/interface';
7
7
  import { HeatmapSeriesSpecTransformer } from './heatmap-transformer';
8
+ import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
8
9
  export declare const DefaultBandWidth = 6;
9
10
  export declare class HeatmapSeries<T extends IHeatmapSeriesSpec = IHeatmapSeriesSpec> extends CartesianSeries<T> {
10
11
  static readonly type: string;
@@ -20,6 +21,7 @@ export declare class HeatmapSeries<T extends IHeatmapSeriesSpec = IHeatmapSeries
20
21
  protected _fieldValue: string[];
21
22
  getFieldValue(): string[];
22
23
  setFieldValue(f: string | string[]): void;
24
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
23
25
  setAttrFromSpec(): void;
24
26
  initMark(): void;
25
27
  initMarkStyle(): void;
@@ -6,6 +6,7 @@ import type { Datum } from '../../typings';
6
6
  import type { ILineSeriesSpec } from './interface';
7
7
  import type { IMark } from '../../mark/interface';
8
8
  import { LineLikeSeriesSpecTransformer } from '../mixin/line-mixin-transformer';
9
+ import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
9
10
  export interface LineSeries<T extends ILineSeriesSpec = ILineSeriesSpec> extends Pick<LineLikeSeriesMixin, 'initLineMark' | 'initSymbolMark' | 'initLabelMarkStyle' | 'initLineMarkStyle' | 'initSymbolMarkStyle' | '_lineMark' | '_symbolMark' | 'addSamplingCompile' | 'addOverlapCompile' | 'reCompileSampling'>, CartesianSeries<T> {
10
11
  }
11
12
  export declare class LineSeries<T extends ILineSeriesSpec = ILineSeriesSpec> extends CartesianSeries<T> {
@@ -18,6 +19,7 @@ export declare class LineSeries<T extends ILineSeriesSpec = ILineSeriesSpec> ext
18
19
  static readonly transformerConstructor: typeof LineLikeSeriesSpecTransformer;
19
20
  readonly transformerConstructor: typeof LineLikeSeriesSpecTransformer;
20
21
  protected _sortDataByAxis: boolean;
22
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
21
23
  compile(): void;
22
24
  initMark(): void;
23
25
  protected initTooltip(): void;
@@ -7,6 +7,7 @@ import type { DimensionEventParams } from '../../event/events/dimension';
7
7
  import type { IRegion } from '../../region/interface';
8
8
  import type { ILineLikeSeriesTheme } from './interface';
9
9
  import type { ICompilableData } from '../../compile/data';
10
+ export declare const LINE_LIKE_SERIES_DATA_RELATED_KEYS: Record<string, true>;
10
11
  export interface LineLikeSeriesMixin extends ISeries {
11
12
  _spec: any;
12
13
  _option: ISeriesOption;
@@ -1,5 +1,6 @@
1
1
  import type { IPoint, Datum, StateValueType } from '../../typings';
2
2
  import { PolarSeries } from '../polar/polar';
3
+ import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
3
4
  import type { IArcMark, IMark, IPathMark, ITextMark } from '../../mark/interface';
4
5
  import type { IArcSeries, SeriesMarkMap } from '../interface';
5
6
  import { SeriesTypeEnum } from '../interface/type';
@@ -56,15 +57,10 @@ export declare class BasePieSeries<T extends IBasePieSeriesSpec> extends PolarSe
56
57
  getInnerRadius(state?: StateValueType): number;
57
58
  computeRadius(r: number, k?: number): number;
58
59
  computeDatumRadius(datum: Datum, state?: string): number;
60
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
59
61
  _compareSpec(spec: T, prevSpec: T, ignoreCheckKeys?: {
60
62
  [key: string]: true;
61
- }): {
62
- change: boolean;
63
- reMake: boolean;
64
- reRender: boolean;
65
- reSize: boolean;
66
- reCompile: boolean;
67
- };
63
+ }): import("../..").IUpdateSpecResult;
68
64
  computeDatumInnerRadius(datum: Datum, state?: string): number;
69
65
  dataToPosition(datum: Datum, checkInViewData?: boolean): IPoint | null;
70
66
  dataToCentralPosition: (datum: Datum) => IPoint | null;
@@ -1,6 +1,7 @@
1
1
  import type { Datum } from '../../../typings';
2
2
  import type { SeriesMarkMap } from '../../interface';
3
3
  import { SeriesTypeEnum } from '../../interface/type';
4
+ import type { ISeriesSpecUpdatePolicy } from '../../base/base-series';
4
5
  import type { ICircularProgressSeriesSpec } from './interface';
5
6
  import { ProgressLikeSeries } from '../../polar/progress-like/progress-like';
6
7
  import type { IMark } from '../../../mark/interface';
@@ -16,6 +17,7 @@ export declare class CircularProgressSeries<T extends ICircularProgressSeriesSpe
16
17
  readonly transformerConstructor: typeof CircularProgressSeriesSpecTransformer;
17
18
  private _progressMark;
18
19
  private _trackMark;
20
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
19
21
  getStackGroupFields(): string[];
20
22
  getGroupFields(): string[];
21
23
  initMark(): void;
@@ -3,6 +3,7 @@ import type { SeriesMarkMap } from '../../interface';
3
3
  import { SeriesTypeEnum } from '../../interface/type';
4
4
  import type { ILinearProgressSeriesSpec } from './interface';
5
5
  import type { IMark } from '../../../mark/interface';
6
+ import type { ISeriesSpecUpdatePolicy } from '../../base/base-series';
6
7
  export declare class LinearProgressSeries<T extends ILinearProgressSeriesSpec = ILinearProgressSeriesSpec> extends CartesianSeries<T> {
7
8
  static readonly type: string;
8
9
  type: SeriesTypeEnum;
@@ -12,6 +13,7 @@ export declare class LinearProgressSeries<T extends ILinearProgressSeriesSpec =
12
13
  };
13
14
  private _progressMark;
14
15
  private _trackMark;
16
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
15
17
  initMark(): void;
16
18
  initMarkStyle(): void;
17
19
  private _initProgressMark;
@@ -2,6 +2,7 @@ import type { DataView } from '@visactor/vdataset';
2
2
  import type { IScatterInvalidType } from '../../typings';
3
3
  import type { IScatterSeriesSpec } from './interface';
4
4
  import { CartesianSeries } from '../cartesian/cartesian';
5
+ import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
5
6
  import type { SeriesMarkMap } from '../interface';
6
7
  import { SeriesTypeEnum } from '../interface/type';
7
8
  import type { ILabelMark, IMark } from '../../mark/interface';
@@ -22,6 +23,7 @@ export declare class ScatterSeries<T extends IScatterSeriesSpec = IScatterSeries
22
23
  private _shape;
23
24
  private _shapeField;
24
25
  protected _invalidType: IScatterInvalidType;
26
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
25
27
  setAttrFromSpec(): void;
26
28
  private _getSeriesAttribute;
27
29
  private getSizeAttribute;
@@ -8,6 +8,7 @@ import type { Datum } from '../../typings';
8
8
  import type { ILabelMark, IRuleMark, ITextMark } from '../../mark/interface';
9
9
  import type { ILabelInfo } from '../../component/label/interface';
10
10
  import { type ICompilableData } from '../../compile/data';
11
+ import type { ISeriesSpecUpdatePolicy } from '../base/base-series';
11
12
  export declare const DefaultBandWidth = 6;
12
13
  export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfallSeriesSpec> extends BarSeries<any> {
13
14
  static readonly type: string;
@@ -24,6 +25,7 @@ export declare class WaterfallSeries<T extends IWaterfallSeriesSpec = IWaterfall
24
25
  protected _leaderLineMark: IRuleMark;
25
26
  protected _stackLabelMark: ITextMark;
26
27
  protected _labelMark: ITextMark;
28
+ protected _getSpecUpdatePolicy(): ISeriesSpecUpdatePolicy;
27
29
  protected initGroups(): void;
28
30
  setAttrFromSpec(): void;
29
31
  getSeriesKeys(): string[];
@@ -1,3 +1,4 @@
1
1
  import type { IMarkGraphic } from '../mark/interface';
2
+ export declare const setGraphicStates: (graphic: IMarkGraphic, nextStates?: string[] | null, hasAnimation?: boolean) => void;
2
3
  export declare const addGraphicState: (graphic: IMarkGraphic, state: string, keepCurrentStates?: boolean, hasAnimation?: boolean) => void;
3
4
  export declare const removeGraphicState: (graphic: IMarkGraphic, state: string | string[], hasAnimation?: boolean) => void;