@visactor/vchart-types 1.15.5-alpha.8 → 2.0.0-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/animate-manager.d.ts +0 -12
- package/types/animation/animation-planner.d.ts +13 -0
- package/types/animation/config.d.ts +5 -5
- package/types/animation/grammar-dector.d.ts +22 -0
- package/types/animation/index.d.ts +7 -0
- package/types/animation/interface.d.ts +98 -7
- package/types/animation/sequential-animate.d.ts +1 -0
- package/types/animation/spec.d.ts +27 -3
- package/types/animation/state-transition.d.ts +1 -0
- package/types/animation/strategy/common.d.ts +17 -0
- package/types/animation/strategy/horizontal-bar-split.d.ts +11 -0
- package/types/animation/strategy/vertical-bar-split.d.ts +11 -0
- package/types/animation/utils.d.ts +3 -4
- package/types/chart/area/area.d.ts +1 -0
- package/types/chart/bar/bar.d.ts +1 -0
- package/types/chart/bar/index.d.ts +0 -1
- package/types/chart/bar/interface.d.ts +1 -5
- package/types/chart/base/base-chart.d.ts +22 -9
- package/types/chart/box-plot/box-plot.d.ts +1 -0
- package/types/chart/common/common.d.ts +1 -0
- package/types/chart/common/interface.d.ts +5 -5
- package/types/chart/funnel/index.d.ts +0 -1
- package/types/chart/funnel/interface.d.ts +1 -4
- package/types/chart/funnel/util.d.ts +2 -0
- package/types/chart/histogram/histogram.d.ts +1 -0
- package/types/chart/histogram/index.d.ts +0 -1
- package/types/chart/histogram/interface.d.ts +1 -4
- package/types/chart/index.d.ts +19 -17
- package/types/chart/interface/chart.d.ts +14 -5
- package/types/chart/interface/common.d.ts +2 -9
- package/types/chart/interface/type.d.ts +1 -8
- package/types/chart/line/line.d.ts +1 -0
- package/types/chart/mosaic/mosaic.d.ts +1 -0
- package/types/chart/pictogram/interface.d.ts +1 -1
- package/types/chart/pie/index.d.ts +0 -1
- package/types/chart/pie/interface.d.ts +1 -5
- package/types/chart/progress/circular/circular.d.ts +1 -0
- package/types/chart/progress/linear/linear.d.ts +1 -0
- package/types/chart/radar/radar.d.ts +1 -0
- package/types/chart/range-area/range-area.d.ts +1 -0
- package/types/chart/range-column/index.d.ts +0 -1
- package/types/chart/range-column/interface.d.ts +1 -5
- package/types/chart/range-column/range-column.d.ts +1 -0
- package/types/chart/rose/rose.d.ts +1 -0
- package/types/chart/sankey/sankey.d.ts +1 -1
- package/types/chart/scatter/scatter.d.ts +1 -0
- package/types/chart/waterfall/waterfall.d.ts +1 -0
- package/types/chart/word-cloud/index.d.ts +0 -1
- package/types/chart/word-cloud/interface.d.ts +1 -5
- package/types/chart/word-cloud/word-cloud.d.ts +4 -8
- package/types/compile/compilable-base.d.ts +1 -1
- package/types/compile/compiler.d.ts +35 -25
- package/types/compile/data/compilable-data.d.ts +7 -7
- package/types/compile/data/interface.d.ts +4 -1
- package/types/compile/grammar-item.d.ts +7 -13
- package/types/compile/interface/compilable-item.d.ts +22 -28
- package/types/compile/interface/compiler.d.ts +14 -4
- package/types/compile/mark/compilable-mark.d.ts +1 -0
- package/types/compile/mark/index.d.ts +0 -1
- package/types/compile/mark/interface.d.ts +48 -34
- package/types/compile/mark/mark-state-manager.d.ts +12 -13
- package/types/compile/mark/util.d.ts +1 -1
- package/types/compile/morph.d.ts +3 -0
- package/types/compile/state-manager.d.ts +11 -0
- package/types/compile/util.d.ts +14 -0
- package/types/component/axis/base-axis.d.ts +10 -3
- package/types/component/axis/cartesian/axis.d.ts +7 -14
- package/types/component/axis/cartesian/band-axis.d.ts +6 -0
- package/types/component/axis/cartesian/linear-axis.d.ts +2 -1
- package/types/component/axis/cartesian/log-axis.d.ts +6 -0
- package/types/component/axis/cartesian/symlog-axis.d.ts +6 -0
- package/types/component/axis/cartesian/time-axis.d.ts +6 -0
- package/types/component/axis/cartesian/util/common.d.ts +3 -1
- package/types/component/axis/interface/common.d.ts +8 -0
- package/types/component/axis/interface/spec.d.ts +7 -2
- package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
- package/types/component/axis/polar/band-axis.d.ts +6 -0
- package/types/component/axis/polar/linear-axis.d.ts +6 -0
- package/types/component/axis/polar/util/common.d.ts +4 -1
- package/types/component/axis/util.d.ts +2 -6
- package/types/component/base/base-component.d.ts +1 -5
- package/types/component/base/util.d.ts +1 -2
- package/types/component/brush/brush.d.ts +35 -30
- package/types/component/brush/interface.d.ts +2 -0
- package/types/component/common/trigger/desktop.d.ts +0 -2
- package/types/component/common/trigger/interface.d.ts +0 -2
- package/types/component/common/trigger/mobile.d.ts +0 -2
- package/types/component/crosshair/base.d.ts +25 -36
- package/types/component/crosshair/cartesian.d.ts +9 -29
- package/types/component/crosshair/interface/common.d.ts +67 -2
- package/types/component/crosshair/interface/index.d.ts +0 -2
- package/types/component/crosshair/interface/spec.d.ts +8 -4
- package/types/component/crosshair/polar.d.ts +10 -23
- package/types/component/crosshair/utils/cartesian.d.ts +10 -21
- package/types/component/crosshair/utils/common.d.ts +2 -3
- package/types/component/crosshair/utils/polar.d.ts +18 -11
- package/types/component/custom-mark/custom-mark.d.ts +1 -0
- package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
- package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
- package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
- package/types/component/data-zoom/interface.d.ts +11 -0
- package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +4 -2
- package/types/component/geo/geo-coordinate.d.ts +2 -2
- package/types/component/geo/interface.d.ts +1 -1
- package/types/component/index.d.ts +14 -8
- package/types/component/indicator/indicator.d.ts +3 -0
- package/types/component/interface/common.d.ts +0 -2
- package/types/component/interface/theme.d.ts +1 -3
- package/types/component/interface/type.d.ts +0 -1
- package/types/component/label/base-label.d.ts +9 -4
- package/types/component/label/interface.d.ts +14 -8
- package/types/component/label/label.d.ts +5 -3
- package/types/component/label/total-label.d.ts +4 -1
- package/types/component/label/util.d.ts +9 -10
- package/types/component/legend/continuous/legend.d.ts +4 -0
- package/types/component/legend/discrete/legend.d.ts +3 -0
- package/types/component/legend/util.d.ts +2 -2
- package/types/component/marker/base-marker.d.ts +1 -1
- package/types/component/marker/mark-area/cartesian-mark-area.d.ts +3 -0
- package/types/component/marker/mark-area/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-area/polar-mark-area.d.ts +3 -0
- package/types/component/marker/mark-line/cartesian-mark-line.d.ts +3 -0
- package/types/component/marker/mark-line/interface/theme.d.ts +4 -3
- package/types/component/marker/mark-line/polar-mark-line.d.ts +3 -0
- package/types/component/marker/mark-point/cartesian-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/geo-mark-point.d.ts +3 -0
- package/types/component/marker/mark-point/interface/theme.d.ts +5 -2
- package/types/component/marker/mark-point/polar-mark-point.d.ts +3 -0
- package/types/component/marker/utils.d.ts +12 -0
- package/types/component/player/player.d.ts +3 -0
- package/types/component/title/title.d.ts +3 -0
- package/types/component/tooltip/constant.d.ts +6 -2
- package/types/component/tooltip/interface/common.d.ts +2 -1
- package/types/component/tooltip/processor/base.d.ts +4 -5
- package/types/component/tooltip/processor/dimension-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/group-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/interface.d.ts +12 -1
- package/types/component/tooltip/processor/mark-tooltip.d.ts +1 -0
- package/types/component/tooltip/processor/util.d.ts +1 -1
- package/types/component/tooltip/tooltip.d.ts +8 -5
- package/types/component/util.d.ts +1 -2
- package/types/constant/data.d.ts +1 -0
- package/types/constant/event.d.ts +55 -2
- package/types/core/factory.d.ts +31 -2
- package/types/core/index.d.ts +18 -2
- package/types/core/interface.d.ts +19 -5
- package/types/core/vchart.d.ts +8 -7
- package/types/data/transforms/circle-packing.d.ts +1 -1
- package/types/data/transforms/data-key.d.ts +1 -1
- package/types/data/transforms/flatten.d.ts +1 -1
- package/types/data/transforms/funnel.d.ts +1 -6
- package/types/data/transforms/pictogram.d.ts +2 -10
- package/types/data/transforms/sankey-links.d.ts +1 -2
- package/types/data/transforms/sankey-nodes.d.ts +1 -2
- package/types/data/transforms/sankey.d.ts +4 -4
- package/types/data/transforms/sunburst.d.ts +1 -1
- package/types/data/transforms/treemap.d.ts +5 -6
- package/types/data/transforms/venn.d.ts +10 -0
- package/types/data/transforms/waterfall.d.ts +1 -0
- package/types/event/event-dispatcher.d.ts +4 -1
- package/types/event/event.d.ts +4 -1
- package/types/event/events/base.d.ts +1 -2
- package/types/event/events/dimension/util/cartesian.d.ts +2 -1
- package/types/event/events/index.d.ts +1 -5
- package/types/event/index.d.ts +1 -0
- package/types/event/interface.d.ts +19 -13
- package/types/index-harmony-simple.d.ts +4 -4
- package/types/index-harmony.d.ts +1 -1
- package/types/index.d.ts +11 -0
- package/types/interaction/config.d.ts +13 -0
- package/types/interaction/index.d.ts +10 -1
- package/types/interaction/interaction.d.ts +17 -25
- package/types/interaction/interface/common.d.ts +22 -0
- package/types/interaction/interface/spec.d.ts +53 -0
- package/types/interaction/interface/trigger.d.ts +87 -0
- package/types/interaction/triggers/base.d.ts +28 -0
- package/types/interaction/triggers/dimension-hover.d.ts +22 -0
- package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
- package/types/interaction/triggers/element-active.d.ts +20 -0
- package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
- package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
- package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
- package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
- package/types/interaction/triggers/element-highlight.d.ts +25 -0
- package/types/interaction/triggers/element-select.d.ts +24 -0
- package/types/interaction/triggers/enum.d.ts +6 -0
- package/types/interaction/triggers/util.d.ts +12 -0
- package/types/interaction/zoom/zoomable.d.ts +5 -0
- package/types/layout/base-layout.d.ts +12 -9
- package/types/layout/index.d.ts +4 -4
- package/types/layout/interface.d.ts +8 -3
- package/types/layout/layout-item.d.ts +7 -3
- package/types/layout/util.d.ts +17 -4
- package/types/mark/arc.d.ts +3 -3
- package/types/mark/area.d.ts +2 -0
- package/types/mark/base/base-line.d.ts +25 -2
- package/types/mark/base/base-mark.d.ts +160 -13
- package/types/mark/box-plot.d.ts +11 -5
- package/types/mark/cell.d.ts +6 -3
- package/types/mark/component.d.ts +12 -3
- package/types/mark/glyph.d.ts +30 -0
- package/types/mark/group.d.ts +11 -6
- package/types/mark/index.d.ts +10 -7
- package/types/mark/interface/common.d.ts +81 -9
- package/types/mark/interface/enum.d.ts +6 -0
- package/types/mark/interface/index.d.ts +1 -0
- package/types/mark/interface/mark.d.ts +20 -5
- package/types/mark/interface/type.d.ts +1 -3
- package/types/mark/label.d.ts +4 -3
- package/types/mark/link-path.d.ts +35 -5
- package/types/mark/liquid.d.ts +47 -5
- package/types/mark/ripple.d.ts +39 -4
- package/types/mark/rule.d.ts +4 -1
- package/types/mark/symbol.d.ts +4 -5
- package/types/mark/text.d.ts +5 -3
- package/types/mark/transform/data-sampling.d.ts +10 -0
- package/types/mark/transform/filter.d.ts +1 -0
- package/types/mark/transform/map.d.ts +1 -0
- package/types/mark/transform/symbol-overlap.d.ts +13 -0
- package/types/mark/utils/common.d.ts +4 -1
- package/types/mark/utils/glyph.d.ts +2 -0
- package/types/mark/utils/index.d.ts +2 -0
- package/types/mark/utils/line.d.ts +3 -0
- package/types/model/base-model.d.ts +11 -10
- package/types/model/interface.d.ts +11 -10
- package/types/model/layout-model.d.ts +4 -3
- package/types/plugin/chart/index.d.ts +1 -0
- package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
- package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
- package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -14
- package/types/plugin/other.d.ts +3 -4
- package/types/region/interface.d.ts +0 -4
- package/types/region/region.d.ts +3 -11
- package/types/series/area/animation.d.ts +1 -1
- package/types/series/area/area.d.ts +3 -2
- package/types/series/bar/animation.d.ts +1 -2
- package/types/series/bar/bar.d.ts +9 -9
- package/types/series/bar/constant.d.ts +0 -1
- package/types/series/bar/interface.d.ts +1 -7
- package/types/series/base/base-series-transformer.d.ts +1 -1
- package/types/series/base/base-series.d.ts +23 -40
- package/types/series/base/tooltip-helper.d.ts +1 -2
- package/types/series/box-plot/animation.d.ts +52 -0
- package/types/series/box-plot/box-plot.d.ts +6 -3
- package/types/series/cartesian/cartesian.d.ts +1 -1
- package/types/series/circle-packing/animation.d.ts +1 -1
- package/types/series/circle-packing/circle-packing.d.ts +4 -1
- package/types/series/correlation/animation.d.ts +1 -1
- package/types/series/correlation/correlation.d.ts +6 -4
- package/types/series/dot/dot.d.ts +5 -2
- package/types/series/funnel/constant.d.ts +0 -1
- package/types/series/funnel/funnel.d.ts +10 -11
- package/types/series/funnel/interface.d.ts +2 -13
- package/types/series/funnel/tooltip-helper.d.ts +4 -2
- package/types/series/gauge/animation.d.ts +1 -1
- package/types/series/gauge/gauge-pointer.d.ts +7 -1
- package/types/series/gauge/gauge.d.ts +5 -2
- package/types/series/geo/geo.d.ts +3 -4
- package/types/series/heatmap/animation.d.ts +1 -1
- package/types/series/heatmap/heatmap.d.ts +7 -1
- package/types/series/index.d.ts +24 -19
- package/types/series/interface/common.d.ts +1 -4
- package/types/series/interface/series.d.ts +6 -1
- package/types/series/interface/theme.d.ts +5 -16
- package/types/series/interface/type.d.ts +1 -11
- package/types/series/line/animation.d.ts +1 -1
- package/types/series/line/line.d.ts +4 -1
- package/types/series/link/link.d.ts +8 -2
- package/types/series/liquid/animation.d.ts +1 -1
- package/types/series/liquid/liquid.d.ts +7 -1
- package/types/series/map/interface.d.ts +10 -0
- package/types/series/map/map.d.ts +3 -0
- package/types/series/mixin/line-mixin.d.ts +5 -5
- package/types/series/mosaic/mosaic.d.ts +2 -0
- package/types/series/pictogram/pictogram.d.ts +2 -0
- package/types/series/pictogram/tooltip-helper.d.ts +2 -2
- package/types/series/pie/animation/animation.d.ts +4 -4
- package/types/series/pie/animation/centerOffset.d.ts +1 -1
- package/types/series/pie/constant.d.ts +0 -1
- package/types/series/pie/interface.d.ts +3 -13
- package/types/series/pie/pie.d.ts +13 -11
- package/types/series/polar/animation.d.ts +2 -4
- package/types/series/polar/progress-like/animation.d.ts +1 -1
- package/types/series/polar/progress-like/interface.d.ts +1 -0
- package/types/series/polar/progress-like/progress-like.d.ts +1 -2
- package/types/series/progress/circular/circular.d.ts +7 -1
- package/types/series/progress/linear/animation.d.ts +2 -2
- package/types/series/progress/linear/interface.d.ts +1 -0
- package/types/series/progress/linear/linear.d.ts +7 -1
- package/types/series/radar/animation.d.ts +12 -10
- package/types/series/radar/radar.d.ts +5 -2
- package/types/series/range-column/animation.d.ts +1 -1
- package/types/series/range-column/constant.d.ts +0 -1
- package/types/series/range-column/interface.d.ts +0 -3
- package/types/series/range-column/range-column.d.ts +5 -4
- package/types/series/rose/animation.d.ts +1 -1
- package/types/series/rose/rose.d.ts +3 -0
- package/types/series/sankey/animation.d.ts +14 -1
- package/types/series/sankey/interface.d.ts +0 -1
- package/types/series/sankey/sankey.d.ts +14 -12
- package/types/series/sankey/tooltip-helper.d.ts +1 -1
- package/types/series/scatter/animation.d.ts +1 -1
- package/types/series/scatter/scatter.d.ts +3 -0
- package/types/series/sunburst/animation/enter.d.ts +1 -1
- package/types/series/sunburst/animation/exit.d.ts +1 -1
- package/types/series/sunburst/animation/preset.d.ts +1 -1
- package/types/series/sunburst/animation/utils.d.ts +2 -2
- package/types/series/sunburst/interface.d.ts +1 -1
- package/types/series/sunburst/sunburst.d.ts +4 -1
- package/types/series/treemap/animation.d.ts +1 -1
- package/types/series/treemap/interface.d.ts +1 -1
- package/types/series/treemap/treemap.d.ts +4 -2
- package/types/series/venn/animation.d.ts +12 -1
- package/types/series/venn/venn.d.ts +5 -1
- package/types/series/waterfall/animation.d.ts +1 -1
- package/types/series/waterfall/waterfall.d.ts +6 -2
- package/types/series/word-cloud/animation.d.ts +2 -4
- package/types/series/word-cloud/base.d.ts +4 -3
- package/types/series/word-cloud/interface.d.ts +2 -20
- package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +0 -1
- package/types/theme/builtin/common/series/funnel.d.ts +2 -2
- package/types/theme/builtin/common/series/word-cloud.d.ts +1 -2
- package/types/theme/builtin/index.d.ts +3 -1
- package/types/theme/color-scheme/util.d.ts +1 -1
- package/types/typings/common.d.ts +13 -0
- package/types/typings/spec/chart.d.ts +6 -12
- package/types/typings/spec/common.d.ts +40 -41
- package/types/typings/tooltip/position.d.ts +1 -1
- package/types/typings/visual.d.ts +11 -13
- package/types/util/array.d.ts +1 -0
- package/types/util/index.d.ts +1 -0
- package/types/util/mark.d.ts +5 -0
- package/types/util/math.d.ts +1 -1
- package/types/util/region.d.ts +5 -0
- package/types/util/scale.d.ts +1 -0
- package/types/util/theme/common.d.ts +1 -1
- package/types/util/theme/merge-theme.d.ts +2 -2
- package/types/util/theme/preprocess.d.ts +1 -2
- package/types/vrender-tools.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DimensionEventParams } from '../../../event/events/dimension/interface';
|
|
2
2
|
import type { DimensionTooltipInfo, GroupTooltipInfo, MarkTooltipInfo } from '../processor/interface';
|
|
3
|
-
import type { Datum, IShowTooltipOption, ITooltipActual } from '../../../typings';
|
|
3
|
+
import type { Datum, IShowTooltipOption, ITooltipActual, ITooltipHandler } from '../../../typings';
|
|
4
4
|
import type { IComponent } from '../../interface';
|
|
5
5
|
import type { ITooltipSpec } from './spec';
|
|
6
6
|
export type TooltipHandlerParams = DimensionEventParams & {
|
|
@@ -24,6 +24,7 @@ export declare const enum TooltipResult {
|
|
|
24
24
|
failed = 1
|
|
25
25
|
}
|
|
26
26
|
export interface ITooltip extends IComponent {
|
|
27
|
+
tooltipHandler?: ITooltipHandler;
|
|
27
28
|
getVisible: () => boolean;
|
|
28
29
|
showTooltip: (datum: Datum, options: IShowTooltipOption) => void;
|
|
29
30
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { BaseEventParams } from '../../../event/interface';
|
|
2
2
|
import type { ITooltipActual, TooltipActiveType, TooltipData } from '../../../typings';
|
|
3
|
-
import type { TooltipHandlerParams } from '../interface';
|
|
3
|
+
import type { ITooltip, TooltipHandlerParams } from '../interface';
|
|
4
4
|
import { TooltipResult } from '../interface/common';
|
|
5
|
-
import type { Tooltip } from '../tooltip';
|
|
6
5
|
import type { MouseEventData, TooltipInfo } from './interface';
|
|
7
|
-
import type { IDimensionInfo } from '../../../event/events/dimension';
|
|
6
|
+
import type { IDimensionInfo } from '../../../event/events/dimension/interface';
|
|
8
7
|
export declare abstract class BaseTooltipProcessor {
|
|
9
|
-
readonly component:
|
|
8
|
+
readonly component: ITooltip;
|
|
10
9
|
abstract activeType: TooltipActiveType;
|
|
11
10
|
protected _cacheActiveSpec: ITooltipActual | undefined;
|
|
12
|
-
constructor(component:
|
|
11
|
+
constructor(component: ITooltip);
|
|
13
12
|
abstract showTooltip(info: TooltipInfo, params: BaseEventParams, changePositionOnly: boolean): TooltipResult;
|
|
14
13
|
abstract getMouseEventData(params: BaseEventParams): MouseEventData;
|
|
15
14
|
protected _showTooltipByHandler: (data: TooltipData | undefined, params: TooltipHandlerParams) => TooltipResult;
|
|
@@ -9,3 +9,4 @@ export declare class DimensionTooltipProcessor extends BaseTooltipProcessor {
|
|
|
9
9
|
protected _getDimensionInfo(params: BaseEventParams): IDimensionInfo[];
|
|
10
10
|
getMouseEventData(params: BaseEventParams): MouseEventData;
|
|
11
11
|
}
|
|
12
|
+
export declare const registerDimensionTooltipProcessor: () => void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Datum } from '@visactor/vgrammar-core';
|
|
2
1
|
import type { IMark } from '../../../mark/interface';
|
|
3
2
|
import type { ISeries } from '../../../series/interface';
|
|
4
3
|
import type { IDimensionInfo } from '../../../event/events/dimension/interface';
|
|
4
|
+
import type { Datum } from '../../../typings/common';
|
|
5
|
+
import type { BaseEventParams } from '../../../event/interface';
|
|
6
|
+
import type { ITooltip, TooltipResult } from '../interface/common';
|
|
5
7
|
export type DimensionTooltipInfo = IDimensionInfo[];
|
|
6
8
|
export type MarkTooltipInfo<T = Datum> = {
|
|
7
9
|
datum: T;
|
|
@@ -14,3 +16,12 @@ export type MouseEventData = {
|
|
|
14
16
|
tooltipInfo: TooltipInfo;
|
|
15
17
|
ignore: boolean;
|
|
16
18
|
};
|
|
19
|
+
export interface ITooltipProcessor<T> {
|
|
20
|
+
shouldHandleTooltip: (params: BaseEventParams, info: TooltipInfo) => boolean;
|
|
21
|
+
clearCache: () => void;
|
|
22
|
+
showTooltip: (info: T, params: BaseEventParams, changePositionOnly: boolean) => TooltipResult;
|
|
23
|
+
getMouseEventData: (params: BaseEventParams) => MouseEventData;
|
|
24
|
+
}
|
|
25
|
+
export interface ITooltipProcessorConstructor {
|
|
26
|
+
new (comp: ITooltip): ITooltipProcessor<DimensionTooltipInfo> | ITooltipProcessor<MarkTooltipInfo> | ITooltipProcessor<GroupTooltipInfo>;
|
|
27
|
+
}
|
|
@@ -7,3 +7,4 @@ export declare class MarkTooltipProcessor extends BaseTooltipProcessor {
|
|
|
7
7
|
showTooltip(info: MarkTooltipInfo, params: BaseEventParams, changePositionOnly: boolean): import("../interface").TooltipResult;
|
|
8
8
|
getMouseEventData(params: BaseEventParams): MouseEventData;
|
|
9
9
|
}
|
|
10
|
+
export declare const registerMarkTooltipProcessor: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Maybe } from '@visactor/vutils';
|
|
2
2
|
import type { DimensionTooltipInfo, MarkTooltipInfo, TooltipInfo } from './interface';
|
|
3
|
-
export declare const isMarkInfo: (info: Maybe<TooltipInfo>) => info is MarkTooltipInfo<
|
|
3
|
+
export declare const isMarkInfo: (info: Maybe<TooltipInfo>) => info is MarkTooltipInfo<import("../../..").Datum>;
|
|
4
4
|
export declare const isDimensionInfo: (info: Maybe<TooltipInfo>) => info is DimensionTooltipInfo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentTypeEnum } from '../interface/type';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IModelRenderOption } from '../../model/interface';
|
|
3
3
|
import type { IRegion } from '../../region/interface';
|
|
4
4
|
import { BaseComponent } from '../base/base-component';
|
|
5
5
|
import type { BaseEventParams, EventCallback, EventQuery, EventType } from '../../event/interface';
|
|
@@ -7,7 +7,7 @@ import type { ITooltipHandler, TooltipActiveType } from '../../typings/tooltip';
|
|
|
7
7
|
import type { Datum, IShowTooltipOption } from '../../typings';
|
|
8
8
|
import type { ITooltip, ITooltipActiveTypeAsKeys, ITooltipSpec, TooltipHandlerParams, TotalMouseEventData } from './interface';
|
|
9
9
|
import { TooltipResult } from './interface/common';
|
|
10
|
-
import {
|
|
10
|
+
import type { DimensionTooltipInfo, GroupTooltipInfo, ITooltipProcessor, MarkTooltipInfo } from './processor/interface';
|
|
11
11
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
12
12
|
import { TooltipSpecTransformer } from './tooltip-transformer';
|
|
13
13
|
export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
@@ -17,6 +17,9 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
17
17
|
type: ComponentTypeEnum;
|
|
18
18
|
name: string;
|
|
19
19
|
readonly transformerConstructor: typeof TooltipSpecTransformer;
|
|
20
|
+
static readonly builtInTheme: {
|
|
21
|
+
tooltip: import("./interface").ITooltipTheme<string | import("../..").IColorKey>;
|
|
22
|
+
};
|
|
20
23
|
static specKey: string;
|
|
21
24
|
specKey: string;
|
|
22
25
|
layoutType: 'none';
|
|
@@ -26,9 +29,10 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
26
29
|
private _needInitEventOfTooltip?;
|
|
27
30
|
private _enterable;
|
|
28
31
|
private _isReleased;
|
|
32
|
+
private _isEnterTooltip;
|
|
29
33
|
protected _spec: ITooltipSpec;
|
|
30
34
|
tooltipHandler?: ITooltipHandler;
|
|
31
|
-
processor: ITooltipActiveTypeAsKeys<
|
|
35
|
+
processor: ITooltipActiveTypeAsKeys<ITooltipProcessor<MarkTooltipInfo>, ITooltipProcessor<DimensionTooltipInfo>, ITooltipProcessor<GroupTooltipInfo>>;
|
|
32
36
|
private _alwaysShow;
|
|
33
37
|
private _cacheInfo;
|
|
34
38
|
private _cacheParams;
|
|
@@ -43,8 +47,7 @@ export declare class Tooltip extends BaseComponent<any> implements ITooltip {
|
|
|
43
47
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
44
48
|
protected _registerEvent(): void;
|
|
45
49
|
protected _releaseEvent(): void;
|
|
46
|
-
|
|
47
|
-
onLayoutEnd(ctx: IModelLayoutOption): void;
|
|
50
|
+
onLayoutEnd(): void;
|
|
48
51
|
onRender(ctx: IModelRenderOption): void;
|
|
49
52
|
created(): void;
|
|
50
53
|
release(): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Maybe } from '@visactor/vutils';
|
|
2
|
-
import type { ITheme } from '../theme';
|
|
3
2
|
import type { Datum } from '../typings';
|
|
4
3
|
import type { IModelSpecInfo } from '../model/interface';
|
|
5
|
-
export declare function getComponentThemeFromOption(type: string,
|
|
4
|
+
export declare function getComponentThemeFromOption(type: string, getTheme: (...keys: string[]) => any): any;
|
|
6
5
|
export declare function getFormatFunction(formatMethod?: any, formatter?: string | string[], text?: string | number, datum?: Datum): {
|
|
7
6
|
formatFunc: any;
|
|
8
7
|
args: (string | number | Datum)[];
|
package/types/constant/data.d.ts
CHANGED
|
@@ -1,4 +1,54 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare enum HOOK_EVENT {
|
|
2
|
+
BEFORE_EVALUATE_DATA = "beforeEvaluateData",
|
|
3
|
+
AFTER_EVALUATE_DATA = "afterEvaluateData",
|
|
4
|
+
BEFORE_EVALUATE_SCALE = "beforeEvaluateScale",
|
|
5
|
+
AFTER_EVALUATE_SCALE = "afterEvaluateScale",
|
|
6
|
+
BEFORE_PARSE_VIEW = "beforeParseView",
|
|
7
|
+
AFTER_PARSE_VIEW = "afterParseView",
|
|
8
|
+
BEFORE_TRANSFORM = "beforeTransform",
|
|
9
|
+
AFTER_TRANSFORM = "afterTransform",
|
|
10
|
+
BEFORE_CREATE_VRENDER_STAGE = "beforeCreateVRenderStage",
|
|
11
|
+
AFTER_CREATE_VRENDER_STAGE = "afterCreateVRenderStage",
|
|
12
|
+
BEFORE_CREATE_VRENDER_LAYER = "beforeCreateVRenderLayer",
|
|
13
|
+
AFTER_CREATE_VRENDER_LAYER = "afterCreateVRenderLayer",
|
|
14
|
+
BEFORE_STAGE_RESIZE = "beforeStageResize",
|
|
15
|
+
AFTER_STAGE_RESIZE = "afterStageResize",
|
|
16
|
+
BEFORE_VRENDER_DRAW = "beforeVRenderDraw",
|
|
17
|
+
AFTER_VRENDER_DRAW = "afterVRenderDraw",
|
|
18
|
+
BEFORE_MARK_JOIN = "beforeMarkJoin",
|
|
19
|
+
AFTER_MARK_JOIN = "afterMarkJoin",
|
|
20
|
+
BEFORE_MARK_UPDATE = "beforeMarkUpdate",
|
|
21
|
+
AFTER_MARK_UPDATE = "afterMarkUpdate",
|
|
22
|
+
BEFORE_MARK_STATE = "beforeMarkState",
|
|
23
|
+
AFTER_MARK_STATE = "afterMarkState",
|
|
24
|
+
BEFORE_MARK_ENCODE = "beforeMarkEncode",
|
|
25
|
+
AFTER_MARK_ENCODE = "afterMarkEncode",
|
|
26
|
+
BEFORE_DO_LAYOUT = "beforeDoLayout",
|
|
27
|
+
AFTER_DO_LAYOUT = "afterDoLayout",
|
|
28
|
+
BEFORE_MARK_LAYOUT_END = "beforeMarkLayoutEnd",
|
|
29
|
+
AFTER_MARK_LAYOUT_END = "afterMarkLayoutEnd",
|
|
30
|
+
BEFORE_DO_RENDER = "beforeDoRender",
|
|
31
|
+
AFTER_DO_RENDER = "afterDoRender",
|
|
32
|
+
BEFORE_MARK_RENDER_END = "beforeMarkRenderEnd",
|
|
33
|
+
AFTER_MARK_RENDER_END = "afterMarkRenderEnd",
|
|
34
|
+
BEFORE_CREATE_VRENDER_MARK = "beforeCreateVRenderMark",
|
|
35
|
+
AFTER_CREATE_VRENDER_MARK = "afterCreateVRenderMark",
|
|
36
|
+
BEFORE_ADD_VRENDER_MARK = "beforeAddVRenderMark",
|
|
37
|
+
AFTER_ADD_VRENDER_MARK = "afterAddVRenderMark",
|
|
38
|
+
AFTER_VRENDER_NEXT_RENDER = "afterVRenderNextRender",
|
|
39
|
+
BEFORE_ELEMENT_UPDATE_DATA = "beforeElementUpdateData",
|
|
40
|
+
AFTER_ELEMENT_UPDATE_DATA = "afterElementUpdateData",
|
|
41
|
+
BEFORE_ELEMENT_STATE = "beforeElementState",
|
|
42
|
+
AFTER_ELEMENT_STATE = "afterElementState",
|
|
43
|
+
BEFORE_ELEMENT_ENCODE = "beforeElementEncode",
|
|
44
|
+
AFTER_ELEMENT_ENCODE = "afterElementEncode",
|
|
45
|
+
ANIMATION_START = "animationStart",
|
|
46
|
+
ANIMATION_END = "animationEnd",
|
|
47
|
+
ELEMENT_ANIMATION_START = "elementAnimationStart",
|
|
48
|
+
ELEMENT_ANIMATION_END = "elementAnimationEnd",
|
|
49
|
+
ALL_ANIMATION_START = "allAnimationStart",
|
|
50
|
+
ALL_ANIMATION_END = "allAnimationEnd"
|
|
51
|
+
}
|
|
2
52
|
export declare const BASE_EVENTS: string[];
|
|
3
53
|
export declare enum ChartEvent {
|
|
4
54
|
initialized = "initialized",
|
|
@@ -33,6 +83,7 @@ export declare enum ChartEvent {
|
|
|
33
83
|
brushChange = "brushChange",
|
|
34
84
|
brushEnd = "brushEnd",
|
|
35
85
|
brushClear = "brushClear",
|
|
86
|
+
brushActive = "brushActive",
|
|
36
87
|
legendSelectedDataChange = "legendSelectedDataChange",
|
|
37
88
|
legendFilter = "legendFilter",
|
|
38
89
|
legendItemClick = "legendItemClick",
|
|
@@ -43,7 +94,8 @@ export declare enum ChartEvent {
|
|
|
43
94
|
tooltipRelease = "tooltipRelease",
|
|
44
95
|
afterResize = "afterResize",
|
|
45
96
|
afterRender = "afterRender",
|
|
46
|
-
afterLayout = "afterLayout"
|
|
97
|
+
afterLayout = "afterLayout",
|
|
98
|
+
afterMarkLayoutEnd = "afterMarkLayoutEnd"
|
|
47
99
|
}
|
|
48
100
|
export declare enum Event_Source_Type {
|
|
49
101
|
chart = "chart",
|
|
@@ -56,3 +108,4 @@ export declare enum Event_Bubble_Level {
|
|
|
56
108
|
model = "model",
|
|
57
109
|
mark = "mark"
|
|
58
110
|
}
|
|
111
|
+
export declare const EventBubbleLevels: Event_Bubble_Level[];
|
package/types/core/factory.d.ts
CHANGED
|
@@ -6,13 +6,20 @@ import type { IRegion, IRegionConstructor } from '../region/interface';
|
|
|
6
6
|
import type { IBaseModelSpecTransformer, IBaseModelSpecTransformerOption, IModelOption } from '../model/interface';
|
|
7
7
|
import type { Transform, Parser } from '@visactor/vdataset';
|
|
8
8
|
import type { ILayoutConstructor } from '../layout/interface';
|
|
9
|
-
import type { MarkAnimationSpec } from '@visactor/vgrammar-core';
|
|
10
9
|
import type { IChartPluginConstructor } from '../plugin/chart/interface';
|
|
11
10
|
import type { IComponentPluginConstructor } from '../plugin/components/interface';
|
|
11
|
+
import type { IGraphic } from '@visactor/vrender-core';
|
|
12
|
+
import type { GrammarTransformOption, IStageEventPlugin, VRenderComponentOptions } from './interface';
|
|
13
|
+
import type { MarkAnimationSpec } from '../animation/interface';
|
|
14
|
+
import type { IBaseTriggerOptions, ITriggerConstructor } from '../interaction/interface/trigger';
|
|
15
|
+
import type { IComposedEventConstructor } from '../index-harmony-simple';
|
|
16
|
+
import type { ITooltipProcessorConstructor } from '../component/tooltip/processor/interface';
|
|
17
|
+
import type { ITooltip } from '../component';
|
|
12
18
|
export declare class Factory {
|
|
13
19
|
private static _charts;
|
|
14
20
|
private static _series;
|
|
15
21
|
private static _components;
|
|
22
|
+
private static _graphicComponents;
|
|
16
23
|
private static _marks;
|
|
17
24
|
private static _regions;
|
|
18
25
|
private static _animations;
|
|
@@ -31,16 +38,22 @@ export declare class Factory {
|
|
|
31
38
|
};
|
|
32
39
|
static registerChart(key: string, chart: IChartConstructor): void;
|
|
33
40
|
static registerSeries(key: string, series: ISeriesConstructor): void;
|
|
34
|
-
static registerComponent(key: string, cmp: IComponentConstructor, alwaysCheck?: boolean): void;
|
|
41
|
+
static registerComponent(key: string, cmp: IComponentConstructor, alwaysCheck?: boolean, createOrder?: number): void;
|
|
42
|
+
static registerGraphicComponent(key: string, creator: (attrs: any, options?: VRenderComponentOptions) => IGraphic): void;
|
|
43
|
+
static createGraphicComponent(componentType: string, attrs: any, options?: VRenderComponentOptions): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
|
|
35
44
|
static registerMark(key: string, mark: MarkConstructor): void;
|
|
36
45
|
static registerRegion(key: string, region: IRegionConstructor): void;
|
|
37
46
|
static registerTransform(key: string, transform: Transform): void;
|
|
47
|
+
private static _grammarTransforms;
|
|
48
|
+
static registerGrammarTransform(type: string, transform: GrammarTransformOption): void;
|
|
49
|
+
static getGrammarTransform(type: string): GrammarTransformOption;
|
|
38
50
|
static registerLayout(key: string, layout: ILayoutConstructor): void;
|
|
39
51
|
static registerAnimation(key: string, animation: (params?: any, preset?: any) => MarkAnimationSpec): void;
|
|
40
52
|
static registerImplement(key: string, implement: (...args: any) => void): void;
|
|
41
53
|
static registerChartPlugin(key: string, plugin: IChartPluginConstructor): void;
|
|
42
54
|
static registerComponentPlugin(key: string, plugin: IComponentPluginConstructor): void;
|
|
43
55
|
static createChart(chartType: string, spec: any, options: IChartOption): IChart | null;
|
|
56
|
+
static getChart(chartType: string): IChartConstructor;
|
|
44
57
|
static createChartSpecTransformer(chartType: string, option: IChartSpecTransformerOption): IChartSpecTransformer | null;
|
|
45
58
|
static createRegion(regionType: string, spec: any, options: IModelOption): IRegion | null;
|
|
46
59
|
static createRegionSpecTransformer(regionType: string, options: IBaseModelSpecTransformerOption): IBaseModelSpecTransformer | null;
|
|
@@ -50,6 +63,7 @@ export declare class Factory {
|
|
|
50
63
|
static getComponents(): {
|
|
51
64
|
cmp: IComponentConstructor;
|
|
52
65
|
alwaysCheck?: boolean;
|
|
66
|
+
createOrder: number;
|
|
53
67
|
}[];
|
|
54
68
|
static getComponentInKey(name: string): IComponentConstructor;
|
|
55
69
|
static getLayout(): ILayoutConstructor[];
|
|
@@ -60,9 +74,24 @@ export declare class Factory {
|
|
|
60
74
|
static getAnimationInKey(key: string): (params?: any, preset?: any) => MarkAnimationSpec;
|
|
61
75
|
static getImplementInKey(key: string): (...args: any) => void;
|
|
62
76
|
static getSeriesMarkMap(seriesType: string): Partial<Record<SeriesMarkNameEnum, ISeriesMarkInfo>>;
|
|
77
|
+
static getSeriesBuiltInTheme(themeKey: string): Record<string, any>;
|
|
78
|
+
static getComponentBuiltInTheme(themeKey: string): Record<string, any>;
|
|
63
79
|
static getChartPlugins(): IChartPluginConstructor[];
|
|
64
80
|
static getComponentPlugins(): IComponentPluginConstructor[];
|
|
65
81
|
static getComponentPluginInType(type: string): IComponentPluginConstructor;
|
|
66
82
|
static registerFormatter(func: typeof Factory['_formatter']): void;
|
|
67
83
|
static getFormatter(): (text: string | number | string[] | number[], datum: any, formatter: string | string[]) => any;
|
|
84
|
+
private static _stageEventPlugins;
|
|
85
|
+
static registerStageEventPlugin: (type: string, Plugin: IStageEventPlugin<any>) => void;
|
|
86
|
+
static getStageEventPlugin: (type: string) => IStageEventPlugin<any>;
|
|
87
|
+
private static _interactionTriggers;
|
|
88
|
+
static registerInteractionTrigger: (interactionType: string, interaction: ITriggerConstructor) => void;
|
|
89
|
+
static createInteractionTrigger(interactionType: string, options?: IBaseTriggerOptions): import("../interaction/interface/trigger").ITrigger<IBaseTriggerOptions>;
|
|
90
|
+
static hasInteractionTrigger(interactionType: string): boolean;
|
|
91
|
+
private static _composedEventMap;
|
|
92
|
+
static registerComposedEvent: (eType: string, composedEvent: IComposedEventConstructor) => void;
|
|
93
|
+
static getComposedEvent(eType: string): IComposedEventConstructor;
|
|
94
|
+
private static _tooltipProcessors;
|
|
95
|
+
static registerTooltipProcessor: (type: string, processor: ITooltipProcessorConstructor) => void;
|
|
96
|
+
static createTooltipProcessor: (type: string, tooltip: ITooltip) => import("../component/tooltip/processor/interface").ITooltipProcessor<import("../component/tooltip/processor/interface").DimensionTooltipInfo> | import("../component/tooltip/processor/interface").ITooltipProcessor<import("../component/tooltip/processor/interface").MarkTooltipInfo<import("../index-harmony-simple").Datum>>;
|
|
68
97
|
}
|
package/types/core/index.d.ts
CHANGED
|
@@ -5,13 +5,29 @@ export declare const version: string;
|
|
|
5
5
|
export type { IVChart } from './interface';
|
|
6
6
|
export type { IStateSpec, StateValueType } from '../compile/mark';
|
|
7
7
|
export type { IRegion } from '../region/interface';
|
|
8
|
-
export * from '../typings/spec/common';
|
|
9
8
|
export * from '../event/interface';
|
|
10
9
|
export * from '../theme/interface';
|
|
10
|
+
export * from '../model/interface';
|
|
11
11
|
export * from './interface';
|
|
12
|
+
export * from '../typings';
|
|
13
|
+
export type { IMarkGraphic, IGraphicContext } from '../mark/interface/';
|
|
12
14
|
export * from '../constant/base';
|
|
13
15
|
export * from '../constant/data';
|
|
16
|
+
export * from '../constant/layout';
|
|
17
|
+
export { AttributeLevel } from '../constant/attribute';
|
|
18
|
+
export { TransformLevel } from '../data/initialize';
|
|
19
|
+
export { STATE_VALUE_ENUM } from '../compile/mark/interface';
|
|
20
|
+
export { ChartEvent } from '../constant/event';
|
|
14
21
|
export * from '../typings/spec/index';
|
|
22
|
+
export * from '../typings/visual';
|
|
15
23
|
export * from '../typings/tooltip';
|
|
16
24
|
export * from '../theme/index';
|
|
17
|
-
export { vglobal } from '@visactor/vrender-core';
|
|
25
|
+
export { vglobal, createGroup, createRichText, createText, createArc, createArea, createRect, createLine, createSymbol } from '@visactor/vrender-core';
|
|
26
|
+
export { ManualTicker, StreamLight } from '@visactor/vrender-animate';
|
|
27
|
+
export * from '../util/space';
|
|
28
|
+
export { transformToGraphic } from '../util/style';
|
|
29
|
+
export { getSpecInfo } from '../component/util';
|
|
30
|
+
export { registerDataSetInstanceParser, registerDataSetInstanceTransform } from '../data/register';
|
|
31
|
+
export { lookup } from '../data/transforms/lookup';
|
|
32
|
+
export { warn } from '../util/debug';
|
|
33
|
+
export { measureText } from '../util/text';
|
|
@@ -2,14 +2,14 @@ import type { DataSet, IParserOptions } from '@visactor/vdataset';
|
|
|
2
2
|
import type { Datum, IDataValues, IInitOption, IMarkStateSpec, IPoint, IRegionQuerier, IShowTooltipOption, ISpec, ITooltipHandler, Maybe, MaybeArray, StringOrNumber } from '../typings';
|
|
3
3
|
import type { IMorphConfig } from '../animation/spec';
|
|
4
4
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
5
|
-
import type { EventCallback,
|
|
6
|
-
import type { IMark } from '../mark/interface';
|
|
5
|
+
import type { EventCallback, EventQuery, EventType, ExtendEventParam } from '../event/interface';
|
|
6
|
+
import type { IMark, IMarkDataTransform } from '../mark/interface';
|
|
7
7
|
import type { ISeries } from '../series/interface/series';
|
|
8
8
|
import type { ITheme } from '../theme/interface';
|
|
9
9
|
import type { IComponent } from '../component/interface';
|
|
10
10
|
import type { LayoutCallBack } from '../layout/interface';
|
|
11
11
|
import type { DimensionIndexOption, IChart, IChartSpecInfo } from '../chart/interface';
|
|
12
|
-
import type { IStage } from '@visactor/vrender-core';
|
|
12
|
+
import type { IEventTarget, IStage } from '@visactor/vrender-core';
|
|
13
13
|
import type { IContainerSize } from '@visactor/vrender-components';
|
|
14
14
|
import type { IBaseScale } from '@visactor/vscale';
|
|
15
15
|
import type { IUpdateSpecResult } from '../model/interface';
|
|
@@ -53,8 +53,8 @@ export interface IVChart {
|
|
|
53
53
|
updateViewBox: (viewBox: IBoundsLike, reRender?: boolean) => IVChart;
|
|
54
54
|
resize: (width: number, height: number) => Promise<IVChart>;
|
|
55
55
|
release: () => void;
|
|
56
|
-
on: ((eType: EventType, handler: EventCallback<
|
|
57
|
-
off: (eType: EventType, handler?: EventCallback<
|
|
56
|
+
on: ((eType: EventType, handler: EventCallback<ExtendEventParam>) => void) & ((eType: EventType, query: EventQuery, handler: EventCallback<ExtendEventParam>) => void);
|
|
57
|
+
off: (eType: EventType, handler?: EventCallback<ExtendEventParam>) => void;
|
|
58
58
|
updateState: (state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean) => void;
|
|
59
59
|
setSelected: (datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
60
60
|
setHovered: (datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier) => void;
|
|
@@ -123,3 +123,17 @@ export interface IVChartRenderOption {
|
|
|
123
123
|
actionSource?: VChartRenderActionSource;
|
|
124
124
|
}
|
|
125
125
|
export type VChartRenderActionSource = 'render' | 'updateSpec' | 'updateModelSpec' | 'setCurrentTheme' | 'updateSpecAndRecompile';
|
|
126
|
+
export interface VRenderComponentOptions {
|
|
127
|
+
skipDefault?: boolean;
|
|
128
|
+
mode?: '2d' | '3d';
|
|
129
|
+
}
|
|
130
|
+
export interface IStageEventPlugin<T> {
|
|
131
|
+
new (taget: IEventTarget, cfg?: T): {
|
|
132
|
+
release: () => void;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export interface GrammarTransformOption {
|
|
136
|
+
canProgressive?: boolean;
|
|
137
|
+
transform: IMarkDataTransform;
|
|
138
|
+
runType?: 'beforeJoin' | 'afterEncode';
|
|
139
|
+
}
|
package/types/core/vchart.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { RenderModeEnum } from '../typings/spec/common';
|
|
|
5
5
|
import type { ISeriesConstructor } from '../series/interface';
|
|
6
6
|
import { type DimensionIndexOption, type IChart, type IChartConstructor, type IChartOption, type IChartSpecInfo } from '../chart/interface';
|
|
7
7
|
import type { IComponentConstructor } from '../component/interface';
|
|
8
|
-
import type { EventCallback,
|
|
8
|
+
import type { EventCallback, EventQuery, EventType, ExtendEventParam } from '../event/interface';
|
|
9
9
|
import type { IParserOptions, Transform } from '@visactor/vdataset';
|
|
10
10
|
import { DataSet, DataView } from '@visactor/vdataset';
|
|
11
11
|
import type { IStage } from '@visactor/vrender-core';
|
|
@@ -40,7 +40,6 @@ export declare class VChart implements IVChart {
|
|
|
40
40
|
static getMap(key: string): GeoSourceType;
|
|
41
41
|
static registerSVG(key: string, source: GeoSourceType, option?: GeoSourceOption): void;
|
|
42
42
|
static unregisterSVG(key: string): void;
|
|
43
|
-
static getSVG(key: string): any;
|
|
44
43
|
static hideTooltip(excludeId?: MaybeArray<number>): void;
|
|
45
44
|
static getLogger(): ILogger;
|
|
46
45
|
static readonly InstanceManager: typeof InstanceManager;
|
|
@@ -73,6 +72,7 @@ export declare class VChart implements IVChart {
|
|
|
73
72
|
private _observer;
|
|
74
73
|
private _currentThemeName;
|
|
75
74
|
private _currentTheme;
|
|
75
|
+
private _cachedProcessedTheme;
|
|
76
76
|
private _onError?;
|
|
77
77
|
private _context;
|
|
78
78
|
private _isReleased;
|
|
@@ -85,7 +85,7 @@ export declare class VChart implements IVChart {
|
|
|
85
85
|
private _updateSpecInfo;
|
|
86
86
|
private _initChart;
|
|
87
87
|
private _releaseData;
|
|
88
|
-
private
|
|
88
|
+
private _bindViewEvent;
|
|
89
89
|
private _bindResizeEvent;
|
|
90
90
|
private _unBindResizeEvent;
|
|
91
91
|
getCurrentSize(): {
|
|
@@ -133,9 +133,9 @@ export declare class VChart implements IVChart {
|
|
|
133
133
|
protected _beforeResize(width: number, height: number): boolean;
|
|
134
134
|
protected _afterResize(): IVChart;
|
|
135
135
|
updateViewBox(viewBox: IBoundsLike, reRender?: boolean, reLayout?: boolean): IVChart;
|
|
136
|
-
on(eType: EventType, handler: EventCallback<
|
|
137
|
-
on(eType: EventType, query: EventQuery, handler: EventCallback<
|
|
138
|
-
off(eType: EventType, handler?: EventCallback<
|
|
136
|
+
on(eType: EventType, handler: EventCallback<ExtendEventParam>): void;
|
|
137
|
+
on(eType: EventType, query: EventQuery, handler: EventCallback<ExtendEventParam>): void;
|
|
138
|
+
off(eType: EventType, handler?: EventCallback<ExtendEventParam>): void;
|
|
139
139
|
updateState(state: Record<string, Omit<IMarkStateSpec<unknown>, 'style'>>, filter?: (series: ISeries, mark: IMark, stateKey: string) => boolean): void;
|
|
140
140
|
setSelected(datum: MaybeArray<any> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
141
141
|
setHovered(datum: MaybeArray<Datum> | null, filter?: (series: ISeries, mark: IMark) => boolean, region?: IRegionQuerier): void;
|
|
@@ -205,7 +205,8 @@ export declare class VChart implements IVChart {
|
|
|
205
205
|
}): void;
|
|
206
206
|
private _initChartPlugin;
|
|
207
207
|
private _chartPluginApply;
|
|
208
|
-
protected _getMode():
|
|
208
|
+
protected _getMode(): (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
|
|
209
|
+
protected getTheme: (...keys: string[]) => any;
|
|
209
210
|
protected _getChartOption(type: string): IChartOption;
|
|
210
211
|
}
|
|
211
212
|
export declare const registerVChartCore: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Datum } from '../../typings';
|
|
2
|
-
import type { CirclePackingOptions } from '@visactor/
|
|
2
|
+
import type { CirclePackingOptions } from '@visactor/vlayouts';
|
|
3
3
|
export interface ICirclePackingOpt extends CirclePackingOptions {
|
|
4
4
|
width: number;
|
|
5
5
|
height: number;
|
|
@@ -7,7 +7,7 @@ export declare function initKeyMap(this: BaseSeries<any>): {
|
|
|
7
7
|
keyMap: Map<any, any>;
|
|
8
8
|
needDefaultSeriesField: boolean;
|
|
9
9
|
defaultSeriesField: string;
|
|
10
|
-
getKey: (datum: import("
|
|
10
|
+
getKey: (datum: import("../..").Datum, index: number, context: AddVChartPropertyContext) => unknown;
|
|
11
11
|
};
|
|
12
12
|
export declare function addDataKey(d: any, i: number, context: AddVChartPropertyContext): void;
|
|
13
13
|
export declare function initHierarchyKeyMap(this: TreemapSeries | SunburstSeries | CirclePackingSeries): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Datum } from '../../typings';
|
|
2
|
-
import type { TreemapNodeElement, SunburstNodeElement } from '@visactor/
|
|
2
|
+
import type { TreemapNodeElement, SunburstNodeElement } from '@visactor/vlayouts';
|
|
3
3
|
export type FlattenNodeElement = TreemapNodeElement | SunburstNodeElement;
|
|
4
4
|
export interface IFlattenOpt {
|
|
5
5
|
output?: Datum[];
|
|
@@ -32,17 +32,12 @@ export declare const funnel: (originData: Array<DataView>, op: IFunnelOpt) => {
|
|
|
32
32
|
historyData: any[];
|
|
33
33
|
parserData: any;
|
|
34
34
|
latestData: any;
|
|
35
|
-
_diffMap: Map<string, any>;
|
|
36
|
-
_diffRank: number;
|
|
37
35
|
latestDataAUD: {
|
|
38
36
|
add: any;
|
|
39
37
|
update: any;
|
|
40
38
|
del: any;
|
|
41
39
|
};
|
|
42
|
-
reRunAllTransform: (opt?:
|
|
43
|
-
pushHistory: boolean;
|
|
44
|
-
emitMessage: boolean;
|
|
45
|
-
}) => DataView;
|
|
40
|
+
reRunAllTransform: (opt?: import("@visactor/vdataset/es/data-view").DataViewTransformOptions) => DataView;
|
|
46
41
|
markRunning: () => void;
|
|
47
42
|
}[];
|
|
48
43
|
export interface IFunnelTransformOpt {
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import type { DataView } from '@visactor/vdataset';
|
|
2
2
|
export declare const graphicAttributeTransform: {
|
|
3
|
-
group: (attributes: Record<string, any>) =>
|
|
4
|
-
visibleAll: boolean;
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
fillStrokeOrder: boolean;
|
|
8
|
-
fill: any;
|
|
9
|
-
lineWidth: number;
|
|
10
|
-
stroke: any;
|
|
11
|
-
};
|
|
3
|
+
group: (attributes: Record<string, any>) => any;
|
|
12
4
|
rule: (attributes: Record<string, any>) => {
|
|
13
5
|
x: number;
|
|
14
6
|
y: number;
|
|
@@ -50,9 +42,9 @@ export declare const graphicAttributeTransform: {
|
|
|
50
42
|
path: (attributes: Record<string, any>) => {
|
|
51
43
|
path: any;
|
|
52
44
|
fillStrokeOrder: boolean;
|
|
45
|
+
fill: any;
|
|
53
46
|
x: number;
|
|
54
47
|
y: number;
|
|
55
|
-
fill: any;
|
|
56
48
|
lineWidth: number;
|
|
57
49
|
stroke: any;
|
|
58
50
|
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const sankeyLinks: (data: SankeyData) => any;
|
|
1
|
+
export declare const sankeyLinks: (data: any) => any;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const sankeyNodes: (data: SankeyData) => any;
|
|
1
|
+
export declare const sankeyNodes: (data: any) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SankeyOptions, SankeyData } from '@visactor/
|
|
1
|
+
import type { SankeyOptions, SankeyData } from '@visactor/vlayouts';
|
|
2
2
|
export interface ISankeyOpt extends SankeyOptions {
|
|
3
3
|
targetField: string;
|
|
4
4
|
sourceField: string;
|
|
@@ -13,7 +13,7 @@ export interface ISankeyOpt extends SankeyOptions {
|
|
|
13
13
|
export declare const collectHierarchyField: (set: Set<any>, data: any[], field: string) => void;
|
|
14
14
|
export declare const sankeyFormat: (data: any[]) => SankeyData[];
|
|
15
15
|
export declare const sankeyLayout: (data: SankeyData[], op: ISankeyOpt) => {
|
|
16
|
-
nodes: import("@visactor/
|
|
17
|
-
links: import("@visactor/
|
|
18
|
-
columns: import("@visactor/
|
|
16
|
+
nodes: import("@visactor/vlayouts").SankeyNodeElement[];
|
|
17
|
+
links: import("@visactor/vlayouts").SankeyLinkElement[];
|
|
18
|
+
columns: import("@visactor/vlayouts").SankeyNodeElement[][];
|
|
19
19
|
}[];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { TreemapOptions } from '@visactor/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
range: () => {
|
|
1
|
+
import type { TreemapNodeElement, TreemapOptions } from '@visactor/vlayouts';
|
|
2
|
+
export declare const treemapLayout: (data: Array<any>, op: TreemapOptions & {
|
|
3
|
+
getViewBox: () => {
|
|
5
4
|
x0: number;
|
|
6
5
|
x1: number;
|
|
7
6
|
y0: number;
|
|
8
7
|
y1: number;
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
nameField: string;
|
|
10
|
+
}) => TreemapNodeElement[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const vennLayout: (data: Array<any>, op: {
|
|
2
|
+
setField: string;
|
|
3
|
+
valueField: string;
|
|
4
|
+
getViewBox: () => {
|
|
5
|
+
x0: number;
|
|
6
|
+
x1: number;
|
|
7
|
+
y0: number;
|
|
8
|
+
y1: number;
|
|
9
|
+
};
|
|
10
|
+
}) => (import("@visactor/vlayouts").IVennCircleDatum<any> | import("@visactor/vlayouts").IVennOverlapDatum<any>)[];
|
|
@@ -14,7 +14,10 @@ export declare class EventDispatcher implements IEventDispatcher {
|
|
|
14
14
|
register<Evt extends EventType>(eType: Evt, handler: EventHandler<EventParamsDefinition[Evt]>): this;
|
|
15
15
|
unregister<Evt extends EventType>(eType: Evt, handler?: EventHandler<EventParamsDefinition[Evt]>): this;
|
|
16
16
|
dispatch<Evt extends EventType>(eType: Evt, params: EventParamsDefinition[Evt], level?: EventBubbleLevel): this;
|
|
17
|
-
prevent<Evt extends EventType>(eType: Evt, except?:
|
|
17
|
+
prevent<Evt extends EventType>(eType: Evt, except?: {
|
|
18
|
+
handler: EventCallback<EventParams>;
|
|
19
|
+
level: EventBubbleLevel;
|
|
20
|
+
}): this;
|
|
18
21
|
allow<Evt extends EventType>(eType: Evt): this;
|
|
19
22
|
clear(): void;
|
|
20
23
|
release(): void;
|
package/types/event/event.d.ts
CHANGED
|
@@ -14,7 +14,10 @@ export declare class Event implements IEvent {
|
|
|
14
14
|
off<Evt extends EventType>(eType: Evt, callback?: EventCallback<EventParamsDefinition[Evt]>): this;
|
|
15
15
|
off<Evt extends EventType>(eType: Evt, query: EventQuery, callback: EventCallback<EventParamsDefinition[Evt]>): this;
|
|
16
16
|
emit<Evt extends EventType>(eType: Evt, params: EventParamsDefinition[Evt], level?: EventBubbleLevel): this;
|
|
17
|
-
prevent<Evt extends EventType>(eType: Evt, except?:
|
|
17
|
+
prevent<Evt extends EventType>(eType: Evt, except?: {
|
|
18
|
+
handler: EventCallback<EventParamsDefinition[Evt]>;
|
|
19
|
+
level: EventBubbleLevel;
|
|
20
|
+
}): this;
|
|
18
21
|
allow<Evt extends EventType>(eType: Evt): this;
|
|
19
22
|
release(): void;
|
|
20
23
|
}
|