@visactor/vchart-types 0.10.0-alpha.2 → 0.11.6-alpha.1
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/animation/config.d.ts +1 -0
- package/types/animation/utils.d.ts +4 -4
- package/types/chart/area/area.d.ts +0 -1
- package/types/chart/bar/3d/bar-3d.d.ts +0 -1
- package/types/chart/bar/bar-transformer.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +3 -0
- package/types/chart/base/base-chart-transformer.d.ts +9 -1
- package/types/chart/base/base-chart.d.ts +9 -4
- package/types/chart/base/util.d.ts +2 -2
- package/types/chart/box-plot/box-plot.d.ts +0 -1
- package/types/chart/cartesian/cartesian-transformer.d.ts +1 -0
- package/types/chart/circle-packing/circle-packing.d.ts +0 -1
- package/types/chart/common/common-transformer.d.ts +1 -0
- package/types/chart/common/common.d.ts +0 -1
- package/types/chart/common/interface.d.ts +5 -2
- package/types/chart/correlation/correlation.d.ts +0 -1
- package/types/chart/funnel/3d/funnel-3d.d.ts +0 -1
- package/types/chart/funnel/funnel.d.ts +0 -1
- package/types/chart/gauge/gauge.d.ts +0 -1
- package/types/chart/heatmap/heatmap.d.ts +0 -1
- package/types/chart/histogram/3d/histogram-3d.d.ts +0 -1
- package/types/chart/histogram/histogram.d.ts +0 -1
- package/types/chart/index.d.ts +6 -4
- package/types/chart/interface/chart.d.ts +10 -3
- package/types/chart/interface/common.d.ts +1 -5
- package/types/chart/interface/type.d.ts +2 -1
- package/types/chart/line/line.d.ts +0 -1
- package/types/chart/liquid/liquid.d.ts +0 -1
- package/types/chart/map/map.d.ts +0 -1
- package/types/chart/pie/3d/pie-3d.d.ts +0 -1
- package/types/chart/pie/pie.d.ts +0 -1
- package/types/chart/polar/interface.d.ts +2 -1
- package/types/chart/progress/circular/circular.d.ts +0 -1
- package/types/chart/progress/linear/linear.d.ts +0 -1
- package/types/chart/radar/radar.d.ts +0 -1
- package/types/chart/range-area/range-area.d.ts +0 -1
- package/types/chart/range-column/3d/range-column-3d.d.ts +0 -1
- package/types/chart/range-column/range-column.d.ts +0 -1
- package/types/chart/rose/rose.d.ts +0 -1
- package/types/chart/sankey/sankey.d.ts +5 -1
- package/types/chart/scatter/scatter.d.ts +0 -1
- package/types/chart/sequence/interface.d.ts +2 -2
- package/types/chart/sequence/sequence.d.ts +0 -1
- package/types/chart/sunburst/sunburst.d.ts +0 -1
- package/types/chart/treemap/treemap.d.ts +0 -1
- package/types/chart/venn/index.d.ts +3 -0
- package/types/chart/venn/interface.d.ts +6 -0
- package/types/chart/venn/venn-transformer.d.ts +7 -0
- package/types/chart/venn/venn.d.ts +13 -0
- package/types/chart/waterfall/waterfall.d.ts +0 -1
- package/types/chart/word-cloud/3d/word-cloud-3d.d.ts +0 -1
- package/types/chart/word-cloud/word-cloud.d.ts +0 -1
- package/types/compile/compiler.d.ts +5 -3
- package/types/compile/interface/compiler.d.ts +1 -0
- package/types/compile/mark/compilable-mark.d.ts +6 -2
- package/types/compile/mark/interface.d.ts +8 -2
- package/types/component/axis/base-axis.d.ts +13 -60
- package/types/component/axis/cartesian/axis.d.ts +3 -8
- package/types/component/axis/cartesian/band-axis.d.ts +7 -2
- package/types/component/axis/cartesian/interface/common.d.ts +1 -0
- package/types/component/axis/cartesian/interface/spec.d.ts +5 -0
- package/types/component/axis/cartesian/time-axis.d.ts +1 -1
- package/types/component/axis/cartesian/util/index.d.ts +0 -1
- package/types/component/axis/interface/common.d.ts +2 -1
- package/types/component/axis/interface/spec.d.ts +9 -6
- package/types/component/axis/mixin/linear-axis-mixin.d.ts +12 -3
- package/types/component/axis/polar/axis.d.ts +13 -10
- package/types/component/axis/polar/band-axis.d.ts +2 -1
- package/types/component/axis/polar/interface/common.d.ts +2 -0
- package/types/component/axis/polar/interface/spec.d.ts +6 -2
- package/types/component/axis/polar/linear-axis.d.ts +5 -1
- package/types/component/axis/polar/util/common.d.ts +1 -0
- package/types/component/base/base-component.d.ts +2 -1
- package/types/component/base/util.d.ts +5 -0
- package/types/component/brush/brush.d.ts +8 -3
- package/types/component/brush/interface.d.ts +4 -3
- package/types/component/crosshair/base.d.ts +14 -5
- package/types/component/crosshair/cartesian.d.ts +3 -9
- package/types/component/crosshair/interface/cartesian.d.ts +33 -0
- package/types/component/crosshair/interface/common.d.ts +7 -0
- package/types/component/crosshair/interface/index.d.ts +3 -0
- package/types/component/crosshair/interface/polar.d.ts +25 -0
- package/types/component/crosshair/interface/spec.d.ts +3 -0
- package/types/component/crosshair/polar.d.ts +4 -3
- package/types/component/crosshair/utils/cartesian.d.ts +34 -0
- package/types/component/crosshair/utils/common.d.ts +9 -0
- package/types/component/crosshair/utils/index.d.ts +1 -0
- package/types/component/crosshair/utils/polar.d.ts +37 -0
- package/types/component/custom-mark/custom-mark.d.ts +16 -5
- package/types/component/data-zoom/data-filter-base-component.d.ts +7 -9
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +6 -8
- package/types/component/data-zoom/index.d.ts +1 -0
- package/types/component/data-zoom/interface.d.ts +3 -0
- package/types/component/data-zoom/scroll-bar/interface.d.ts +3 -5
- package/types/component/data-zoom/util.d.ts +0 -4
- package/types/component/index.d.ts +8 -7
- package/types/component/indicator/interface.d.ts +5 -5
- package/types/component/interface/theme.d.ts +12 -0
- package/types/component/interface/type.d.ts +4 -0
- package/types/component/label/base-label.d.ts +6 -5
- package/types/component/label/interface.d.ts +9 -10
- package/types/component/label/label.d.ts +1 -2
- package/types/component/label/total-label.d.ts +1 -0
- package/types/component/label/util.d.ts +10 -2
- package/types/component/legend/continuous/interface.d.ts +7 -12
- package/types/component/legend/discrete/interface.d.ts +21 -6
- package/types/component/legend/discrete/legend.d.ts +5 -1
- package/types/component/legend/util.d.ts +14 -5
- package/types/component/marker/base-marker.d.ts +37 -44
- package/types/component/marker/interface.d.ts +45 -18
- package/types/component/marker/mark-area/base-mark-area.d.ts +18 -0
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +19 -0
- package/types/component/marker/mark-area/index.d.ts +2 -1
- package/types/component/marker/mark-area/interface/spec.d.ts +16 -1
- package/types/component/marker/mark-area/interface/theme.d.ts +5 -7
- package/types/component/marker/mark-area/polar-mark-area.d.ts +25 -0
- package/types/component/marker/mark-line/base-mark-line.d.ts +19 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +20 -0
- package/types/component/marker/mark-line/index.d.ts +2 -1
- package/types/component/marker/mark-line/interface/spec.d.ts +26 -2
- package/types/component/marker/mark-line/interface/theme.d.ts +5 -7
- package/types/component/marker/mark-line/polar-mark-line.d.ts +23 -0
- package/types/component/marker/mark-point/base-mark-point.d.ts +17 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +16 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +14 -0
- package/types/component/marker/mark-point/index.d.ts +3 -1
- package/types/component/marker/mark-point/interface/spec.d.ts +9 -1
- package/types/component/marker/mark-point/interface/theme.d.ts +19 -18
- package/types/component/marker/mark-point/polar-mark-point.d.ts +18 -0
- package/types/component/marker/utils.d.ts +40 -5
- package/types/component/player/interface/theme.d.ts +1 -1
- package/types/component/player/player.d.ts +2 -1
- package/types/component/poptip/interface.d.ts +5 -2
- package/types/component/title/interface/spec.d.ts +18 -7
- package/types/component/title/interface/theme.d.ts +2 -1
- package/types/component/tooltip/constant.d.ts +8 -0
- package/types/component/tooltip/index.d.ts +1 -0
- package/types/component/tooltip/interface/common.d.ts +13 -8
- package/types/component/tooltip/interface/event.d.ts +1 -2
- package/types/component/tooltip/interface/index.d.ts +1 -0
- package/types/component/tooltip/interface/spec.d.ts +6 -5
- package/types/component/tooltip/interface/theme.d.ts +7 -5
- package/types/component/tooltip/processor/base.d.ts +10 -5
- package/types/component/tooltip/processor/group-tooltip.d.ts +11 -0
- package/types/component/tooltip/processor/index.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +4 -3
- package/types/component/tooltip/processor/mark-tooltip.d.ts +2 -2
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip-transformer.d.ts +2 -0
- package/types/component/tooltip/tooltip.d.ts +7 -11
- package/types/component/tooltip/utils/compose.d.ts +4 -0
- package/types/component/tooltip/utils/get-spec.d.ts +5 -0
- package/types/component/tooltip/utils/get-value.d.ts +6 -0
- package/types/component/tooltip/utils/index.d.ts +4 -0
- package/types/component/tooltip/utils/pattern.d.ts +4 -0
- package/types/component/tooltip/utils/show-tooltip.d.ts +21 -3
- package/types/component/util.d.ts +8 -0
- package/types/constant/index.d.ts +1 -0
- package/types/core/factory.d.ts +3 -0
- package/types/core/index.d.ts +1 -0
- package/types/core/interface.d.ts +10 -3
- package/types/core/vchart.d.ts +12 -5
- package/types/data/transforms/aggregation.d.ts +12 -7
- package/types/data/transforms/dimension-statistics.d.ts +2 -0
- package/types/data/transforms/funnel.d.ts +1 -1
- package/types/data/transforms/invalid-travel.d.ts +1 -1
- package/types/data/transforms/legend-data/continuous/interface.d.ts +1 -0
- package/types/data/transforms/legend-data/discrete/interface.d.ts +2 -0
- package/types/env/env.d.ts +2 -0
- package/types/event/event-dispatcher.d.ts +3 -0
- package/types/event/events/dimension/interface.d.ts +4 -2
- package/types/event/interface.d.ts +14 -2
- package/types/index.d.ts +2 -0
- package/types/interaction/dimension-trigger.d.ts +1 -6
- package/types/interaction/index.d.ts +1 -0
- package/types/interaction/interaction.d.ts +5 -0
- package/types/interaction/interface.d.ts +12 -9
- package/types/layout/grid-layout/grid-layout.d.ts +1 -1
- package/types/mark/base/base-mark.d.ts +3 -3
- package/types/mark/index.d.ts +20 -21
- package/types/mark/interface/type.d.ts +0 -1
- package/types/mark/label.d.ts +2 -2
- package/types/mark/text.d.ts +16 -7
- package/types/model/interface.d.ts +4 -8
- package/types/model/tooltip-helper.d.ts +4 -2
- package/types/plugin/base/base-plugin-service.d.ts +4 -2
- package/types/plugin/base/base-plugin.d.ts +1 -0
- package/types/plugin/base/interface.d.ts +6 -3
- package/types/plugin/chart/formatter/formatter.d.ts +28 -0
- package/types/plugin/chart/formatter/index.d.ts +1 -0
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/chart/media-query/media-query.d.ts +1 -1
- package/types/plugin/chart/plugin-service.d.ts +1 -0
- package/types/plugin/components/index.d.ts +2 -5
- package/types/plugin/components/plugin-service.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +8 -13
- package/types/plugin/components/tooltip-handler/canvas/canvas-tooltip-handler.d.ts +1 -2
- package/types/plugin/components/tooltip-handler/constants.d.ts +0 -8
- package/types/plugin/components/tooltip-handler/dom/dom-tooltip-handler.d.ts +8 -4
- package/types/plugin/components/tooltip-handler/dom/interface.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/dom/model/base-tooltip-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-column-model.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -3
- package/types/plugin/components/tooltip-handler/dom/model/interface.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/interface/style.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/common.d.ts +1 -7
- package/types/plugin/components/tooltip-handler/utils/compose.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/index.d.ts +0 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +19 -3
- package/types/plugin/index.d.ts +1 -0
- package/types/region/interface.d.ts +4 -1
- package/types/region/region.d.ts +1 -0
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area-transformer.d.ts +1 -0
- package/types/series/area/area.d.ts +1 -1
- package/types/series/area/interface.d.ts +7 -1
- package/types/series/bar/bar-transformer.d.ts +1 -0
- package/types/series/bar/bar.d.ts +11 -3
- package/types/series/bar/interface.d.ts +4 -3
- package/types/series/base/base-series-transformer.d.ts +9 -3
- package/types/series/base/base-series.d.ts +16 -23
- package/types/series/base/tooltip-helper.d.ts +12 -8
- package/types/series/box-plot/tooltip-helper.d.ts +1 -1
- package/types/series/cartesian/cartesian.d.ts +3 -4
- package/types/series/circle-packing/tooltip-helper.d.ts +1 -1
- package/types/series/correlation/interface.d.ts +3 -3
- package/types/series/dot/interface.d.ts +2 -2
- package/types/series/funnel/funnel.d.ts +1 -1
- package/types/series/funnel/interface.d.ts +6 -4
- package/types/series/funnel/tooltip-helper.d.ts +3 -3
- package/types/series/gauge/gauge-pointer-transformer.d.ts +5 -0
- package/types/series/gauge/gauge-pointer.d.ts +3 -1
- package/types/series/gauge/gauge-transformer.d.ts +1 -0
- package/types/series/gauge/gauge.d.ts +0 -1
- package/types/series/gauge/interface.d.ts +3 -3
- package/types/series/geo/geo.d.ts +2 -1
- package/types/series/index.d.ts +7 -3
- package/types/series/interface/common.d.ts +12 -5
- package/types/series/interface/series.d.ts +12 -3
- package/types/series/interface/theme.d.ts +19 -1
- package/types/series/interface/tooltip-helper.d.ts +8 -5
- package/types/series/interface/type.d.ts +6 -2
- package/types/series/line/interface.d.ts +3 -2
- package/types/series/map/geo-source.d.ts +4 -2
- package/types/series/map/interface.d.ts +3 -5
- package/types/series/map/tooltip-helper.d.ts +1 -1
- package/types/series/mixin/line-mixin.d.ts +1 -0
- package/types/series/pie/3d/pie-3d.d.ts +1 -1
- package/types/series/pie/interface.d.ts +5 -4
- package/types/series/pie/pie-transformer.d.ts +1 -0
- package/types/series/pie/pie.d.ts +2 -4
- package/types/series/polar/interface.d.ts +2 -2
- package/types/series/polar/polar.d.ts +3 -3
- package/types/series/polar/progress-like/progress-like.d.ts +0 -1
- package/types/series/progress/circular/circular-transformer.d.ts +5 -0
- package/types/series/progress/circular/circular.d.ts +3 -0
- package/types/series/progress/circular/interface.d.ts +5 -5
- package/types/series/radar/interface.d.ts +2 -1
- package/types/series/range-area/range-area.d.ts +2 -2
- package/types/series/range-column/interface.d.ts +5 -5
- package/types/series/range-column/range-column-transformer.d.ts +1 -0
- package/types/series/range-column/range-column.d.ts +0 -1
- package/types/series/rose/interface.d.ts +2 -1
- package/types/series/rose/rose-transformer.d.ts +1 -0
- package/types/series/rose/rose.d.ts +0 -1
- package/types/series/sankey/interface.d.ts +7 -2
- package/types/series/sankey/sankey.d.ts +13 -4
- package/types/series/scatter/interface.d.ts +2 -1
- package/types/series/sunburst/sunburst.d.ts +1 -1
- package/types/series/sunburst/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +3 -2
- package/types/series/treemap/tooltip-helper.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +3 -0
- package/types/series/venn/animation.d.ts +6 -0
- package/types/series/venn/constant.d.ts +2 -0
- package/types/series/venn/interface.d.ts +21 -0
- package/types/series/venn/tooltip-helper.d.ts +5 -0
- package/types/series/venn/util.d.ts +1 -0
- package/types/series/venn/venn-transform.d.ts +6 -0
- package/types/series/venn/venn.d.ts +63 -0
- package/types/series/waterfall/interface.d.ts +6 -1
- package/types/series/waterfall/waterfall-transformer.d.ts +1 -0
- package/types/series/waterfall/waterfall.d.ts +9 -1
- package/types/series/word-cloud/base.d.ts +2 -0
- package/types/series/word-cloud/interface.d.ts +2 -6
- package/types/theme/builtin/common/series/venn.d.ts +2 -0
- package/types/theme/index.d.ts +1 -0
- package/types/theme/interface.d.ts +3 -19
- package/types/theme/theme-manager.d.ts +1 -1
- package/types/theme/token/builtin/default.d.ts +2 -0
- package/types/theme/token/builtin/index.d.ts +2 -0
- package/types/theme/token/builtin/interface.d.ts +17 -0
- package/types/theme/token/index.d.ts +3 -0
- package/types/theme/token/interface.d.ts +6 -0
- package/types/theme/token/util.d.ts +3 -0
- package/types/typings/spec/chart.d.ts +2 -0
- package/types/typings/spec/common.d.ts +41 -26
- package/types/typings/spec/index.d.ts +1 -1
- package/types/typings/tooltip/handler.d.ts +1 -1
- package/types/typings/tooltip/line.d.ts +9 -2
- package/types/typings/tooltip/position.d.ts +18 -24
- package/types/typings/tooltip/shape.d.ts +2 -2
- package/types/typings/tooltip/tooltip.d.ts +13 -8
- package/types/typings/visual.d.ts +15 -11
- package/types/util/data.d.ts +22 -4
- package/types/util/hierarchy.d.ts +2 -0
- package/types/util/index.d.ts +2 -2
- package/types/util/math.d.ts +4 -5
- package/types/util/space.d.ts +1 -1
- package/types/util/spec/common.d.ts +0 -2
- package/types/util/spec/index.d.ts +0 -5
- package/types/util/theme/common.d.ts +2 -0
- package/types/util/theme/index.d.ts +3 -0
- package/types/util/theme/merge-theme.d.ts +6 -0
- package/types/util/theme/preprocess.d.ts +4 -0
|
@@ -5,13 +5,15 @@ import type { MarkTypeEnum } from '../mark/interface';
|
|
|
5
5
|
import type { IColorKey, IThemeColorScheme } from './color-scheme/interface';
|
|
6
6
|
import type { IGradientColor } from '@visactor/vrender-core';
|
|
7
7
|
import type { IComponentTheme } from '../component/interface';
|
|
8
|
+
import type { ITokenKey, TokenMap } from './token';
|
|
8
9
|
export interface ITheme {
|
|
9
10
|
name?: string;
|
|
10
11
|
description?: string;
|
|
11
12
|
type?: 'light' | 'dark';
|
|
12
13
|
background?: string | IGradientColor | IColorKey;
|
|
13
14
|
padding?: ILayoutPaddingSpec;
|
|
14
|
-
fontFamily?: string;
|
|
15
|
+
fontFamily?: string | ITokenKey;
|
|
16
|
+
token?: TokenMap;
|
|
15
17
|
colorScheme?: IThemeColorScheme;
|
|
16
18
|
mark?: IGlobalMarkThemeByType;
|
|
17
19
|
markByName?: IGlobalMarkThemeByName;
|
|
@@ -36,21 +38,3 @@ export interface IGlobalMarkThemeByName {
|
|
|
36
38
|
label?: Partial<IMarkTheme<ITextMarkSpec>>;
|
|
37
39
|
[markName: string]: Partial<IMarkTheme<any>>;
|
|
38
40
|
}
|
|
39
|
-
export interface IThemeConstants {
|
|
40
|
-
defaultFontFamily: string;
|
|
41
|
-
defaultFontSize: number;
|
|
42
|
-
l1FontSize: number;
|
|
43
|
-
l1LineHeight: number | string;
|
|
44
|
-
l2FontSize: number;
|
|
45
|
-
l2LineHeight: number | string;
|
|
46
|
-
l3FontSize: number;
|
|
47
|
-
l3LineHeight: number | string;
|
|
48
|
-
l4FontSize: number;
|
|
49
|
-
l4LineHeight: number | string;
|
|
50
|
-
l5FontSize: number;
|
|
51
|
-
l5LineHeight: number | string;
|
|
52
|
-
l6FontSize: number;
|
|
53
|
-
l6LineHeight: number | string;
|
|
54
|
-
axisTickSize: number;
|
|
55
|
-
areaOpacity: number;
|
|
56
|
-
}
|
|
@@ -8,6 +8,6 @@ export declare class ThemeManager {
|
|
|
8
8
|
static themeExist(name: any): boolean;
|
|
9
9
|
static getDefaultTheme(): ITheme;
|
|
10
10
|
static setCurrentTheme(name: string): void;
|
|
11
|
-
static getCurrentTheme(): ITheme;
|
|
11
|
+
static getCurrentTheme(transformed?: boolean): ITheme;
|
|
12
12
|
static getCurrentThemeName(): string;
|
|
13
13
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TokenMap } from '../interface';
|
|
2
|
+
export type BuiltinTokenMap = TokenMap & {
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
fontSize: number;
|
|
5
|
+
l1FontSize: number;
|
|
6
|
+
l1LineHeight: number | string;
|
|
7
|
+
l2FontSize: number;
|
|
8
|
+
l2LineHeight: number | string;
|
|
9
|
+
l3FontSize: number;
|
|
10
|
+
l3LineHeight: number | string;
|
|
11
|
+
l4FontSize: number;
|
|
12
|
+
l4LineHeight: number | string;
|
|
13
|
+
l5FontSize: number;
|
|
14
|
+
l5LineHeight: number | string;
|
|
15
|
+
l6FontSize: number;
|
|
16
|
+
l6LineHeight: number | string;
|
|
17
|
+
};
|
|
@@ -25,6 +25,7 @@ import type { IWaterfallChartSpec } from '../../chart/waterfall';
|
|
|
25
25
|
import type { ICorrelationChartSpec } from '../../chart/correlation';
|
|
26
26
|
import type { IWordCloudChartSpec, IWordCloud3dChartSpec } from '../../chart/word-cloud';
|
|
27
27
|
import type { IChartSpec } from './common';
|
|
28
|
+
import type { ILiquidChartSpec } from '../../chart/liquid/interface';
|
|
28
29
|
export interface ChartSpecMap {
|
|
29
30
|
readonly common: ICommonChartSpec;
|
|
30
31
|
readonly area: IAreaChartSpec;
|
|
@@ -58,5 +59,6 @@ export interface ChartSpecMap {
|
|
|
58
59
|
readonly circlePacking: ICirclePackingChartSpec;
|
|
59
60
|
readonly heatmap: IHeatmapChartSpec;
|
|
60
61
|
readonly correlation: ICorrelationChartSpec;
|
|
62
|
+
readonly liquid: ILiquidChartSpec;
|
|
61
63
|
}
|
|
62
64
|
export type ISpec = ChartSpecMap[keyof ChartSpecMap] | IChartSpec;
|
|
@@ -2,17 +2,17 @@ import type { IFillMarkSpec, IImageMarkSpec } from '../visual';
|
|
|
2
2
|
import type { LayoutCallBack } from '../../layout/interface';
|
|
3
3
|
import type { IElement, srIOption3DType } from '@visactor/vgrammar-core';
|
|
4
4
|
import type { DataSet, DataView, ISimplifyOptions, IFieldsOptions, IFilterOptions, IFoldOptions, IDsvParserOptions } from '@visactor/vdataset';
|
|
5
|
-
import type {
|
|
5
|
+
import type { RegionSpec } from '../../region/interface';
|
|
6
6
|
import type { IHoverSpec, ISelectSpec, IInteractionSpec } from '../../interaction/interface';
|
|
7
7
|
import type { IRenderOption } from '../../compile/interface';
|
|
8
8
|
import type { ITooltipSpec } from '../../component/tooltip/interface';
|
|
9
9
|
import type { ILayoutSpec } from '../../layout/interface';
|
|
10
|
-
import type { ConvertToMarkStyleSpec, IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICommonSpec, IGroupMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec,
|
|
10
|
+
import type { ConvertToMarkStyleSpec, IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICommonSpec, IGroupMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IRuleMarkSpec, ISymbolMarkSpec, IRippleMarkSpec, ITextMarkSpec, IVisualSpecScale } from '../visual';
|
|
11
11
|
import type { StateValue } from '../../compile/mark';
|
|
12
12
|
import type { ISeriesStyle, SeriesType } from '../../series/interface';
|
|
13
13
|
import type { Datum, StringOrNumber } from '../common';
|
|
14
14
|
import type { IInvalidType } from '../data';
|
|
15
|
-
import type { IMorphSeriesSpec } from '../../animation/spec';
|
|
15
|
+
import type { IAnimationSpec, IMorphSeriesSpec } from '../../animation/spec';
|
|
16
16
|
import type { IPlayer } from '../../component/player';
|
|
17
17
|
import type { IMarkProgressiveConfig, MarkTypeEnum } from '../../mark/interface';
|
|
18
18
|
import type { IDataZoomSpec, IScrollBarSpec } from '../../component/data-zoom';
|
|
@@ -23,9 +23,10 @@ import type { IBrushSpec } from '../../component/brush';
|
|
|
23
23
|
import type { ITotalLabelSpec } from '../../component/label';
|
|
24
24
|
import type { ILegendSpec } from '../../component/legend';
|
|
25
25
|
import type { ILayoutOrientPadding, ILayoutPaddingSpec } from '../layout';
|
|
26
|
-
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
26
|
+
import type { ICustomPath2D, IRichTextCharacter } from '@visactor/vrender-core';
|
|
27
27
|
import type { ICommonAxisSpec } from '../../component/axis';
|
|
28
28
|
import type { IMediaQuerySpec } from '..';
|
|
29
|
+
import type { IModelSpec } from '../../model/interface';
|
|
29
30
|
export type IChartPadding = ILayoutOrientPadding | number;
|
|
30
31
|
export interface IInitOption extends Omit<IRenderOption, 'pluginList'> {
|
|
31
32
|
dom?: string | HTMLElement;
|
|
@@ -48,6 +49,8 @@ export declare enum RenderModeEnum {
|
|
|
48
49
|
'worker' = "worker",
|
|
49
50
|
'miniApp' = "miniApp",
|
|
50
51
|
'wx' = "wx",
|
|
52
|
+
'tt' = "tt",
|
|
53
|
+
'harmony' = "harmony",
|
|
51
54
|
'desktop-miniApp' = "desktop-miniApp",
|
|
52
55
|
'lynx' = "lynx"
|
|
53
56
|
}
|
|
@@ -65,7 +68,7 @@ export interface IChartSpec {
|
|
|
65
68
|
animationThreshold?: number;
|
|
66
69
|
hover?: boolean | IHoverSpec;
|
|
67
70
|
select?: boolean | ISelectSpec;
|
|
68
|
-
region?:
|
|
71
|
+
region?: RegionSpec[];
|
|
69
72
|
title?: ITitleSpec;
|
|
70
73
|
layout?: ILayoutSpec;
|
|
71
74
|
legends?: ILegendSpec | ILegendSpec[];
|
|
@@ -81,6 +84,7 @@ export interface IChartSpec {
|
|
|
81
84
|
theme?: Omit<ITheme, 'name'> | string;
|
|
82
85
|
background?: IBackgroundSpec;
|
|
83
86
|
stackInverse?: boolean;
|
|
87
|
+
stackSort?: boolean;
|
|
84
88
|
media?: IMediaQuerySpec;
|
|
85
89
|
}
|
|
86
90
|
export type IBackgroundStyleSpec = ConvertToMarkStyleSpec<Omit<IFillMarkSpec, 'width' | 'height' | 'background'>> & {
|
|
@@ -159,7 +163,7 @@ export interface ISeriesSpec extends IInteractionSpec {
|
|
|
159
163
|
animationThreshold?: number;
|
|
160
164
|
support3d?: boolean;
|
|
161
165
|
morph?: IMorphSeriesSpec;
|
|
162
|
-
extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType,
|
|
166
|
+
extensionMark?: (IExtensionMarkSpec<Exclude<EnableMarkType, 'group'>> | IExtensionGroupMarkSpec)[];
|
|
163
167
|
}
|
|
164
168
|
export type IChartExtendsSeriesSpec<T extends ISeriesSpec> = Omit<T, 'data' | 'morph' | 'stackValue'>;
|
|
165
169
|
export type AdaptiveSpec<T, K extends keyof any> = {
|
|
@@ -236,40 +240,51 @@ export interface IPerformanceHook {
|
|
|
236
240
|
afterVRenderDraw?: () => void;
|
|
237
241
|
}
|
|
238
242
|
export type IBuildinMarkSpec = {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
[MarkTypeEnum.ripple]: IRippleMarkSpec;
|
|
243
|
+
group: IGroupMarkSpec;
|
|
244
|
+
symbol: ISymbolMarkSpec;
|
|
245
|
+
rule: IRuleMarkSpec;
|
|
246
|
+
line: ILineMarkSpec;
|
|
247
|
+
text: ITextMarkSpec;
|
|
248
|
+
rect: IRectMarkSpec;
|
|
249
|
+
rect3d: IRect3dMarkSpec;
|
|
250
|
+
image: IImageMarkSpec;
|
|
251
|
+
path: IPathMarkSpec;
|
|
252
|
+
area: IAreaMarkSpec;
|
|
253
|
+
arc: IArcMarkSpec;
|
|
254
|
+
arc3d: IArc3dMarkSpec;
|
|
255
|
+
polygon: IPolygonMarkSpec;
|
|
256
|
+
pyramid3d: IPyramid3dMarkSpec;
|
|
257
|
+
boxPlot: IBoxPlotMarkSpec;
|
|
258
|
+
linkPath: ILinkPathMarkSpec;
|
|
259
|
+
ripple: IRippleMarkSpec;
|
|
257
260
|
};
|
|
258
261
|
export type EnableMarkType = keyof IBuildinMarkSpec;
|
|
259
|
-
export interface ICustomMarkSpec<T extends EnableMarkType> extends IMarkSpec<IBuildinMarkSpec[T]> {
|
|
262
|
+
export interface ICustomMarkSpec<T extends EnableMarkType> extends IModelSpec, IMarkSpec<IBuildinMarkSpec[T]>, IAnimationSpec<string, string> {
|
|
260
263
|
type: T;
|
|
261
264
|
dataIndex?: number;
|
|
265
|
+
dataKey?: string | ((datum: any) => string);
|
|
262
266
|
dataId?: StringOrNumber;
|
|
263
267
|
componentType?: string;
|
|
268
|
+
animation?: boolean;
|
|
264
269
|
}
|
|
265
270
|
export interface ICustomMarkGroupSpec extends ICustomMarkSpec<MarkTypeEnum.group> {
|
|
266
271
|
children?: ICustomMarkSpec<EnableMarkType>[];
|
|
267
272
|
}
|
|
268
|
-
export interface IExtensionMarkSpec<T extends Exclude<EnableMarkType,
|
|
273
|
+
export interface IExtensionMarkSpec<T extends Exclude<EnableMarkType, 'group'>> extends ICustomMarkSpec<T> {
|
|
269
274
|
dataIndex?: number;
|
|
275
|
+
dataKey?: string | ((datum: any) => string);
|
|
270
276
|
dataId?: StringOrNumber;
|
|
271
277
|
componentType?: string;
|
|
272
278
|
}
|
|
273
279
|
export interface IExtensionGroupMarkSpec extends ICustomMarkSpec<MarkTypeEnum.group> {
|
|
274
280
|
children?: ICustomMarkSpec<EnableMarkType>[];
|
|
275
281
|
}
|
|
282
|
+
export type ITextFormatMethod<T extends any[]> = (...args: T) => ITextMarkSpec['text'] | {
|
|
283
|
+
type: 'text';
|
|
284
|
+
text: ITextMarkSpec['text'];
|
|
285
|
+
};
|
|
286
|
+
export type IRichTextFormatMethod<T extends any[]> = (...args: T) => {
|
|
287
|
+
type: 'rich';
|
|
288
|
+
text: IRichTextCharacter[];
|
|
289
|
+
} | IRichTextCharacter[];
|
|
290
|
+
export type IFormatMethod<T extends any[]> = (...args: T) => ReturnType<ITextFormatMethod<T>> | ReturnType<IRichTextFormatMethod<T>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './common';
|
|
2
2
|
export type { IStateSpec, StateValueType } from '../../compile/mark';
|
|
3
3
|
export * from './chart';
|
|
4
|
-
export type { IRegionSpec, IGeoRegionSpec } from '../../region/interface';
|
|
4
|
+
export type { IRegionSpec, IGeoRegionSpec, RegionSpec } from '../../region/interface';
|
|
5
5
|
export * from './media-query';
|
|
@@ -5,4 +5,4 @@ export interface ITooltipHandler extends ITooltipHandlerSpec {
|
|
|
5
5
|
reInit?: () => any;
|
|
6
6
|
}
|
|
7
7
|
export type TooltipData = IDimensionInfo[] | IDimensionData[];
|
|
8
|
-
export type TooltipActiveType = 'mark' | 'dimension';
|
|
8
|
+
export type TooltipActiveType = 'mark' | 'dimension' | 'group';
|
|
@@ -2,9 +2,11 @@ import type { TooltipContentProperty } from './common';
|
|
|
2
2
|
import type { ITooltipLabelActual, ITooltipLabelPattern } from './label';
|
|
3
3
|
import type { ITooltipShapeActual, ITooltipShapePattern } from './shape';
|
|
4
4
|
import type { TooltipRichTextAttrs } from '@visactor/vrender-components';
|
|
5
|
-
export interface
|
|
5
|
+
export interface ITooltipLinePattern extends ITooltipShapePattern, ITooltipLabelPattern {
|
|
6
6
|
key?: TooltipContentProperty<string>;
|
|
7
|
+
keyFormatter?: string;
|
|
7
8
|
value?: TooltipContentProperty<string | TooltipRichTextAttrs>;
|
|
9
|
+
valueFormatter?: string;
|
|
8
10
|
visible?: TooltipContentProperty<boolean>;
|
|
9
11
|
isKeyAdaptive?: TooltipContentProperty<boolean>;
|
|
10
12
|
spaceRow?: TooltipContentProperty<number>;
|
|
@@ -13,11 +15,16 @@ export interface IToolTipLinePattern extends ITooltipShapePattern, ITooltipLabel
|
|
|
13
15
|
valueTimeFormat?: string;
|
|
14
16
|
valueTimeFormatMode?: 'utc' | 'local';
|
|
15
17
|
}
|
|
16
|
-
export interface
|
|
18
|
+
export interface ITooltipLineActual extends ITooltipShapeActual, ITooltipLabelActual {
|
|
17
19
|
key?: string;
|
|
18
20
|
value?: string | TooltipRichTextAttrs;
|
|
21
|
+
valueFormatter?: string;
|
|
19
22
|
visible?: boolean;
|
|
20
23
|
isKeyAdaptive?: boolean;
|
|
21
24
|
spaceRow?: number;
|
|
22
25
|
datum?: any;
|
|
23
26
|
}
|
|
27
|
+
export type TooltipActualTitleContent = {
|
|
28
|
+
title?: ITooltipLineActual;
|
|
29
|
+
content?: ITooltipLineActual[];
|
|
30
|
+
};
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export type TooltipPositionCallback<T> = (event: MouseEvent) => T;
|
|
2
|
+
export type TooltipPositionValue = number | TooltipPositionCallback<number>;
|
|
3
|
+
export interface ITooltipPositionFixedValue {
|
|
4
|
+
orient: TooltipFixedPosition;
|
|
5
|
+
mode: TooltipPositionMode;
|
|
6
|
+
offset?: number;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
rt = "rt",
|
|
17
|
-
bl = "bl",
|
|
18
|
-
lb = "lb",
|
|
19
|
-
br = "br",
|
|
20
|
-
rb = "rb",
|
|
21
|
-
inside = "inside"
|
|
8
|
+
export type TooltipPositionPatternItem = TooltipPositionValue | ITooltipPositionFixedValue;
|
|
9
|
+
export type TooltipFixedPosition = 'top' | 'bottom' | 'left' | 'right' | 'tl' | 'lt' | 'tr' | 'rt' | 'bl' | 'lb' | 'br' | 'rb' | 'center' | 'centerTop' | 'centerBottom' | 'centerLeft' | 'centerRight' | 'inside';
|
|
10
|
+
export type TooltipPositionMode = 'pointer' | 'mark' | 'crosshair';
|
|
11
|
+
export interface IGlobalTooltipPositionPattern {
|
|
12
|
+
left?: TooltipPositionValue;
|
|
13
|
+
right?: TooltipPositionValue;
|
|
14
|
+
top?: TooltipPositionValue;
|
|
15
|
+
bottom?: TooltipPositionValue;
|
|
22
16
|
}
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
export interface IFixedTooltipPositionPattern {
|
|
18
|
+
x: TooltipPositionPatternItem;
|
|
19
|
+
y: TooltipPositionPatternItem;
|
|
26
20
|
}
|
|
27
|
-
export type TooltipPosition =
|
|
21
|
+
export type TooltipPosition = IGlobalTooltipPositionPattern | IFixedTooltipPositionPattern | TooltipFixedPosition;
|
|
28
22
|
export interface ITooltipPositionActual {
|
|
29
23
|
x: number;
|
|
30
24
|
y: number;
|
|
@@ -8,8 +8,8 @@ export interface ITooltipShapePattern {
|
|
|
8
8
|
shapeStroke?: TooltipContentProperty<string>;
|
|
9
9
|
shapeLineWidth?: TooltipContentProperty<number>;
|
|
10
10
|
shapeSize?: TooltipContentProperty<number>;
|
|
11
|
+
shapeHollow?: TooltipContentProperty<boolean>;
|
|
11
12
|
shapeColor?: TooltipContentProperty<string>;
|
|
12
|
-
shapeHollow?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface ITooltipShapeActual {
|
|
15
15
|
hasShape?: boolean;
|
|
@@ -18,6 +18,6 @@ export interface ITooltipShapeActual {
|
|
|
18
18
|
shapeStroke?: string;
|
|
19
19
|
shapeLineWidth?: number;
|
|
20
20
|
shapeSize?: number;
|
|
21
|
-
shapeColor?: string;
|
|
22
21
|
shapeHollow?: boolean;
|
|
22
|
+
shapeColor?: string;
|
|
23
23
|
}
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import type { MaybeArray } from '../common';
|
|
2
2
|
import type { TooltipPatternProperty, TooltipUpdateCallback } from './common';
|
|
3
3
|
import type { TooltipActiveType, TooltipData } from './handler';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ITooltipLineActual, ITooltipLinePattern } from './line';
|
|
5
5
|
import type { ITooltipPositionActual, TooltipPositionMode, TooltipPosition } from './position';
|
|
6
6
|
import type { ITooltipShapePattern } from './shape';
|
|
7
7
|
export interface ITooltipPattern extends ITooltipShapePattern {
|
|
8
8
|
visible?: TooltipPatternProperty<boolean>;
|
|
9
|
-
title?: TooltipPatternProperty<
|
|
10
|
-
content?: MaybeArray<TooltipPatternProperty<MaybeArray<
|
|
9
|
+
title?: TooltipPatternProperty<ITooltipLinePattern>;
|
|
10
|
+
content?: MaybeArray<TooltipPatternProperty<MaybeArray<ITooltipLinePattern>>>;
|
|
11
11
|
position?: TooltipPatternProperty<TooltipPosition>;
|
|
12
12
|
positionMode?: TooltipPatternProperty<TooltipPositionMode>;
|
|
13
|
-
updateTitle?: TooltipUpdateCallback<
|
|
14
|
-
updateContent?: TooltipUpdateCallback<
|
|
13
|
+
updateTitle?: TooltipUpdateCallback<ITooltipLineActual>;
|
|
14
|
+
updateContent?: TooltipUpdateCallback<ITooltipLineActual[]>;
|
|
15
15
|
updatePosition?: TooltipUpdateCallback<ITooltipPositionActual>;
|
|
16
16
|
maxLineCount?: number;
|
|
17
|
+
othersLine?: ITooltipLineActual;
|
|
17
18
|
activeType?: TooltipActiveType;
|
|
18
19
|
}
|
|
19
|
-
export
|
|
20
|
+
export type GroupTooltipTriggerMark = 'line' | 'area' | 'point' | 'bar';
|
|
21
|
+
export interface IGroupTooltipPattern extends ITooltipPattern {
|
|
22
|
+
triggerMark?: MaybeArray<GroupTooltipTriggerMark>;
|
|
23
|
+
}
|
|
24
|
+
export interface ITooltipActual {
|
|
20
25
|
visible?: boolean;
|
|
21
|
-
title?:
|
|
22
|
-
content?:
|
|
26
|
+
title?: ITooltipLineActual;
|
|
27
|
+
content?: ITooltipLineActual[];
|
|
23
28
|
activeType?: TooltipActiveType;
|
|
24
29
|
position?: ITooltipPositionActual;
|
|
25
30
|
data?: TooltipData;
|
|
@@ -6,10 +6,11 @@ import type { ScaleType } from './scale';
|
|
|
6
6
|
import type { ShapeType } from './shape';
|
|
7
7
|
import type { IPoint } from './coordinate';
|
|
8
8
|
import type { IAttributeOpt, IModelMarkAttributeContext } from '../compile/mark';
|
|
9
|
-
import type { Datum
|
|
9
|
+
import type { Datum } from './common';
|
|
10
10
|
import type { IPadding } from '@visactor/vutils';
|
|
11
11
|
import type { IColorKey } from '../theme/color-scheme/interface';
|
|
12
|
-
import type {
|
|
12
|
+
import type { ITokenKey } from '../theme/token';
|
|
13
|
+
import type { IRepeatType, TextAlignType, TextBaselineType, IRichTextAttribute, IGraphicStyle } from '@visactor/vrender-core';
|
|
13
14
|
export interface IVisualSpecBase<D, T> {
|
|
14
15
|
type: ScaleType;
|
|
15
16
|
domain: D[];
|
|
@@ -80,6 +81,7 @@ export interface ICommonSpec {
|
|
|
80
81
|
texturePadding?: number;
|
|
81
82
|
outerBorder?: IBorder;
|
|
82
83
|
innerBorder?: IBorder;
|
|
84
|
+
html?: IMarkHtmlSpec;
|
|
83
85
|
[key: string]: any;
|
|
84
86
|
}
|
|
85
87
|
export interface IFillMarkSpec extends ICommonSpec {
|
|
@@ -87,6 +89,7 @@ export interface IFillMarkSpec extends ICommonSpec {
|
|
|
87
89
|
fillOpacity?: number;
|
|
88
90
|
background?: string | HTMLImageElement | HTMLCanvasElement | null;
|
|
89
91
|
}
|
|
92
|
+
export type IMarkHtmlSpec = Partial<IGraphicStyle['html']>;
|
|
90
93
|
export interface ISymbolMarkSpec extends IFillMarkSpec {
|
|
91
94
|
dx?: number;
|
|
92
95
|
dy?: number;
|
|
@@ -116,11 +119,10 @@ export interface IRuleMarkSpec extends ILineMarkSpec {
|
|
|
116
119
|
y1?: number;
|
|
117
120
|
}
|
|
118
121
|
export interface ITextMarkSpec extends IFillMarkSpec {
|
|
119
|
-
|
|
120
|
-
text?: StringOrNumber | string[] | IRichTextCharacter[] | Function;
|
|
122
|
+
text?: string | number | string[] | number[];
|
|
121
123
|
dx?: number;
|
|
122
124
|
dy?: number;
|
|
123
|
-
fontSize?: number;
|
|
125
|
+
fontSize?: number | ITokenKey;
|
|
124
126
|
textAlign?: TextAlign;
|
|
125
127
|
textBaseline?: TextBaseLine;
|
|
126
128
|
fontFamily?: string;
|
|
@@ -129,13 +131,17 @@ export interface ITextMarkSpec extends IFillMarkSpec {
|
|
|
129
131
|
maxLineWidth?: number;
|
|
130
132
|
ellipsis?: string;
|
|
131
133
|
suffixPosition?: 'start' | 'end' | 'middle';
|
|
132
|
-
lineBreak?: string;
|
|
133
134
|
underline?: boolean;
|
|
134
135
|
lineThrough?: boolean;
|
|
135
|
-
lineHeight?: number | string;
|
|
136
|
+
lineHeight?: number | string | ITokenKey;
|
|
136
137
|
poptip?: PopTipAttributes;
|
|
137
138
|
direction?: 'horizontal' | 'vertical';
|
|
138
139
|
}
|
|
140
|
+
export type IRichTextMarkSpec = IRichTextAttribute & IFillMarkSpec & {
|
|
141
|
+
type: 'rich';
|
|
142
|
+
text: IRichTextAttribute['textConfig'];
|
|
143
|
+
};
|
|
144
|
+
export type IComposedTextMarkSpec = ITextMarkSpec | IRichTextMarkSpec;
|
|
139
145
|
export type IPositionedTextMarkSpec = Omit<ITextMarkSpec, 'align' | 'textAlign' | 'baseline' | 'textBaseline'>;
|
|
140
146
|
export interface IRectMarkSpec extends IFillMarkSpec {
|
|
141
147
|
cornerRadius?: number | number[];
|
|
@@ -201,6 +207,8 @@ export interface IArcMarkSpec extends IFillMarkSpec {
|
|
|
201
207
|
outerRadius?: number;
|
|
202
208
|
innerRadius?: number;
|
|
203
209
|
cornerRadius?: number;
|
|
210
|
+
innerPadding?: number;
|
|
211
|
+
outerPadding?: number;
|
|
204
212
|
centerOffset?: number;
|
|
205
213
|
cap?: boolean | [boolean, boolean];
|
|
206
214
|
autoCapConical?: boolean;
|
|
@@ -208,10 +216,6 @@ export interface IArcMarkSpec extends IFillMarkSpec {
|
|
|
208
216
|
export interface IArc3dMarkSpec extends IArcMarkSpec {
|
|
209
217
|
height?: number;
|
|
210
218
|
}
|
|
211
|
-
export interface IProgressArcMarkSpec extends IArcMarkSpec {
|
|
212
|
-
innerPadding?: number;
|
|
213
|
-
outerPadding?: number;
|
|
214
|
-
}
|
|
215
219
|
export interface ICellMarkSpec extends ISymbolMarkSpec {
|
|
216
220
|
padding?: number | number[] | IPadding;
|
|
217
221
|
}
|
package/types/util/data.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
import type { StatisticOperations } from '../data/transforms/dimension-statistics';
|
|
3
3
|
import type { ISeries, ISeriesStackDataMeta } from '../series/interface';
|
|
4
|
+
import type { IRegion } from '../region/interface';
|
|
4
5
|
export declare function mergeFields(targetFields: {
|
|
5
6
|
key: string;
|
|
6
7
|
operations: StatisticOperations;
|
|
@@ -18,21 +19,38 @@ export interface IStackCacheNode {
|
|
|
18
19
|
s: ISeries;
|
|
19
20
|
values: any[];
|
|
20
21
|
}[];
|
|
22
|
+
sortDatums: {
|
|
23
|
+
datum: any;
|
|
24
|
+
index: number;
|
|
25
|
+
series: ISeries;
|
|
26
|
+
}[];
|
|
21
27
|
nodes: {
|
|
22
28
|
[key: string]: IStackCacheNode;
|
|
23
29
|
};
|
|
30
|
+
key: string;
|
|
24
31
|
}
|
|
25
32
|
export interface IStackCacheRoot {
|
|
26
33
|
nodes: {
|
|
27
34
|
[key: string]: IStackCacheNode;
|
|
28
35
|
};
|
|
29
36
|
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
export interface IStackSortCache {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
lastIndex: number;
|
|
40
|
+
sort: {
|
|
41
|
+
[key: string]: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export declare function getRegionStackGroup(region: IRegion, setInitialValue: boolean, filter?: (s: any) => boolean): {
|
|
33
46
|
[key: string]: IStackCacheRoot;
|
|
34
47
|
};
|
|
48
|
+
export declare function sortStackValueGroup(stackValueGroup: {
|
|
49
|
+
[key: string]: IStackCacheNode;
|
|
50
|
+
}, stackSortCache: IStackSortCache): {
|
|
51
|
+
[key: string]: IStackCacheNode;
|
|
52
|
+
};
|
|
35
53
|
export declare function stackTotal(stackData: IStackCacheNode, valueField: string): void;
|
|
36
54
|
export declare function stackOffsetSilhouette(stackCache: IStackCacheNode): void;
|
|
37
55
|
export declare function stack(stackCache: IStackCacheNode, stackInverse: boolean, hasPercent?: boolean): void;
|
|
38
|
-
export declare function stackGroup(s: ISeries, stackData: ISeriesStackDataMeta, stackCache: IStackCacheNode, valueField: string, setInitialValue: boolean): void;
|
|
56
|
+
export declare function stackGroup(s: ISeries, stackData: ISeriesStackDataMeta, stackCache: IStackCacheNode, valueField: string, setInitialValue: boolean, stackSortCache: IStackSortCache, stackKey?: string): void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const findHierarchyNode: <T>(hierarchyData: T[], key: string, keyField?: string, childrenField?: string) => T;
|
|
2
2
|
export declare const findHierarchyNodeParent: <T>(hierarchyData: T[], key: string, keyField?: string, childrenField?: string) => T;
|
|
3
3
|
export declare const findHierarchyPath: <T>(hierarchyData: T[], key: string, keyField?: string, childrenField?: string) => string[];
|
|
4
|
+
export declare function isHierarchyItem(item: Object, valueField?: string, childrenField?: string): boolean;
|
|
5
|
+
export declare function filterHierarchyDataByRange(data: any[], minValue: number, maxValue: number, valueField?: string, childrenField?: string): any[];
|
package/types/util/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TimeUtil } from '
|
|
2
|
-
import { debounce, throttle, clamp } from '@visactor/vutils';
|
|
1
|
+
import { debounce, throttle, clamp, TimeUtil } from '@visactor/vutils';
|
|
3
2
|
export { debounce, throttle, clamp };
|
|
4
3
|
export * from './array';
|
|
5
4
|
export * from './color';
|
|
@@ -12,6 +11,7 @@ export * from './object';
|
|
|
12
11
|
export * from './scale';
|
|
13
12
|
export * from './space';
|
|
14
13
|
export * from './type';
|
|
14
|
+
export * from './theme';
|
|
15
15
|
export * from './spec';
|
|
16
16
|
export * from './text';
|
|
17
17
|
export * from './data';
|
package/types/util/math.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
2
|
-
import type { IPoint,
|
|
3
|
-
import { isNumberClose, isGreater, isLess } from '@visactor/vutils';
|
|
4
|
-
import {
|
|
2
|
+
import type { IPoint, Quadrant } from '../typings';
|
|
3
|
+
import { isNumberClose, isGreater, isLess, normalizeAngle } from '@visactor/vutils';
|
|
4
|
+
import { angleLabelOrientAttribute } from '@visactor/vrender-components';
|
|
5
5
|
export declare const isClose: typeof isNumberClose;
|
|
6
6
|
export { isGreater, isLess, normalizeAngle, angleLabelOrientAttribute };
|
|
7
|
-
export declare function polarToCartesian(point: IPolarPoint): IPoint;
|
|
8
7
|
export declare function computeQuadrant(angle: number): Quadrant;
|
|
9
8
|
export declare function normalizeStartEndAngle(start: number | null, end: number | null): {
|
|
10
9
|
startAngle: number;
|
|
@@ -25,4 +24,4 @@ export declare function radiusLabelOrientAttribute(angle: number): {
|
|
|
25
24
|
};
|
|
26
25
|
export declare function vectorAngle(v1: IPoint, v2: IPoint): number;
|
|
27
26
|
export declare function distance(p1: IPoint, p2?: IPoint): number;
|
|
28
|
-
export declare function getPercentValue(valueList: number[],
|
|
27
|
+
export declare function getPercentValue(valueList: number[], precision?: number): number[] | 0;
|
package/types/util/space.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { ILayoutNumber, ILayoutRect, IPercent, IPercentOffset, ILayoutPaddi
|
|
|
5
5
|
export declare function isValidOrient(orient: string): boolean;
|
|
6
6
|
export declare function isPercent(v: any): v is IPercent;
|
|
7
7
|
export declare function isPercentOffset(v: any): v is IPercentOffset;
|
|
8
|
-
export declare function calcLayoutNumber(v: ILayoutNumber | undefined, size: number, callOp?: ILayoutRect): number;
|
|
8
|
+
export declare function calcLayoutNumber(v: ILayoutNumber | undefined, size: number, callOp?: ILayoutRect, defaultValue?: number): number;
|
|
9
9
|
export declare function calcPadding(paddingSpec: ILayoutOrientPadding, rect: ILayoutRect, callOp: ILayoutRect): IPadding;
|
|
10
10
|
export declare function boundsInRect(bounds: IBoundsLike, rect: ILayoutRect): ILayoutRect;
|
|
11
11
|
export declare function normalizeLayoutPaddingSpec(spec: ILayoutPaddingSpec): ILayoutOrientPadding;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { DataView } from '@visactor/vdataset';
|
|
2
|
-
import type { ITheme } from '../../theme';
|
|
3
2
|
export declare function isDataView(obj: any): obj is DataView;
|
|
4
3
|
export declare function isHTMLElement(obj: any): obj is Element;
|
|
5
|
-
export declare function getThemeObject(theme?: string | ITheme, transformed?: boolean): ITheme;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Maybe } from '@visactor/vutils';
|
|
2
|
+
import type { IGlobalMarkThemeByName, IGlobalMarkThemeByType, ITheme } from '../../theme';
|
|
3
|
+
import type { IThemeColorScheme } from '../../theme/color-scheme/interface';
|
|
4
|
+
export declare function mergeTheme(target: Maybe<ITheme>, ...sources: Maybe<ITheme>[]): Maybe<ITheme>;
|
|
5
|
+
export declare function transformColorSchemeToMerge(colorScheme?: Maybe<IThemeColorScheme>): Maybe<IThemeColorScheme>;
|
|
6
|
+
export declare function transformSeriesThemeToMerge(seriesTheme: any, seriesType: string, markByType: IGlobalMarkThemeByType, markByName: IGlobalMarkThemeByName): any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IThemeColorScheme } from '../../theme/color-scheme/interface';
|
|
2
|
+
import type { ISeriesSpec } from '../../typings';
|
|
3
|
+
import type { TokenMap } from '../../theme/token';
|
|
4
|
+
export declare function preprocessTheme(obj: any, colorScheme?: IThemeColorScheme, tokenMap?: TokenMap, seriesSpec?: ISeriesSpec): any;
|