@visactor/vchart-types 0.10.0-alpha.3 → 0.11.6-alpha.2
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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IVennSeriesSpec } from '../../series/venn/interface';
|
|
2
|
+
import type { IChartSpec } from '../../typings/spec/common';
|
|
3
|
+
export interface IVennChartSpec extends Omit<IChartSpec, 'data' | 'series'>, IVennSeriesSpec {
|
|
4
|
+
type: 'venn';
|
|
5
|
+
series?: IVennSeriesSpec[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AdaptiveSpec } from '../../typings';
|
|
2
|
+
import { BaseChartSpecTransformer } from '../base';
|
|
3
|
+
import type { IVennChartSpec } from './interface';
|
|
4
|
+
export declare class VennChartSpecTransformer<T extends IVennChartSpec = IVennChartSpec> extends BaseChartSpecTransformer<AdaptiveSpec<T, 'data' | 'series'>> {
|
|
5
|
+
protected _getDefaultSeriesSpec(spec: T): any;
|
|
6
|
+
transformSpec(spec: any): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseChart } from '../base/base-chart';
|
|
2
|
+
import type { IVennChartSpec } from './interface';
|
|
3
|
+
import type { AdaptiveSpec } from '../../typings';
|
|
4
|
+
import { VennChartSpecTransformer } from './venn-transformer';
|
|
5
|
+
export declare class VennChart<T extends IVennChartSpec = IVennChartSpec> extends BaseChart<AdaptiveSpec<T, 'data' | 'series'>> {
|
|
6
|
+
static readonly type: string;
|
|
7
|
+
static readonly seriesType: string;
|
|
8
|
+
static readonly transformerConstructor: typeof VennChartSpecTransformer;
|
|
9
|
+
readonly transformerConstructor: typeof VennChartSpecTransformer;
|
|
10
|
+
readonly type: string;
|
|
11
|
+
readonly seriesType: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const registerVennChart: () => void;
|
|
@@ -5,7 +5,6 @@ import { WaterfallChartSpecTransformer } from './waterfall-transformer';
|
|
|
5
5
|
export declare class WaterfallChart<T extends IWaterfallChartSpec = IWaterfallChartSpec> extends BarChart<AdaptiveSpec<T, 'type' | 'series' | 'label'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof WaterfallChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof WaterfallChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -5,7 +5,6 @@ import { WordCloud3dChartSpecTransformer } from './word-cloud-3d-transformer';
|
|
|
5
5
|
export declare class WordCloud3dChart<T extends IWordCloud3dChartSpec = IWordCloud3dChartSpec> extends BaseWordCloudChart<AdaptiveSpec<T, 'type' | 'series'>> {
|
|
6
6
|
static readonly type: string;
|
|
7
7
|
static readonly seriesType: string;
|
|
8
|
-
static readonly view: string;
|
|
9
8
|
static readonly transformerConstructor: typeof WordCloud3dChartSpecTransformer;
|
|
10
9
|
readonly transformerConstructor: typeof WordCloud3dChartSpecTransformer;
|
|
11
10
|
readonly type: string;
|
|
@@ -4,7 +4,6 @@ import { WordCloudChartSpecTransformer } from './word-cloud-transformer';
|
|
|
4
4
|
export declare class WordCloudChart<T extends IWordCloudChartSpec = IWordCloudChartSpec> extends BaseWordCloudChart<T> {
|
|
5
5
|
static readonly type: string;
|
|
6
6
|
static readonly seriesType: string;
|
|
7
|
-
static readonly view: string;
|
|
8
7
|
static readonly transformerConstructor: typeof WordCloudChartSpecTransformer;
|
|
9
8
|
readonly transformerConstructor: typeof WordCloudChartSpecTransformer;
|
|
10
9
|
readonly type: string;
|
|
@@ -3,9 +3,9 @@ import type { CompilerListenerParameters, CompilerModel, IGrammarItem, IRenderCo
|
|
|
3
3
|
import type { IBoundsLike } from '@visactor/vutils';
|
|
4
4
|
import type { EventSourceType } from '../event/interface';
|
|
5
5
|
import type { IChart } from '../chart/interface';
|
|
6
|
-
import type { VChart } from '../core/vchart';
|
|
7
6
|
import type { IColor, Stage } from '@visactor/vrender-core';
|
|
8
7
|
import type { IMorphConfig } from '../animation/spec';
|
|
8
|
+
import type { IVChart } from '../core/interface';
|
|
9
9
|
type EventListener = {
|
|
10
10
|
type: string;
|
|
11
11
|
callback: (...args: any[]) => void;
|
|
@@ -23,6 +23,7 @@ export declare class Compiler {
|
|
|
23
23
|
protected _height: number;
|
|
24
24
|
protected _container: IRenderContainer;
|
|
25
25
|
protected _option: IRenderOption;
|
|
26
|
+
private _released;
|
|
26
27
|
protected _model: CompilerModel;
|
|
27
28
|
protected _interactions: (InteractionSpec & {
|
|
28
29
|
seriesId?: number;
|
|
@@ -35,15 +36,16 @@ export declare class Compiler {
|
|
|
35
36
|
getCanvas(): HTMLCanvasElement | undefined;
|
|
36
37
|
getStage(): Stage | undefined;
|
|
37
38
|
initView(): void;
|
|
39
|
+
handleStageRender: () => void;
|
|
38
40
|
private _setCanvasStyle;
|
|
39
41
|
compileInteractions(): void;
|
|
40
42
|
compile(ctx: {
|
|
41
43
|
chart: IChart;
|
|
42
|
-
vChart:
|
|
44
|
+
vChart: IVChart;
|
|
43
45
|
}, option: any): void;
|
|
44
46
|
clear(ctx: {
|
|
45
47
|
chart: IChart;
|
|
46
|
-
vChart:
|
|
48
|
+
vChart: IVChart;
|
|
47
49
|
}, removeGraphicItems?: boolean): void;
|
|
48
50
|
renderNextTick(morphConfig?: IMorphConfig): void;
|
|
49
51
|
render(morphConfig?: IMorphConfig): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { IGroupMark, IMark, MarkAnimationSpec, MarkFunctionCallback, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
1
|
+
import type { IElement, IGroupMark, IMark, MarkAnimationSpec, MarkFunctionCallback, Nil, TransformSpec } from '@visactor/vgrammar-core';
|
|
2
2
|
import type { DataView } from '@visactor/vdataset';
|
|
3
3
|
import { GrammarItem } from '../grammar-item';
|
|
4
4
|
import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
5
5
|
import type { IMarkProgressiveConfig, IMarkStateStyle, MarkType } from '../../mark/interface';
|
|
6
6
|
import type { IModel } from '../../model/interface';
|
|
7
7
|
import { MarkStateManager } from './mark-state-manager';
|
|
8
|
-
import type { ICompilableMark, IMarkDataInitOption, ICompilableMarkOption, StateValueType, IMarkCompileOption, IAttributeOpt } from './interface';
|
|
8
|
+
import type { ICompilableMark, IMarkDataInitOption, ICompilableMarkOption, StateValueType, IMarkCompileOption, IAttributeOpt, MarkClip } from './interface';
|
|
9
9
|
import { MarkData } from './mark-data';
|
|
10
10
|
import { GrammarType } from '../interface/compilable-item';
|
|
11
11
|
import type { IEvent } from '../../event/interface';
|
|
@@ -75,6 +75,9 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
75
75
|
setCustomizedShapeCallback(callback: (datum: any[], attrs: any, path: ICustomPath2D) => ICustomPath2D): void;
|
|
76
76
|
protected _enableSegments: boolean;
|
|
77
77
|
setEnableSegments(enable: boolean): void;
|
|
78
|
+
protected _clip: MarkClip;
|
|
79
|
+
getClip(): MarkClip;
|
|
80
|
+
setClip(clip: MarkClip): void;
|
|
78
81
|
protected _stateSort?: (stateA: string, stateB: string) => number;
|
|
79
82
|
setStateSortCallback(stateSort: (stateA: string, stateB: string) => number): void;
|
|
80
83
|
protected _option: ICompilableMarkOption;
|
|
@@ -112,5 +115,6 @@ export declare abstract class CompilableMark extends GrammarItem implements ICom
|
|
|
112
115
|
stopAnimationByState(state?: string): import("@visactor/vgrammar-core").IAnimate;
|
|
113
116
|
pauseAnimationByState(state?: string): import("@visactor/vgrammar-core").IAnimate;
|
|
114
117
|
resumeAnimationByState(state?: string): import("@visactor/vgrammar-core").IAnimate;
|
|
118
|
+
getProductElements(): IElement[];
|
|
115
119
|
release(): void;
|
|
116
120
|
}
|
|
@@ -8,7 +8,7 @@ import type { IAnimate, IAnimateArranger, IElement, IGroupMark, IMark, MarkAnima
|
|
|
8
8
|
import type { Maybe, Datum, StringOrNumber } from '../../typings';
|
|
9
9
|
import type { MarkData } from './mark-data';
|
|
10
10
|
import type { IRegion } from '../../region/interface';
|
|
11
|
-
import type { ICustomPath2D } from '@visactor/vrender-core';
|
|
11
|
+
import type { ICustomPath2D, IGraphic } from '@visactor/vrender-core';
|
|
12
12
|
export interface ICompilableMarkOption extends GrammarItemInitOption {
|
|
13
13
|
key?: string | ((datum: Datum) => string);
|
|
14
14
|
groupKey?: string;
|
|
@@ -62,8 +62,11 @@ export interface ICompilableMark extends IGrammarItem {
|
|
|
62
62
|
setUserId: (id: StringOrNumber) => void;
|
|
63
63
|
getSupport3d: () => boolean | undefined;
|
|
64
64
|
setSupport3d: (support3d: boolean) => void;
|
|
65
|
+
getClip: () => MarkClip | undefined;
|
|
66
|
+
setClip: (clip: MarkClip) => void;
|
|
65
67
|
compile: (option?: IMarkCompileOption) => void;
|
|
66
68
|
getProduct: () => Maybe<IMark>;
|
|
69
|
+
getProductElements: () => Maybe<IMark['elements']>;
|
|
67
70
|
getMarks: () => ICompilableMark[];
|
|
68
71
|
setSkipBeforeLayouted: (skip: boolean) => void;
|
|
69
72
|
getSkipBeforeLayouted: () => boolean;
|
|
@@ -118,7 +121,9 @@ export declare enum STATE_VALUE_ENUM {
|
|
|
118
121
|
STATE_DIMENSION_HOVER = "dimension_hover",
|
|
119
122
|
STATE_DIMENSION_HOVER_REVERSE = "dimension_hover_reverse",
|
|
120
123
|
STATE_SELECTED = "selected",
|
|
121
|
-
STATE_SELECTED_REVERSE = "selected_reverse"
|
|
124
|
+
STATE_SELECTED_REVERSE = "selected_reverse",
|
|
125
|
+
STATE_SANKEY_EMPHASIS = "selected",
|
|
126
|
+
STATE_SANKEY_EMPHASIS_REVERSE = "blur"
|
|
122
127
|
}
|
|
123
128
|
export declare enum STATE_VALUE_ENUM_REVERSE {
|
|
124
129
|
STATE_HOVER_REVERSE = "hover_reverse",
|
|
@@ -145,3 +150,4 @@ export interface ISeriesMarkAttributeContext extends IModelMarkAttributeContext
|
|
|
145
150
|
seriesColor: (seriesValue?: string | number) => string;
|
|
146
151
|
getRegion: () => IRegion;
|
|
147
152
|
}
|
|
153
|
+
export type MarkClip = false | IGraphic[] | ((elements: IElement[]) => IGraphic[]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ITickDataOpt } from '@visactor/
|
|
1
|
+
import type { ITickDataOpt } from '@visactor/vrender-components';
|
|
2
2
|
import type { IBaseScale } from '@visactor/vscale';
|
|
3
3
|
import type { IGroup, IGraphic } from '@visactor/vrender-core';
|
|
4
4
|
import type { IOrientType, IPolarOrientType, StringOrNumber, CoordinateType } from '../../typings';
|
|
@@ -39,21 +39,25 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
39
39
|
protected abstract axisHelper(): any;
|
|
40
40
|
protected abstract getSeriesStatisticsField(s: ISeries): string[];
|
|
41
41
|
protected abstract updateSeriesScale(): void;
|
|
42
|
-
protected abstract
|
|
43
|
-
min: number;
|
|
44
|
-
max: number;
|
|
45
|
-
values: any[];
|
|
46
|
-
}[];
|
|
42
|
+
protected abstract collectSeriesField(depth: number, series: ISeries): string | string[];
|
|
47
43
|
abstract transformScaleDomain(): void;
|
|
44
|
+
protected abstract updateScaleRange(): boolean;
|
|
48
45
|
protected _dataFieldText: string;
|
|
49
46
|
protected _axisMark: IComponentMark;
|
|
50
47
|
protected _gridMark: IComponentMark;
|
|
51
48
|
protected _coordinateType: CoordinateType;
|
|
49
|
+
getCoordinateType(): CoordinateType;
|
|
52
50
|
constructor(spec: T, options: IComponentOption);
|
|
53
51
|
protected _getNeedClearVRenderComponents(): IGraphic[];
|
|
54
52
|
getVRenderComponents(): any[];
|
|
55
53
|
created(): void;
|
|
54
|
+
protected _shouldComputeTickData(): boolean;
|
|
56
55
|
protected _initData(): void;
|
|
56
|
+
protected collectData(depth: number, rawData?: boolean): {
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
values: any[];
|
|
60
|
+
}[];
|
|
57
61
|
protected isSeriesDataEnable(): boolean;
|
|
58
62
|
protected setSeriesAndRegionsFromSpec(): void;
|
|
59
63
|
getBindSeriesFilter(): {
|
|
@@ -63,6 +67,7 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
63
67
|
protected initEvent(): void;
|
|
64
68
|
protected updateScaleDomain(): void;
|
|
65
69
|
protected _clearRawDomain(): void;
|
|
70
|
+
onLayoutEnd(ctx: any): void;
|
|
66
71
|
protected computeData(updateType?: 'domain' | 'range' | 'force'): void;
|
|
67
72
|
protected initScales(): void;
|
|
68
73
|
_compareSpec(spec: T, prevSpec: T): {
|
|
@@ -72,61 +77,8 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
72
77
|
reSize: boolean;
|
|
73
78
|
reCompile: boolean;
|
|
74
79
|
};
|
|
75
|
-
protected getLabelFormatMethod(): (value: any, datum: any, index: number) => any;
|
|
76
80
|
protected _delegateAxisContainerEvent(component: IGroup): void;
|
|
77
|
-
protected _getAxisAttributes():
|
|
78
|
-
orient: IOrientType | IPolarOrientType;
|
|
79
|
-
select: boolean;
|
|
80
|
-
hover: boolean;
|
|
81
|
-
line: any;
|
|
82
|
-
label: {
|
|
83
|
-
style: any;
|
|
84
|
-
formatMethod: (value: any, datum: any, index: number) => any;
|
|
85
|
-
state: {};
|
|
86
|
-
};
|
|
87
|
-
tick: {
|
|
88
|
-
visible: boolean;
|
|
89
|
-
length?: undefined;
|
|
90
|
-
inside?: undefined;
|
|
91
|
-
alignWithLabel?: undefined;
|
|
92
|
-
style?: undefined;
|
|
93
|
-
state?: undefined;
|
|
94
|
-
dataFilter?: undefined;
|
|
95
|
-
} | {
|
|
96
|
-
visible: true;
|
|
97
|
-
length: number;
|
|
98
|
-
inside: boolean;
|
|
99
|
-
alignWithLabel: boolean;
|
|
100
|
-
style: any;
|
|
101
|
-
state: {};
|
|
102
|
-
dataFilter: (data: import("@visactor/vrender-components").AxisItem[]) => import("@visactor/vrender-components").AxisItem[];
|
|
103
|
-
};
|
|
104
|
-
subTick: {
|
|
105
|
-
visible: boolean;
|
|
106
|
-
length?: undefined;
|
|
107
|
-
inside?: undefined;
|
|
108
|
-
count?: undefined;
|
|
109
|
-
style?: undefined;
|
|
110
|
-
state?: undefined;
|
|
111
|
-
} | {
|
|
112
|
-
visible: true;
|
|
113
|
-
length: number;
|
|
114
|
-
inside: boolean;
|
|
115
|
-
count: number;
|
|
116
|
-
style: any;
|
|
117
|
-
state: {};
|
|
118
|
-
};
|
|
119
|
-
title: any;
|
|
120
|
-
panel: {
|
|
121
|
-
visible: boolean;
|
|
122
|
-
style?: undefined;
|
|
123
|
-
state?: undefined;
|
|
124
|
-
} | {
|
|
125
|
-
visible: any;
|
|
126
|
-
style: any;
|
|
127
|
-
state: {};
|
|
128
|
-
};
|
|
129
|
-
};
|
|
81
|
+
protected _getAxisAttributes(): any;
|
|
130
82
|
protected _getGridAttributes(): {
|
|
131
83
|
alternateColor: any;
|
|
132
84
|
alignWithLabel: any;
|
|
@@ -143,6 +95,7 @@ export declare abstract class AxisComponent<T extends ICommonAxisSpec & Record<s
|
|
|
143
95
|
style: any;
|
|
144
96
|
};
|
|
145
97
|
};
|
|
98
|
+
protected _getLabelFormatMethod(): (value: any, datum: any, index: number) => any;
|
|
146
99
|
protected _initTickDataSet<T extends ITickDataOpt>(options: T, index?: number): DataView;
|
|
147
100
|
protected _tickTransformOption(): ITickDataOpt;
|
|
148
101
|
addTransformToTickData(options: ITransformOptions, execute?: boolean): void;
|
|
@@ -11,7 +11,7 @@ import type { ILayoutRect, ILayoutType } from '../../../typings/layout';
|
|
|
11
11
|
import type { IComponentOption } from '../../interface';
|
|
12
12
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
13
13
|
import type { IAxis, ITick } from '../interface';
|
|
14
|
-
import type { ICartesianTickDataOpt } from '@visactor/
|
|
14
|
+
import type { ICartesianTickDataOpt } from '@visactor/vrender-components';
|
|
15
15
|
import type { DataSet } from '@visactor/vdataset';
|
|
16
16
|
import { AxisComponent } from '../base-axis';
|
|
17
17
|
import type { IGraphic } from '@visactor/vrender-core';
|
|
@@ -80,17 +80,12 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
80
80
|
protected _tickTransformOption(): ICartesianTickDataOpt;
|
|
81
81
|
protected axisHelper(): IAxisHelper;
|
|
82
82
|
afterCompile(): void;
|
|
83
|
-
onLayoutEnd(ctx: any): void;
|
|
84
83
|
onRender(ctx: any): void;
|
|
85
84
|
changeRegions(regions: IRegion[]): void;
|
|
86
85
|
update(ctx: IComponentOption): void;
|
|
87
86
|
resize(ctx: IComponentOption): void;
|
|
88
87
|
protected collectScale(): IBaseScale[];
|
|
89
|
-
protected
|
|
90
|
-
min: number;
|
|
91
|
-
max: number;
|
|
92
|
-
values: any[];
|
|
93
|
-
}[];
|
|
88
|
+
protected collectSeriesField(depth: number, series: ICartesianSeries): string | string[];
|
|
94
89
|
protected updateSeriesScale(): void;
|
|
95
90
|
_transformLayoutPosition: (pos: Partial<IPoint>) => {
|
|
96
91
|
x: number;
|
|
@@ -98,11 +93,11 @@ export declare abstract class CartesianAxis<T extends ICartesianAxisCommonSpec =
|
|
|
98
93
|
};
|
|
99
94
|
_transformLayoutRect: (result: ILayoutRect) => ILayoutRect;
|
|
100
95
|
getBoundsInRect(rect: ILayoutRect): IBoundsLike;
|
|
101
|
-
updateLayoutAttribute(): void;
|
|
102
96
|
private _getTitleLimit;
|
|
103
97
|
private _getUpdateAttribute;
|
|
104
98
|
protected getLabelItems(length: number): any[];
|
|
105
99
|
protected initEvent(): void;
|
|
100
|
+
protected _updateAxisLayout: () => void;
|
|
106
101
|
protected _getNormalizedValue(values: any[], length: number): number;
|
|
107
102
|
private _fixAxisOnZero;
|
|
108
103
|
protected _layoutCacheProcessing(rect: ILayoutRect): ILayoutRect;
|
|
@@ -22,8 +22,8 @@ export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICarte
|
|
|
22
22
|
protected axisHelper(): {
|
|
23
23
|
isContinuous: boolean;
|
|
24
24
|
dataToPosition: (values: any[]) => number;
|
|
25
|
-
getScale: (depth
|
|
26
|
-
getBandwidth: (depth
|
|
25
|
+
getScale: (depth?: number) => BandScale;
|
|
26
|
+
getBandwidth: (depth?: number) => number;
|
|
27
27
|
getAxisType: () => ComponentTypeEnum;
|
|
28
28
|
getAxisId: () => number;
|
|
29
29
|
isInverse: () => boolean;
|
|
@@ -31,5 +31,10 @@ export declare class CartesianBandAxis<T extends ICartesianBandAxisSpec = ICarte
|
|
|
31
31
|
};
|
|
32
32
|
transformScaleDomain(): void;
|
|
33
33
|
updateFixedWholeLength(): void;
|
|
34
|
+
protected _getOuterBandSizeFromSpec(): {
|
|
35
|
+
bandSize: number;
|
|
36
|
+
maxBandSize: number;
|
|
37
|
+
minBandSize: number;
|
|
38
|
+
};
|
|
34
39
|
}
|
|
35
40
|
export declare const registerCartesianBandAxis: () => void;
|
|
@@ -23,6 +23,7 @@ export interface ILinearAxis extends IAxis {
|
|
|
23
23
|
readonly zero: boolean;
|
|
24
24
|
readonly nice: boolean;
|
|
25
25
|
setExtendDomain: (key: string, value: number | undefined) => void;
|
|
26
|
+
niceLabelFormatter?: (value: StringOrNumber) => StringOrNumber;
|
|
26
27
|
}
|
|
27
28
|
export interface IAxisHelper {
|
|
28
29
|
isContinuous: boolean;
|
|
@@ -49,6 +49,11 @@ export type ICartesianBandAxisSpec = ICartesianAxisCommonSpec & IBandAxisSpec &
|
|
|
49
49
|
bandSize?: number;
|
|
50
50
|
maxBandSize?: number;
|
|
51
51
|
minBandSize?: number;
|
|
52
|
+
bandSizeLevel?: number;
|
|
53
|
+
bandSizeExtend?: {
|
|
54
|
+
gap?: number | string;
|
|
55
|
+
extend?: number;
|
|
56
|
+
};
|
|
52
57
|
autoRegionSize?: boolean;
|
|
53
58
|
};
|
|
54
59
|
export type ICartesianTimeAxisSpec = Omit<ICartesianAxisCommonSpec, 'inverse'> & {
|
|
@@ -16,7 +16,7 @@ export declare class CartesianTimeAxis<T extends ICartesianTimeAxisSpec = ICarte
|
|
|
16
16
|
setAttrFromSpec(): void;
|
|
17
17
|
protected _initData(): void;
|
|
18
18
|
protected computeData(updateType?: 'range' | 'domain' | 'force'): void;
|
|
19
|
-
protected
|
|
19
|
+
protected _getLabelFormatMethod(): any;
|
|
20
20
|
protected getLabelItems(length: number): any[];
|
|
21
21
|
transformScaleDomain(): void;
|
|
22
22
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IBaseScale } from '@visactor/vscale';
|
|
2
|
-
import type { Datum, IPolarOrientType, StringOrNumber } from '../../../typings';
|
|
2
|
+
import type { CoordinateType, Datum, IPolarOrientType, StringOrNumber } from '../../../typings';
|
|
3
3
|
import type { IComponent } from '../../interface/common';
|
|
4
4
|
import type { ICartesianAxisSpec } from '../cartesian/interface';
|
|
5
5
|
import type { ITextGraphicAttribute } from '@visactor/vrender-core';
|
|
@@ -15,6 +15,7 @@ export interface IAxis extends IComponent {
|
|
|
15
15
|
getScales: () => IBaseScale[];
|
|
16
16
|
getOrient: () => ICartesianAxisSpec['orient'] | IPolarOrientType;
|
|
17
17
|
getInverse: () => boolean;
|
|
18
|
+
getCoordinateType: () => CoordinateType;
|
|
18
19
|
visible: boolean;
|
|
19
20
|
directionStr?: 'l2r' | 'r2l' | 't2b' | 'b2t';
|
|
20
21
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { AxisItem, AxisItemStateStyle } from '@visactor/vrender-components';
|
|
2
2
|
import type { IAnimationSpec } from '../../../animation/spec';
|
|
3
|
-
import type { Datum, IPadding, IRectMarkSpec, IRuleMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';
|
|
3
|
+
import type { Datum, IFormatMethod, IPadding, IRectMarkSpec, IRichTextFormatMethod, IRuleMarkSpec, ISymbolMarkSpec, ITextMarkSpec, StringOrNumber } from '../../../typings';
|
|
4
4
|
import type { IComponentSpec } from '../../base/interface';
|
|
5
5
|
import type { AxisType, IAxisItem, IBandAxisLayer, ITickCalculationCfg, StyleCallback } from './common';
|
|
6
|
-
import type { IRichTextCharacter } from '@visactor/vrender-core';
|
|
7
6
|
export interface ICommonAxisSpec extends Omit<IComponentSpec, 'orient' | 'center'>, IAnimationSpec<string, string> {
|
|
8
7
|
type?: AxisType;
|
|
9
8
|
visible?: boolean;
|
|
@@ -14,10 +13,13 @@ export interface ICommonAxisSpec extends Omit<IComponentSpec, 'orient' | 'center
|
|
|
14
13
|
select?: boolean;
|
|
15
14
|
hover?: boolean;
|
|
16
15
|
sampling?: boolean;
|
|
16
|
+
forceInitTick?: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface ILinearAxisSpec {
|
|
19
19
|
min?: number;
|
|
20
20
|
max?: number;
|
|
21
|
+
softMin?: number | ((domain: number[]) => number);
|
|
22
|
+
softMax?: number | ((domain: number[]) => number);
|
|
21
23
|
range?: {
|
|
22
24
|
min?: number;
|
|
23
25
|
max?: number;
|
|
@@ -62,8 +64,9 @@ export interface ISubTick extends IAxisItem<IRuleMarkSpec> {
|
|
|
62
64
|
state?: AxisItemStateStyle<IRuleMarkSpec>;
|
|
63
65
|
}
|
|
64
66
|
export interface ILabel extends IAxisItem<ITextMarkSpec> {
|
|
65
|
-
type?: 'text' | 'rich'
|
|
66
|
-
formatMethod?:
|
|
67
|
+
type?: 'text' | 'rich';
|
|
68
|
+
formatMethod?: IFormatMethod<[text: string | string[], datum?: Datum]>;
|
|
69
|
+
formatter?: string | string[];
|
|
67
70
|
space?: number;
|
|
68
71
|
inside?: boolean;
|
|
69
72
|
minGap?: number;
|
|
@@ -75,6 +78,8 @@ export interface IDomainLine extends IAxisItem<IRuleMarkSpec> {
|
|
|
75
78
|
state?: AxisItemStateStyle<IRuleMarkSpec>;
|
|
76
79
|
}
|
|
77
80
|
export interface ITitle extends IAxisItem<ITextMarkSpec> {
|
|
81
|
+
type?: 'text' | 'rich';
|
|
82
|
+
text?: ITextMarkSpec['text'] | ReturnType<IRichTextFormatMethod<[]>>;
|
|
78
83
|
position?: 'start' | 'middle' | 'end';
|
|
79
84
|
space?: number;
|
|
80
85
|
padding?: IPadding | number | number[];
|
|
@@ -85,8 +90,6 @@ export interface ITitle extends IAxisItem<ITextMarkSpec> {
|
|
|
85
90
|
space?: number;
|
|
86
91
|
state?: AxisItemStateStyle<Partial<ISymbolMarkSpec>>;
|
|
87
92
|
};
|
|
88
|
-
type?: 'text' | 'rich' | 'html';
|
|
89
|
-
text?: string | string[] | IRichTextCharacter[];
|
|
90
93
|
angle?: number;
|
|
91
94
|
state?: AxisItemStateStyle<Partial<ITextMarkSpec>>;
|
|
92
95
|
}
|
|
@@ -3,6 +3,7 @@ import type { IAxisLocationCfg, ITick } from '../interface';
|
|
|
3
3
|
import type { IEvent } from '../../../event/interface';
|
|
4
4
|
import type { IOrientType } from '../../../typings/space';
|
|
5
5
|
import type { IComponentOption } from '../../interface/common';
|
|
6
|
+
import type { StringOrNumber } from '../../../typings';
|
|
6
7
|
export declare const e10: number;
|
|
7
8
|
export declare const e5: number;
|
|
8
9
|
export declare const e2: number;
|
|
@@ -16,6 +17,9 @@ export interface LinearAxisMixin {
|
|
|
16
17
|
min?: number;
|
|
17
18
|
max?: number;
|
|
18
19
|
};
|
|
20
|
+
_domainAfterSpec: number[];
|
|
21
|
+
_softMinValue?: number;
|
|
22
|
+
_softMaxValue?: number;
|
|
19
23
|
_expand?: {
|
|
20
24
|
max?: number;
|
|
21
25
|
min?: number;
|
|
@@ -31,16 +35,18 @@ export interface LinearAxisMixin {
|
|
|
31
35
|
event: IEvent;
|
|
32
36
|
_orient: IOrientType;
|
|
33
37
|
_option: IComponentOption;
|
|
38
|
+
niceLabelFormatter: (value: StringOrNumber) => StringOrNumber;
|
|
34
39
|
}
|
|
35
40
|
export declare class LinearAxisMixin {
|
|
36
41
|
protected _extend: {
|
|
37
42
|
[key: string]: number;
|
|
38
43
|
};
|
|
44
|
+
niceLabelFormatter: (value: StringOrNumber) => StringOrNumber;
|
|
39
45
|
setExtraAttrFromSpec(): void;
|
|
40
46
|
transformScaleDomain(): void;
|
|
41
|
-
setLinearScaleNice():
|
|
42
|
-
setLogScaleNice():
|
|
43
|
-
setScaleNice():
|
|
47
|
+
setLinearScaleNice(): false | LinearScale;
|
|
48
|
+
setLogScaleNice(): false | LinearScale;
|
|
49
|
+
setScaleNice(): false | LinearScale;
|
|
44
50
|
dataToPosition(values: any[], cfg?: IAxisLocationCfg): number;
|
|
45
51
|
valueToPosition(value: any): number;
|
|
46
52
|
computeLinearDomain(data: {
|
|
@@ -58,7 +64,10 @@ export declare class LinearAxisMixin {
|
|
|
58
64
|
max?: number;
|
|
59
65
|
};
|
|
60
66
|
protected setDomainMinMax(domain: number[]): void;
|
|
67
|
+
protected setSoftDomainMinMax(domain: number[]): void;
|
|
61
68
|
setZero(zero: boolean): void;
|
|
62
69
|
protected updateScaleDomain(): void;
|
|
63
70
|
protected updateScaleDomainByModel(domain?: number[]): void;
|
|
71
|
+
getDomainAfterSpec(): number[];
|
|
72
|
+
protected _updateNiceLabelFormatter(domain: number[]): void;
|
|
64
73
|
}
|
|
@@ -2,7 +2,7 @@ import type { IBaseScale } from '@visactor/vscale';
|
|
|
2
2
|
import type { IPolarAxis, IPolarAxisCommonSpec } from './interface';
|
|
3
3
|
import type { IComponentOption } from '../../interface';
|
|
4
4
|
import { ComponentTypeEnum } from '../../interface/type';
|
|
5
|
-
import type { IPolarTickDataOpt } from '@visactor/
|
|
5
|
+
import type { IPolarTickDataOpt } from '@visactor/vrender-components';
|
|
6
6
|
import type { IPolarSeries } from '../../../series/interface';
|
|
7
7
|
import type { IPoint, IPolarOrientType, IPolarPoint, StringOrNumber, ILayoutType } from '../../../typings';
|
|
8
8
|
import type { Maybe } from '@visactor/vutils';
|
|
@@ -20,8 +20,14 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
20
20
|
layoutType: ILayoutType;
|
|
21
21
|
layoutZIndex: number;
|
|
22
22
|
protected _tick: ITick | undefined;
|
|
23
|
-
protected _center:
|
|
24
|
-
|
|
23
|
+
protected _center: {
|
|
24
|
+
x: string | number;
|
|
25
|
+
y: string | number;
|
|
26
|
+
} | null;
|
|
27
|
+
get center(): {
|
|
28
|
+
x: string | number;
|
|
29
|
+
y: string | number;
|
|
30
|
+
};
|
|
25
31
|
protected _startAngle: number;
|
|
26
32
|
get startAngle(): number;
|
|
27
33
|
protected _endAngle: number;
|
|
@@ -38,17 +44,12 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
38
44
|
effect: IEffect;
|
|
39
45
|
setAttrFromSpec(): void;
|
|
40
46
|
_transformLayoutPosition: (pos: Partial<IPoint>) => Partial<IPoint>;
|
|
41
|
-
onLayoutEnd(ctx: any): void;
|
|
42
47
|
onRender(ctx: any): void;
|
|
43
48
|
changeRegions(): void;
|
|
44
49
|
protected _tickTransformOption(): IPolarTickDataOpt;
|
|
45
50
|
afterCompile(): void;
|
|
46
51
|
protected updateScaleRange(): boolean;
|
|
47
|
-
protected
|
|
48
|
-
min: number;
|
|
49
|
-
max: number;
|
|
50
|
-
values: any[];
|
|
51
|
-
}[];
|
|
52
|
+
protected collectSeriesField(depth: number, series: IPolarSeries): string | string[];
|
|
52
53
|
protected abstract computeDomain(data: {
|
|
53
54
|
min: number;
|
|
54
55
|
max: number;
|
|
@@ -63,7 +64,8 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
63
64
|
coordToPoint: (point: IPolarPoint) => IPoint;
|
|
64
65
|
pointToCoord: (point: IPoint) => IPolarPoint;
|
|
65
66
|
center: () => IPoint;
|
|
66
|
-
|
|
67
|
+
layoutRadius: () => number;
|
|
68
|
+
getScale: (depth?: number) => IBaseScale;
|
|
67
69
|
getAxisId: () => number;
|
|
68
70
|
getSpec: () => T;
|
|
69
71
|
};
|
|
@@ -80,6 +82,7 @@ export declare abstract class PolarAxis<T extends IPolarAxisCommonSpec = IPolarA
|
|
|
80
82
|
private _layoutAngleAxis;
|
|
81
83
|
private _layoutRadiusAxis;
|
|
82
84
|
protected _getRelatedAngleAxis(): IPolarAxis | undefined;
|
|
85
|
+
private computeLayoutRadius;
|
|
83
86
|
private computeLayoutOuterRadius;
|
|
84
87
|
private computeLayoutInnerRadius;
|
|
85
88
|
private getRefLayoutRect;
|
|
@@ -25,7 +25,8 @@ export declare class PolarBandAxis<T extends IPolarBandAxisSpec = IPolarBandAxis
|
|
|
25
25
|
coordToPoint: (point: import("../../../typings").IPolarPoint) => import("../../../typings").IPoint;
|
|
26
26
|
pointToCoord: (point: import("../../../typings").IPoint) => import("../../../typings").IPolarPoint;
|
|
27
27
|
center: () => import("../../../typings").IPoint;
|
|
28
|
-
|
|
28
|
+
layoutRadius: () => number;
|
|
29
|
+
getScale: (depth?: number) => import("@visactor/vscale").IBaseScale;
|
|
29
30
|
getAxisId: () => number;
|
|
30
31
|
getSpec: () => T;
|
|
31
32
|
};
|
|
@@ -11,9 +11,11 @@ export interface IPolarAxisHelper {
|
|
|
11
11
|
coordToPoint: (point: IPolarPoint) => IPoint;
|
|
12
12
|
pointToCoord: (point: IPoint) => IPolarPoint;
|
|
13
13
|
center: () => IPoint;
|
|
14
|
+
layoutRadius: () => number;
|
|
14
15
|
getScale: (depth?: number) => IBaseScale;
|
|
15
16
|
getBandwidth?: (depth?: number) => number;
|
|
16
17
|
getAxisId: () => number;
|
|
18
|
+
setExtendDomain?: (key: string, value: number | undefined) => void;
|
|
17
19
|
}
|
|
18
20
|
export interface IPolarAxis extends IAxis {
|
|
19
21
|
startAngle: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { IPoint, IPolarOrientType } from '../../../../typings';
|
|
1
|
+
import type { ILayoutRect, IPoint, IPolarOrientType } from '../../../../typings';
|
|
2
2
|
import type { IBandAxisSpec, IDomainLine, ILinearAxisSpec, ITitle, ILabel, ICommonAxisSpec } from '../../interface';
|
|
3
3
|
import type { IPolarGrid } from './common';
|
|
4
4
|
export type IPolarAxisSpec = IPolarLinearAxisSpec | IPolarBandAxisSpec;
|
|
5
5
|
export type IPolarAxisCommonSpec = Omit<ICommonAxisSpec, 'center'> & {
|
|
6
|
+
layoutRadius?: 'auto' | number | ((layoutRect: ILayoutRect, center: IPoint) => number);
|
|
6
7
|
inside?: boolean;
|
|
7
8
|
orient: IPolarOrientType;
|
|
8
9
|
grid?: IPolarGrid;
|
|
@@ -13,7 +14,10 @@ export type IPolarAxisCommonSpec = Omit<ICommonAxisSpec, 'center'> & {
|
|
|
13
14
|
title?: ITitle;
|
|
14
15
|
innerRadius?: number;
|
|
15
16
|
outerRadius?: number;
|
|
16
|
-
center?:
|
|
17
|
+
center?: {
|
|
18
|
+
x: number | string;
|
|
19
|
+
y: number | string;
|
|
20
|
+
};
|
|
17
21
|
startAngle?: number;
|
|
18
22
|
endAngle?: number;
|
|
19
23
|
};
|
|
@@ -3,7 +3,7 @@ import { ComponentTypeEnum } from '../../interface/type';
|
|
|
3
3
|
import { PolarAxis } from './axis';
|
|
4
4
|
import type { IPolarLinearAxisSpec } from './interface/spec';
|
|
5
5
|
import { LinearAxisMixin } from '../mixin/linear-axis-mixin';
|
|
6
|
-
export interface PolarLinearAxis<T extends IPolarLinearAxisSpec = IPolarLinearAxisSpec> extends Pick<LinearAxisMixin, 'setExtraAttrFromSpec' | 'transformScaleDomain' | 'valueToPosition' | 'computeLinearDomain' | 'setScaleNice'>, PolarAxis<T> {
|
|
6
|
+
export interface PolarLinearAxis<T extends IPolarLinearAxisSpec = IPolarLinearAxisSpec> extends Pick<LinearAxisMixin, 'setExtraAttrFromSpec' | 'transformScaleDomain' | 'valueToPosition' | 'computeLinearDomain' | 'setScaleNice' | 'setExtendDomain'>, PolarAxis<T> {
|
|
7
7
|
}
|
|
8
8
|
export declare class PolarLinearAxis<T extends IPolarLinearAxisSpec = IPolarLinearAxisSpec> extends PolarAxis<T> {
|
|
9
9
|
static type: ComponentTypeEnum;
|
|
@@ -11,6 +11,9 @@ export declare class PolarLinearAxis<T extends IPolarLinearAxisSpec = IPolarLine
|
|
|
11
11
|
static specKey: string;
|
|
12
12
|
protected _zero: boolean;
|
|
13
13
|
protected _nice: boolean;
|
|
14
|
+
protected _extend: {
|
|
15
|
+
[key: string]: number;
|
|
16
|
+
};
|
|
14
17
|
protected _scale: LinearScale;
|
|
15
18
|
protected _groupScales: LinearScale[];
|
|
16
19
|
setAttrFromSpec(): void;
|
|
@@ -20,5 +23,6 @@ export declare class PolarLinearAxis<T extends IPolarLinearAxisSpec = IPolarLine
|
|
|
20
23
|
max: number;
|
|
21
24
|
values: any[];
|
|
22
25
|
}[]): number[];
|
|
26
|
+
protected axisHelper(): any;
|
|
23
27
|
}
|
|
24
28
|
export declare const registerPolarLinearAxis: () => void;
|