@antv/g2 5.0.0-beta.4 → 5.0.0-beta.5
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/dist/g2-lite.min.js +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/api/mark/mark.js +0 -2
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +0 -2
- package/esm/component/axis.js +5 -4
- package/esm/component/axis.js.map +1 -1
- package/esm/component/slider.js +2 -4
- package/esm/component/slider.js.map +1 -1
- package/esm/composition/mark.js +2 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/index.d.ts +3 -0
- package/esm/interaction/index.js +3 -0
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushHighlight.d.ts +15 -0
- package/esm/interaction/native/brushHighlight.js +283 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +1 -0
- package/esm/interaction/native/brushXHighlight.js +8 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +1 -0
- package/esm/interaction/native/brushYHighlight.js +8 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/legendFilter.js +3 -12
- package/esm/interaction/native/legendFilter.js.map +1 -1
- package/esm/interaction/native/tooltip.js +96 -28
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +4 -0
- package/esm/interaction/native/utils.js +23 -0
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/runtime/plot.js +24 -6
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/scale.js +17 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +10 -4
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +1 -0
- package/esm/runtime/types/options.d.ts +1 -0
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +20 -0
- package/esm/shape/label/{position.js → position/default.js} +9 -45
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +1 -0
- package/esm/shape/label/position/outside.js +2 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +40 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +37 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/spec/composition.d.ts +2 -0
- package/esm/spec/geometry.d.ts +1 -1
- package/esm/spec/interaction.d.ts +21 -5
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/theme.d.ts +5 -2
- package/esm/stdlib/index.js +5 -6
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +402 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +3 -2
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +4 -3
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +12 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +1 -0
- package/esm/utils/helper.js +3 -0
- package/esm/utils/helper.js.map +1 -1
- package/lib/api/mark/mark.js +0 -2
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +0 -2
- package/lib/component/axis.js +5 -4
- package/lib/component/axis.js.map +1 -1
- package/lib/component/slider.js +2 -4
- package/lib/component/slider.js.map +1 -1
- package/lib/composition/mark.js +2 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/index.d.ts +3 -0
- package/lib/interaction/index.js +7 -1
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushHighlight.d.ts +15 -0
- package/lib/interaction/native/brushHighlight.js +289 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +1 -0
- package/lib/interaction/native/brushXHighlight.js +12 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +1 -0
- package/lib/interaction/native/brushYHighlight.js +12 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/legendFilter.js +4 -13
- package/lib/interaction/native/legendFilter.js.map +1 -1
- package/lib/interaction/native/tooltip.js +93 -25
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +4 -0
- package/lib/interaction/native/utils.js +28 -1
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/runtime/plot.js +24 -6
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/scale.js +16 -4
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +10 -4
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +1 -0
- package/lib/runtime/types/options.d.ts +1 -0
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +20 -0
- package/lib/shape/label/{position.js → position/default.js} +10 -43
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +1 -0
- package/lib/shape/label/position/outside.js +6 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +44 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +41 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/spec/composition.d.ts +2 -0
- package/lib/spec/geometry.d.ts +1 -1
- package/lib/spec/interaction.d.ts +21 -5
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/theme.d.ts +5 -2
- package/lib/stdlib/index.js +2 -3
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +406 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +3 -2
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +4 -3
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +14 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/helper.js +5 -1
- package/lib/utils/helper.js.map +1 -1
- package/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/api/mark/mark.ts +0 -2
- package/src/api/mark/types.ts +0 -2
- package/src/component/axis.ts +16 -11
- package/src/component/slider.ts +1 -3
- package/src/composition/mark.ts +2 -0
- package/src/data/.DS_Store +0 -0
- package/src/interaction/index.ts +3 -0
- package/src/interaction/native/brushHighlight.ts +346 -0
- package/src/interaction/native/brushXHighlight.ts +11 -0
- package/src/interaction/native/brushYHighlight.ts +11 -0
- package/src/interaction/native/legendFilter.ts +3 -14
- package/src/interaction/native/tooltip.ts +119 -32
- package/src/interaction/native/utils.ts +31 -0
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +6 -6
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/runtime/plot.ts +35 -6
- package/src/runtime/scale.ts +15 -7
- package/src/runtime/transform.ts +13 -4
- package/src/runtime/types/common.ts +1 -0
- package/src/runtime/types/options.ts +1 -0
- package/src/shape/.DS_Store +0 -0
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +12 -56
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +1 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +46 -0
- package/src/shape/label/position/surround.ts +42 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/spec/composition.ts +2 -0
- package/src/spec/geometry.ts +2 -1
- package/src/spec/interaction.ts +28 -4
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/theme.ts +6 -2
- package/src/stdlib/index.ts +19 -7
- package/src/theme/academy.ts +408 -0
- package/src/theme/dark.ts +3 -2
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +4 -3
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +12 -0
- package/src/utils/helper.ts +4 -0
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Coordinate } from '@antv/coord';
|
|
2
|
+
import { Vector2 } from '../../../runtime';
|
|
3
|
+
export type LabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inside' | 'outside' | 'area' | 'spider' | 'surround';
|
|
4
|
+
export declare function inferNonCircularStyle(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate): any;
|
|
5
|
+
export declare function inferRadialStyle(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate): {
|
|
6
|
+
textAlign: string;
|
|
7
|
+
textBaseline: string;
|
|
8
|
+
rotate: number;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function inferCircularStyle(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate): {
|
|
13
|
+
connector: any;
|
|
14
|
+
connectorPoints: Vector2[];
|
|
15
|
+
dx: number;
|
|
16
|
+
textAlign: string;
|
|
17
|
+
textBaseline: string;
|
|
18
|
+
rotate: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function getDefaultStyle(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate): any;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
function inferNonCircularStyle(position, points, value, coordinate) {
|
|
1
|
+
import { getArcObject } from '../../../shape/utils';
|
|
2
|
+
import { isCircular, isRadial } from '../../../utils/coordinate';
|
|
3
|
+
import { maybePercentage } from '../../../utils/helper';
|
|
4
|
+
import { mid } from '../../../utils/vector';
|
|
5
|
+
export function inferNonCircularStyle(position, points, value, coordinate) {
|
|
7
6
|
const { bounds } = value;
|
|
8
7
|
const [[x0, y0], [x1, y1]] = bounds;
|
|
9
8
|
const w = x1 - x0;
|
|
@@ -40,7 +39,7 @@ function inferNonCircularStyle(position, points, value, coordinate) {
|
|
|
40
39
|
textBaseline: 'middle',
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
|
-
function inferRadialStyle(position, points, value, coordinate) {
|
|
42
|
+
export function inferRadialStyle(position, points, value, coordinate) {
|
|
44
43
|
const { y, y1, autoRotate, rotateToAlignArc } = value;
|
|
45
44
|
const center = coordinate.getCenter();
|
|
46
45
|
const arcObject = getArcObject(coordinate, points, [y, y1]);
|
|
@@ -67,7 +66,7 @@ function inferRotation(angle, autoRotate, rotateToAlignArc) {
|
|
|
67
66
|
const append = rotateToAlignArc ? 0 : Math.sin(angle) < 0 ? 90 : -90;
|
|
68
67
|
return (angle / Math.PI) * 180 + append;
|
|
69
68
|
}
|
|
70
|
-
function inferCircularStyle(position, points, value, coordinate) {
|
|
69
|
+
export function inferCircularStyle(position, points, value, coordinate) {
|
|
71
70
|
const { y, y1, autoRotate, rotateToAlignArc, connector = true, connectorLength2 = 0, connectorDistance = 0, radius: radiusRatio = 0.5, offset = 0, } = value;
|
|
72
71
|
const arcObject = getArcObject(coordinate, points, [y, y1]);
|
|
73
72
|
const { startAngle, endAngle } = arcObject;
|
|
@@ -115,7 +114,7 @@ function inferIdentityStyle(position, points, value, coordinate) {
|
|
|
115
114
|
y: p[1],
|
|
116
115
|
};
|
|
117
116
|
}
|
|
118
|
-
function getDefaultStyle(position, points, value, coordinate) {
|
|
117
|
+
export function getDefaultStyle(position, points, value, coordinate) {
|
|
119
118
|
const { bounds } = value;
|
|
120
119
|
// When bounds.length = 1
|
|
121
120
|
// For series mark, such as line and area.
|
|
@@ -131,39 +130,4 @@ function getDefaultStyle(position, points, value, coordinate) {
|
|
|
131
130
|
: inferNonCircularStyle;
|
|
132
131
|
return inferDefaultStyle(position, points, value, coordinate);
|
|
133
132
|
}
|
|
134
|
-
|
|
135
|
-
export const bottom = getDefaultStyle;
|
|
136
|
-
export const right = getDefaultStyle;
|
|
137
|
-
export const left = getDefaultStyle;
|
|
138
|
-
export const topLeft = getDefaultStyle;
|
|
139
|
-
export const topRight = getDefaultStyle;
|
|
140
|
-
export const bottomLeft = getDefaultStyle;
|
|
141
|
-
export const bottomRight = getDefaultStyle;
|
|
142
|
-
export const inside = getDefaultStyle;
|
|
143
|
-
export const outside = getDefaultStyle;
|
|
144
|
-
/**
|
|
145
|
-
* Only for Area label.
|
|
146
|
-
*/
|
|
147
|
-
export function area(position, points, value, coordinate) {
|
|
148
|
-
const l = points.length / 2;
|
|
149
|
-
const Y1 = points.slice(0, l);
|
|
150
|
-
const Y0 = points.slice(l);
|
|
151
|
-
// Get the maximal space for label.
|
|
152
|
-
let idx = maxIndex(Y1, (p, i) => Math.abs(p[1] - Y0[i][1]));
|
|
153
|
-
// Do not show label at first and last.
|
|
154
|
-
idx = Math.max(Math.min(idx, l - 2), 1);
|
|
155
|
-
const mid = (i) => [Y1[i][0], (Y1[i][1] + Y0[i][1]) / 2];
|
|
156
|
-
const point = mid(idx);
|
|
157
|
-
const prev = mid(idx - 1);
|
|
158
|
-
const next = mid(idx + 1);
|
|
159
|
-
// todo: G rotate only support deg.
|
|
160
|
-
const rotate = (angle(sub(next, prev)) / Math.PI) * 180;
|
|
161
|
-
return {
|
|
162
|
-
x: point[0],
|
|
163
|
-
y: point[1],
|
|
164
|
-
transform: `rotate(${rotate}deg)`,
|
|
165
|
-
textAlign: 'center',
|
|
166
|
-
textBaseline: 'middle',
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
//# sourceMappingURL=position.js.map
|
|
133
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"src/","sources":["shape/label/position/default.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD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EAAE,UAAU;IAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;IACnB,OAAO;QACL,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACP,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,QAAuB,EACvB,MAAiB,EACjB,KAA0B,EAC1B,UAAsB;IAEtB,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,yBAAyB;IACzB,0CAA0C;IAC1C,sDAAsD;IACtD,wCAAwC;IACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;KAChE;IAED,MAAM,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC;QAC5C,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;YACxB,CAAC,CAAC,kBAAkB;YACpB,CAAC,CAAC,qBAAqB,CAAC;IAE1B,OAAO,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { area } from './area';
|
|
2
|
+
export { bottom } from './bottom';
|
|
3
|
+
export { bottomLeft } from './bottomLeft';
|
|
4
|
+
export { bottomRight } from './bottomRight';
|
|
5
|
+
export { inside } from './inside';
|
|
6
|
+
export { left } from './left';
|
|
7
|
+
export { outside } from './outside';
|
|
8
|
+
export { right } from './right';
|
|
9
|
+
export { spider } from './spider';
|
|
10
|
+
export { surround } from './surround';
|
|
11
|
+
export { top } from './top';
|
|
12
|
+
export { topLeft } from './topLeft';
|
|
13
|
+
export { topRight } from './topRight';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { area } from './area';
|
|
2
|
+
export { bottom } from './bottom';
|
|
3
|
+
export { bottomLeft } from './bottomLeft';
|
|
4
|
+
export { bottomRight } from './bottomRight';
|
|
5
|
+
export { inside } from './inside';
|
|
6
|
+
export { left } from './left';
|
|
7
|
+
export { outside } from './outside';
|
|
8
|
+
export { right } from './right';
|
|
9
|
+
export { spider } from './spider';
|
|
10
|
+
export { surround } from './surround';
|
|
11
|
+
export { top } from './top';
|
|
12
|
+
export { topLeft } from './topLeft';
|
|
13
|
+
export { topRight } from './topRight';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["shape/label/position/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as inside } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inside.js","sourceRoot":"src/","sources":["shape/label/position/inside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as left } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"left.js","sourceRoot":"src/","sources":["shape/label/position/left.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as outside } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outside.js","sourceRoot":"src/","sources":["shape/label/position/outside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as right } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"right.js","sourceRoot":"src/","sources":["shape/label/position/right.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Coordinate } from '@antv/coord';
|
|
2
|
+
import { Vector2 } from '../../../runtime';
|
|
3
|
+
import { LabelPosition } from './default';
|
|
4
|
+
/**
|
|
5
|
+
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
6
|
+
*/
|
|
7
|
+
export declare function spider(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate, options: any): any;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { sub } from '../../../utils/vector';
|
|
13
|
+
import { isCircular } from '../../../utils/coordinate';
|
|
14
|
+
import { maybePercentage } from '../../../utils/helper';
|
|
15
|
+
import { inferCircularStyle } from './default';
|
|
16
|
+
/**
|
|
17
|
+
* Spider label transform only suitable for the labels in polar coordinate, labels should distinguish coordinate type.
|
|
18
|
+
*/
|
|
19
|
+
export function spider(position, points, value, coordinate, options) {
|
|
20
|
+
if (!isCircular(coordinate))
|
|
21
|
+
return {};
|
|
22
|
+
const { edgeDistance = 0 } = options;
|
|
23
|
+
const style = __rest(inferCircularStyle('outside', points, value, coordinate), []);
|
|
24
|
+
const { x: coordX, width } = coordinate.getOptions();
|
|
25
|
+
const center = coordinate.getCenter();
|
|
26
|
+
// todo: How to configure spider.
|
|
27
|
+
const margin = maybePercentage(edgeDistance, width);
|
|
28
|
+
const edgeX = coordX + margin;
|
|
29
|
+
const edgeX1 = coordX + width - margin;
|
|
30
|
+
const { x: originX, x0, y0 } = style;
|
|
31
|
+
const dx = originX <= center[0] ? edgeX - originX : edgeX1 - originX;
|
|
32
|
+
style.x += dx;
|
|
33
|
+
const { x, y } = style;
|
|
34
|
+
const p0 = sub([x0, y0], center);
|
|
35
|
+
const p1 = sub([0, y], center);
|
|
36
|
+
const p1x = p0[1] ? (p0[0] * p1[1]) / p0[1] + center[0] : x;
|
|
37
|
+
style.connectorPoints = [[p1x - x, 0]];
|
|
38
|
+
return style;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=spider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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AAE,CAAC,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/B,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAEvC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Coordinate } from '@antv/coord';
|
|
2
|
+
import { Vector2 } from '../../../runtime';
|
|
3
|
+
import { LabelPosition } from './default';
|
|
4
|
+
/**
|
|
5
|
+
* Surround label transform is used to make labels surround circular.
|
|
6
|
+
*/
|
|
7
|
+
export declare function surround(position: LabelPosition, points: Vector2[], value: Record<string, any>, coordinate: Coordinate, options: any): any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { getRadius, isCircular } from '../../../utils/coordinate';
|
|
13
|
+
import { angleWithQuadrant } from '../../../utils/vector';
|
|
14
|
+
import { inferCircularStyle } from './default';
|
|
15
|
+
/**
|
|
16
|
+
* Surround label transform is used to make labels surround circular.
|
|
17
|
+
*/
|
|
18
|
+
export function surround(position, points, value, coordinate, options) {
|
|
19
|
+
if (!isCircular(coordinate))
|
|
20
|
+
return {};
|
|
21
|
+
const { offset = 12 } = options;
|
|
22
|
+
const style = __rest(inferCircularStyle('outside', points, value, coordinate), []);
|
|
23
|
+
const center = coordinate.getCenter();
|
|
24
|
+
const radius = getRadius(coordinate) + offset;
|
|
25
|
+
const { x0, y0, connector, connectorLength2 = 0 } = style;
|
|
26
|
+
const labelAngle = angleWithQuadrant([x0 - center[0], y0 - center[1]]);
|
|
27
|
+
const length2 = connector
|
|
28
|
+
? connectorLength2 * (Math.sin(labelAngle) < 0 ? -1 : 1)
|
|
29
|
+
: 0;
|
|
30
|
+
const newX = center[0] + Math.sin(labelAngle) * radius;
|
|
31
|
+
const newY = center[1] - Math.cos(labelAngle) * radius;
|
|
32
|
+
style.x = newX + length2;
|
|
33
|
+
style.y = newY;
|
|
34
|
+
style.connectorPoints = [[-length2, 0]];
|
|
35
|
+
return style;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=surround.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surround.js","sourceRoot":"src/","sources":["shape/label/position/surround.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAiB,MAAM,WAAW,CAAC;AAE9D;;GAEG;AACH,MAAM,UAAU,QAAQ,CACtB,QAAuB,EACvB,MAAiB,EACjB,KAA0B,EAC1B,UAA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AAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as top } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top.js","sourceRoot":"src/","sources":["shape/label/position/top.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,GAAG,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as topLeft } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topLeft.js","sourceRoot":"src/","sources":["shape/label/position/topLeft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getDefaultStyle as topRight } from './default';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topRight.js","sourceRoot":"src/","sources":["shape/label/position/topRight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -12,6 +12,7 @@ type EventType = (...args: any[]) => void;
|
|
|
12
12
|
export type Node = MarkComposition | ViewComposition | SpaceLayerComposition | SpaceFlexComposition | RepeatMatrixComposition | FacetRectComposition | FacetCircleComposition | GeoViewComposition | TimingKeyframeComposition;
|
|
13
13
|
export type MarkComposition = Geometry & {
|
|
14
14
|
title?: Title;
|
|
15
|
+
clip?: boolean;
|
|
15
16
|
};
|
|
16
17
|
export type ViewComposition = {
|
|
17
18
|
type?: 'view';
|
|
@@ -47,6 +48,7 @@ export type ViewComposition = {
|
|
|
47
48
|
legend?: Record<string, any>;
|
|
48
49
|
on?: Record<string, EventType | EventType[]>;
|
|
49
50
|
style?: Record<string, any>;
|
|
51
|
+
clip?: boolean;
|
|
50
52
|
};
|
|
51
53
|
export type SpaceLayerComposition = {
|
|
52
54
|
type?: 'spaceLayer';
|
package/esm/spec/geometry.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Theme } from './theme';
|
|
|
9
9
|
import { ClusterTransform, Data } from './data';
|
|
10
10
|
export type Geometry = IntervalGeometry | RectGeometry | LineGeometry | PointGeometry | TextGeometry | CellGeometry | AreaGeometry | NodeGeometry | EdgeGeometry | ImageGeometry | PolygonGeometry | BoxGeometry | VectorGeometry | LineXMark | LineYMark | RangeMark | RangeXMark | RangeYMark | ConnectorMark | SankeyMark | PathMark | TreemapMark | PackMark | BoxPlotMark | ShapeMark | ForceGraphMark | TreeMark | WordCloudMark | CustomComponent;
|
|
11
11
|
export type GeometryTypes = 'interval' | 'rect' | 'line' | 'point' | 'text' | 'cell' | 'area' | 'node' | 'edge' | 'link' | 'image' | 'polygon' | 'box' | 'vector' | 'lineX' | 'lineY' | 'connector' | 'range' | 'rangeX' | 'rangeY' | 'sankey' | 'path' | 'treemap' | 'pack' | 'boxplot' | 'shape' | 'forceGraph' | 'tree' | 'wordCloud' | MarkComponent;
|
|
12
|
-
export type ChannelTypes = 'x' | 'y' | 'x1' | 'y1' | 'series' | 'color' | 'opacity' | 'shape' | 'enterType' | 'enterEasing' | 'enterDuration' | 'enterDelay' | 'enter' | 'size' | 'tooltip' | 'title' | 'key' | 'groupKey' | 'label' | 'position' | 'series'
|
|
12
|
+
export type ChannelTypes = 'x' | 'y' | 'x1' | 'y1' | 'series' | 'color' | 'opacity' | 'shape' | 'enterType' | 'enterEasing' | 'enterDuration' | 'enterDelay' | 'enter' | 'size' | 'tooltip' | 'title' | 'key' | 'groupKey' | 'label' | 'position' | 'series' | `tooltip${number}`;
|
|
13
13
|
export type BaseGeometry<T extends GeometryTypes, C extends string = ChannelTypes> = {
|
|
14
14
|
type?: T | string;
|
|
15
15
|
class?: string;
|
|
@@ -2,17 +2,33 @@ import { ChannelTypes } from 'spec';
|
|
|
2
2
|
import { InteractionComponent } from '../runtime';
|
|
3
3
|
import { ActiveRegionAction, PoptipAction, TooltipAction } from './action';
|
|
4
4
|
import { FisheyeCoordinate } from './coordinate';
|
|
5
|
-
export type Interaction = ElementHighlightInteraction | ElementHighlightByColorInteraction | ElementHighlightByXInteraction | ElementSelectByColorInteraction | ElementSelectByXInteraction | ElementSelectInteraction | TooltipInteraction | FisheyeInteraction | ChartIndex | CustomInteraction | LegendFilterInteraction;
|
|
6
|
-
export type InteractionTypes = 'elementHighlight' | 'elementHighlightByX' | 'elementHighlightByColor' | 'fisheye' | 'chartIndex' | 'elementSelect' | 'elementSelectByX' | 'elementSelectByColor' | 'fisheye' | 'tooltip' | 'legendFilter' | InteractionComponent;
|
|
5
|
+
export type Interaction = ElementHighlightInteraction | ElementHighlightByColorInteraction | ElementHighlightByXInteraction | ElementSelectByColorInteraction | ElementSelectByXInteraction | ElementSelectInteraction | TooltipInteraction | FisheyeInteraction | ChartIndex | CustomInteraction | LegendFilterInteraction | BrushHighlightInteraction | BrushXHighlightInteraction | BrushYHighlightInteraction;
|
|
6
|
+
export type InteractionTypes = 'elementHighlight' | 'elementHighlightByX' | 'elementHighlightByColor' | 'fisheye' | 'chartIndex' | 'elementSelect' | 'elementSelectByX' | 'elementSelectByColor' | 'fisheye' | 'tooltip' | 'legendFilter' | 'brushXHighlight' | 'brushYHighlight' | 'brushHighlight' | InteractionComponent;
|
|
7
7
|
export type BrushInteraction = {
|
|
8
8
|
type?: 'brush';
|
|
9
9
|
brushType?: 'rect' | 'rectX' | 'rectY' | 'polygon';
|
|
10
10
|
};
|
|
11
11
|
export type BrushHighlightInteraction = {
|
|
12
12
|
type?: 'brushHighlight';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
reverse?: boolean;
|
|
14
|
+
shared?: boolean;
|
|
15
|
+
series?: boolean;
|
|
16
|
+
facet?: boolean;
|
|
17
|
+
} & Record<`${'mask' | 'highlighted' | 'unhighlighted'}${any}`, any>;
|
|
18
|
+
export type BrushXHighlightInteraction = {
|
|
19
|
+
type?: 'brushXHighlight';
|
|
20
|
+
reverse?: boolean;
|
|
21
|
+
shared?: boolean;
|
|
22
|
+
series?: boolean;
|
|
23
|
+
facet?: boolean;
|
|
24
|
+
} & Record<`${'mask' | 'highlighted' | 'unhighlighted'}${any}`, any>;
|
|
25
|
+
export type BrushYHighlightInteraction = {
|
|
26
|
+
type?: 'brushYHighlight';
|
|
27
|
+
reverse?: boolean;
|
|
28
|
+
shared?: boolean;
|
|
29
|
+
series?: boolean;
|
|
30
|
+
facet?: boolean;
|
|
31
|
+
} & Record<`${'mask' | 'highlighted' | 'unhighlighted'}${any}`, any>;
|
|
16
32
|
export type BrushVisibleInteraction = {
|
|
17
33
|
type?: 'brushVisible';
|
|
18
34
|
brushType?: 'rect' | 'rectX' | 'rectY' | 'polygon';
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
|
|
1
|
+
import { DisplayObject } from '@antv/g';
|
|
2
|
+
export type LabelTransform = OverlapHideTransform | OverlapDodgeYTransform | ContrastReverseTransform | OverflowHideTransform;
|
|
3
|
+
export type OverlapHideTransform = {
|
|
4
|
+
type?: 'overlapHide';
|
|
5
|
+
/**
|
|
6
|
+
* The hide priority, is the comparator for label.sort().
|
|
7
|
+
*/
|
|
8
|
+
priority?: (a: DisplayObject, b: DisplayObject) => number;
|
|
4
9
|
};
|
|
5
|
-
export type
|
|
6
|
-
type?: '
|
|
7
|
-
|
|
10
|
+
export type OverlapDodgeYTransform = {
|
|
11
|
+
type?: 'overlapDodgeY';
|
|
12
|
+
maxIterations?: number;
|
|
8
13
|
maxError?: number;
|
|
9
14
|
padding?: number;
|
|
10
15
|
};
|
|
11
|
-
export type
|
|
12
|
-
type
|
|
13
|
-
|
|
16
|
+
export type ContrastReverseTransform = {
|
|
17
|
+
type: 'contrastReverse';
|
|
18
|
+
/**
|
|
19
|
+
* Transform when the contrast ratio < threshold.
|
|
20
|
+
* Default is `4.5`.
|
|
21
|
+
*/
|
|
22
|
+
threshold?: number;
|
|
23
|
+
/**
|
|
24
|
+
* The optional color palette, default is [#000, #fff].
|
|
25
|
+
*/
|
|
26
|
+
palette?: string[];
|
|
14
27
|
};
|
|
15
|
-
export type
|
|
16
|
-
type
|
|
28
|
+
export type OverflowHideTransform = {
|
|
29
|
+
type: 'overflowHide';
|
|
17
30
|
};
|
package/esm/spec/theme.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Theme as ThemeOptions, ThemeComponent } from '../runtime/types/component';
|
|
2
|
-
export type Theme = LightTheme | DarkTheme | CustomTheme;
|
|
3
|
-
export type ThemeTypes = 'light' | 'dark' | ThemeComponent;
|
|
2
|
+
export type Theme = LightTheme | DarkTheme | AcademyTheme | CustomTheme;
|
|
3
|
+
export type ThemeTypes = 'light' | 'dark' | 'academy' | ThemeComponent;
|
|
4
4
|
export type LightTheme = {
|
|
5
5
|
type?: 'light';
|
|
6
6
|
} & ThemeOptions;
|
|
7
7
|
export type DarkTheme = {
|
|
8
8
|
type?: 'dark';
|
|
9
9
|
} & ThemeOptions;
|
|
10
|
+
export type AcademyTheme = {
|
|
11
|
+
type?: 'academy';
|
|
12
|
+
} & ThemeOptions;
|
|
10
13
|
export type CustomTheme = {
|
|
11
14
|
type?: ThemeComponent;
|
|
12
15
|
} & ThemeOptions;
|
package/esm/stdlib/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Cell, Interval, Rect, Line, Point as PointGeometry, Text as TextGeometr
|
|
|
4
4
|
import { Category10, Category20, SequentialBlue, SequentialDarkBlue, SequentialGreen, SequentialDarkGreen, SequentialGrey, SequentialOrange, SequentialPink, SequentialRed, SequentialYellow, SequentialPurple, SequentialYellowOrange, SequentialYellowGreen, SequentialPinkPurple, SequentialGreenBlue, DivergingGreenYellow, DivergingRedBlue, DivergingGreenRed, DivergingRedPurple, } from '../palette';
|
|
5
5
|
import { Linear, Ordinal, Band, Identity, Point, Time, Log, Pow, Threshold, Quantile, Quantize, Sqrt, Sequential, } from '../scale';
|
|
6
6
|
import { Rect as RectShape, HollowRect, Line as LineShape, HV, VH, HVH, Smooth, Bowtie, Cross, Diamond, Hexagon, HollowBowtie, HollowDiamond, HollowHexagon, HollowPoint, HollowSquare, HollowTriangle, HollowTriangleDown, Hyphen, LinePoint, Plus, Point as PointShape, Square, Tick, Triangle, TriangleDown, Text, Badge, LineXY, Connector as ConnectorShape, Area, SmoothArea, Step, SmoothEdge, VHVEdge, Arc, Image, Polygon, Ribbon, Box, Funnel, Pyramid, Vector, Link, Label, Path as PathShape, HollowPath, Shape as CustomShape, } from '../shape';
|
|
7
|
-
import { Light, Dark } from '../theme';
|
|
7
|
+
import { Light, Dark, Academy } from '../theme';
|
|
8
8
|
import { AxisX, AxisY, LegendCategory, LegendContinuous, TitleComponent, SliderX, SliderY, } from '../component';
|
|
9
9
|
import { ScaleInX, ScaleOutX, ScaleInY, ScaleOutY, WaveIn, FadeIn, FadeOut, Morphing, ZoomIn, ZoomOut, PathIn, GrowInX, GrowInY, } from '../animation';
|
|
10
10
|
import {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
// ElementSelected,
|
|
13
13
|
// Tooltip,
|
|
14
14
|
// Fisheye as FisheyeInteraction,
|
|
15
|
-
ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter,
|
|
15
|
+
ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, ElementSelectByX, ElementSelectByColor, ChartIndex, Fisheye as ChartFisheye, Tooltip, LegendFilter, BrushHighlight, BrushXHighlight, BrushYHighlight,
|
|
16
16
|
// ElementHighlightByX,
|
|
17
17
|
// ElementHighlightByColor,
|
|
18
18
|
// ElementListHighlight,
|
|
@@ -27,12 +27,12 @@ ElementHighlight, ElementHighlightByX, ElementHighlightByColor, ElementSelect, E
|
|
|
27
27
|
import { SpaceLayer, SpaceFlex, Mark, View, FacetRect, FacetCircle, RepeatMatrix, TimingKeyframe, } from '../composition';
|
|
28
28
|
import { MaybeTitle, MaybeZeroX, MaybeZeroY1, MaybeStackY, MaybeSeries, MaybeZeroY, MaybeSize, MaybeKey, StackY, DodgeX, StackEnter, NormalizeY, Jitter, JitterX, SymmetryY, DiffY, Select, SelectX, SelectY, GroupX, Group, SortX, FlexX, MaybeTupleY, MaybeTupleX, MaybeIdentityY, MaybeIdentityX, MaybeZeroPadding, MaybeTuple, SortY, GroupY, GroupColor, SortColor, Pack, BinX, Bin, MaybeVisualPosition, MaybeFunctionAttribute, MaybeGradient, MaybeTooltip, Sample, Filter, } from '../transform';
|
|
29
29
|
import { Fetch, SortBy, Filter as DataFilter, Map, Pick, Rename, Subset, Fold, Inline, Custom, Cluster, Tree, Sankey as SankeyTransform, Arc as ArcTransform, WordCloud, Join, Sort, } from '../data';
|
|
30
|
-
import {
|
|
30
|
+
import { OverlapDodgeY, OverflowHide, ContrastReverse, OverlapHide, } from '../label-transform';
|
|
31
31
|
import { geoLibrary } from '../geo';
|
|
32
32
|
export function createLibrary() {
|
|
33
33
|
return Object.assign({ 'data.fetch': Fetch, 'data.inline': Inline, 'data.sortBy': SortBy, 'data.sort': Sort, 'data.filter': DataFilter, 'data.pick': Pick, 'data.rename': Rename, 'data.subset': Subset, 'data.fold': Fold, 'data.custom': Custom, 'data.map': Map, 'data.cluster': Cluster, 'data.tree': Tree, 'data.sankey': SankeyTransform, 'data.arc': ArcTransform, 'data.wordCloud': WordCloud, 'data.join': Join,
|
|
34
34
|
// 'transform.voronoi': Voronoi,
|
|
35
|
-
'transform.maybeZeroY1': MaybeZeroY1, 'transform.maybeZeroX': MaybeZeroX, 'transform.maybeStackY': MaybeStackY, 'transform.maybeTitle': MaybeTitle, 'transform.maybeSeries': MaybeSeries, 'transform.maybeZeroPadding': MaybeZeroPadding, 'transform.stackY': StackY, 'transform.binX': BinX, 'transform.bin': Bin, 'transform.dodgeX': DodgeX, 'transform.jitter': Jitter, 'transform.jitterX': JitterX, 'transform.symmetryY': SymmetryY, 'transform.diffY': DiffY, 'transform.stackEnter': StackEnter, 'transform.normalizeY': NormalizeY, 'transform.select': Select, 'transform.selectX': SelectX, 'transform.selectY': SelectY, 'transform.groupX': GroupX, 'transform.groupY': GroupY, 'transform.groupColor': GroupColor, 'transform.group': Group, 'transform.maybeSize': MaybeSize, 'transform.maybeZeroY': MaybeZeroY, 'transform.maybeKey': MaybeKey, 'transform.sortX': SortX, 'transform.sortY': SortY, 'transform.sortColor': SortColor, 'transform.flexX': FlexX, 'transform.maybeTupleY': MaybeTupleY, 'transform.maybeTupleX': MaybeTupleX, 'transform.maybeIdentityY': MaybeIdentityY, 'transform.maybeIdentityX': MaybeIdentityX, 'transform.maybeTuple': MaybeTuple, 'transform.maybeVisualPosition': MaybeVisualPosition, 'transform.maybeFunctionAttribute': MaybeFunctionAttribute, 'transform.maybeGradient': MaybeGradient, 'transform.maybeTooltip': MaybeTooltip, 'transform.pack': Pack, 'transform.sample': Sample, 'transform.filter': Filter, 'coordinate.cartesian': Cartesian, 'coordinate.polar': Polar, 'coordinate.helix': Helix, 'coordinate.transpose': Transpose, 'coordinate.theta': Theta, 'coordinate.reflect': Reflect, 'coordinate.reflectX': ReflectX, 'coordinate.reflectY': ReflectY, 'coordinate.parallel': Parallel, 'coordinate.fisheye': Fisheye, 'coordinate.fisheyeX': FisheyeX, 'coordinate.fisheyeY': FisheyeY, 'coordinate.radial': Radial, 'encode.constant': Constant, 'encode.field': Field, 'encode.transform': Transform, 'encode.column': Column, 'mark.interval': Interval, 'mark.rect': Rect, 'mark.line': Line, 'mark.point': PointGeometry, 'mark.text': TextGeometry, 'mark.cell': Cell, 'mark.area': AreaGeometry, 'mark.link': LinkGeometry, 'mark.image': ImageGeometry, 'mark.polygon': PolygonGeometry, 'mark.box': BoxGeometry, 'mark.vector': VectorGeometry, 'mark.lineX': LineX, 'mark.lineY': LineY, 'mark.connector': Connector, 'mark.range': Range, 'mark.rangeX': RangeX, 'mark.rangeY': RangeY, 'mark.sankey': Sankey, 'mark.path': Path, 'mark.treemap': Treemap, 'mark.pack': PackGeometry, 'mark.boxplot': Boxplot, 'mark.shape': Shape, 'mark.forceGraph': ForceGraph, 'mark.tree': TreeGeometry, 'mark.wordCloud': WordCloudGeometry, 'palette.category10': Category10, 'palette.category20': Category20, 'palette.sequentialBlue': SequentialBlue, 'palette.sequentialDarkBlue': SequentialDarkBlue, 'palette.sequentialGreen': SequentialGreen, 'palette.sequentialDarkGreen': SequentialDarkGreen, 'palette.sequentialGrey': SequentialGrey, 'palette.sequentialOrange': SequentialOrange, 'palette.sequentialPink': SequentialPink, 'palette.sequentialRed': SequentialRed, 'palette.sequentialYellow': SequentialYellow, 'palette.sequentialPurple': SequentialPurple, 'palette.sequentialYellowOrange': SequentialYellowOrange, 'palette.sequentialYellowGreen': SequentialYellowGreen, 'palette.sequentialPinkPurple': SequentialPinkPurple, 'palette.sequentialGreenBlue': SequentialGreenBlue, 'palette.divergingGreenYellow': DivergingGreenYellow, 'palette.divergingRedBlue': DivergingRedBlue, 'palette.divergingGreenRed': DivergingGreenRed, 'palette.divergingRedPurple': DivergingRedPurple, 'scale.linear': Linear, 'scale.ordinal': Ordinal, 'scale.band': Band, 'scale.identity': Identity, 'scale.point': Point, 'scale.time': Time, 'scale.log': Log, 'scale.pow': Pow, 'scale.sqrt': Sqrt, 'scale.threshold': Threshold, 'scale.quantile': Quantile, 'scale.quantize': Quantize, 'scale.sequential': Sequential, 'shape.interval.rect': RectShape, 'shape.interval.hollow': HollowRect, 'shape.interval.funnel': Funnel, 'shape.interval.pyramid': Pyramid, 'shape.rect.rect': RectShape, 'shape.rect.hollow': HollowRect, 'shape.cell.cell': RectShape, 'shape.cell.hollow': HollowRect, 'shape.line.line': LineShape, 'shape.line.hv': HV, 'shape.line.vh': VH, 'shape.line.hvh': HVH, 'shape.line.smooth': Smooth, 'shape.point.bowtie': Bowtie, 'shape.point.cross': Cross, 'shape.point.diamond': Diamond, 'shape.point.hexagon': Hexagon, 'shape.point.hollowBowtie': HollowBowtie, 'shape.point.hollowDiamond': HollowDiamond, 'shape.point.hollowHexagon': HollowHexagon, 'shape.point.hollow': HollowPoint, 'shape.point.hollowSquare': HollowSquare, 'shape.point.hollowTriangle': HollowTriangle, 'shape.point.hollowTriangleDown': HollowTriangleDown, 'shape.point.hyphen': Hyphen, 'shape.point.line': LinePoint, 'shape.point.plus': Plus, 'shape.point.point': PointShape, 'shape.point.square': Square, 'shape.point.tick': Tick, 'shape.point.triangle': Triangle, 'shape.point.triangleDown': TriangleDown, 'shape.text.text': Text, 'shape.area.area': Area, 'shape.area.smooth': SmoothArea, 'shape.area.step': Step, 'shape.link.smooth': SmoothEdge, 'shape.link.vhv': VHVEdge, 'shape.link.arc': Arc, 'shape.link.link': Link, 'shape.image.image': Image, 'shape.polygon.polygon': Polygon, 'shape.polygon.ribbon': Ribbon, 'shape.box.box': Box, 'shape.vector.vector': Vector, 'shape.label.label': Label, 'shape.text.badge': Badge, 'shape.lineX.line': LineXY, 'shape.lineY.line': LineXY, 'shape.shape.shape': CustomShape, 'shape.connector.connector': ConnectorShape, 'shape.range.range': RectShape, 'shape.rangeX.range': RectShape, 'shape.rangeY.range': RectShape, 'shape.path.path': PathShape, 'shape.path.hollow': HollowPath, 'theme.light': Light, 'theme.dark': Dark, 'component.axisX': AxisX, 'component.axisY': AxisY, 'component.legendCategory': LegendCategory, 'component.legendContinuous': LegendContinuous, 'component.title': TitleComponent, 'component.sliderX': SliderX, 'component.sliderY': SliderY, 'animation.scaleInX': ScaleInX, 'animation.scaleOutX': ScaleOutX, 'animation.scaleInY': ScaleInY, 'animation.scaleOutY': ScaleOutY, 'animation.waveIn': WaveIn, 'animation.fadeIn': FadeIn, 'animation.fadeOut': FadeOut, 'animation.zoomIn': ZoomIn, 'animation.zoomOut': ZoomOut, 'animation.pathIn': PathIn, 'animation.morphing': Morphing, 'animation.growInX': GrowInX, 'animation.growInY': GrowInY, 'interaction.elementHighlight': ElementHighlight, 'interaction.elementHighlightByX': ElementHighlightByX, 'interaction.elementHighlightByColor': ElementHighlightByColor, 'interaction.elementSelect': ElementSelect, 'interaction.elementSelectByX': ElementSelectByX, 'interaction.elementSelectByColor': ElementSelectByColor, 'interaction.fisheye': ChartFisheye, 'interaction.chartIndex': ChartIndex, 'interaction.tooltip': Tooltip, 'interaction.legendFilter': LegendFilter,
|
|
35
|
+
'transform.maybeZeroY1': MaybeZeroY1, 'transform.maybeZeroX': MaybeZeroX, 'transform.maybeStackY': MaybeStackY, 'transform.maybeTitle': MaybeTitle, 'transform.maybeSeries': MaybeSeries, 'transform.maybeZeroPadding': MaybeZeroPadding, 'transform.stackY': StackY, 'transform.binX': BinX, 'transform.bin': Bin, 'transform.dodgeX': DodgeX, 'transform.jitter': Jitter, 'transform.jitterX': JitterX, 'transform.symmetryY': SymmetryY, 'transform.diffY': DiffY, 'transform.stackEnter': StackEnter, 'transform.normalizeY': NormalizeY, 'transform.select': Select, 'transform.selectX': SelectX, 'transform.selectY': SelectY, 'transform.groupX': GroupX, 'transform.groupY': GroupY, 'transform.groupColor': GroupColor, 'transform.group': Group, 'transform.maybeSize': MaybeSize, 'transform.maybeZeroY': MaybeZeroY, 'transform.maybeKey': MaybeKey, 'transform.sortX': SortX, 'transform.sortY': SortY, 'transform.sortColor': SortColor, 'transform.flexX': FlexX, 'transform.maybeTupleY': MaybeTupleY, 'transform.maybeTupleX': MaybeTupleX, 'transform.maybeIdentityY': MaybeIdentityY, 'transform.maybeIdentityX': MaybeIdentityX, 'transform.maybeTuple': MaybeTuple, 'transform.maybeVisualPosition': MaybeVisualPosition, 'transform.maybeFunctionAttribute': MaybeFunctionAttribute, 'transform.maybeGradient': MaybeGradient, 'transform.maybeTooltip': MaybeTooltip, 'transform.pack': Pack, 'transform.sample': Sample, 'transform.filter': Filter, 'coordinate.cartesian': Cartesian, 'coordinate.polar': Polar, 'coordinate.helix': Helix, 'coordinate.transpose': Transpose, 'coordinate.theta': Theta, 'coordinate.reflect': Reflect, 'coordinate.reflectX': ReflectX, 'coordinate.reflectY': ReflectY, 'coordinate.parallel': Parallel, 'coordinate.fisheye': Fisheye, 'coordinate.fisheyeX': FisheyeX, 'coordinate.fisheyeY': FisheyeY, 'coordinate.radial': Radial, 'encode.constant': Constant, 'encode.field': Field, 'encode.transform': Transform, 'encode.column': Column, 'mark.interval': Interval, 'mark.rect': Rect, 'mark.line': Line, 'mark.point': PointGeometry, 'mark.text': TextGeometry, 'mark.cell': Cell, 'mark.area': AreaGeometry, 'mark.link': LinkGeometry, 'mark.image': ImageGeometry, 'mark.polygon': PolygonGeometry, 'mark.box': BoxGeometry, 'mark.vector': VectorGeometry, 'mark.lineX': LineX, 'mark.lineY': LineY, 'mark.connector': Connector, 'mark.range': Range, 'mark.rangeX': RangeX, 'mark.rangeY': RangeY, 'mark.sankey': Sankey, 'mark.path': Path, 'mark.treemap': Treemap, 'mark.pack': PackGeometry, 'mark.boxplot': Boxplot, 'mark.shape': Shape, 'mark.forceGraph': ForceGraph, 'mark.tree': TreeGeometry, 'mark.wordCloud': WordCloudGeometry, 'palette.category10': Category10, 'palette.category20': Category20, 'palette.sequentialBlue': SequentialBlue, 'palette.sequentialDarkBlue': SequentialDarkBlue, 'palette.sequentialGreen': SequentialGreen, 'palette.sequentialDarkGreen': SequentialDarkGreen, 'palette.sequentialGrey': SequentialGrey, 'palette.sequentialOrange': SequentialOrange, 'palette.sequentialPink': SequentialPink, 'palette.sequentialRed': SequentialRed, 'palette.sequentialYellow': SequentialYellow, 'palette.sequentialPurple': SequentialPurple, 'palette.sequentialYellowOrange': SequentialYellowOrange, 'palette.sequentialYellowGreen': SequentialYellowGreen, 'palette.sequentialPinkPurple': SequentialPinkPurple, 'palette.sequentialGreenBlue': SequentialGreenBlue, 'palette.divergingGreenYellow': DivergingGreenYellow, 'palette.divergingRedBlue': DivergingRedBlue, 'palette.divergingGreenRed': DivergingGreenRed, 'palette.divergingRedPurple': DivergingRedPurple, 'scale.linear': Linear, 'scale.ordinal': Ordinal, 'scale.band': Band, 'scale.identity': Identity, 'scale.point': Point, 'scale.time': Time, 'scale.log': Log, 'scale.pow': Pow, 'scale.sqrt': Sqrt, 'scale.threshold': Threshold, 'scale.quantile': Quantile, 'scale.quantize': Quantize, 'scale.sequential': Sequential, 'shape.interval.rect': RectShape, 'shape.interval.hollow': HollowRect, 'shape.interval.funnel': Funnel, 'shape.interval.pyramid': Pyramid, 'shape.rect.rect': RectShape, 'shape.rect.hollow': HollowRect, 'shape.cell.cell': RectShape, 'shape.cell.hollow': HollowRect, 'shape.line.line': LineShape, 'shape.line.hv': HV, 'shape.line.vh': VH, 'shape.line.hvh': HVH, 'shape.line.smooth': Smooth, 'shape.point.bowtie': Bowtie, 'shape.point.cross': Cross, 'shape.point.diamond': Diamond, 'shape.point.hexagon': Hexagon, 'shape.point.hollowBowtie': HollowBowtie, 'shape.point.hollowDiamond': HollowDiamond, 'shape.point.hollowHexagon': HollowHexagon, 'shape.point.hollow': HollowPoint, 'shape.point.hollowSquare': HollowSquare, 'shape.point.hollowTriangle': HollowTriangle, 'shape.point.hollowTriangleDown': HollowTriangleDown, 'shape.point.hyphen': Hyphen, 'shape.point.line': LinePoint, 'shape.point.plus': Plus, 'shape.point.point': PointShape, 'shape.point.square': Square, 'shape.point.tick': Tick, 'shape.point.triangle': Triangle, 'shape.point.triangleDown': TriangleDown, 'shape.text.text': Text, 'shape.area.area': Area, 'shape.area.smooth': SmoothArea, 'shape.area.step': Step, 'shape.link.smooth': SmoothEdge, 'shape.link.vhv': VHVEdge, 'shape.link.arc': Arc, 'shape.link.link': Link, 'shape.image.image': Image, 'shape.polygon.polygon': Polygon, 'shape.polygon.ribbon': Ribbon, 'shape.box.box': Box, 'shape.vector.vector': Vector, 'shape.label.label': Label, 'shape.text.badge': Badge, 'shape.lineX.line': LineXY, 'shape.lineY.line': LineXY, 'shape.shape.shape': CustomShape, 'shape.connector.connector': ConnectorShape, 'shape.range.range': RectShape, 'shape.rangeX.range': RectShape, 'shape.rangeY.range': RectShape, 'shape.path.path': PathShape, 'shape.path.hollow': HollowPath, 'theme.light': Light, 'theme.dark': Dark, 'theme.academy': Academy, 'component.axisX': AxisX, 'component.axisY': AxisY, 'component.legendCategory': LegendCategory, 'component.legendContinuous': LegendContinuous, 'component.title': TitleComponent, 'component.sliderX': SliderX, 'component.sliderY': SliderY, 'animation.scaleInX': ScaleInX, 'animation.scaleOutX': ScaleOutX, 'animation.scaleInY': ScaleInY, 'animation.scaleOutY': ScaleOutY, 'animation.waveIn': WaveIn, 'animation.fadeIn': FadeIn, 'animation.fadeOut': FadeOut, 'animation.zoomIn': ZoomIn, 'animation.zoomOut': ZoomOut, 'animation.pathIn': PathIn, 'animation.morphing': Morphing, 'animation.growInX': GrowInX, 'animation.growInY': GrowInY, 'interaction.elementHighlight': ElementHighlight, 'interaction.elementHighlightByX': ElementHighlightByX, 'interaction.elementHighlightByColor': ElementHighlightByColor, 'interaction.elementSelect': ElementSelect, 'interaction.elementSelectByX': ElementSelectByX, 'interaction.elementSelectByColor': ElementSelectByColor, 'interaction.fisheye': ChartFisheye, 'interaction.chartIndex': ChartIndex, 'interaction.tooltip': Tooltip, 'interaction.legendFilter': LegendFilter, 'interaction.brushHighlight': BrushHighlight, 'interaction.brushXHighlight': BrushXHighlight, 'interaction.brushYHighlight': BrushYHighlight,
|
|
36
36
|
// 'interaction.elementSelected': ElementSelected,
|
|
37
37
|
// 'interaction.elementHighlight': ElementHighlight,
|
|
38
38
|
// 'interaction.elementHighlightByX': ElementHighlightByX,
|
|
@@ -43,10 +43,9 @@ export function createLibrary() {
|
|
|
43
43
|
// 'interaction.tooltip': Tooltip,
|
|
44
44
|
// 'interaction.fisheye': FisheyeInteraction,
|
|
45
45
|
// 'interaction.brush': Brush,
|
|
46
|
-
// 'interaction.brushHighlight': BrushHighlight,
|
|
47
46
|
// 'interaction.brushVisible': BrushVisible,
|
|
48
47
|
// 'interaction.activeRegion': ActiveRegion,
|
|
49
48
|
// 'interaction.ellipsisText': EllipsisText,
|
|
50
|
-
'composition.spaceLayer': SpaceLayer, 'composition.spaceFlex': SpaceFlex, 'composition.mark': Mark, 'composition.view': View, 'composition.facetRect': FacetRect, 'composition.repeatMatrix': RepeatMatrix, 'composition.facetCircle': FacetCircle, 'composition.timingKeyframe': TimingKeyframe, 'labelTransform.
|
|
49
|
+
'composition.spaceLayer': SpaceLayer, 'composition.spaceFlex': SpaceFlex, 'composition.mark': Mark, 'composition.view': View, 'composition.facetRect': FacetRect, 'composition.repeatMatrix': RepeatMatrix, 'composition.facetCircle': FacetCircle, 'composition.timingKeyframe': TimingKeyframe, 'labelTransform.overlapHide': OverlapHide, 'labelTransform.overlapDodgeY': OverlapDodgeY, 'labelTransform.overflowHide': OverflowHide, 'labelTransform.contrastReverse': ContrastReverse }, geoLibrary);
|
|
51
50
|
}
|
|
52
51
|
//# sourceMappingURL=index.js.map
|
package/esm/stdlib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["stdlib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,IAAI,aAAa,EACtB,IAAI,IAAI,YAAY,EACpB,IAAI,IAAI,YAAY,EACpB,KAAK,IAAI,aAAa,EACtB,OAAO,IAAI,eAAe,EAC1B,GAAG,IAAI,WAAW,EAClB,MAAM,IAAI,cAAc,EACxB,IAAI,IAAI,YAAY,EACpB,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,I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,EACV,KAAK,IAAI,WAAW,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["stdlib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,IAAI,aAAa,EACtB,IAAI,IAAI,YAAY,EACpB,IAAI,IAAI,YAAY,EACpB,KAAK,IAAI,aAAa,EACtB,OAAO,IAAI,eAAe,EAC1B,GAAG,IAAI,WAAW,EAClB,MAAM,IAAI,cAAc,EACxB,IAAI,IAAI,YAAY,EACpB,KAAK,EACL,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,IAAI,EACJ,OAAO,EACP,IAAI,IAAI,YAAY,EACpB,KAAK,EACL,OAAO,EACP,UAAU,EACV,IAAI,IAAI,YAAY,EACpB,SAAS,IAAI,iBAAiB,GAC/B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,UAAU,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC;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