@visactor/vchart-types 1.9.1 → 1.9.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.
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/chart/base/base-chart.d.ts +1 -1
- package/types/component/axis/base-axis.d.ts +3 -2
- package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +1 -0
- package/types/component/data-zoom/util.d.ts +1 -1
- package/types/component/label/label.d.ts +2 -2
- package/types/component/legend/util.d.ts +7 -1
- package/types/mark/group.d.ts +1 -1
- package/types/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -1
- package/types/series/base/base-series.d.ts +2 -1
- package/types/series/cartesian/cartesian.d.ts +1 -0
- package/types/series/heatmap/heatmap.d.ts +1 -1
- package/types/series/line/constant.d.ts +1 -1
- package/types/series/mixin/line-mixin.d.ts +1 -1
- package/types/series/range-area/constant.d.ts +1 -1
- package/types/series/range-column/range-column-transformer.d.ts +1 -1
- package/types/series/range-column/range-column.d.ts +1 -1
- package/types/theme/builtin/common/series/rangeColumn.d.ts +1 -1
- package/types/util/math.d.ts +1 -0
- package/types/util/scale.d.ts +2 -1
- package/types/util/space.d.ts +1 -1
- package/types/util/spec/common.d.ts +1 -1
- package/types/util/spec/merge-theme.d.ts +1 -1
|
@@ -7,7 +7,7 @@ import type { IChart, IChartLayoutOption, IChartRenderOption, IChartOption, ICha
|
|
|
7
7
|
import type { ISeries, ISeriesConstructor } from '../../series/interface';
|
|
8
8
|
import type { IRegion } from '../../region/interface';
|
|
9
9
|
import type { IComponent, IComponentConstructor } from '../../component/interface';
|
|
10
|
-
import {
|
|
10
|
+
import type { IMark } from '../../mark/interface';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
12
12
|
import type { DataView } from '@visactor/vdataset';
|
|
13
13
|
import type { DataSet } from '@visactor/vdataset/es/data-set';
|
|
@@ -7,8 +7,9 @@ import { CompilableData } from '../../compile/data';
|
|
|
7
7
|
import type { IAxis, ICommonAxisSpec, ITick } from './interface';
|
|
8
8
|
import type { IComponentOption } from '../interface';
|
|
9
9
|
import type { ISeries } from '../../series/interface';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import type { ITransformOptions } from '@visactor/vdataset';
|
|
11
|
+
import { DataView } from '@visactor/vdataset';
|
|
12
|
+
import type { IComponentMark } from '../../mark/component';
|
|
12
13
|
export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<string, any> = any> extends BaseComponent<T> implements IAxis {
|
|
13
14
|
static specKey: string;
|
|
14
15
|
specKey: string;
|
|
@@ -34,6 +34,7 @@ export interface BandAxisMixin {
|
|
|
34
34
|
_getNormalizedValue: (values: any[], length: number) => number;
|
|
35
35
|
}
|
|
36
36
|
export declare class BandAxisMixin {
|
|
37
|
+
private _tickDataMap;
|
|
37
38
|
protected _initData(): void;
|
|
38
39
|
protected _rawDomainIndex: {
|
|
39
40
|
[key: string | number | symbol]: number;
|
|
@@ -34,6 +34,7 @@ export declare abstract class DataFilterBaseComponent<T extends IDataFilterCompo
|
|
|
34
34
|
protected _end: number;
|
|
35
35
|
protected _minSpan: number;
|
|
36
36
|
protected _maxSpan: number;
|
|
37
|
+
protected _shouldChange: boolean;
|
|
37
38
|
protected _field: string | undefined;
|
|
38
39
|
protected _stateField: string;
|
|
39
40
|
protected _valueField?: string;
|
|
@@ -4,12 +4,12 @@ import type { IRegion } from '../../region/interface';
|
|
|
4
4
|
import type { IModelInitOption, IModelSpecInfo } from '../../model/interface';
|
|
5
5
|
import type { ISeries } from '../../series/interface';
|
|
6
6
|
import type { ILabel, IMark as IVGrammarMark } from '@visactor/vgrammar-core';
|
|
7
|
-
import {
|
|
7
|
+
import type { IComponentMark } from '../../mark/component';
|
|
8
8
|
import { BaseLabelComponent } from './base-label';
|
|
9
9
|
import type { Maybe } from '@visactor/vutils';
|
|
10
10
|
import type { IGroup } from '@visactor/vrender-core';
|
|
11
11
|
import type { TransformedLabelSpec } from './interface';
|
|
12
|
-
import {
|
|
12
|
+
import type { ILabelMark } from '../../mark/label';
|
|
13
13
|
import type { ICompilableMark } from '../../compile/mark';
|
|
14
14
|
import type { IChartSpecInfo } from '../../chart/interface';
|
|
15
15
|
import type { IChartSpec } from '../../typings';
|
|
@@ -15,7 +15,13 @@ export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
|
15
15
|
visible?: boolean;
|
|
16
16
|
style?: Omit<import("./interface").NoVisibleMarkStyle<import("../..").IRectMarkSpec>, "visible" | "width" | "height">;
|
|
17
17
|
};
|
|
18
|
-
text?: string | number | string[] | number[]
|
|
18
|
+
text?: string | number | string[] | number[] | {
|
|
19
|
+
type?: "text";
|
|
20
|
+
text: string | number | string[] | number[];
|
|
21
|
+
} | {
|
|
22
|
+
type: "rich";
|
|
23
|
+
text: import("@visactor/vrender-core").IRichTextCharacter[];
|
|
24
|
+
};
|
|
19
25
|
visible?: boolean;
|
|
20
26
|
padding?: import("@visactor/vrender-components/es/core/type").Padding;
|
|
21
27
|
maxWidth?: number;
|
package/types/mark/group.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { IGroupMarkSpec } from '../typings/visual';
|
|
|
3
3
|
import { BaseMark } from './base/base-mark';
|
|
4
4
|
import type { IMark, IMarkRaw, IMarkStyle, MarkType } from './interface';
|
|
5
5
|
import { MarkTypeEnum } from './interface/type';
|
|
6
|
-
import {
|
|
6
|
+
import type { IGroupMark as IVGrammarGroupMark } from '@visactor/vgrammar-core';
|
|
7
7
|
import type { IMarkCompileOption } from '../compile/mark';
|
|
8
8
|
export interface IGroupMark extends IMarkRaw<IGroupMarkSpec> {
|
|
9
9
|
addMark: (m: IMark) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseTooltipModel } from './base-tooltip-model';
|
|
2
2
|
import { ContentColumnModel } from './content-column-model';
|
|
3
|
-
import {
|
|
3
|
+
import type { Maybe } from '@visactor/vutils';
|
|
4
4
|
export declare class ContentModel extends BaseTooltipModel {
|
|
5
5
|
shapeBox: Maybe<ContentColumnModel>;
|
|
6
6
|
keyBox: Maybe<ContentColumnModel>;
|
|
@@ -10,7 +10,8 @@ import type { AddVChartPropertyContext } from '../../data/transforms/add-propert
|
|
|
10
10
|
import type { StatisticOperations } from '../../data/transforms/dimension-statistics';
|
|
11
11
|
import { SeriesData } from './series-data';
|
|
12
12
|
import type { IGroupMark } from '../../mark/group';
|
|
13
|
-
import {
|
|
13
|
+
import type { ISeriesMarkAttributeContext } from '../../compile/mark';
|
|
14
|
+
import { STATE_VALUE_ENUM } from '../../compile/mark';
|
|
14
15
|
import { BaseSeriesSpecTransformer } from './base-series-transformer';
|
|
15
16
|
import type { EventType } from '@visactor/vgrammar-core';
|
|
16
17
|
export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel<T> implements ISeries {
|
|
@@ -59,6 +59,7 @@ export declare abstract class CartesianSeries<T extends ICartesianSeriesSpec = I
|
|
|
59
59
|
}[];
|
|
60
60
|
getGroupFields(): string[];
|
|
61
61
|
getStackGroupFields(): string[];
|
|
62
|
+
getStackValue(): StringOrNumber;
|
|
62
63
|
getStackValueField(): string;
|
|
63
64
|
setValueFieldToStack(): void;
|
|
64
65
|
setValueFieldToPercent(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CartesianSeries } from '../cartesian/cartesian';
|
|
2
2
|
import type { IHeatmapSeriesSpec } from './interface';
|
|
3
3
|
import type { IAxisHelper } from '../../component/axis/cartesian/interface';
|
|
4
|
-
import {
|
|
4
|
+
import type { ITextMark } from '../../mark/text';
|
|
5
5
|
import type { SeriesMarkMap } from '../interface';
|
|
6
6
|
import { SeriesTypeEnum } from '../interface/type';
|
|
7
7
|
import type { ICellMark } from '../../mark/cell';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SeriesMarkMap } from '../interface/common';
|
|
2
2
|
export declare const lineSeriesMark: SeriesMarkMap;
|
|
@@ -7,7 +7,7 @@ import type { ITextMark } from '../../mark/text';
|
|
|
7
7
|
import type { DirectionType, IInvalidType, InterpolateType, ILineMarkSpec, ISymbolMarkSpec, Maybe, Datum, IMarkTheme, ILayoutRect } from '../../typings';
|
|
8
8
|
import type { ISeriesMarkInfo, ISeriesMarkInitOption, ISeriesTooltipHelper } from '../interface';
|
|
9
9
|
import type { ILabelSpec } from '../../component/label';
|
|
10
|
-
import {
|
|
10
|
+
import type { DimensionEventParams } from '../../event/events/dimension';
|
|
11
11
|
import type { ILabelMark } from '../../mark/label';
|
|
12
12
|
import type { Functional } from '@visactor/vrender-components';
|
|
13
13
|
import type { IRegion } from '../../region/interface';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SeriesMarkMap } from '../interface/common';
|
|
2
2
|
export declare const rangeAreaSeriesMark: SeriesMarkMap;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BarSeriesSpecTransformer } from '../bar/bar-transformer';
|
|
2
|
-
import {
|
|
2
|
+
import type { IRangeColumnSeriesSpec, IRangeColumnSeriesTheme } from './interface';
|
|
3
3
|
export declare class RangeColumnSeriesSpecTransformer<T extends IRangeColumnSeriesSpec = IRangeColumnSeriesSpec, K extends IRangeColumnSeriesTheme = IRangeColumnSeriesTheme> extends BarSeriesSpecTransformer<any, K> {
|
|
4
4
|
protected _transformLabelSpec(spec: T): void;
|
|
5
5
|
}
|
|
@@ -2,7 +2,7 @@ import { BarSeries } from '../bar/bar';
|
|
|
2
2
|
import { MarkTypeEnum } from '../../mark/interface/type';
|
|
3
3
|
import type { SeriesMarkMap } from '../interface';
|
|
4
4
|
import { SeriesTypeEnum } from '../interface/type';
|
|
5
|
-
import {
|
|
5
|
+
import type { ITextMark } from '../../mark/text';
|
|
6
6
|
import type { Datum } from '../../typings';
|
|
7
7
|
import type { IRangeColumnSeriesSpec } from './interface';
|
|
8
8
|
export declare const DefaultBandWidth = 6;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IRangeColumnSeriesTheme } from '../../../../series/range-column/interface';
|
|
2
2
|
export declare const rangeColumn: IRangeColumnSeriesTheme;
|
package/types/util/math.d.ts
CHANGED
|
@@ -25,3 +25,4 @@ export declare function radiusLabelOrientAttribute(angle: number): {
|
|
|
25
25
|
};
|
|
26
26
|
export declare function vectorAngle(v1: IPoint, v2: IPoint): number;
|
|
27
27
|
export declare function distance(p1: IPoint, p2?: IPoint): number;
|
|
28
|
+
export declare function getPercentValue(valueList: number[], idx: number, precision?: number): number;
|
package/types/util/scale.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IGlobalScale } from '../scale/interface';
|
|
2
|
-
import {
|
|
2
|
+
import type { IBaseScale } from '@visactor/vscale';
|
|
3
|
+
import { BandScale, LinearScale, OrdinalScale, PointScale, ThresholdScale } from '@visactor/vscale';
|
|
3
4
|
import type { IVisual } from '../typings/visual';
|
|
4
5
|
import { ColorOrdinalScale } from '../scale/color-ordinal-scale';
|
|
5
6
|
declare const defaultScaleMap: {
|
package/types/util/space.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
2
|
import type { IPadding } from '../typings/space';
|
|
3
3
|
import type { IPoint } from '../typings/coordinate';
|
|
4
4
|
import type { ILayoutNumber, ILayoutRect, IPercent, IPercentOffset, ILayoutPaddingSpec, ILayoutOrientPadding } from '../typings/layout';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataView } from '@visactor/vdataset';
|
|
2
|
-
import {
|
|
2
|
+
import type { ITheme } from '../../theme';
|
|
3
3
|
export declare function isDataView(obj: any): obj is DataView;
|
|
4
4
|
export declare function isHTMLElement(obj: any): obj is Element;
|
|
5
5
|
export declare function getThemeObject(theme?: string | ITheme, transformed?: boolean): ITheme;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Maybe } from '@visactor/vutils';
|
|
2
2
|
import type { IGlobalMarkThemeByName, IGlobalMarkThemeByType, ITheme } from '../../theme';
|
|
3
3
|
import type { IThemeColorScheme } from '../../theme/color-scheme/interface';
|
|
4
4
|
export declare function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme>;
|