@visactor/vchart-types 2.1.5-alpha.0 → 2.1.5

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.
@@ -46,6 +46,8 @@ export type IItem = {
46
46
  height?: number | string;
47
47
  autoEllipsisStrategy?: 'labelFirst' | 'valueFirst' | 'none';
48
48
  } & Omit<LegendItem, 'background' | 'shape' | 'label' | 'value' | 'focusIconStyle' | 'width' | 'height' | 'maxWidth'>;
49
+ export type LegendPagerLayout = 'horizontal' | 'vertical';
50
+ export type LegendPagerPosition = 'start' | 'middle' | 'end';
49
51
  export type IPager = {
50
52
  textStyle?: Partial<NoVisibleMarkStyle<ITextMarkSpec>>;
51
53
  handler?: {
@@ -58,7 +60,9 @@ export type IPager = {
58
60
  disable?: Omit<NoVisibleMarkStyle<ISymbolMarkSpec>, 'symbolType'>;
59
61
  };
60
62
  };
61
- } & Omit<LegendPagerAttributes, 'textStyle' | 'handler'>;
63
+ layout?: LegendPagerLayout | ((ctx: IDiscreteLegendPagerCallbackContext) => LegendPagerLayout);
64
+ position?: LegendPagerPosition | ((ctx: IDiscreteLegendPagerCallbackContext) => LegendPagerPosition);
65
+ } & Omit<LegendPagerAttributes, 'textStyle' | 'handler' | 'layout' | 'position'>;
62
66
  export type ILegendScrollbar = {
63
67
  type: 'scrollbar';
64
68
  railStyle?: Omit<Partial<NoVisibleMarkStyle<IRectMarkSpec>>, 'width' | 'height'>;
@@ -69,6 +73,10 @@ export interface IDiscreteLegendArrangeContext {
69
73
  orient: IOrientType;
70
74
  id?: StringOrNumber;
71
75
  }
76
+ export interface IDiscreteLegendPagerCallbackContext extends IDiscreteLegendArrangeContext {
77
+ maxRow?: number;
78
+ maxCol?: number;
79
+ }
72
80
  export type DiscreteLegendArrangeCount = number | ((ctx: IDiscreteLegendArrangeContext) => number);
73
81
  export type IDiscreteLegendSpec = ILegendCommonSpec & {
74
82
  type?: 'discrete';
@@ -101,7 +101,7 @@ export type IMarkerSymbol = IMarkerRef & {
101
101
  } & Partial<IMarkerState<Omit<ISymbolMarkSpec, 'visible'>>>;
102
102
  export type MarkerStyleCallback<T> = (markerData: DataView, context: IMarkerAttributeContext) => T;
103
103
  export type MarkerStateCallback<T> = (markerData: DataView, context: IMarkerAttributeContext) => T;
104
- export type MarkerStateValue = 'hover' | 'hover_reverse' | 'selected' | 'selected_reverse';
104
+ export type MarkerStateValue = 'hover' | 'hover_reverse' | 'dimension_hover' | 'dimension_hover_reverse' | 'selected' | 'selected_reverse';
105
105
  export type IMarkerState<T> = {
106
106
  style?: T | MarkerStyleCallback<T>;
107
107
  state?: Record<MarkerStateValue, T | MarkerStateCallback<T>>;
@@ -1,6 +1,7 @@
1
1
  import type { IMarkPoint, IMarkPointSpec } from './interface';
2
2
  import { MarkPoint as MarkPointComponent } from '@visactor/vrender-components';
3
3
  import { BaseMarker } from '../base-marker';
4
+ import { type DimensionEventParams } from '../../../event/events/dimension/interface';
4
5
  import type { IGroup } from '@visactor/vrender-core';
5
6
  export declare abstract class BaseMarkPoint extends BaseMarker<IMarkPointSpec> implements IMarkPoint {
6
7
  static specKey: string;
@@ -8,6 +9,10 @@ export declare abstract class BaseMarkPoint extends BaseMarker<IMarkPointSpec> i
8
9
  layoutZIndex: number;
9
10
  protected _markerComponent: MarkPointComponent;
10
11
  protected abstract _computePointsAttr(): any;
12
+ protected initEvent(): void;
13
+ protected _handleDimensionHover: (params: DimensionEventParams) => void;
14
+ private _getTargetSymbolGraphic;
15
+ private _isDimensionHoverTarget;
11
16
  static _getMarkerCoordinateType(markerSpec: any): string;
12
17
  protected _createMarkerComponent(): IGroup;
13
18
  protected _markerLayout(): void;