@visactor/vchart-types 0.10.0-alpha.3 → 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 +3 -3
- 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
|
@@ -27,21 +27,22 @@ import { CartesianCrossHair, PolarCrossHair, registerCartesianCrossHair, registe
|
|
|
27
27
|
import type { IPlayerSpec, IPlayerTheme } from './player';
|
|
28
28
|
import { Player, registerPlayer } from './player';
|
|
29
29
|
import type { IMarkLineSpec, IStepMarkLineSpec, IMarkLineTheme } from './marker/mark-line';
|
|
30
|
-
import {
|
|
30
|
+
import { CartesianMarkLine, PolarMarkLine, registerMarkLine, registerPolarMarkLine } from './marker/mark-line';
|
|
31
31
|
import type { IMarkAreaSpec, IMarkAreaTheme } from './marker/mark-area';
|
|
32
|
-
import {
|
|
32
|
+
import { CartesianMarkArea, PolarMarkArea, registerMarkArea, registerPolarMarkArea } from './marker/mark-area';
|
|
33
33
|
import type { IMarkPointSpec, IMarkPointTheme } from './marker/mark-point';
|
|
34
|
-
import {
|
|
34
|
+
import { CartesianMarkPoint, PolarMarkPoint, GeoMarkPoint, registerMarkPoint, registerPolarMarkPoint, registerGeoMarkPoint } from './marker/mark-point';
|
|
35
35
|
import type { ITooltipSpec, ITooltipTheme } from './tooltip';
|
|
36
36
|
import { Tooltip, registerTooltip } from './tooltip';
|
|
37
|
-
import type { ILabelSpec, ITotalLabelTheme } from './label';
|
|
37
|
+
import type { ILabelSpec, ITotalLabelTheme, ITotalLabelSpec } from './label';
|
|
38
38
|
import { Label, registerLabel } from './label';
|
|
39
39
|
import { TotalLabel, registerTotalLabel } from './label/total-label';
|
|
40
40
|
import { registerPoptip } from './poptip/index';
|
|
41
41
|
import type { IComponentTheme } from './interface';
|
|
42
42
|
import type { IAxisCommonTheme, IAxisItemTheme, IBandAxisTheme } from './axis/interface';
|
|
43
43
|
import type { IPoptipTheme } from './poptip/interface';
|
|
44
|
-
export { ScrollBar, DataZoom, CustomMark, Brush, MapLabelComponent, CartesianAxis, CartesianBandAxis, CartesianLinearAxis, CartesianTimeAxis, CartesianLogAxis, CartesianSymlogAxis, PolarAxis, PolarBandAxis, PolarLinearAxis, DiscreteLegend, ContinuousLegend, Indicator, Title, GeoCoordinate, CartesianCrossHair, PolarCrossHair, Player,
|
|
45
|
-
export { registerBrush, registerScrollBar, registerTitle, registerTooltip, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerContinuousLegend, registerCustomMark, registerDataZoom, registerDiscreteLegend, registerGeoCoordinate, registerIndicator, registerLabel, registerTotalLabel, registerMapLabel,
|
|
46
|
-
export type { IComponent, IScrollBarSpec, IBrushSpec, ICartesianAxisSpec, ICartesianBandAxisSpec, ICartesianCrosshairSpec, ICartesianLinearAxisSpec, ICartesianTimeAxisSpec, ICartesianLogAxisSpec, IContinuousLegendSpec, IDataZoomSpec, IDiscreteLegendSpec, IGeoCoordinateSpec, IIndicatorSpec, ILabelSpec, IMapLabelSpec, IMarkAreaSpec, IMarkLineSpec, IStepMarkLineSpec, IMarkPointSpec, IPlayerSpec, IPolarAxisSpec, IPolarBandAxisSpec, IPolarCrosshairSpec, IPolarLinearAxisSpec, ITitleSpec, ITooltipSpec };
|
|
44
|
+
export { ScrollBar, DataZoom, CustomMark, Brush, MapLabelComponent, CartesianAxis, CartesianBandAxis, CartesianLinearAxis, CartesianTimeAxis, CartesianLogAxis, CartesianSymlogAxis, PolarAxis, PolarBandAxis, PolarLinearAxis, DiscreteLegend, ContinuousLegend, Indicator, Title, GeoCoordinate, CartesianCrossHair, PolarCrossHair, Player, CartesianMarkLine, CartesianMarkArea, CartesianMarkPoint, PolarMarkLine, PolarMarkArea, PolarMarkPoint, GeoMarkPoint, Tooltip, Label, TotalLabel };
|
|
45
|
+
export { registerBrush, registerScrollBar, registerTitle, registerTooltip, registerCartesianBandAxis, registerCartesianCrossHair, registerCartesianLinearAxis, registerCartesianLogAxis, registerCartesianSymlogAxis, registerCartesianTimeAxis, registerContinuousLegend, registerCustomMark, registerDataZoom, registerDiscreteLegend, registerGeoCoordinate, registerIndicator, registerLabel, registerTotalLabel, registerMapLabel, registerMarkLine, registerMarkArea, registerMarkPoint, registerPolarMarkLine, registerPolarMarkArea, registerPolarMarkPoint, registerGeoMarkPoint, registerPlayer, registerPolarBandAxis, registerPolarCrossHair, registerPolarLinearAxis, registerPoptip };
|
|
46
|
+
export type { IComponent, IScrollBarSpec, IBrushSpec, ICartesianAxisSpec, ICartesianBandAxisSpec, ICartesianCrosshairSpec, ICartesianLinearAxisSpec, ICartesianTimeAxisSpec, ICartesianLogAxisSpec, IContinuousLegendSpec, IDataZoomSpec, IDiscreteLegendSpec, IGeoCoordinateSpec, IIndicatorSpec, ILabelSpec, ITotalLabelSpec, IMapLabelSpec, IMarkAreaSpec, IMarkLineSpec, IStepMarkLineSpec, IMarkPointSpec, IPlayerSpec, IPolarAxisSpec, IPolarBandAxisSpec, IPolarCrosshairSpec, IPolarLinearAxisSpec, ITitleSpec, ITooltipSpec };
|
|
47
47
|
export type { IComponentTheme, ICrosshairTheme, IAxisItemTheme, IAxisCommonTheme, IBandAxisTheme, IPolarAxisCommonTheme, ICartesianAxisCommonTheme, IBrushTheme, IDataZoomTheme, IScrollBarTheme, IIndicatorTheme, IMapLabelTheme, ITotalLabelTheme, ISizeLegendTheme, IColorLegendTheme, IDiscreteLegendTheme, IContinuousLegendTheme, IMarkAreaTheme, IMarkLineTheme, IMarkPointTheme, IPlayerTheme, IPoptipTheme, ITitleTheme, ITooltipTheme };
|
|
48
|
+
export * from './tooltip/interface';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Datum, IFormatMethod } from '../../typings';
|
|
1
2
|
import type { IPercent } from '../../typings/layout';
|
|
2
3
|
import type { ConvertToMarkStyleSpec, ITextMarkSpec } from '../../typings/visual';
|
|
3
4
|
import type { IComponentSpec } from '../base/interface';
|
|
4
5
|
import type { IComponent } from '../interface';
|
|
5
|
-
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
6
6
|
export interface IIndicatorItemSpec {
|
|
7
7
|
visible?: boolean;
|
|
8
8
|
field?: string;
|
|
@@ -12,8 +12,8 @@ export interface IIndicatorItemSpec {
|
|
|
12
12
|
fitPercent?: number;
|
|
13
13
|
fitStrategy?: 'default' | 'inscribed';
|
|
14
14
|
style?: Omit<ConvertToMarkStyleSpec<ITextMarkSpec>, 'visible' | 'text'> & {
|
|
15
|
-
type?: 'text' | 'rich'
|
|
16
|
-
text?:
|
|
15
|
+
type?: 'text' | 'rich';
|
|
16
|
+
text?: IFormatMethod<[activeDatum: Datum]> | ITextMarkSpec['text'] | ReturnType<IFormatMethod<[activeDatum: Datum]>>;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export type IIndicator = IComponent;
|
|
@@ -28,10 +28,10 @@ export interface IIndicatorSpec extends IComponentSpec {
|
|
|
28
28
|
title?: IIndicatorItemSpec;
|
|
29
29
|
content?: IIndicatorItemSpec[] | IIndicatorItemSpec;
|
|
30
30
|
}
|
|
31
|
-
export interface IIndicatorItemTheme extends IIndicatorItemSpec {
|
|
31
|
+
export interface IIndicatorItemTheme extends Omit<IIndicatorItemSpec, 'style'> {
|
|
32
32
|
style?: Omit<ITextMarkSpec, 'visible'>;
|
|
33
33
|
}
|
|
34
|
-
export interface IIndicatorTheme extends IIndicatorSpec {
|
|
34
|
+
export interface IIndicatorTheme extends Omit<IIndicatorSpec, 'content' | 'title'> {
|
|
35
35
|
title?: IIndicatorItemTheme;
|
|
36
36
|
content?: IIndicatorItemTheme;
|
|
37
37
|
}
|
|
@@ -15,6 +15,7 @@ import type { ComponentTypeEnum } from './type';
|
|
|
15
15
|
import type { ITotalLabelTheme } from '../label';
|
|
16
16
|
import type { IPoptipTheme } from '../poptip/interface';
|
|
17
17
|
import type { IColorKey } from '../../theme';
|
|
18
|
+
import type { Direction, IOrientType } from '../../typings';
|
|
18
19
|
export interface IComponentTheme {
|
|
19
20
|
axis?: IAxisCommonTheme;
|
|
20
21
|
axisBand?: IAxisCommonTheme;
|
|
@@ -28,8 +29,12 @@ export interface IComponentTheme {
|
|
|
28
29
|
[ComponentTypeEnum.colorLegend]?: IColorLegendTheme;
|
|
29
30
|
[ComponentTypeEnum.sizeLegend]?: ISizeLegendTheme;
|
|
30
31
|
[ComponentTypeEnum.markLine]?: IMarkLineTheme;
|
|
32
|
+
[ComponentTypeEnum.polarMarkLine]?: IMarkLineTheme;
|
|
31
33
|
[ComponentTypeEnum.markArea]?: IMarkAreaTheme;
|
|
34
|
+
[ComponentTypeEnum.polarMarkArea]?: IMarkAreaTheme;
|
|
32
35
|
[ComponentTypeEnum.markPoint]?: IMarkPointTheme;
|
|
36
|
+
[ComponentTypeEnum.polarMarkPoint]?: IMarkPointTheme;
|
|
37
|
+
[ComponentTypeEnum.geoMarkPoint]?: IMarkPointTheme;
|
|
33
38
|
[ComponentTypeEnum.tooltip]?: ITooltipTheme<string | IColorKey>;
|
|
34
39
|
[ComponentTypeEnum.crosshair]?: ICrosshairTheme;
|
|
35
40
|
[ComponentTypeEnum.dataZoom]?: IDataZoomTheme;
|
|
@@ -42,3 +47,10 @@ export interface IComponentTheme {
|
|
|
42
47
|
[ComponentTypeEnum.poptip]?: IPoptipTheme;
|
|
43
48
|
[ComponentTypeEnum.totalLabel]?: ITotalLabelTheme;
|
|
44
49
|
}
|
|
50
|
+
export type ComponentThemeWithDirection<T extends {
|
|
51
|
+
orient?: IOrientType;
|
|
52
|
+
}> = T & {
|
|
53
|
+
orient?: IOrientType;
|
|
54
|
+
[Direction.horizontal]?: Omit<T, 'orient'>;
|
|
55
|
+
[Direction.vertical]?: Omit<T, 'orient'>;
|
|
56
|
+
};
|
|
@@ -23,6 +23,10 @@ export declare enum ComponentTypeEnum {
|
|
|
23
23
|
markLine = "markLine",
|
|
24
24
|
markArea = "markArea",
|
|
25
25
|
markPoint = "markPoint",
|
|
26
|
+
polarMarkLine = "polarMarkLine",
|
|
27
|
+
polarMarkArea = "polarMarkArea",
|
|
28
|
+
polarMarkPoint = "polarMarkPoint",
|
|
29
|
+
geoMarkPoint = "geoMarkPoint",
|
|
26
30
|
tooltip = "tooltip",
|
|
27
31
|
title = "title",
|
|
28
32
|
player = "player",
|
|
@@ -4,7 +4,7 @@ import { ComponentTypeEnum } from '../interface/type';
|
|
|
4
4
|
import type { IRegion } from '../../region/interface';
|
|
5
5
|
import type { IModelRenderOption } from '../../model/interface';
|
|
6
6
|
import type { ILabelSpec } from './interface';
|
|
7
|
-
import type { IGraphic } from '@visactor/vrender-core';
|
|
7
|
+
import type { IGraphic, IGroup } from '@visactor/vrender-core';
|
|
8
8
|
export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<T> {
|
|
9
9
|
static type: ComponentTypeEnum;
|
|
10
10
|
type: ComponentTypeEnum;
|
|
@@ -16,10 +16,10 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
16
16
|
hover: boolean;
|
|
17
17
|
select: boolean;
|
|
18
18
|
state: {
|
|
19
|
-
hover?: Partial<import("
|
|
20
|
-
hover_reverse?: Partial<import("
|
|
21
|
-
selected?: Partial<import("
|
|
22
|
-
selected_reverse?: Partial<import("
|
|
19
|
+
hover?: Partial<import("../../typings").IComposedTextMarkSpec>;
|
|
20
|
+
hover_reverse?: Partial<import("../../typings").IComposedTextMarkSpec>;
|
|
21
|
+
selected?: Partial<import("../../typings").IComposedTextMarkSpec>;
|
|
22
|
+
selected_reverse?: Partial<import("../../typings").IComposedTextMarkSpec>;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
_compareSpec(spec: T, prevSpec: T): {
|
|
@@ -32,4 +32,5 @@ export declare abstract class BaseLabelComponent<T = any> extends BaseComponent<
|
|
|
32
32
|
onRender(ctx: IModelRenderOption): void;
|
|
33
33
|
changeRegions(regions: IRegion[]): void;
|
|
34
34
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
35
|
+
protected _delegateLabelEvent(component: IGroup): void;
|
|
35
36
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BaseLabelAttrs } from '@visactor/vrender-components';
|
|
2
|
-
import type { ConvertToMarkStyleSpec, Datum, ITextMarkSpec } from '../../typings';
|
|
2
|
+
import type { ConvertToMarkStyleSpec, Datum, IComposedTextMarkSpec, IFormatMethod, ITextMarkSpec } from '../../typings';
|
|
3
3
|
import type { IComponentSpec } from '../base/interface';
|
|
4
|
-
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
5
4
|
import type { ILabelMark } from '../../mark/label';
|
|
6
5
|
import type { ISeries } from '../../series';
|
|
7
6
|
export interface ILabelFormatMethodContext {
|
|
@@ -10,13 +9,13 @@ export interface ILabelFormatMethodContext {
|
|
|
10
9
|
export interface ILabelSpec extends IComponentSpec {
|
|
11
10
|
visible?: boolean;
|
|
12
11
|
interactive?: boolean;
|
|
13
|
-
textType?:
|
|
14
|
-
formatMethod?:
|
|
15
|
-
formatter?: string;
|
|
12
|
+
textType?: 'text' | 'rich';
|
|
13
|
+
formatMethod?: IFormatMethod<[text: string | string[], datum?: Datum, ctx?: ILabelFormatMethodContext]>;
|
|
14
|
+
formatter?: string | string[];
|
|
16
15
|
offset?: number;
|
|
17
16
|
position?: string;
|
|
18
|
-
style?: ConvertToMarkStyleSpec<
|
|
19
|
-
state?: LabelStateStyle<Partial<
|
|
17
|
+
style?: ConvertToMarkStyleSpec<IComposedTextMarkSpec>;
|
|
18
|
+
state?: LabelStateStyle<Partial<IComposedTextMarkSpec>>;
|
|
20
19
|
overlap?: BaseLabelAttrs['overlap'];
|
|
21
20
|
smartInvert?: BaseLabelAttrs['smartInvert'];
|
|
22
21
|
animation?: BaseLabelAttrs['animation'];
|
|
@@ -24,21 +23,21 @@ export interface ILabelSpec extends IComponentSpec {
|
|
|
24
23
|
customLayoutFunc?: BaseLabelAttrs['customLayoutFunc'];
|
|
25
24
|
customOverlapFunc?: BaseLabelAttrs['customOverlapFunc'];
|
|
26
25
|
labelLayout?: 'series' | 'region';
|
|
27
|
-
centerOffset?: number;
|
|
28
26
|
support3d?: boolean;
|
|
29
27
|
syncState?: boolean;
|
|
30
28
|
}
|
|
29
|
+
export type IMultiLabelSpec<T extends Omit<ILabelSpec, 'position'>> = T | T[];
|
|
31
30
|
type LabelStateStyle<T> = {
|
|
32
31
|
hover?: T;
|
|
33
32
|
hover_reverse?: T;
|
|
34
33
|
selected?: T;
|
|
35
34
|
selected_reverse?: T;
|
|
36
35
|
};
|
|
37
|
-
export type ITotalLabelSpec = Pick<ILabelSpec, 'visible' | 'formatMethod' | 'interactive' | 'offset' | 'style' | 'state'>;
|
|
36
|
+
export type ITotalLabelSpec = Pick<ILabelSpec, 'visible' | 'formatMethod' | 'interactive' | 'offset' | 'style' | 'state' | 'textType'>;
|
|
38
37
|
export interface ITotalLabelTheme extends Pick<ILabelSpec, 'visible' | 'interactive' | 'offset' | 'overlap' | 'smartInvert' | 'animation'> {
|
|
39
38
|
style?: ITextMarkSpec;
|
|
40
39
|
}
|
|
41
40
|
export type TransformedLabelSpec = ILabelSpec & {
|
|
42
|
-
getStyleHandler: (series: ISeries) => (mark?: ILabelMark) => void;
|
|
41
|
+
getStyleHandler: (series: ISeries) => (mark?: ILabelMark, spec?: any) => void;
|
|
43
42
|
};
|
|
44
43
|
export {};
|
|
@@ -7,7 +7,6 @@ import type { ILabel, IMark as IVGrammarMark } from '@visactor/vgrammar-core';
|
|
|
7
7
|
import type { IComponentMark } from '../../mark/component';
|
|
8
8
|
import { BaseLabelComponent } from './base-label';
|
|
9
9
|
import type { Maybe } from '@visactor/vutils';
|
|
10
|
-
import type { IGroup } from '@visactor/vrender-core';
|
|
11
10
|
import type { TransformedLabelSpec } from './interface';
|
|
12
11
|
import type { ILabelMark } from '../../mark/label';
|
|
13
12
|
import type { ICompilableMark } from '../../compile/mark';
|
|
@@ -41,7 +40,7 @@ export declare class Label<T extends IChartSpec = any> extends BaseLabelComponen
|
|
|
41
40
|
init(option: IModelInitOption): void;
|
|
42
41
|
reInit(spec?: T): void;
|
|
43
42
|
initEvent(): void;
|
|
44
|
-
|
|
43
|
+
afterCompile(): void;
|
|
45
44
|
protected _initTextMark(): void;
|
|
46
45
|
protected _initLabelComponent(): void;
|
|
47
46
|
protected _initTextMarkStyle(): void;
|
|
@@ -19,6 +19,7 @@ export declare class TotalLabel extends BaseLabelComponent {
|
|
|
19
19
|
protected _initTextMark(): void;
|
|
20
20
|
_initTextMarkStyle(): void;
|
|
21
21
|
protected _initLabelComponent(): void;
|
|
22
|
+
afterCompile(): void;
|
|
22
23
|
updateLayoutAttribute(): void;
|
|
23
24
|
compileMarks(): void;
|
|
24
25
|
getVRenderComponents(): any[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WaterfallSeries } from './../../series/waterfall/waterfall';
|
|
1
2
|
import type { Datum } from '../../typings/common';
|
|
2
3
|
import type { ILabelInfo } from './label';
|
|
3
4
|
import type { LabelItem, Strategy } from '@visactor/vrender-components';
|
|
@@ -14,6 +15,7 @@ export declare const labelRuleMap: {
|
|
|
14
15
|
rect3d: typeof barLabel;
|
|
15
16
|
arc3d: typeof pieLabel;
|
|
16
17
|
treemap: typeof treemapLabel;
|
|
18
|
+
venn: typeof vennLabel;
|
|
17
19
|
};
|
|
18
20
|
export declare function defaultLabelConfig(rule: string, labelInfo: ILabelInfo): any;
|
|
19
21
|
export declare function textAttribute(labelInfo: ILabelInfo, datum: Datum, formatMethod?: ILabelSpec['formatMethod'], formatter?: ILabelSpec['formatter']): any;
|
|
@@ -48,7 +50,9 @@ export declare function pieLabel(labelInfo: ILabelInfo): {
|
|
|
48
50
|
position: import("@visactor/vrender-components").Functional<string>;
|
|
49
51
|
smartInvert: boolean | import("@visactor/vrender-components").SmartInvertAttrs;
|
|
50
52
|
};
|
|
51
|
-
export declare function
|
|
53
|
+
export declare function stackLabelX(datum2: Datum, series: WaterfallSeries, pos: string, offset: number): number;
|
|
54
|
+
export declare function stackLabelY(datum2: Datum, series: WaterfallSeries, pos: string, offset: number): number;
|
|
55
|
+
export declare function stackLabel(labelInfo: ILabelInfo, datumTransform?: (data: any) => any, attributeTransform?: (label: LabelItem, datum: Datum, att: any) => any): {
|
|
52
56
|
customLayoutFunc: (labels: LabelItem[]) => import("@visactor/vrender-core").IText[];
|
|
53
57
|
dataFilter: (labels: LabelItem[]) => LabelItem[];
|
|
54
58
|
overlap: {
|
|
@@ -56,9 +60,13 @@ export declare function stackLabel(labelInfo: ILabelInfo): {
|
|
|
56
60
|
};
|
|
57
61
|
};
|
|
58
62
|
export declare function treemapLabel(labelInfo: ILabelInfo): {
|
|
59
|
-
customLayoutFunc: (labels: LabelItem[]) =>
|
|
63
|
+
customLayoutFunc: (labels: LabelItem[], text: any) => any;
|
|
60
64
|
overlap: boolean;
|
|
61
65
|
};
|
|
66
|
+
export declare function vennLabel(labelInfo: ILabelInfo): {
|
|
67
|
+
customLayoutFunc: (labels: LabelItem[], text: any) => any;
|
|
68
|
+
smartInvert: boolean;
|
|
69
|
+
};
|
|
62
70
|
export declare function LineLabel(labelInfo: ILabelInfo): {
|
|
63
71
|
position: string;
|
|
64
72
|
data: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';
|
|
2
|
+
import type { ComponentThemeWithDirection } from '../../interface';
|
|
2
3
|
import type { ILegendCommonSpec, NoVisibleMarkStyle } from '../interface';
|
|
3
4
|
type Text = StringOrNumber;
|
|
4
5
|
export type TextAttribute = {
|
|
@@ -15,6 +16,7 @@ export type HandlerTextAttribute = {
|
|
|
15
16
|
style?: Omit<NoVisibleMarkStyle<ITextMarkSpec>, 'text'>;
|
|
16
17
|
};
|
|
17
18
|
export type IContinuousLegendSpec = ILegendCommonSpec & {
|
|
19
|
+
inverse?: boolean;
|
|
18
20
|
field?: string;
|
|
19
21
|
scale?: string;
|
|
20
22
|
defaultSelected?: [number, number];
|
|
@@ -44,16 +46,9 @@ export type ISizeLegendSpec = IContinuousLegendSpec & {
|
|
|
44
46
|
align?: 'top' | 'bottom' | 'left' | 'right';
|
|
45
47
|
};
|
|
46
48
|
export type IContinuousLegendTheme = Omit<IContinuousLegendSpec, 'type' | 'field' | 'scale' | 'regionIndex' | 'regionId' | 'seriesIndex' | 'seriesId' | 'id' | 'defaultSelected'>;
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export
|
|
52
|
-
horizontal?: IContinuousLegendTheme & {
|
|
53
|
-
sizeBackground?: ISizeLegendSpec['sizeBackground'];
|
|
54
|
-
};
|
|
55
|
-
vertical?: IContinuousLegendTheme & {
|
|
56
|
-
sizeBackground?: ISizeLegendSpec['sizeBackground'];
|
|
57
|
-
};
|
|
58
|
-
}
|
|
49
|
+
export type ISizeLegendCommonTheme = IContinuousLegendTheme & {
|
|
50
|
+
sizeBackground?: ISizeLegendSpec['sizeBackground'];
|
|
51
|
+
};
|
|
52
|
+
export type IColorLegendTheme = ComponentThemeWithDirection<IContinuousLegendTheme>;
|
|
53
|
+
export type ISizeLegendTheme = ComponentThemeWithDirection<ISizeLegendCommonTheme>;
|
|
59
54
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { IRectMarkSpec, ISymbolMarkSpec, ITextMarkSpec } from '../../../typings/visual';
|
|
2
|
-
import type { DiscreteLegendAttrs, LegendItemDatum, LegendItem } from '@visactor/vrender-components';
|
|
2
|
+
import type { DiscreteLegendAttrs, LegendItemDatum, LegendItem, LegendPagerAttributes, LegendScrollbarAttributes } from '@visactor/vrender-components';
|
|
3
3
|
import type { ILegendCommonSpec, NoVisibleMarkStyle } from '../interface';
|
|
4
|
-
import type { StringOrNumber } from '../../../typings';
|
|
4
|
+
import type { IFormatMethod, StringOrNumber } from '../../../typings';
|
|
5
5
|
import type { IBaseScale } from '@visactor/vscale';
|
|
6
6
|
import type { IGlobalScale } from '../../../scale/interface';
|
|
7
|
-
|
|
7
|
+
import type { ComponentThemeWithDirection } from '../../interface';
|
|
8
|
+
export type formatterCallback = IFormatMethod<[text: StringOrNumber, item: LegendItemDatum, index: number]>;
|
|
8
9
|
export type LegendItemStyleValue<T> = T | ((item: LegendItemDatum, isSelected: boolean, index: number, allItems: LegendItemDatum[]) => T);
|
|
9
10
|
export type LegendItemStyle<T> = {
|
|
10
11
|
style?: T;
|
|
@@ -16,6 +17,7 @@ export type LegendItemStyle<T> = {
|
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
export type IItem = {
|
|
20
|
+
align?: 'left' | 'right';
|
|
19
21
|
background?: {
|
|
20
22
|
visible?: boolean;
|
|
21
23
|
} & LegendItemStyle<LegendItemStyleValue<NoVisibleMarkStyle<IRectMarkSpec>>>;
|
|
@@ -24,18 +26,23 @@ export type IItem = {
|
|
|
24
26
|
space?: number;
|
|
25
27
|
} & LegendItemStyle<LegendItemStyleValue<Partial<NoVisibleMarkStyle<ISymbolMarkSpec>>>>;
|
|
26
28
|
label?: {
|
|
29
|
+
widthRatio?: number;
|
|
27
30
|
space?: number;
|
|
28
31
|
formatMethod?: formatterCallback;
|
|
32
|
+
formatter?: string;
|
|
29
33
|
} & LegendItemStyle<LegendItemStyleValue<NoVisibleMarkStyle<ITextMarkSpec>>>;
|
|
30
34
|
value?: {
|
|
35
|
+
widthRatio?: number;
|
|
31
36
|
space?: number;
|
|
32
37
|
alignRight?: boolean;
|
|
33
38
|
formatMethod?: formatterCallback;
|
|
39
|
+
formatter?: string | string[];
|
|
34
40
|
} & LegendItemStyle<LegendItemStyleValue<NoVisibleMarkStyle<ITextMarkSpec>>>;
|
|
35
41
|
focusIconStyle?: NoVisibleMarkStyle<ISymbolMarkSpec>;
|
|
36
42
|
maxWidth?: number | string;
|
|
37
43
|
width?: number | string;
|
|
38
44
|
height?: number | string;
|
|
45
|
+
autoEllipsisStrategy?: 'labelFirst' | 'valueFirst' | 'none';
|
|
39
46
|
} & Omit<LegendItem, 'background' | 'shape' | 'label' | 'value' | 'focusIconStyle' | 'width' | 'height' | 'maxWidth'>;
|
|
40
47
|
export type IPager = {
|
|
41
48
|
textStyle?: Partial<NoVisibleMarkStyle<ITextMarkSpec>>;
|
|
@@ -49,13 +56,21 @@ export type IPager = {
|
|
|
49
56
|
disable?: Omit<NoVisibleMarkStyle<ISymbolMarkSpec>, 'symbolType'>;
|
|
50
57
|
};
|
|
51
58
|
};
|
|
52
|
-
} & Omit<
|
|
59
|
+
} & Omit<LegendPagerAttributes, 'textStyle' | 'handler'>;
|
|
60
|
+
export type ILegendScrollbar = {
|
|
61
|
+
type: 'scrollbar';
|
|
62
|
+
railStyle?: Omit<Partial<NoVisibleMarkStyle<IRectMarkSpec>>, 'width' | 'height'>;
|
|
63
|
+
sliderStyle?: Omit<Partial<NoVisibleMarkStyle<IRectMarkSpec>>, 'width' | 'height'>;
|
|
64
|
+
} & Omit<LegendScrollbarAttributes, 'railStyle' | 'sliderStyle'>;
|
|
53
65
|
export type IDiscreteLegendSpec = ILegendCommonSpec & {
|
|
54
66
|
type?: 'discrete';
|
|
55
67
|
data?: (data: LegendItemDatum[], colorScale: IBaseScale, globalScale: IGlobalScale) => LegendItemDatum[];
|
|
56
68
|
item?: IItem;
|
|
57
|
-
pager?: IPager;
|
|
69
|
+
pager?: IPager | ILegendScrollbar;
|
|
70
|
+
scale?: string;
|
|
58
71
|
scaleName?: string;
|
|
59
72
|
field?: string;
|
|
73
|
+
defaultSelected?: string[];
|
|
60
74
|
} & Omit<DiscreteLegendAttrs, 'layout' | 'title' | 'items' | 'item' | 'pager'>;
|
|
61
|
-
export type
|
|
75
|
+
export type IDiscreteLegendCommonTheme = Omit<IDiscreteLegendSpec, 'type' | 'data' | 'regionIndex' | 'regionId' | 'seriesIndex' | 'seriesId' | 'id' | 'defaultSelected'>;
|
|
76
|
+
export type IDiscreteLegendTheme = ComponentThemeWithDirection<IDiscreteLegendCommonTheme>;
|
|
@@ -7,21 +7,25 @@ import { ComponentTypeEnum } from '../../interface/type';
|
|
|
7
7
|
import { DiscreteLegend as LegendComponent } from '@visactor/vrender-components';
|
|
8
8
|
import { BaseLegend } from '../base-legend';
|
|
9
9
|
import type { ILayoutRect } from '../../../typings/layout';
|
|
10
|
+
import type { StringOrNumber } from '../../../typings';
|
|
10
11
|
export declare class DiscreteLegend extends BaseLegend<IDiscreteLegendSpec> {
|
|
11
12
|
static specKey: string;
|
|
12
13
|
static type: ComponentTypeEnum;
|
|
13
14
|
type: ComponentTypeEnum;
|
|
14
15
|
name: string;
|
|
16
|
+
protected _unselectedData: StringOrNumber[];
|
|
15
17
|
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
16
18
|
init(option: IModelInitOption): void;
|
|
17
19
|
protected _initLegendData(): DataView;
|
|
18
20
|
protected _getSeriesLegendField(s: ISeries): string;
|
|
19
21
|
protected _initSelectedData(): void;
|
|
20
|
-
|
|
22
|
+
getLegendDefaultData(originalData?: boolean): any;
|
|
21
23
|
private _addDefaultTitleText;
|
|
22
24
|
protected _getLegendAttributes(rect: ILayoutRect): any;
|
|
23
25
|
protected _getLegendConstructor(): typeof LegendComponent;
|
|
26
|
+
setSelectedData(selectedData: StringOrNumber[]): void;
|
|
24
27
|
protected _initEvent(): void;
|
|
25
28
|
private _getLegendItems;
|
|
29
|
+
private _addLegendItemFormatMethods;
|
|
26
30
|
}
|
|
27
31
|
export declare const registerDiscreteLegend: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ITitle } from './interface';
|
|
2
2
|
export declare function transformLegendTitleAttributes(title: ITitle): {
|
|
3
3
|
textStyle?: import("./interface").NoVisibleMarkStyle<import("../..").ITextMarkSpec>;
|
|
4
4
|
style?: import("./interface").NoVisibleMarkStyle<import("../..").ITextMarkSpec>;
|
|
@@ -15,18 +15,27 @@ 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 |
|
|
18
|
+
text?: string | number | number[] | string[] | {
|
|
19
19
|
type?: "text";
|
|
20
|
-
text: string | number |
|
|
20
|
+
text: string | number | number[] | string[];
|
|
21
21
|
} | {
|
|
22
22
|
type: "rich";
|
|
23
23
|
text: import("@visactor/vrender-core").IRichTextCharacter[];
|
|
24
|
+
} | {
|
|
25
|
+
type: "html";
|
|
26
|
+
text: {
|
|
27
|
+
dom: string | HTMLElement;
|
|
28
|
+
} & import("@visactor/vrender-core").SimpleDomStyleOptions & import("@visactor/vrender-core").CommonDomOptions;
|
|
29
|
+
} | {
|
|
30
|
+
type: "react";
|
|
31
|
+
text: {
|
|
32
|
+
element: any;
|
|
33
|
+
} & import("@visactor/vrender-core").SimpleDomStyleOptions & import("@visactor/vrender-core").CommonDomOptions;
|
|
24
34
|
};
|
|
25
35
|
visible?: boolean;
|
|
26
|
-
padding?: import("@visactor/vrender-components
|
|
36
|
+
padding?: import("@visactor/vrender-components").Padding;
|
|
27
37
|
maxWidth?: number;
|
|
28
38
|
minWidth?: number;
|
|
29
39
|
space?: number;
|
|
30
40
|
align?: "start" | "end" | "center";
|
|
31
41
|
};
|
|
32
|
-
export declare function getLayout(spec: ILegendCommonSpec): "vertical" | "horizontal";
|
|
@@ -1,67 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import { DataView } from '@visactor/vdataset';
|
|
2
|
+
import type { Maybe } from '@visactor/vutils';
|
|
3
|
+
import type { IModelRenderOption, IModelSpecInfo } from '../../model/interface';
|
|
3
4
|
import type { IRegion } from '../../region/interface';
|
|
4
|
-
import type { ICartesianSeries } from '../../series/interface';
|
|
5
5
|
import type { ILayoutRect, ILayoutType, IRect } from '../../typings';
|
|
6
6
|
import { BaseComponent } from '../base/base-component';
|
|
7
|
-
import type {
|
|
7
|
+
import type { IDataPos, IDataPosCallback, IMarkerSpec, IMarkerSupportSeries } from './interface';
|
|
8
8
|
import type { IGraphic, IGroup } from '@visactor/vrender-core';
|
|
9
9
|
export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComponent<T> {
|
|
10
10
|
layoutType: ILayoutType | 'none';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
static specKey: string;
|
|
12
|
+
static type: string;
|
|
13
|
+
static coordinateType: string;
|
|
14
|
+
coordinateType: string;
|
|
15
|
+
protected _startRelativeSeries: IMarkerSupportSeries;
|
|
16
|
+
protected _endRelativeSeries: IMarkerSupportSeries;
|
|
17
|
+
protected _relativeSeries: IMarkerSupportSeries;
|
|
18
|
+
protected _specifiedDataSeries: IMarkerSupportSeries | IMarkerSupportSeries[];
|
|
19
|
+
getRelativeSeries(): IMarkerSupportSeries;
|
|
15
20
|
protected _markerData: DataView;
|
|
21
|
+
getMarkerData(): DataView;
|
|
16
22
|
protected _markerComponent: any;
|
|
17
23
|
protected _layoutOffsetX: number;
|
|
18
24
|
protected _layoutOffsetY: number;
|
|
19
25
|
private _firstSeries;
|
|
26
|
+
protected abstract _initDataView(): void;
|
|
27
|
+
protected abstract _createMarkerComponent(): IGroup;
|
|
28
|
+
protected abstract _markerLayout(): void;
|
|
29
|
+
static _getMarkerCoordinateType(markerSpec: any): string;
|
|
30
|
+
static getSpecInfo(chartSpec: any): Maybe<IModelSpecInfo[]>;
|
|
20
31
|
created(): void;
|
|
21
32
|
protected _getAllRelativeSeries(): {
|
|
22
|
-
getRelativeSeries: () =>
|
|
23
|
-
getStartRelativeSeries: () =>
|
|
24
|
-
getEndRelativeSeries: () =>
|
|
33
|
+
getRelativeSeries: () => IMarkerSupportSeries;
|
|
34
|
+
getStartRelativeSeries: () => IMarkerSupportSeries;
|
|
35
|
+
getEndRelativeSeries: () => IMarkerSupportSeries;
|
|
25
36
|
};
|
|
26
37
|
private _getFieldInfoFromSpec;
|
|
27
|
-
protected
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
protected _processSpecY(specY: IDataPos | IDataPosCallback): {
|
|
37
|
-
getRelativeSeries: () => ICartesianSeries;
|
|
38
|
-
getStartRelativeSeries: () => ICartesianSeries;
|
|
39
|
-
getEndRelativeSeries: () => ICartesianSeries;
|
|
40
|
-
y: string | number | IDataPosCallback | {
|
|
41
|
-
field: any;
|
|
42
|
-
aggrType: IAggrType;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
protected _processSpecXY(specX: IDataPos | IDataPosCallback, specY: IDataPos | IDataPosCallback): {
|
|
46
|
-
getRelativeSeries: () => ICartesianSeries;
|
|
47
|
-
getStartRelativeSeries: () => ICartesianSeries;
|
|
48
|
-
getEndRelativeSeries: () => ICartesianSeries;
|
|
49
|
-
x: string | number | IDataPosCallback | {
|
|
50
|
-
field: any;
|
|
51
|
-
aggrType: IAggrType;
|
|
52
|
-
};
|
|
53
|
-
y: string | number | IDataPosCallback | {
|
|
54
|
-
field: any;
|
|
55
|
-
aggrType: IAggrType;
|
|
56
|
-
};
|
|
38
|
+
protected _processSpecByDims(dimSpec: {
|
|
39
|
+
dim: 'x' | 'y' | 'angle' | 'radius' | 'areaName';
|
|
40
|
+
specValue: IDataPos | IDataPosCallback;
|
|
41
|
+
}[]): {
|
|
42
|
+
getRelativeSeries: () => IMarkerSupportSeries;
|
|
43
|
+
getStartRelativeSeries: () => IMarkerSupportSeries;
|
|
44
|
+
getEndRelativeSeries: () => IMarkerSupportSeries;
|
|
57
45
|
};
|
|
58
46
|
protected _processSpecCoo(spec: any): any;
|
|
47
|
+
protected _getRelativeDataView(): DataView;
|
|
59
48
|
updateLayoutAttribute(): void;
|
|
60
49
|
private _getSeriesByIdOrIndex;
|
|
61
50
|
protected _bindSeries(): void;
|
|
62
|
-
protected abstract _initDataView(): void;
|
|
63
|
-
protected abstract _createMarkerComponent(): IGroup;
|
|
64
|
-
protected abstract _markerLayout(): void;
|
|
65
51
|
protected initEvent(): void;
|
|
66
52
|
onRender(ctx: IModelRenderOption): void;
|
|
67
53
|
changeRegions(regions: IRegion[]): void;
|
|
@@ -69,4 +55,11 @@ export declare abstract class BaseMarker<T extends IMarkerSpec> extends BaseComp
|
|
|
69
55
|
private _getFirstSeries;
|
|
70
56
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
71
57
|
onLayoutStart(layoutRect: IRect, chartViewRect: ILayoutRect, ctx: any): void;
|
|
58
|
+
_compareSpec(spec: T, prevSpec: T): {
|
|
59
|
+
change: boolean;
|
|
60
|
+
reMake: boolean;
|
|
61
|
+
reRender: boolean;
|
|
62
|
+
reSize: boolean;
|
|
63
|
+
reCompile: boolean;
|
|
64
|
+
};
|
|
72
65
|
}
|