@visactor/vchart-types 1.6.1 → 1.6.3

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.
@@ -1,7 +1,7 @@
1
1
  import type { IGroupMark, IMark, MarkAnimationSpec, MarkFunctionCallback, Nil, TransformSpec } from '@visactor/vgrammar-core';
2
2
  import type { DataView } from '@visactor/vdataset';
3
3
  import { GrammarItem } from '../grammar-item';
4
- import type { Maybe, Datum, StringOrNumber } from '../../typings';
4
+ import type { Maybe, StringOrNumber } from '../../typings';
5
5
  import type { IMarkProgressiveConfig, IMarkStateStyle, MarkType } from '../../mark/interface';
6
6
  import type { IModel } from '../../model/interface';
7
7
  import { MarkStateManager } from './mark-state-manager';
@@ -95,7 +95,6 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
95
95
  compileAnimation(): void;
96
96
  compileContext(): void;
97
97
  compileSignal(): void;
98
- protected _computeAttribute(key: string, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => any;
99
98
  protected compileCommonAttributeCallback(key: string, state: string): MarkFunctionCallback<any>;
100
99
  protected compileTransform(): void;
101
100
  protected _lookupGrammar(id: string): IMark;
@@ -10,6 +10,7 @@ export interface IShapeSvgOption {
10
10
  lineWidth?: number;
11
11
  hollow?: boolean;
12
12
  marginTop?: string;
13
+ index?: number;
13
14
  }
14
15
  export declare class ShapeModel extends BaseTooltipModel {
15
16
  svg: SVGElement;
@@ -62,6 +62,7 @@ export declare class VChart implements IVChart {
62
62
  private _currentChartLevelTheme;
63
63
  private _onError?;
64
64
  private _context;
65
+ private _isReleased;
65
66
  constructor(spec: ISpec, options: IInitOption);
66
67
  private _setSpec;
67
68
  private _initChart;
@@ -25,12 +25,12 @@ export declare class BaseMark<T extends ICommonSpec> extends CompilableMark impl
25
25
  protected _filterAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state: StateValueType, level: number, isUserLevel: boolean, stateStyle?: IMarkStateStyle<T>): StyleConvert<T[U]>;
26
26
  setReferer<U extends keyof T>(mark: IMarkRaw<T>, styleKey?: U, state?: StateValueType, stateStyle?: IMarkStateStyle<T>): void;
27
27
  setPostProcess<U extends keyof T>(key: U, postProcessFunc: any, state?: StateValueType): void;
28
- getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType, opt?: IAttributeOpt): unknown;
28
+ getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType, opt?: IAttributeOpt): any;
29
29
  setAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state?: StateValueType, level?: number, stateStyle?: IMarkStateStyle<T>): void;
30
30
  protected _getDefaultStyle(): IMarkStyle<T>;
31
31
  protected _styleConvert<U extends keyof T>(style?: MarkInputStyle<T[U]>): StyleConvert<T[U]> | undefined;
32
- protected _computeAttribute<U extends keyof T>(key: U, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => unknown;
33
- protected _computeStateAttribute<U extends keyof T>(stateStyle: any, key: U, state: StateValueType): (datum: Datum, opt: IAttributeOpt) => any;
32
+ protected _computeAttribute<U extends keyof T>(key: U, datum: Datum, state: StateValueType, opt: IAttributeOpt): any;
33
+ protected _computeStateAttribute<U extends keyof T>(stateStyle: any, key: U, datum: Datum, state: StateValueType, opt: IAttributeOpt): any;
34
34
  private _initStyle;
35
35
  private _initSpecStyle;
36
36
  private _computeGradientAttr;
@@ -21,6 +21,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
21
21
  protected _linksSeriesData?: SeriesData;
22
22
  private _viewBox;
23
23
  protected _categoryField: string;
24
+ private _colorScale;
24
25
  getCategoryField(): string;
25
26
  setCategoryField(f: string): string;
26
27
  protected _valueField: string;
@@ -46,7 +47,7 @@ export declare class SankeySeries<T extends ISankeySeriesSpec = ISankeySeriesSpe
46
47
  protected _handleNodeRelatedClick: (element: IElement) => void;
47
48
  protected _handleLinkRelatedClick: (element: IGlyphElement) => void;
48
49
  protected initTooltip(): void;
49
- getNodeOrdinalColorScale(item: string): any;
50
+ _setNodeOrdinalColorScale(): void;
50
51
  getNodeList(): any;
51
52
  _getNodeNameFromData(datum: Datum): any;
52
53
  extractNamesFromTree(tree: any, categoryName: string): Set<unknown>;
@@ -18,6 +18,4 @@ export type BuiltinColorPalette = IColorSchemeStruct['palette'] & {
18
18
  scrollBarSliderColor: string;
19
19
  tooltipBackgroundColor: string;
20
20
  markLabelBackgroundColor: string;
21
- titleFontColor: string;
22
- labelFontColor: string;
23
21
  };
@@ -0,0 +1,5 @@
1
+ import type { BuiltinColorPalette } from './builtin';
2
+ import type { ColorSchemeItem, IColorSchemeStruct } from './interface';
3
+ export declare const newTokenToLegacyToken: Record<keyof BuiltinColorPalette, string>;
4
+ export declare const legacyTokenToNewToken: Record<string, keyof BuiltinColorPalette>;
5
+ export declare function getUpgradedTokenValue(palette: IColorSchemeStruct['palette'], key: string): ColorSchemeItem;