@antv/g2 5.0.0-alpha.3 → 5.0.0-alpha.4
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 +2 -2
- package/dist/g2.min.js +2 -2
- package/esm/animation/fadeIn.d.ts +2 -2
- package/esm/animation/fadeOut.d.ts +2 -2
- package/esm/animation/growInX.d.ts +7 -0
- package/esm/animation/growInX.js +26 -0
- package/esm/animation/growInX.js.map +1 -0
- package/esm/animation/growInY.d.ts +7 -0
- package/esm/animation/growInY.js +26 -0
- package/esm/animation/growInY.js.map +1 -0
- package/esm/animation/index.d.ts +6 -0
- package/esm/animation/index.js +3 -0
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/morphing.d.ts +4 -4
- package/esm/animation/morphing.js +49 -12
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/pathIn.d.ts +7 -0
- package/esm/animation/pathIn.js +18 -0
- package/esm/animation/pathIn.js.map +1 -0
- package/esm/animation/scaleInX.d.ts +2 -2
- package/esm/animation/scaleInY.d.ts +2 -2
- package/esm/animation/scaleOutX.d.ts +2 -2
- package/esm/animation/scaleOutY.d.ts +2 -2
- package/esm/animation/types.d.ts +6 -0
- package/esm/animation/types.js +2 -0
- package/esm/animation/types.js.map +1 -0
- package/esm/animation/waveIn.d.ts +2 -2
- package/esm/animation/waveIn.js +28 -2
- package/esm/animation/waveIn.js.map +1 -1
- package/esm/animation/zoomIn.d.ts +2 -2
- package/esm/animation/zoomOut.d.ts +2 -2
- package/esm/api/chart.d.ts +8 -4
- package/esm/api/chart.js +19 -3
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/facetCircle.d.ts +3 -6
- package/esm/api/composition/facetCircle.js +2 -5
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +3 -8
- package/esm/api/composition/facetRect.js +2 -7
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +21 -0
- package/esm/api/composition/geoPath.js +30 -0
- package/esm/api/composition/geoPath.js.map +1 -0
- package/esm/api/composition/geoView.d.ts +21 -0
- package/esm/api/composition/geoView.js +29 -0
- package/esm/api/composition/geoView.js.map +1 -0
- package/esm/api/composition/index.d.ts +7 -1
- package/esm/api/composition/index.js +5 -1
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +3 -6
- package/esm/api/composition/repeatMatrix.js +2 -5
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +1 -5
- package/esm/api/composition/spaceFlex.js +1 -8
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +1 -2
- package/esm/api/composition/spaceLayer.js +1 -5
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -7
- package/esm/api/composition/timingKeyframe.js +1 -8
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +7 -8
- package/esm/api/composition/view.js +6 -7
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/mark/index.d.ts +17 -1
- package/esm/api/mark/index.js +9 -1
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +49 -1
- package/esm/api/mark/mark.js +74 -11
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +4 -12
- package/esm/api/props.d.ts +1 -1
- package/esm/api/types.d.ts +7 -7
- package/esm/component/axis.d.ts +2 -2
- package/esm/component/axis.js +23 -25
- package/esm/component/axis.js.map +1 -1
- package/esm/component/axisX.d.ts +1 -1
- package/esm/component/axisY.d.ts +1 -1
- package/esm/component/legendCategory.d.ts +2 -2
- package/esm/component/legendCategory.js +2 -2
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +1 -1
- package/esm/component/title.d.ts +1 -1
- package/esm/component/utils.d.ts +1 -1
- package/esm/composition/facetCircle.d.ts +1 -1
- package/esm/composition/facetCircle.js +2 -2
- package/esm/composition/facetCircle.js.map +1 -1
- package/esm/composition/facetRect.d.ts +2 -2
- package/esm/composition/facetRect.js +8 -10
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/mark.d.ts +1 -1
- package/esm/composition/mark.js +3 -3
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.d.ts +1 -1
- package/esm/composition/repeatMatrix.js +4 -4
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/composition/spaceFlex.d.ts +1 -1
- package/esm/composition/spaceLayer.d.ts +1 -1
- package/esm/composition/timingKeyframe.d.ts +1 -1
- package/esm/composition/timingKeyframe.js +7 -8
- package/esm/composition/timingKeyframe.js.map +1 -1
- package/esm/composition/utils.d.ts +1 -1
- package/esm/composition/view.d.ts +1 -1
- package/esm/coordinate/cartesian.d.ts +1 -1
- package/esm/coordinate/fisheye.d.ts +1 -1
- package/esm/coordinate/fisheyeX.d.ts +1 -1
- package/esm/coordinate/fisheyeY.d.ts +1 -1
- package/esm/coordinate/helix.d.ts +1 -1
- package/esm/coordinate/parallel.d.ts +1 -1
- package/esm/coordinate/polar.d.ts +1 -1
- package/esm/coordinate/radial.d.ts +1 -1
- package/esm/coordinate/reflect.d.ts +1 -1
- package/esm/coordinate/reflectX.d.ts +1 -1
- package/esm/coordinate/reflectY.d.ts +1 -1
- package/esm/coordinate/theta.d.ts +1 -1
- package/esm/coordinate/transpose.d.ts +1 -1
- package/esm/data/arc.d.ts +1 -1
- package/esm/data/cluster.d.ts +1 -1
- package/esm/data/custom.d.ts +1 -1
- package/esm/data/fetch.d.ts +1 -1
- package/esm/data/fetch.js.map +1 -1
- package/esm/data/filter.d.ts +9 -0
- package/esm/data/filter.js +13 -0
- package/esm/data/filter.js.map +1 -0
- package/esm/data/fold.d.ts +1 -1
- package/esm/data/index.d.ts +4 -2
- package/esm/data/index.js +2 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/inline.d.ts +1 -1
- package/esm/data/join.d.ts +7 -0
- package/esm/data/join.js +22 -0
- package/esm/data/join.js.map +1 -0
- package/esm/data/map.d.ts +1 -1
- package/esm/data/pick.d.ts +1 -1
- package/esm/data/rename.d.ts +1 -1
- package/esm/data/rename.js +2 -3
- package/esm/data/rename.js.map +1 -1
- package/esm/data/sankey.d.ts +1 -1
- package/esm/data/sortBy.d.ts +1 -1
- package/esm/data/subset.d.ts +1 -1
- package/esm/data/tree.d.ts +1 -1
- package/esm/data/utils/arc/types.d.ts +2 -2
- package/esm/data/utils/flow.d.ts +1 -1
- package/esm/data/wordCloud.d.ts +1 -1
- package/esm/encode/column.d.ts +1 -1
- package/esm/encode/constant.d.ts +1 -1
- package/esm/encode/field.d.ts +1 -1
- package/esm/encode/transform.d.ts +1 -1
- package/esm/geo/d3-projection.d.ts +1 -0
- package/esm/geo/d3-projection.js +2 -0
- package/esm/geo/d3-projection.js.map +1 -0
- package/esm/geo/geoPath.d.ts +7 -0
- package/esm/geo/geoPath.js +36 -0
- package/esm/geo/geoPath.js.map +1 -0
- package/esm/geo/geoView.d.ts +7 -0
- package/esm/geo/geoView.js +215 -0
- package/esm/geo/geoView.js.map +1 -0
- package/esm/geo/index.d.ts +9 -0
- package/esm/geo/index.js +8 -0
- package/esm/geo/index.js.map +1 -0
- package/esm/interaction/action/service/elementSelection.d.ts +1 -1
- package/esm/interaction/action/service/elementSelection.js +1 -1
- package/esm/interaction/action/service/elementSelection.js.map +1 -1
- package/esm/interaction/action/service/fisheyeFocus.d.ts +1 -1
- package/esm/interaction/action/service/legendItemSelection.d.ts +1 -1
- package/esm/interaction/action/service/recordCurrentPoint.d.ts +1 -1
- package/esm/interaction/action/service/recordPoint.d.ts +1 -1
- package/esm/interaction/action/service/recordRegion.d.ts +1 -1
- package/esm/interaction/action/service/recordState.d.ts +1 -1
- package/esm/interaction/action/service/recordTip.d.ts +1 -1
- package/esm/interaction/action/service/surfacePointSelection.d.ts +1 -1
- package/esm/interaction/action/service/triggerInfoSelection.d.ts +1 -1
- package/esm/interaction/action/transformer/activeElement.d.ts +1 -1
- package/esm/interaction/action/transformer/activeRegion.d.ts +1 -1
- package/esm/interaction/action/transformer/button.d.ts +1 -1
- package/esm/interaction/action/transformer/cursor.d.ts +1 -1
- package/esm/interaction/action/transformer/filter.d.ts +2 -2
- package/esm/interaction/action/transformer/filter.js +6 -4
- package/esm/interaction/action/transformer/filter.js.map +1 -1
- package/esm/interaction/action/transformer/filterElement.d.ts +1 -1
- package/esm/interaction/action/transformer/highlightElement.d.ts +1 -1
- package/esm/interaction/action/transformer/mask.d.ts +1 -1
- package/esm/interaction/action/transformer/move.d.ts +1 -1
- package/esm/interaction/action/transformer/plot.d.ts +1 -1
- package/esm/interaction/action/transformer/poptip.d.ts +1 -1
- package/esm/interaction/action/transformer/setItemState.d.ts +1 -1
- package/esm/interaction/action/transformer/tooltip.d.ts +1 -1
- package/esm/interaction/builtin/activeRegion.d.ts +1 -1
- package/esm/interaction/builtin/brush.d.ts +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/builtin/brushVisible.d.ts +1 -1
- package/esm/interaction/builtin/elementActive.d.ts +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +1 -1
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +5 -3
- package/esm/interaction/builtin/elementHighlightByColor.js +1 -1
- package/esm/interaction/builtin/elementHighlightByColor.js.map +1 -1
- package/esm/interaction/builtin/elementHighlightByX.d.ts +5 -3
- package/esm/interaction/builtin/elementHighlightByX.js +1 -1
- package/esm/interaction/builtin/elementHighlightByX.js.map +1 -1
- package/esm/interaction/builtin/elementListHighlight.d.ts +1 -1
- package/esm/interaction/builtin/elementSelected.d.ts +1 -1
- package/esm/interaction/builtin/ellipsisText.d.ts +1 -1
- package/esm/interaction/builtin/fisheye.d.ts +1 -1
- package/esm/interaction/builtin/legendActive.d.ts +1 -1
- package/esm/interaction/builtin/legendHighlight.d.ts +1 -1
- package/esm/interaction/builtin/tooltip.d.ts +9 -5
- package/esm/interaction/index.d.ts +4 -3
- package/esm/interaction/index.js +4 -3
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/interactor/mousePosition.d.ts +1 -1
- package/esm/interaction/interactor/touchPosition.d.ts +1 -1
- package/esm/interaction/native/chartIndex.js +6 -2
- package/esm/interaction/native/chartIndex.js.map +1 -1
- package/esm/interaction/native/elementHighlight.d.ts +10 -0
- package/esm/interaction/native/{elementActive.js → elementHighlight.js} +9 -9
- package/esm/interaction/native/elementHighlight.js.map +1 -0
- package/esm/interaction/native/elementHighlightByColor.d.ts +4 -0
- package/esm/interaction/native/elementHighlightByColor.js +12 -0
- package/esm/interaction/native/elementHighlightByColor.js.map +1 -0
- package/esm/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
- package/esm/interaction/native/elementHighlightByX.js +13 -0
- package/esm/interaction/native/elementHighlightByX.js.map +1 -0
- package/esm/interaction/native/elementSelect.js +2 -2
- package/esm/interaction/native/elementSelect.js.map +1 -1
- package/esm/interaction/native/elementSelectByColor.js +2 -2
- package/esm/interaction/native/elementSelectByColor.js.map +1 -1
- package/esm/interaction/native/elementSelectByX.js +2 -2
- package/esm/interaction/native/elementSelectByX.js.map +1 -1
- package/esm/interaction/native/fisheye.js +8 -5
- package/esm/interaction/native/fisheye.js.map +1 -1
- package/esm/interaction/native/tooltip.d.ts +11 -0
- package/esm/interaction/native/tooltip.js +279 -0
- package/esm/interaction/native/tooltip.js.map +1 -0
- package/esm/interaction/native/utils.d.ts +1 -1
- package/esm/interaction/native/utils.js +2 -2
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/interaction/types.d.ts +16 -16
- package/esm/label-transform/dodgeY.d.ts +1 -1
- package/esm/label-transform/dodgeY.js +9 -1
- package/esm/label-transform/dodgeY.js.map +1 -1
- package/esm/label-transform/hideOverlap.d.ts +1 -1
- package/esm/label-transform/hideOverlap.js +14 -4
- package/esm/label-transform/hideOverlap.js.map +1 -1
- package/esm/label-transform/index.d.ts +4 -0
- package/esm/label-transform/index.js +2 -0
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/spider.d.ts +7 -0
- package/esm/label-transform/spider.js +30 -0
- package/esm/label-transform/spider.js.map +1 -0
- package/esm/label-transform/surround.d.ts +7 -0
- package/esm/label-transform/surround.js +30 -0
- package/esm/label-transform/surround.js.map +1 -0
- package/esm/mark/area.d.ts +1 -1
- package/esm/mark/area.js +9 -8
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/box.d.ts +1 -1
- package/esm/mark/box.js +7 -9
- package/esm/mark/box.js.map +1 -1
- package/esm/mark/boxplot.d.ts +4 -0
- package/esm/mark/boxplot.js +104 -0
- package/esm/mark/boxplot.js.map +1 -0
- package/esm/mark/cell.d.ts +1 -1
- package/esm/mark/cell.js +4 -8
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/connector.d.ts +1 -1
- package/esm/mark/connector.js +2 -2
- package/esm/mark/connector.js.map +1 -1
- package/esm/mark/forceGraph.d.ts +4 -0
- package/esm/mark/forceGraph.js +95 -0
- package/esm/mark/forceGraph.js.map +1 -0
- package/esm/mark/image.d.ts +1 -1
- package/esm/mark/image.js +12 -9
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/index.d.ts +16 -0
- package/esm/mark/index.js +9 -0
- package/esm/mark/index.js.map +1 -1
- package/esm/mark/interval.d.ts +1 -1
- package/esm/mark/interval.js +7 -8
- package/esm/mark/interval.js.map +1 -1
- package/esm/mark/line.d.ts +1 -1
- package/esm/mark/line.js +13 -9
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/lineX.d.ts +1 -1
- package/esm/mark/lineX.js +5 -2
- package/esm/mark/lineX.js.map +1 -1
- package/esm/mark/lineY.d.ts +1 -1
- package/esm/mark/lineY.js +5 -2
- package/esm/mark/lineY.js.map +1 -1
- package/esm/mark/link.d.ts +1 -1
- package/esm/mark/link.js +4 -8
- package/esm/mark/link.js.map +1 -1
- package/esm/mark/pack.d.ts +4 -0
- package/esm/mark/pack.js +81 -0
- package/esm/mark/pack.js.map +1 -0
- package/esm/mark/path.d.ts +7 -0
- package/esm/mark/path.js +24 -0
- package/esm/mark/path.js.map +1 -0
- package/esm/mark/point.d.ts +1 -1
- package/esm/mark/point.js +31 -28
- package/esm/mark/point.js.map +1 -1
- package/esm/mark/polygon.d.ts +1 -1
- package/esm/mark/polygon.js +4 -8
- package/esm/mark/polygon.js.map +1 -1
- package/esm/mark/range.d.ts +1 -1
- package/esm/mark/range.js +2 -2
- package/esm/mark/range.js.map +1 -1
- package/esm/mark/rangeX.d.ts +1 -1
- package/esm/mark/rangeX.js +5 -2
- package/esm/mark/rangeX.js.map +1 -1
- package/esm/mark/rangeY.d.ts +1 -1
- package/esm/mark/rangeY.js +5 -2
- package/esm/mark/rangeY.js.map +1 -1
- package/esm/mark/rect.d.ts +1 -1
- package/esm/mark/rect.js +7 -8
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/sankey.d.ts +8 -0
- package/esm/mark/sankey.js +97 -0
- package/esm/mark/sankey.js.map +1 -0
- package/esm/mark/shape.d.ts +7 -0
- package/esm/mark/shape.js +33 -0
- package/esm/mark/shape.js.map +1 -0
- package/esm/mark/text.d.ts +1 -1
- package/esm/mark/text.js +16 -11
- package/esm/mark/text.js.map +1 -1
- package/esm/mark/tree.d.ts +4 -0
- package/esm/mark/tree.js +59 -0
- package/esm/mark/tree.js.map +1 -0
- package/esm/mark/treemap.d.ts +4 -0
- package/esm/mark/treemap.js +123 -0
- package/esm/mark/treemap.js.map +1 -0
- package/esm/mark/utils.d.ts +51 -3
- package/esm/mark/utils.js +84 -12
- package/esm/mark/utils.js.map +1 -1
- package/esm/mark/vector.d.ts +1 -1
- package/esm/mark/vector.js +4 -8
- package/esm/mark/vector.js.map +1 -1
- package/esm/mark/wordCloud.d.ts +4 -0
- package/esm/mark/wordCloud.js +65 -0
- package/esm/mark/wordCloud.js.map +1 -0
- package/esm/palette/category10.d.ts +1 -1
- package/esm/palette/category20.d.ts +1 -1
- package/esm/palette/divergingGreenRed.d.ts +1 -1
- package/esm/palette/divergingGreenYellow.d.ts +1 -1
- package/esm/palette/divergingRedBlue.d.ts +1 -1
- package/esm/palette/divergingRedPurple.d.ts +1 -1
- package/esm/palette/sequentialBlue.d.ts +1 -1
- package/esm/palette/sequentialDarkBlue.d.ts +1 -1
- package/esm/palette/sequentialDarkGreen.d.ts +1 -1
- package/esm/palette/sequentialGreen.d.ts +1 -1
- package/esm/palette/sequentialGreenBlue.d.ts +1 -1
- package/esm/palette/sequentialGrey.d.ts +1 -1
- package/esm/palette/sequentialOrange.d.ts +1 -1
- package/esm/palette/sequentialPink.d.ts +1 -1
- package/esm/palette/sequentialPinkPurple.d.ts +1 -1
- package/esm/palette/sequentialPurple.d.ts +1 -1
- package/esm/palette/sequentialRed.d.ts +1 -1
- package/esm/palette/sequentialYellow.d.ts +1 -1
- package/esm/palette/sequentialYellowGreen.d.ts +1 -1
- package/esm/palette/sequentialYellowOrange.d.ts +1 -1
- package/esm/runtime/component.d.ts +1 -1
- package/esm/runtime/component.js +18 -29
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/coordinate.d.ts +8 -8
- package/esm/runtime/coordinate.js +21 -21
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/mark.d.ts +3 -3
- package/esm/runtime/mark.js +37 -41
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.d.ts +2 -2
- package/esm/runtime/plot.js +153 -42
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +0 -7
- package/esm/runtime/render.js +6 -5
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +4 -4
- package/esm/runtime/scale.js +98 -175
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +1 -0
- package/esm/runtime/transform.js +18 -2
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +37 -21
- package/esm/runtime/types/component.d.ts +35 -35
- package/esm/runtime/types/data.d.ts +4 -4
- package/esm/runtime/types/encode.d.ts +9 -9
- package/esm/runtime/types/mark.d.ts +14 -6
- package/esm/runtime/types/options.d.ts +32 -34
- package/esm/runtime/types/theme.d.ts +32 -12
- package/esm/runtime/types/transform.d.ts +7 -7
- package/esm/scale/band.d.ts +1 -1
- package/esm/scale/identity.d.ts +1 -1
- package/esm/scale/linear.d.ts +1 -1
- package/esm/scale/log.d.ts +1 -1
- package/esm/scale/ordinal.d.ts +1 -1
- package/esm/scale/point.d.ts +1 -1
- package/esm/scale/pow.d.ts +1 -1
- package/esm/scale/quantile.d.ts +1 -1
- package/esm/scale/quantize.d.ts +1 -1
- package/esm/scale/sequential.d.ts +1 -1
- package/esm/scale/sqrt.d.ts +1 -1
- package/esm/scale/threshold.d.ts +1 -1
- package/esm/scale/time.d.ts +1 -1
- package/esm/shape/area/area.d.ts +1 -1
- package/esm/shape/area/curve.d.ts +1 -1
- package/esm/shape/area/curve.js +2 -0
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/area/smooth.d.ts +1 -1
- package/esm/shape/area/step.d.ts +1 -1
- package/esm/shape/box/box.d.ts +1 -1
- package/esm/shape/box/box.js +3 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.d.ts +5 -11
- package/esm/shape/connector/connector.js +50 -64
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/createElement.d.ts +1 -1
- package/esm/shape/image/image.d.ts +1 -1
- package/esm/shape/image/image.js +5 -2
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/index.d.ts +4 -0
- package/esm/shape/index.js +3 -0
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +1 -1
- package/esm/shape/interval/color.js +14 -10
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/interval/funnel.d.ts +1 -1
- package/esm/shape/interval/funnel.js +1 -3
- package/esm/shape/interval/funnel.js.map +1 -1
- package/esm/shape/interval/hollow.d.ts +1 -1
- package/esm/shape/interval/pyramid.d.ts +1 -1
- package/esm/shape/interval/pyramid.js +2 -3
- package/esm/shape/interval/pyramid.js.map +1 -1
- package/esm/shape/interval/rect.d.ts +1 -1
- package/esm/shape/label/label.d.ts +1 -1
- package/esm/shape/label/label.js +13 -5
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position.d.ts +1 -1
- package/esm/shape/label/position.js +77 -36
- package/esm/shape/label/position.js.map +1 -1
- package/esm/shape/line/curve.d.ts +1 -1
- package/esm/shape/line/curve.js +8 -2
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/line/hv.d.ts +1 -1
- package/esm/shape/line/hvh.d.ts +1 -1
- package/esm/shape/line/line.d.ts +1 -1
- package/esm/shape/line/smooth.d.ts +1 -1
- package/esm/shape/line/vh.d.ts +1 -1
- package/esm/shape/lineXY/line.d.ts +1 -1
- package/esm/shape/lineXY/line.js +2 -0
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.d.ts +1 -1
- package/esm/shape/link/arc.js +2 -0
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.d.ts +1 -7
- package/esm/shape/link/link.js +5 -3
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.d.ts +1 -1
- package/esm/shape/link/smooth.js +2 -0
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.d.ts +1 -1
- package/esm/shape/link/vhv.js +2 -0
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/path/color.d.ts +9 -0
- package/esm/shape/path/color.js +37 -0
- package/esm/shape/path/color.js.map +1 -0
- package/esm/shape/path/hollow.d.ts +8 -0
- package/esm/shape/path/hollow.js +13 -0
- package/esm/shape/path/hollow.js.map +1 -0
- package/esm/shape/path/path.d.ts +8 -0
- package/esm/shape/path/path.js +13 -0
- package/esm/shape/path/path.js.map +1 -0
- package/esm/shape/point/bowtie.d.ts +1 -1
- package/esm/shape/point/color.d.ts +1 -1
- package/esm/shape/point/color.js +5 -2
- package/esm/shape/point/color.js.map +1 -1
- package/esm/shape/point/cross.d.ts +1 -1
- package/esm/shape/point/diamond.d.ts +1 -1
- package/esm/shape/point/hexagon.d.ts +1 -1
- package/esm/shape/point/hollow.d.ts +1 -1
- package/esm/shape/point/hollowBowtie.d.ts +1 -1
- package/esm/shape/point/hollowDiamond.d.ts +1 -1
- package/esm/shape/point/hollowHexagon.d.ts +1 -1
- package/esm/shape/point/hollowSquare.d.ts +1 -1
- package/esm/shape/point/hollowTriangle.d.ts +1 -1
- package/esm/shape/point/hollowTriangleDown.d.ts +1 -1
- package/esm/shape/point/hyphen.d.ts +1 -1
- package/esm/shape/point/line.d.ts +1 -1
- package/esm/shape/point/plus.d.ts +1 -1
- package/esm/shape/point/point.d.ts +1 -1
- package/esm/shape/point/square.d.ts +1 -1
- package/esm/shape/point/tick.d.ts +1 -1
- package/esm/shape/point/triangle.d.ts +1 -1
- package/esm/shape/point/triangleDown.d.ts +1 -1
- package/esm/shape/polygon/polygon.d.ts +1 -1
- package/esm/shape/polygon/polygon.js +2 -0
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.d.ts +1 -1
- package/esm/shape/polygon/ribbon.js +2 -0
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/shape/shape.d.ts +6 -0
- package/esm/shape/shape/shape.js +27 -0
- package/esm/shape/shape/shape.js.map +1 -0
- package/esm/shape/text/advance.d.ts +2 -0
- package/esm/shape/text/advance.js +122 -0
- package/esm/shape/text/advance.js.map +1 -0
- package/esm/shape/text/badge.d.ts +5 -9
- package/esm/shape/text/badge.js +31 -50
- package/esm/shape/text/badge.js.map +1 -1
- package/esm/shape/text/text.d.ts +1 -15
- package/esm/shape/text/text.js +15 -144
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +21 -21
- package/esm/shape/utils.js +31 -12
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.d.ts +1 -7
- package/esm/shape/vector/vector.js +4 -2
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/action.d.ts +27 -27
- package/esm/spec/animate.d.ts +1 -8
- package/esm/spec/composition.d.ts +40 -17
- package/esm/spec/coordinate.d.ts +17 -17
- package/esm/spec/data.d.ts +47 -25
- package/esm/spec/encode.d.ts +7 -7
- package/esm/spec/geometry.d.ts +79 -39
- package/esm/spec/index.d.ts +1 -1
- package/esm/spec/interaction.d.ts +28 -26
- package/esm/spec/labelTransform.d.ts +10 -3
- package/esm/spec/palette.d.ts +23 -23
- package/esm/spec/scale.d.ts +17 -17
- package/esm/spec/theme.d.ts +5 -5
- package/esm/spec/title.d.ts +1 -1
- package/esm/spec/transform.d.ts +44 -26
- package/esm/stdlib/index.js +12 -216
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/dark.d.ts +1 -1
- package/esm/theme/dark.js +157 -57
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/light.d.ts +1 -1
- package/esm/theme/light.js +155 -52
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/Select.d.ts +1 -1
- package/esm/transform/SelectX.d.ts +1 -1
- package/esm/transform/SelectY.d.ts +1 -1
- package/esm/transform/bin.d.ts +12 -0
- package/esm/transform/bin.js +82 -0
- package/esm/transform/bin.js.map +1 -0
- package/esm/transform/binX.d.ts +4 -0
- package/esm/transform/binX.js +7 -0
- package/esm/transform/binX.js.map +1 -0
- package/esm/transform/diffY.d.ts +1 -1
- package/esm/transform/dodgeX.d.ts +1 -1
- package/esm/transform/flexX.d.ts +1 -1
- package/esm/transform/group.d.ts +2 -2
- package/esm/transform/group.js +4 -82
- package/esm/transform/group.js.map +1 -1
- package/esm/transform/groupColor.d.ts +1 -1
- package/esm/transform/groupColor.js +1 -1
- package/esm/transform/groupColor.js.map +1 -1
- package/esm/transform/groupN.d.ts +9 -0
- package/esm/transform/groupN.js +99 -0
- package/esm/transform/groupN.js.map +1 -0
- package/esm/transform/groupX.d.ts +1 -1
- package/esm/transform/groupX.js +1 -1
- package/esm/transform/groupX.js.map +1 -1
- package/esm/transform/groupY.d.ts +1 -1
- package/esm/transform/groupY.js +1 -1
- package/esm/transform/groupY.js.map +1 -1
- package/esm/transform/index.d.ts +16 -6
- package/esm/transform/index.js +8 -3
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/jitter.d.ts +1 -1
- package/esm/transform/jitterX.d.ts +1 -1
- package/esm/transform/maybeFunctionAttribute.d.ts +6 -0
- package/esm/transform/maybeFunctionAttribute.js +19 -0
- package/esm/transform/maybeFunctionAttribute.js.map +1 -0
- package/esm/transform/maybeGradient.d.ts +7 -0
- package/esm/transform/maybeGradient.js +24 -0
- package/esm/transform/maybeGradient.js.map +1 -0
- package/esm/transform/maybeIdentityX.d.ts +1 -1
- package/esm/transform/maybeIdentityY.d.ts +1 -1
- package/esm/transform/maybeKey.d.ts +1 -1
- package/esm/transform/maybeSeries.d.ts +1 -1
- package/esm/transform/maybeSize.d.ts +1 -1
- package/esm/transform/maybeStackY.d.ts +1 -1
- package/esm/transform/maybeTitle.d.ts +8 -0
- package/esm/transform/{maybeTitleX.js → maybeTitle.js} +6 -5
- package/esm/transform/maybeTitle.js.map +1 -0
- package/esm/transform/maybeTooltip.d.ts +2 -2
- package/esm/transform/maybeTooltip.js +7 -5
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/transform/maybeTuple.d.ts +7 -0
- package/esm/transform/maybeTuple.js +19 -0
- package/esm/transform/maybeTuple.js.map +1 -0
- package/esm/transform/maybeTupleX.d.ts +1 -1
- package/esm/transform/maybeTupleX.js +2 -2
- package/esm/transform/maybeTupleX.js.map +1 -1
- package/esm/transform/maybeTupleY.d.ts +1 -1
- package/esm/transform/maybeTupleY.js +2 -2
- package/esm/transform/maybeTupleY.js.map +1 -1
- package/esm/transform/maybeVisualPosition.d.ts +7 -0
- package/esm/transform/maybeVisualPosition.js +45 -0
- package/esm/transform/maybeVisualPosition.js.map +1 -0
- package/esm/transform/maybeZeroPadding.d.ts +1 -1
- package/esm/transform/maybeZeroX.d.ts +1 -1
- package/esm/transform/maybeZeroY.d.ts +1 -1
- package/esm/transform/maybeZeroY1.d.ts +1 -1
- package/esm/transform/normalizeY.d.ts +1 -1
- package/esm/transform/pack.d.ts +1 -1
- package/esm/transform/sort.d.ts +1 -1
- package/esm/transform/sortColor.d.ts +1 -1
- package/esm/transform/sortX.d.ts +1 -1
- package/esm/transform/sortY.d.ts +1 -1
- package/esm/transform/stackEnter.d.ts +2 -1
- package/esm/transform/stackEnter.js +15 -5
- package/esm/transform/stackEnter.js.map +1 -1
- package/esm/transform/stackY.d.ts +1 -1
- package/esm/transform/stackY.js +25 -4
- package/esm/transform/stackY.js.map +1 -1
- package/esm/transform/symmetryY.d.ts +1 -1
- package/esm/transform/utils/helper.d.ts +1 -0
- package/esm/transform/utils/helper.js +9 -1
- package/esm/transform/utils/helper.js.map +1 -1
- package/esm/transform/utils/order.d.ts +3 -3
- package/esm/transform/utils/order.js +2 -0
- package/esm/transform/utils/order.js.map +1 -1
- package/esm/utils/coordinate.js +3 -1
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +5 -2
- package/esm/utils/helper.js +11 -3
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/selection.d.ts +4 -4
- package/esm/utils/selection.js +3 -1
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.d.ts +6 -1
- package/esm/utils/size.js +22 -1
- package/esm/utils/size.js.map +1 -1
- package/esm/utils/vector.d.ts +1 -1
- package/lib/animation/fadeIn.d.ts +2 -2
- package/lib/animation/fadeOut.d.ts +2 -2
- package/lib/animation/growInX.d.ts +7 -0
- package/lib/animation/growInX.js +30 -0
- package/lib/animation/growInX.js.map +1 -0
- package/lib/animation/growInY.d.ts +7 -0
- package/lib/animation/growInY.js +30 -0
- package/lib/animation/growInY.js.map +1 -0
- package/lib/animation/index.d.ts +6 -0
- package/lib/animation/index.js +7 -1
- package/lib/animation/index.js.map +1 -1
- package/lib/animation/morphing.d.ts +4 -4
- package/lib/animation/morphing.js +49 -12
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/pathIn.d.ts +7 -0
- package/lib/animation/pathIn.js +22 -0
- package/lib/animation/pathIn.js.map +1 -0
- package/lib/animation/scaleInX.d.ts +2 -2
- package/lib/animation/scaleInY.d.ts +2 -2
- package/lib/animation/scaleOutX.d.ts +2 -2
- package/lib/animation/scaleOutY.d.ts +2 -2
- package/lib/animation/types.d.ts +6 -0
- package/lib/animation/types.js +3 -0
- package/lib/animation/types.js.map +1 -0
- package/lib/animation/waveIn.d.ts +2 -2
- package/lib/animation/waveIn.js +28 -2
- package/lib/animation/waveIn.js.map +1 -1
- package/lib/animation/zoomIn.d.ts +2 -2
- package/lib/animation/zoomOut.d.ts +2 -2
- package/lib/api/chart.d.ts +8 -4
- package/lib/api/chart.js +19 -3
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/facetCircle.d.ts +3 -6
- package/lib/api/composition/facetCircle.js +2 -5
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +3 -8
- package/lib/api/composition/facetRect.js +2 -7
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +21 -0
- package/lib/api/composition/geoPath.js +33 -0
- package/lib/api/composition/geoPath.js.map +1 -0
- package/lib/api/composition/geoView.d.ts +21 -0
- package/lib/api/composition/geoView.js +32 -0
- package/lib/api/composition/geoView.js.map +1 -0
- package/lib/api/composition/index.d.ts +7 -1
- package/lib/api/composition/index.js +7 -1
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +3 -6
- package/lib/api/composition/repeatMatrix.js +2 -5
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +1 -5
- package/lib/api/composition/spaceFlex.js +1 -8
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +1 -2
- package/lib/api/composition/spaceLayer.js +1 -5
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -7
- package/lib/api/composition/timingKeyframe.js +1 -8
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +7 -8
- package/lib/api/composition/view.js +6 -7
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/mark/index.d.ts +17 -1
- package/lib/api/mark/index.js +8 -0
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +49 -1
- package/lib/api/mark/mark.js +75 -12
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +4 -12
- package/lib/api/props.d.ts +1 -1
- package/lib/api/types.d.ts +7 -7
- package/lib/component/axis.d.ts +2 -2
- package/lib/component/axis.js +23 -25
- package/lib/component/axis.js.map +1 -1
- package/lib/component/axisX.d.ts +1 -1
- package/lib/component/axisY.d.ts +1 -1
- package/lib/component/legendCategory.d.ts +2 -2
- package/lib/component/legendCategory.js +2 -2
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +1 -1
- package/lib/component/title.d.ts +1 -1
- package/lib/component/utils.d.ts +1 -1
- package/lib/composition/facetCircle.d.ts +1 -1
- package/lib/composition/facetCircle.js +2 -2
- package/lib/composition/facetCircle.js.map +1 -1
- package/lib/composition/facetRect.d.ts +2 -2
- package/lib/composition/facetRect.js +8 -10
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/mark.d.ts +1 -1
- package/lib/composition/mark.js +3 -3
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.d.ts +1 -1
- package/lib/composition/repeatMatrix.js +4 -4
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/composition/spaceFlex.d.ts +1 -1
- package/lib/composition/spaceLayer.d.ts +1 -1
- package/lib/composition/timingKeyframe.d.ts +1 -1
- package/lib/composition/timingKeyframe.js +7 -8
- package/lib/composition/timingKeyframe.js.map +1 -1
- package/lib/composition/utils.d.ts +1 -1
- package/lib/composition/view.d.ts +1 -1
- package/lib/coordinate/cartesian.d.ts +1 -1
- package/lib/coordinate/fisheye.d.ts +1 -1
- package/lib/coordinate/fisheyeX.d.ts +1 -1
- package/lib/coordinate/fisheyeY.d.ts +1 -1
- package/lib/coordinate/helix.d.ts +1 -1
- package/lib/coordinate/parallel.d.ts +1 -1
- package/lib/coordinate/polar.d.ts +1 -1
- package/lib/coordinate/radial.d.ts +1 -1
- package/lib/coordinate/reflect.d.ts +1 -1
- package/lib/coordinate/reflectX.d.ts +1 -1
- package/lib/coordinate/reflectY.d.ts +1 -1
- package/lib/coordinate/theta.d.ts +1 -1
- package/lib/coordinate/transpose.d.ts +1 -1
- package/lib/data/arc.d.ts +1 -1
- package/lib/data/cluster.d.ts +1 -1
- package/lib/data/custom.d.ts +1 -1
- package/lib/data/fetch.d.ts +1 -1
- package/lib/data/fetch.js.map +1 -1
- package/lib/data/filter.d.ts +9 -0
- package/lib/data/filter.js +18 -0
- package/lib/data/filter.js.map +1 -0
- package/lib/data/fold.d.ts +1 -1
- package/lib/data/index.d.ts +4 -2
- package/lib/data/index.js +5 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/inline.d.ts +1 -1
- package/lib/data/join.d.ts +7 -0
- package/lib/data/join.js +26 -0
- package/lib/data/join.js.map +1 -0
- package/lib/data/map.d.ts +1 -1
- package/lib/data/pick.d.ts +1 -1
- package/lib/data/rename.d.ts +1 -1
- package/lib/data/rename.js +2 -3
- package/lib/data/rename.js.map +1 -1
- package/lib/data/sankey.d.ts +1 -1
- package/lib/data/sortBy.d.ts +1 -1
- package/lib/data/subset.d.ts +1 -1
- package/lib/data/tree.d.ts +1 -1
- package/lib/data/utils/arc/types.d.ts +2 -2
- package/lib/data/utils/flow.d.ts +1 -1
- package/lib/data/wordCloud.d.ts +1 -1
- package/lib/encode/column.d.ts +1 -1
- package/lib/encode/constant.d.ts +1 -1
- package/lib/encode/field.d.ts +1 -1
- package/lib/encode/transform.d.ts +1 -1
- package/lib/geo/d3-projection.d.ts +1 -0
- package/lib/geo/d3-projection.js +36 -0
- package/lib/geo/d3-projection.js.map +1 -0
- package/lib/geo/geoPath.d.ts +7 -0
- package/lib/geo/geoPath.js +40 -0
- package/lib/geo/geoPath.js.map +1 -0
- package/lib/geo/geoView.d.ts +7 -0
- package/lib/geo/geoView.js +242 -0
- package/lib/geo/geoView.js.map +1 -0
- package/lib/geo/index.d.ts +9 -0
- package/lib/geo/index.js +12 -0
- package/lib/geo/index.js.map +1 -0
- package/lib/interaction/action/service/elementSelection.d.ts +1 -1
- package/lib/interaction/action/service/elementSelection.js +1 -1
- package/lib/interaction/action/service/elementSelection.js.map +1 -1
- package/lib/interaction/action/service/fisheyeFocus.d.ts +1 -1
- package/lib/interaction/action/service/legendItemSelection.d.ts +1 -1
- package/lib/interaction/action/service/recordCurrentPoint.d.ts +1 -1
- package/lib/interaction/action/service/recordPoint.d.ts +1 -1
- package/lib/interaction/action/service/recordRegion.d.ts +1 -1
- package/lib/interaction/action/service/recordState.d.ts +1 -1
- package/lib/interaction/action/service/recordTip.d.ts +1 -1
- package/lib/interaction/action/service/surfacePointSelection.d.ts +1 -1
- package/lib/interaction/action/service/triggerInfoSelection.d.ts +1 -1
- package/lib/interaction/action/transformer/activeElement.d.ts +1 -1
- package/lib/interaction/action/transformer/activeRegion.d.ts +1 -1
- package/lib/interaction/action/transformer/button.d.ts +1 -1
- package/lib/interaction/action/transformer/cursor.d.ts +1 -1
- package/lib/interaction/action/transformer/filter.d.ts +2 -2
- package/lib/interaction/action/transformer/filter.js +6 -4
- package/lib/interaction/action/transformer/filter.js.map +1 -1
- package/lib/interaction/action/transformer/filterElement.d.ts +1 -1
- package/lib/interaction/action/transformer/highlightElement.d.ts +1 -1
- package/lib/interaction/action/transformer/mask.d.ts +1 -1
- package/lib/interaction/action/transformer/move.d.ts +1 -1
- package/lib/interaction/action/transformer/plot.d.ts +1 -1
- package/lib/interaction/action/transformer/poptip.d.ts +1 -1
- package/lib/interaction/action/transformer/setItemState.d.ts +1 -1
- package/lib/interaction/action/transformer/tooltip.d.ts +1 -1
- package/lib/interaction/builtin/activeRegion.d.ts +1 -1
- package/lib/interaction/builtin/brush.d.ts +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/builtin/brushVisible.d.ts +1 -1
- package/lib/interaction/builtin/elementActive.d.ts +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +1 -1
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +5 -3
- package/lib/interaction/builtin/elementHighlightByColor.js +1 -1
- package/lib/interaction/builtin/elementHighlightByColor.js.map +1 -1
- package/lib/interaction/builtin/elementHighlightByX.d.ts +5 -3
- package/lib/interaction/builtin/elementHighlightByX.js +1 -1
- package/lib/interaction/builtin/elementHighlightByX.js.map +1 -1
- package/lib/interaction/builtin/elementListHighlight.d.ts +1 -1
- package/lib/interaction/builtin/elementSelected.d.ts +1 -1
- package/lib/interaction/builtin/ellipsisText.d.ts +1 -1
- package/lib/interaction/builtin/fisheye.d.ts +1 -1
- package/lib/interaction/builtin/legendActive.d.ts +1 -1
- package/lib/interaction/builtin/legendHighlight.d.ts +1 -1
- package/lib/interaction/builtin/tooltip.d.ts +9 -5
- package/lib/interaction/index.d.ts +4 -3
- package/lib/interaction/index.js +9 -7
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/interactor/mousePosition.d.ts +1 -1
- package/lib/interaction/interactor/touchPosition.d.ts +1 -1
- package/lib/interaction/native/chartIndex.js +6 -2
- package/lib/interaction/native/chartIndex.js.map +1 -1
- package/lib/interaction/native/elementHighlight.d.ts +10 -0
- package/lib/interaction/native/{elementActive.js → elementHighlight.js} +11 -11
- package/lib/interaction/native/elementHighlight.js.map +1 -0
- package/lib/interaction/native/elementHighlightByColor.d.ts +4 -0
- package/lib/interaction/native/elementHighlightByColor.js +16 -0
- package/lib/interaction/native/elementHighlightByColor.js.map +1 -0
- package/lib/interaction/native/{elementActiveByX.d.ts → elementHighlightByX.d.ts} +1 -1
- package/lib/interaction/native/elementHighlightByX.js +17 -0
- package/lib/interaction/native/elementHighlightByX.js.map +1 -0
- package/lib/interaction/native/elementSelect.js +1 -1
- package/lib/interaction/native/elementSelect.js.map +1 -1
- package/lib/interaction/native/elementSelectByColor.js +1 -1
- package/lib/interaction/native/elementSelectByColor.js.map +1 -1
- package/lib/interaction/native/elementSelectByX.js +1 -1
- package/lib/interaction/native/elementSelectByX.js.map +1 -1
- package/lib/interaction/native/fisheye.js +8 -5
- package/lib/interaction/native/fisheye.js.map +1 -1
- package/lib/interaction/native/tooltip.d.ts +11 -0
- package/lib/interaction/native/tooltip.js +285 -0
- package/lib/interaction/native/tooltip.js.map +1 -0
- package/lib/interaction/native/utils.d.ts +1 -1
- package/lib/interaction/native/utils.js +4 -4
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/interaction/types.d.ts +16 -16
- package/lib/label-transform/dodgeY.d.ts +1 -1
- package/lib/label-transform/dodgeY.js +9 -1
- package/lib/label-transform/dodgeY.js.map +1 -1
- package/lib/label-transform/hideOverlap.d.ts +1 -1
- package/lib/label-transform/hideOverlap.js +14 -4
- package/lib/label-transform/hideOverlap.js.map +1 -1
- package/lib/label-transform/index.d.ts +4 -0
- package/lib/label-transform/index.js +5 -1
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/spider.d.ts +7 -0
- package/lib/label-transform/spider.js +34 -0
- package/lib/label-transform/spider.js.map +1 -0
- package/lib/label-transform/surround.d.ts +7 -0
- package/lib/label-transform/surround.js +34 -0
- package/lib/label-transform/surround.js.map +1 -0
- package/lib/mark/area.d.ts +1 -1
- package/lib/mark/area.js +8 -7
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/box.d.ts +1 -1
- package/lib/mark/box.js +6 -8
- package/lib/mark/box.js.map +1 -1
- package/lib/mark/boxplot.d.ts +4 -0
- package/lib/mark/boxplot.js +108 -0
- package/lib/mark/boxplot.js.map +1 -0
- package/lib/mark/cell.d.ts +1 -1
- package/lib/mark/cell.js +3 -7
- package/lib/mark/cell.js.map +1 -1
- package/lib/mark/connector.d.ts +1 -1
- package/lib/mark/connector.js +2 -2
- package/lib/mark/connector.js.map +1 -1
- package/lib/mark/forceGraph.d.ts +4 -0
- package/lib/mark/forceGraph.js +99 -0
- package/lib/mark/forceGraph.js.map +1 -0
- package/lib/mark/image.d.ts +1 -1
- package/lib/mark/image.js +11 -8
- package/lib/mark/image.js.map +1 -1
- package/lib/mark/index.d.ts +16 -0
- package/lib/mark/index.js +19 -1
- package/lib/mark/index.js.map +1 -1
- package/lib/mark/interval.d.ts +1 -1
- package/lib/mark/interval.js +6 -7
- package/lib/mark/interval.js.map +1 -1
- package/lib/mark/line.d.ts +1 -1
- package/lib/mark/line.js +12 -8
- package/lib/mark/line.js.map +1 -1
- package/lib/mark/lineX.d.ts +1 -1
- package/lib/mark/lineX.js +5 -2
- package/lib/mark/lineX.js.map +1 -1
- package/lib/mark/lineY.d.ts +1 -1
- package/lib/mark/lineY.js +5 -2
- package/lib/mark/lineY.js.map +1 -1
- package/lib/mark/link.d.ts +1 -1
- package/lib/mark/link.js +3 -7
- package/lib/mark/link.js.map +1 -1
- package/lib/mark/pack.d.ts +4 -0
- package/lib/mark/pack.js +85 -0
- package/lib/mark/pack.js.map +1 -0
- package/lib/mark/path.d.ts +7 -0
- package/lib/mark/path.js +28 -0
- package/lib/mark/path.js.map +1 -0
- package/lib/mark/point.d.ts +1 -1
- package/lib/mark/point.js +30 -27
- package/lib/mark/point.js.map +1 -1
- package/lib/mark/polygon.d.ts +1 -1
- package/lib/mark/polygon.js +3 -7
- package/lib/mark/polygon.js.map +1 -1
- package/lib/mark/range.d.ts +1 -1
- package/lib/mark/range.js +2 -2
- package/lib/mark/range.js.map +1 -1
- package/lib/mark/rangeX.d.ts +1 -1
- package/lib/mark/rangeX.js +5 -2
- package/lib/mark/rangeX.js.map +1 -1
- package/lib/mark/rangeY.d.ts +1 -1
- package/lib/mark/rangeY.js +5 -2
- package/lib/mark/rangeY.js.map +1 -1
- package/lib/mark/rect.d.ts +1 -1
- package/lib/mark/rect.js +6 -7
- package/lib/mark/rect.js.map +1 -1
- package/lib/mark/sankey.d.ts +8 -0
- package/lib/mark/sankey.js +101 -0
- package/lib/mark/sankey.js.map +1 -0
- package/lib/mark/shape.d.ts +7 -0
- package/lib/mark/shape.js +37 -0
- package/lib/mark/shape.js.map +1 -0
- package/lib/mark/text.d.ts +1 -1
- package/lib/mark/text.js +15 -10
- package/lib/mark/text.js.map +1 -1
- package/lib/mark/tree.d.ts +4 -0
- package/lib/mark/tree.js +63 -0
- package/lib/mark/tree.js.map +1 -0
- package/lib/mark/treemap.d.ts +4 -0
- package/lib/mark/treemap.js +127 -0
- package/lib/mark/treemap.js.map +1 -0
- package/lib/mark/utils.d.ts +51 -3
- package/lib/mark/utils.js +93 -13
- package/lib/mark/utils.js.map +1 -1
- package/lib/mark/vector.d.ts +1 -1
- package/lib/mark/vector.js +3 -7
- package/lib/mark/vector.js.map +1 -1
- package/lib/mark/wordCloud.d.ts +4 -0
- package/lib/mark/wordCloud.js +69 -0
- package/lib/mark/wordCloud.js.map +1 -0
- package/lib/palette/category10.d.ts +1 -1
- package/lib/palette/category20.d.ts +1 -1
- package/lib/palette/divergingGreenRed.d.ts +1 -1
- package/lib/palette/divergingGreenYellow.d.ts +1 -1
- package/lib/palette/divergingRedBlue.d.ts +1 -1
- package/lib/palette/divergingRedPurple.d.ts +1 -1
- package/lib/palette/sequentialBlue.d.ts +1 -1
- package/lib/palette/sequentialDarkBlue.d.ts +1 -1
- package/lib/palette/sequentialDarkGreen.d.ts +1 -1
- package/lib/palette/sequentialGreen.d.ts +1 -1
- package/lib/palette/sequentialGreenBlue.d.ts +1 -1
- package/lib/palette/sequentialGrey.d.ts +1 -1
- package/lib/palette/sequentialOrange.d.ts +1 -1
- package/lib/palette/sequentialPink.d.ts +1 -1
- package/lib/palette/sequentialPinkPurple.d.ts +1 -1
- package/lib/palette/sequentialPurple.d.ts +1 -1
- package/lib/palette/sequentialRed.d.ts +1 -1
- package/lib/palette/sequentialYellow.d.ts +1 -1
- package/lib/palette/sequentialYellowGreen.d.ts +1 -1
- package/lib/palette/sequentialYellowOrange.d.ts +1 -1
- package/lib/runtime/component.d.ts +1 -1
- package/lib/runtime/component.js +18 -29
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/coordinate.d.ts +8 -8
- package/lib/runtime/coordinate.js +21 -21
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/mark.d.ts +3 -3
- package/lib/runtime/mark.js +35 -39
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.d.ts +2 -2
- package/lib/runtime/plot.js +152 -41
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +0 -7
- package/lib/runtime/render.js +6 -6
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +4 -4
- package/lib/runtime/scale.js +98 -175
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +1 -0
- package/lib/runtime/transform.js +20 -3
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +37 -21
- package/lib/runtime/types/component.d.ts +35 -35
- package/lib/runtime/types/data.d.ts +4 -4
- package/lib/runtime/types/encode.d.ts +9 -9
- package/lib/runtime/types/mark.d.ts +14 -6
- package/lib/runtime/types/options.d.ts +32 -34
- package/lib/runtime/types/theme.d.ts +32 -12
- package/lib/runtime/types/transform.d.ts +7 -7
- package/lib/scale/band.d.ts +1 -1
- package/lib/scale/identity.d.ts +1 -1
- package/lib/scale/linear.d.ts +1 -1
- package/lib/scale/log.d.ts +1 -1
- package/lib/scale/ordinal.d.ts +1 -1
- package/lib/scale/point.d.ts +1 -1
- package/lib/scale/pow.d.ts +1 -1
- package/lib/scale/quantile.d.ts +1 -1
- package/lib/scale/quantize.d.ts +1 -1
- package/lib/scale/sequential.d.ts +1 -1
- package/lib/scale/sqrt.d.ts +1 -1
- package/lib/scale/threshold.d.ts +1 -1
- package/lib/scale/time.d.ts +1 -1
- package/lib/shape/area/area.d.ts +1 -1
- package/lib/shape/area/curve.d.ts +1 -1
- package/lib/shape/area/curve.js +2 -0
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/area/smooth.d.ts +1 -1
- package/lib/shape/area/step.d.ts +1 -1
- package/lib/shape/box/box.d.ts +1 -1
- package/lib/shape/box/box.js +3 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.d.ts +5 -11
- package/lib/shape/connector/connector.js +50 -64
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/createElement.d.ts +1 -1
- package/lib/shape/image/image.d.ts +1 -1
- package/lib/shape/image/image.js +5 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/index.d.ts +4 -0
- package/lib/shape/index.js +7 -1
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +1 -1
- package/lib/shape/interval/color.js +13 -9
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/interval/funnel.d.ts +1 -1
- package/lib/shape/interval/funnel.js +1 -3
- package/lib/shape/interval/funnel.js.map +1 -1
- package/lib/shape/interval/hollow.d.ts +1 -1
- package/lib/shape/interval/pyramid.d.ts +1 -1
- package/lib/shape/interval/pyramid.js +2 -3
- package/lib/shape/interval/pyramid.js.map +1 -1
- package/lib/shape/interval/rect.d.ts +1 -1
- package/lib/shape/label/label.d.ts +1 -1
- package/lib/shape/label/label.js +13 -5
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position.d.ts +1 -1
- package/lib/shape/label/position.js +77 -36
- package/lib/shape/label/position.js.map +1 -1
- package/lib/shape/line/curve.d.ts +1 -1
- package/lib/shape/line/curve.js +8 -2
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/line/hv.d.ts +1 -1
- package/lib/shape/line/hvh.d.ts +1 -1
- package/lib/shape/line/line.d.ts +1 -1
- package/lib/shape/line/smooth.d.ts +1 -1
- package/lib/shape/line/vh.d.ts +1 -1
- package/lib/shape/lineXY/line.d.ts +1 -1
- package/lib/shape/lineXY/line.js +2 -0
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.d.ts +1 -1
- package/lib/shape/link/arc.js +2 -0
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.d.ts +1 -7
- package/lib/shape/link/link.js +5 -3
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.d.ts +1 -1
- package/lib/shape/link/smooth.js +2 -0
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.d.ts +1 -1
- package/lib/shape/link/vhv.js +2 -0
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/path/color.d.ts +9 -0
- package/lib/shape/path/color.js +41 -0
- package/lib/shape/path/color.js.map +1 -0
- package/lib/shape/path/hollow.d.ts +8 -0
- package/lib/shape/path/hollow.js +17 -0
- package/lib/shape/path/hollow.js.map +1 -0
- package/lib/shape/path/path.d.ts +8 -0
- package/lib/shape/path/path.js +17 -0
- package/lib/shape/path/path.js.map +1 -0
- package/lib/shape/point/bowtie.d.ts +1 -1
- package/lib/shape/point/color.d.ts +1 -1
- package/lib/shape/point/color.js +4 -1
- package/lib/shape/point/color.js.map +1 -1
- package/lib/shape/point/cross.d.ts +1 -1
- package/lib/shape/point/diamond.d.ts +1 -1
- package/lib/shape/point/hexagon.d.ts +1 -1
- package/lib/shape/point/hollow.d.ts +1 -1
- package/lib/shape/point/hollowBowtie.d.ts +1 -1
- package/lib/shape/point/hollowDiamond.d.ts +1 -1
- package/lib/shape/point/hollowHexagon.d.ts +1 -1
- package/lib/shape/point/hollowSquare.d.ts +1 -1
- package/lib/shape/point/hollowTriangle.d.ts +1 -1
- package/lib/shape/point/hollowTriangleDown.d.ts +1 -1
- package/lib/shape/point/hyphen.d.ts +1 -1
- package/lib/shape/point/line.d.ts +1 -1
- package/lib/shape/point/plus.d.ts +1 -1
- package/lib/shape/point/point.d.ts +1 -1
- package/lib/shape/point/square.d.ts +1 -1
- package/lib/shape/point/tick.d.ts +1 -1
- package/lib/shape/point/triangle.d.ts +1 -1
- package/lib/shape/point/triangleDown.d.ts +1 -1
- package/lib/shape/polygon/polygon.d.ts +1 -1
- package/lib/shape/polygon/polygon.js +2 -0
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.d.ts +1 -1
- package/lib/shape/polygon/ribbon.js +2 -0
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/shape/shape.d.ts +6 -0
- package/lib/shape/shape/shape.js +31 -0
- package/lib/shape/shape/shape.js.map +1 -0
- package/lib/shape/text/advance.d.ts +2 -0
- package/lib/shape/text/advance.js +125 -0
- package/lib/shape/text/advance.js.map +1 -0
- package/lib/shape/text/badge.d.ts +5 -9
- package/lib/shape/text/badge.js +31 -50
- package/lib/shape/text/badge.js.map +1 -1
- package/lib/shape/text/text.d.ts +1 -15
- package/lib/shape/text/text.js +15 -144
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +21 -21
- package/lib/shape/utils.js +33 -13
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.d.ts +1 -7
- package/lib/shape/vector/vector.js +4 -2
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/action.d.ts +27 -27
- package/lib/spec/animate.d.ts +1 -8
- package/lib/spec/composition.d.ts +40 -17
- package/lib/spec/coordinate.d.ts +17 -17
- package/lib/spec/data.d.ts +47 -25
- package/lib/spec/encode.d.ts +7 -7
- package/lib/spec/geometry.d.ts +79 -39
- package/lib/spec/index.d.ts +1 -1
- package/lib/spec/interaction.d.ts +28 -26
- package/lib/spec/labelTransform.d.ts +10 -3
- package/lib/spec/palette.d.ts +23 -23
- package/lib/spec/scale.d.ts +17 -17
- package/lib/spec/theme.d.ts +5 -5
- package/lib/spec/title.d.ts +1 -1
- package/lib/spec/transform.d.ts +44 -26
- package/lib/stdlib/index.js +4 -208
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/dark.d.ts +1 -1
- package/lib/theme/dark.js +157 -57
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/light.d.ts +1 -1
- package/lib/theme/light.js +155 -52
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/Select.d.ts +1 -1
- package/lib/transform/SelectX.d.ts +1 -1
- package/lib/transform/SelectY.d.ts +1 -1
- package/lib/transform/bin.d.ts +12 -0
- package/lib/transform/bin.js +86 -0
- package/lib/transform/bin.js.map +1 -0
- package/lib/transform/binX.d.ts +4 -0
- package/lib/transform/binX.js +11 -0
- package/lib/transform/binX.js.map +1 -0
- package/lib/transform/diffY.d.ts +1 -1
- package/lib/transform/dodgeX.d.ts +1 -1
- package/lib/transform/flexX.d.ts +1 -1
- package/lib/transform/group.d.ts +2 -2
- package/lib/transform/group.js +4 -82
- package/lib/transform/group.js.map +1 -1
- package/lib/transform/groupColor.d.ts +1 -1
- package/lib/transform/groupColor.js +1 -1
- package/lib/transform/groupColor.js.map +1 -1
- package/lib/transform/groupN.d.ts +9 -0
- package/lib/transform/groupN.js +103 -0
- package/lib/transform/groupN.js.map +1 -0
- package/lib/transform/groupX.d.ts +1 -1
- package/lib/transform/groupX.js +1 -1
- package/lib/transform/groupX.js.map +1 -1
- package/lib/transform/groupY.d.ts +1 -1
- package/lib/transform/groupY.js +1 -1
- package/lib/transform/groupY.js.map +1 -1
- package/lib/transform/index.d.ts +16 -6
- package/lib/transform/index.js +17 -7
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/jitter.d.ts +1 -1
- package/lib/transform/jitterX.d.ts +1 -1
- package/lib/transform/maybeFunctionAttribute.d.ts +6 -0
- package/lib/transform/maybeFunctionAttribute.js +23 -0
- package/lib/transform/maybeFunctionAttribute.js.map +1 -0
- package/lib/transform/maybeGradient.d.ts +7 -0
- package/lib/transform/maybeGradient.js +28 -0
- package/lib/transform/maybeGradient.js.map +1 -0
- package/lib/transform/maybeIdentityX.d.ts +1 -1
- package/lib/transform/maybeIdentityY.d.ts +1 -1
- package/lib/transform/maybeKey.d.ts +1 -1
- package/lib/transform/maybeSeries.d.ts +1 -1
- package/lib/transform/maybeSize.d.ts +1 -1
- package/lib/transform/maybeStackY.d.ts +1 -1
- package/lib/transform/maybeTitle.d.ts +8 -0
- package/lib/transform/{maybeTitleX.js → maybeTitle.js} +8 -7
- package/lib/transform/maybeTitle.js.map +1 -0
- package/lib/transform/maybeTooltip.d.ts +2 -2
- package/lib/transform/maybeTooltip.js +7 -5
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/transform/maybeTuple.d.ts +7 -0
- package/lib/transform/maybeTuple.js +23 -0
- package/lib/transform/maybeTuple.js.map +1 -0
- package/lib/transform/maybeTupleX.d.ts +1 -1
- package/lib/transform/maybeTupleX.js +1 -1
- package/lib/transform/maybeTupleX.js.map +1 -1
- package/lib/transform/maybeTupleY.d.ts +1 -1
- package/lib/transform/maybeTupleY.js +1 -1
- package/lib/transform/maybeTupleY.js.map +1 -1
- package/lib/transform/maybeVisualPosition.d.ts +7 -0
- package/lib/transform/maybeVisualPosition.js +49 -0
- package/lib/transform/maybeVisualPosition.js.map +1 -0
- package/lib/transform/maybeZeroPadding.d.ts +1 -1
- package/lib/transform/maybeZeroX.d.ts +1 -1
- package/lib/transform/maybeZeroY.d.ts +1 -1
- package/lib/transform/maybeZeroY1.d.ts +1 -1
- package/lib/transform/normalizeY.d.ts +1 -1
- package/lib/transform/pack.d.ts +1 -1
- package/lib/transform/sort.d.ts +1 -1
- package/lib/transform/sortColor.d.ts +1 -1
- package/lib/transform/sortX.d.ts +1 -1
- package/lib/transform/sortY.d.ts +1 -1
- package/lib/transform/stackEnter.d.ts +2 -1
- package/lib/transform/stackEnter.js +15 -5
- package/lib/transform/stackEnter.js.map +1 -1
- package/lib/transform/stackY.d.ts +1 -1
- package/lib/transform/stackY.js +25 -4
- package/lib/transform/stackY.js.map +1 -1
- package/lib/transform/symmetryY.d.ts +1 -1
- package/lib/transform/utils/helper.d.ts +1 -0
- package/lib/transform/utils/helper.js +11 -2
- package/lib/transform/utils/helper.js.map +1 -1
- package/lib/transform/utils/order.d.ts +3 -3
- package/lib/transform/utils/order.js +2 -0
- package/lib/transform/utils/order.js.map +1 -1
- package/lib/utils/coordinate.js +3 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +5 -2
- package/lib/utils/helper.js +13 -4
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/selection.d.ts +4 -4
- package/lib/utils/selection.js +3 -1
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.d.ts +6 -1
- package/lib/utils/size.js +24 -2
- package/lib/utils/size.js.map +1 -1
- package/lib/utils/vector.d.ts +1 -1
- package/package.json +12 -11
- package/src/animation/fadeIn.ts +1 -1
- package/src/animation/fadeOut.ts +1 -1
- package/src/animation/growInX.ts +40 -0
- package/src/animation/growInY.ts +40 -0
- package/src/animation/index.ts +6 -0
- package/src/animation/morphing.ts +60 -11
- package/src/animation/pathIn.ts +24 -0
- package/src/animation/scaleInX.ts +1 -1
- package/src/animation/scaleInY.ts +1 -1
- package/src/animation/scaleOutX.ts +1 -1
- package/src/animation/scaleOutY.ts +1 -1
- package/src/animation/types.ts +6 -0
- package/src/animation/waveIn.ts +26 -3
- package/src/animation/zoomIn.ts +1 -1
- package/src/animation/zoomOut.ts +1 -1
- package/src/api/chart.ts +25 -5
- package/src/api/composition/facetCircle.ts +4 -10
- package/src/api/composition/facetRect.ts +4 -14
- package/src/api/composition/geoPath.ts +43 -0
- package/src/api/composition/geoView.ts +42 -0
- package/src/api/composition/index.ts +8 -0
- package/src/api/composition/repeatMatrix.ts +4 -13
- package/src/api/composition/spaceFlex.ts +1 -12
- package/src/api/composition/spaceLayer.ts +1 -6
- package/src/api/composition/timingKeyframe.ts +3 -19
- package/src/api/composition/view.ts +12 -14
- package/src/api/mark/index.ts +24 -0
- package/src/api/mark/mark.ts +97 -11
- package/src/api/mark/types.ts +3 -11
- package/src/api/types.ts +4 -2
- package/src/component/axis.ts +29 -13
- package/src/component/legendCategory.ts +3 -3
- package/src/composition/facetCircle.ts +2 -2
- package/src/composition/facetRect.ts +8 -10
- package/src/composition/mark.ts +4 -4
- package/src/composition/repeatMatrix.ts +4 -4
- package/src/composition/timingKeyframe.ts +7 -8
- package/src/data/fetch.ts +1 -0
- package/src/data/filter.ts +19 -0
- package/src/data/index.ts +4 -2
- package/src/data/join.ts +40 -0
- package/src/data/rename.ts +2 -3
- package/src/geo/d3-projection.ts +33 -0
- package/src/geo/geoPath.ts +34 -0
- package/src/geo/geoView.ts +235 -0
- package/src/geo/index.ts +12 -0
- package/src/interaction/action/service/elementSelection.ts +1 -1
- package/src/interaction/action/transformer/filter.ts +6 -5
- package/src/interaction/builtin/elementHighlightByColor.ts +1 -1
- package/src/interaction/builtin/elementHighlightByX.ts +1 -1
- package/src/interaction/index.ts +4 -3
- package/src/interaction/native/chartIndex.ts +5 -2
- package/src/interaction/native/{elementActive.ts → elementHighlight.ts} +9 -9
- package/src/interaction/native/{elementActiveByColor.ts → elementHighlightByColor.ts} +5 -5
- package/src/interaction/native/{elementActiveByX.ts → elementHighlightByX.ts} +5 -5
- package/src/interaction/native/elementSelect.ts +2 -2
- package/src/interaction/native/elementSelectByColor.ts +2 -2
- package/src/interaction/native/elementSelectByX.ts +2 -2
- package/src/interaction/native/fisheye.ts +7 -5
- package/src/interaction/native/tooltip.ts +381 -0
- package/src/interaction/native/utils.ts +2 -2
- package/src/label-transform/dodgeY.ts +11 -1
- package/src/label-transform/hideOverlap.ts +17 -5
- package/src/label-transform/index.ts +4 -0
- package/src/label-transform/spider.ts +37 -0
- package/src/label-transform/surround.ts +37 -0
- package/src/mark/area.ts +10 -7
- package/src/mark/box.ts +7 -8
- package/src/mark/boxplot.ts +119 -0
- package/src/mark/cell.ts +5 -7
- package/src/mark/connector.ts +3 -2
- package/src/mark/forceGraph.ts +133 -0
- package/src/mark/image.ts +14 -9
- package/src/mark/index.ts +16 -0
- package/src/mark/interval.ts +8 -7
- package/src/mark/line.ts +15 -8
- package/src/mark/lineX.ts +6 -2
- package/src/mark/lineY.ts +6 -2
- package/src/mark/link.ts +5 -7
- package/src/mark/pack.ts +104 -0
- package/src/mark/path.ts +34 -0
- package/src/mark/point.ts +32 -27
- package/src/mark/polygon.ts +5 -7
- package/src/mark/range.ts +3 -2
- package/src/mark/rangeX.ts +6 -2
- package/src/mark/rangeY.ts +6 -2
- package/src/mark/rect.ts +8 -7
- package/src/mark/sankey.ts +127 -0
- package/src/mark/shape.ts +37 -0
- package/src/mark/text.ts +17 -11
- package/src/mark/tree.ts +86 -0
- package/src/mark/treemap.ts +188 -0
- package/src/mark/utils.ts +115 -12
- package/src/mark/vector.ts +5 -7
- package/src/mark/wordCloud.ts +73 -0
- package/src/runtime/component.ts +18 -28
- package/src/runtime/coordinate.ts +20 -20
- package/src/runtime/mark.ts +52 -71
- package/src/runtime/plot.ts +229 -61
- package/src/runtime/render.ts +7 -5
- package/src/runtime/scale.ts +112 -246
- package/src/runtime/transform.ts +21 -2
- package/src/runtime/types/common.ts +21 -1
- package/src/runtime/types/component.ts +11 -5
- package/src/runtime/types/mark.ts +12 -2
- package/src/runtime/types/options.ts +6 -4
- package/src/runtime/types/theme.ts +32 -4
- package/src/shape/.DS_Store +0 -0
- package/src/shape/area/curve.ts +2 -0
- package/src/shape/box/box.ts +3 -1
- package/src/shape/connector/connector.ts +75 -102
- package/src/shape/image/image.ts +5 -2
- package/src/shape/index.ts +5 -0
- package/src/shape/interval/color.ts +31 -9
- package/src/shape/interval/funnel.ts +1 -1
- package/src/shape/interval/pyramid.ts +1 -1
- package/src/shape/label/label.ts +20 -7
- package/src/shape/label/position.ts +116 -34
- package/src/shape/line/curve.ts +7 -1
- package/src/shape/lineXY/line.ts +2 -0
- package/src/shape/link/arc.ts +2 -0
- package/src/shape/link/link.ts +6 -10
- package/src/shape/link/smooth.ts +2 -0
- package/src/shape/link/vhv.ts +2 -0
- package/src/shape/path/color.ts +38 -0
- package/src/shape/path/hollow.ts +20 -0
- package/src/shape/path/path.ts +20 -0
- package/src/shape/point/color.ts +5 -2
- package/src/shape/polygon/polygon.ts +2 -0
- package/src/shape/polygon/ribbon.ts +2 -0
- package/src/shape/shape/shape.ts +25 -0
- package/src/shape/text/advance.ts +181 -0
- package/src/shape/text/badge.ts +40 -79
- package/src/shape/text/text.ts +19 -219
- package/src/shape/utils.ts +42 -18
- package/src/shape/vector/vector.ts +5 -9
- package/src/spec/action.ts +1 -1
- package/src/spec/animate.ts +9 -9
- package/src/spec/composition.ts +41 -5
- package/src/spec/data.ts +38 -10
- package/src/spec/geometry.ts +121 -13
- package/src/spec/interaction.ts +40 -34
- package/src/spec/labelTransform.ts +9 -0
- package/src/spec/transform.ts +19 -1
- package/src/stdlib/index.ts +66 -18
- package/src/theme/dark.ts +161 -58
- package/src/theme/light.ts +159 -53
- package/src/transform/bin.ts +102 -0
- package/src/transform/binX.ts +17 -0
- package/src/transform/group.ts +7 -104
- package/src/transform/groupColor.ts +1 -1
- package/src/transform/groupN.ts +120 -0
- package/src/transform/groupX.ts +1 -1
- package/src/transform/groupY.ts +1 -1
- package/src/transform/index.ts +16 -6
- package/src/transform/maybeFunctionAttribute.ts +28 -0
- package/src/transform/maybeGradient.ts +27 -0
- package/src/transform/{maybeTitleX.ts → maybeTitle.ts} +8 -5
- package/src/transform/maybeTooltip.ts +17 -13
- package/src/transform/maybeTuple.ts +22 -0
- package/src/transform/maybeTupleX.ts +2 -2
- package/src/transform/maybeTupleY.ts +2 -2
- package/src/transform/maybeVisualPosition.ts +37 -0
- package/src/transform/stackEnter.ts +20 -4
- package/src/transform/stackY.ts +30 -4
- package/src/transform/utils/helper.ts +8 -1
- package/src/transform/utils/order.ts +1 -0
- package/src/utils/coordinate.ts +2 -1
- package/src/utils/helper.ts +17 -4
- package/src/utils/selection.ts +7 -4
- package/src/utils/size.ts +45 -1
- package/esm/data/filterBy.d.ts +0 -8
- package/esm/data/filterBy.js +0 -17
- package/esm/data/filterBy.js.map +0 -1
- package/esm/interaction/native/elementActive.d.ts +0 -10
- package/esm/interaction/native/elementActive.js.map +0 -1
- package/esm/interaction/native/elementActiveByColor.d.ts +0 -4
- package/esm/interaction/native/elementActiveByColor.js +0 -12
- package/esm/interaction/native/elementActiveByColor.js.map +0 -1
- package/esm/interaction/native/elementActiveByX.js +0 -13
- package/esm/interaction/native/elementActiveByX.js.map +0 -1
- package/esm/transform/maybeTitleX.d.ts +0 -6
- package/esm/transform/maybeTitleX.js.map +0 -1
- package/esm/transform/maybeTooltipPosition.d.ts +0 -7
- package/esm/transform/maybeTooltipPosition.js +0 -10
- package/esm/transform/maybeTooltipPosition.js.map +0 -1
- package/esm/transform/maybeTooltipY.d.ts +0 -6
- package/esm/transform/maybeTooltipY.js +0 -9
- package/esm/transform/maybeTooltipY.js.map +0 -1
- package/lib/data/filterBy.d.ts +0 -8
- package/lib/data/filterBy.js +0 -21
- package/lib/data/filterBy.js.map +0 -1
- package/lib/interaction/native/elementActive.d.ts +0 -10
- package/lib/interaction/native/elementActive.js.map +0 -1
- package/lib/interaction/native/elementActiveByColor.d.ts +0 -4
- package/lib/interaction/native/elementActiveByColor.js +0 -16
- package/lib/interaction/native/elementActiveByColor.js.map +0 -1
- package/lib/interaction/native/elementActiveByX.js +0 -17
- package/lib/interaction/native/elementActiveByX.js.map +0 -1
- package/lib/transform/maybeTitleX.d.ts +0 -6
- package/lib/transform/maybeTitleX.js.map +0 -1
- package/lib/transform/maybeTooltipPosition.d.ts +0 -7
- package/lib/transform/maybeTooltipPosition.js +0 -14
- package/lib/transform/maybeTooltipPosition.js.map +0 -1
- package/lib/transform/maybeTooltipY.d.ts +0 -6
- package/lib/transform/maybeTooltipY.js +0 -13
- package/lib/transform/maybeTooltipY.js.map +0 -1
- package/src/data/filterBy.ts +0 -28
- package/src/transform/maybeTooltipPosition.ts +0 -14
- package/src/transform/maybeTooltipY.ts +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"src/","sources":["shape/text/badge.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"src/","sources":["shape/text/badge.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,mCAAmC;AAEnC,6DAA0D;AAC1D,+CAA+C;AAC/C,qDAA+C;AAC/C,6CAA8D;AAQ9D;;GAEG;AACH,SAAS,OAAO,CAAC,CAAS;IACxB,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;IACzC,OAAO;QACL,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QACf,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;QAC9B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QACf,CAAC,GAAG,CAAC;KACN,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAoB;IAC7C,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC;IAC5C,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,G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,MAAW,KAAK,UAAK,OAAO,EAAtB,EAAY,CAAU,CAAC;IAC7B,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;QAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;QAC5C,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;QACnE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;QAEnC,MAAM,SAAS,GAAG;YAChB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;YAClB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,KAAK;SACZ,CAAC;QAEF,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC;QAC1B,OAAO,IAAA,kBAAM,EAAC,IAAI,UAAU,EAAE,CAAC;aAC5B,IAAI,CAAC,kBAAU,EAAE,UAAU,CAAC;aAC5B,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;aACd,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;aACd,IAAI,CAAC,kBAAU,EAAE,SAAS,CAAC;aAC3B,IAAI,CAAC,kBAAU,EAAE,KAAK,CAAC;aACvB,IAAI,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,KAAK,SAsBhB;AAEF,aAAK,CAAC,KAAK,GAAG;IACZ,qBAAqB,EAAE,QAAQ;IAC/B,sBAAsB,EAAE,UAAU;IAClC,oBAAoB,EAAE,SAAS;CAChC,CAAC"}
|
package/lib/shape/text/text.d.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import { TextStyleProps, RectStyleProps, PathStyleProps } from '@antv/g';
|
|
2
1
|
import { ShapeComponent as SC } from '../../runtime';
|
|
3
|
-
export
|
|
4
|
-
declare type MarkerStyleProps = {
|
|
5
|
-
size?: number;
|
|
6
|
-
symbol?: string | ((x: number, y: number, r: number) => string);
|
|
7
|
-
};
|
|
8
|
-
declare type TextShapeStyleProps = Omit<TextStyleProps, 'text'> & {
|
|
9
|
-
connector?: PathStyleProps;
|
|
10
|
-
startMarker?: MarkerStyleProps;
|
|
11
|
-
endMarker?: MarkerStyleProps;
|
|
12
|
-
background?: Omit<RectStyleProps, 'width' | 'height' | 'x' | 'y'> & {
|
|
13
|
-
padding?: number[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
2
|
+
export type TextOptions = Record<string, any>;
|
|
16
3
|
/**
|
|
17
4
|
* todo autoRotate when in polar coordinate
|
|
18
5
|
*/
|
|
19
6
|
export declare const Text: SC<TextOptions>;
|
|
20
|
-
export {};
|
package/lib/shape/text/text.js
CHANGED
|
@@ -12,144 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.Text = void 0;
|
|
15
|
-
const g_1 = require("@antv/g");
|
|
16
|
-
const gui_1 = require("@antv/gui");
|
|
17
15
|
const utils_1 = require("../../shape/utils");
|
|
18
16
|
const selection_1 = require("../../utils/selection");
|
|
19
|
-
|
|
20
|
-
const { min: [x0, y0], max: [x1, y1], } = shape.getLocalBounds();
|
|
21
|
-
let x = 0;
|
|
22
|
-
let y = 0;
|
|
23
|
-
if (x0 > 0)
|
|
24
|
-
x = x0;
|
|
25
|
-
if (x1 < 0)
|
|
26
|
-
x = x1;
|
|
27
|
-
if (y0 > 0)
|
|
28
|
-
y = y0;
|
|
29
|
-
if (y1 < 0)
|
|
30
|
-
y = y1;
|
|
31
|
-
return [
|
|
32
|
-
['M', 0, 0],
|
|
33
|
-
['L', x, y],
|
|
34
|
-
];
|
|
35
|
-
}
|
|
36
|
-
class TextShape extends g_1.CustomElement {
|
|
37
|
-
constructor(config) {
|
|
38
|
-
super(config);
|
|
39
|
-
}
|
|
40
|
-
// Callback after connected with canvas, should trigger render.
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
this.draw();
|
|
43
|
-
}
|
|
44
|
-
attributeChangedCallback() {
|
|
45
|
-
this.draw();
|
|
46
|
-
}
|
|
47
|
-
draw() {
|
|
48
|
-
this.drawText();
|
|
49
|
-
this.drawBackground();
|
|
50
|
-
this.drawConnector();
|
|
51
|
-
this.drawPoints();
|
|
52
|
-
}
|
|
53
|
-
get endPoint() {
|
|
54
|
-
const { connector } = this.style;
|
|
55
|
-
if (Array.isArray(connector === null || connector === void 0 ? void 0 : connector.path) && connector.path.length) {
|
|
56
|
-
const [[, x, y]] = connector.path.slice(-1);
|
|
57
|
-
return { x, y };
|
|
58
|
-
}
|
|
59
|
-
return { x: 0, y: 0 };
|
|
60
|
-
}
|
|
61
|
-
drawText() {
|
|
62
|
-
const _a = this.attributes, {
|
|
63
|
-
// Do not pass className.
|
|
64
|
-
class: className, connector, startMarker, endMarker, background, transform, textAlign } = _a, style = __rest(_a, ["class", "connector", "startMarker", "endMarker", "background", "transform", "textAlign"]);
|
|
65
|
-
const { x, y } = this.endPoint;
|
|
66
|
-
this.textShape = (0, selection_1.select)(this.textShape || this.appendChild(new g_1.Text({})))
|
|
67
|
-
.call(utils_1.applyStyle, style)
|
|
68
|
-
.style('x', +x)
|
|
69
|
-
.style('y', +y)
|
|
70
|
-
.style('textAlign', textAlign || (x < 0 ? 'right' : x > 0 ? 'left' : 'center'))
|
|
71
|
-
.node();
|
|
72
|
-
}
|
|
73
|
-
drawBackground() {
|
|
74
|
-
const { background } = this.style;
|
|
75
|
-
if (!background) {
|
|
76
|
-
if (this.background) {
|
|
77
|
-
this.removeChild(this.background);
|
|
78
|
-
this.background.destroy();
|
|
79
|
-
}
|
|
80
|
-
this.background = undefined;
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const { padding } = background, style = __rest(background, ["padding"]);
|
|
84
|
-
const [top = 0, right = 0, bottom = top, left = right] = padding || [];
|
|
85
|
-
const angle = this.getEulerAngles();
|
|
86
|
-
this.setEulerAngles(0);
|
|
87
|
-
const { min: [x, y], halfExtents: [hw, hh], } = this.textShape.getLocalBounds();
|
|
88
|
-
this.setEulerAngles(angle);
|
|
89
|
-
this.background = (0, selection_1.select)(this.background || this.appendChild(new g_1.Rect({})))
|
|
90
|
-
.style('zIndex', -1)
|
|
91
|
-
.style('x', x - left)
|
|
92
|
-
.style('y', y - top)
|
|
93
|
-
.style('width', hw * 2 + left + right)
|
|
94
|
-
.style('height', hh * 2 + top + bottom)
|
|
95
|
-
.call(utils_1.applyStyle, style)
|
|
96
|
-
.node();
|
|
97
|
-
}
|
|
98
|
-
drawConnector() {
|
|
99
|
-
const { connector } = this.style;
|
|
100
|
-
if (!connector) {
|
|
101
|
-
if (this.connector) {
|
|
102
|
-
this.removeChild(this.connector);
|
|
103
|
-
this.connector.destroy();
|
|
104
|
-
}
|
|
105
|
-
this.connector = undefined;
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const path = connector.path || getConnectorPath(this.background || this.textShape);
|
|
109
|
-
this.connector = (0, selection_1.select)(this.connector || this.appendChild(new g_1.Path({})))
|
|
110
|
-
.style('zIndex', -1)
|
|
111
|
-
.style('stroke', 'black')
|
|
112
|
-
.style('lineWidth', 1)
|
|
113
|
-
.call(utils_1.applyStyle, connector)
|
|
114
|
-
.style('path', path)
|
|
115
|
-
.node();
|
|
116
|
-
}
|
|
117
|
-
drawPoints() {
|
|
118
|
-
const { startMarker, endMarker } = this.style;
|
|
119
|
-
this.drawStartMarker(startMarker);
|
|
120
|
-
this.drawEndMarker(endMarker && Object.assign(Object.assign({}, endMarker), this.endPoint));
|
|
121
|
-
}
|
|
122
|
-
drawStartMarker(style) {
|
|
123
|
-
const shape = this.startMarkerPoint;
|
|
124
|
-
if (!style) {
|
|
125
|
-
if (shape) {
|
|
126
|
-
this.removeChild(shape);
|
|
127
|
-
shape.destroy();
|
|
128
|
-
}
|
|
129
|
-
this.startMarkerPoint = undefined;
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (!shape) {
|
|
133
|
-
this.startMarkerPoint = this.appendChild(new gui_1.Marker({ style: { symbol: 'circle', size: 4 } }));
|
|
134
|
-
}
|
|
135
|
-
this.startMarkerPoint.update(style);
|
|
136
|
-
}
|
|
137
|
-
drawEndMarker(style) {
|
|
138
|
-
const shape = this.endMarkerPoint;
|
|
139
|
-
if (!style) {
|
|
140
|
-
if (shape) {
|
|
141
|
-
this.removeChild(shape);
|
|
142
|
-
shape.destroy();
|
|
143
|
-
}
|
|
144
|
-
this.endMarkerPoint = undefined;
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (!shape) {
|
|
148
|
-
this.endMarkerPoint = this.appendChild(new gui_1.Marker({ style: { symbol: 'circle', size: 4 } }));
|
|
149
|
-
}
|
|
150
|
-
this.endMarkerPoint.update(style);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
17
|
+
const advance_1 = require("./advance");
|
|
153
18
|
/**
|
|
154
19
|
* todo autoRotate when in polar coordinate
|
|
155
20
|
*/
|
|
@@ -157,18 +22,22 @@ const Text = (options) => {
|
|
|
157
22
|
const style = __rest(options, []);
|
|
158
23
|
return (points, value, coordinate, theme) => {
|
|
159
24
|
const { mark, shape, defaultShape } = value;
|
|
160
|
-
const
|
|
161
|
-
const { color, text = '', fontSize
|
|
25
|
+
const shapeTheme = (0, utils_1.getShapeTheme)(theme, mark, shape, defaultShape);
|
|
26
|
+
const { color, text = '', fontSize, rotate = 0, transform = '' } = value;
|
|
27
|
+
const textStyle = {
|
|
28
|
+
text: String(text),
|
|
29
|
+
stroke: color,
|
|
30
|
+
fill: color,
|
|
31
|
+
fontSize,
|
|
32
|
+
};
|
|
162
33
|
const [[x0, y0]] = points;
|
|
163
|
-
return (0, selection_1.select)(new
|
|
164
|
-
.call(utils_1.applyStyle, shapeTheme)
|
|
34
|
+
return (0, selection_1.select)(new advance_1.Advance())
|
|
165
35
|
.style('x', x0)
|
|
166
36
|
.style('y', y0)
|
|
167
|
-
.
|
|
168
|
-
.style('stroke', color || stroke)
|
|
169
|
-
.style('fill', color || fill)
|
|
170
|
-
.style('fontSize', fontSize)
|
|
37
|
+
.call(utils_1.applyStyle, shapeTheme)
|
|
171
38
|
.style('transform', `${transform}rotate(${+rotate}deg)`)
|
|
39
|
+
.style('coordCenter', coordinate.getCenter())
|
|
40
|
+
.call(utils_1.applyStyle, textStyle)
|
|
172
41
|
.call(utils_1.applyStyle, style)
|
|
173
42
|
.node();
|
|
174
43
|
};
|
|
@@ -176,5 +45,7 @@ const Text = (options) => {
|
|
|
176
45
|
exports.Text = Text;
|
|
177
46
|
exports.Text.props = {
|
|
178
47
|
defaultEnterAnimation: 'fadeIn',
|
|
48
|
+
defaultUpdateAnimation: 'morphing',
|
|
49
|
+
defaultExitAnimation: 'fadeOut',
|
|
179
50
|
};
|
|
180
51
|
//# sourceMappingURL=text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","sourceRoot":"src/","sources":["shape/text/text.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"src/","sources":["shape/text/text.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,6CAA8D;AAC9D,qDAA+C;AAC/C,uCAAoC;AAIpC;;GAEG;AACI,MAAM,IAAI,GAAoB,CAAC,OAAO,EAAE,EAAE;IAC/C,MAAW,KAAK,UAAK,OAAO,EAAtB,EAAY,CAAU,CAAC;IAC7B,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;QAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;QAC5C,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;QACnE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;QAEzE,MAAM,SAAS,GAAG;YAChB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;YAClB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,KAAK;YACX,QAAQ;SACT,CAAC;QAEF,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC;QAE1B,OAAO,IAAA,kBAAM,EAAC,IAAI,iBAAO,EAAE,CAAC;aACzB,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;aACd,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC;aACd,IAAI,CAAC,kBAAU,EAAE,UAAU,CAAC;aAC5B,KAAK,CAAC,WAAW,EAAE,GAAG,SAAS,UAAU,CAAC,MAAM,MAAM,CAAC;aACvD,KAAK,CAAC,aAAa,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC;aAC5C,IAAI,CAAC,kBAAU,EAAE,SAAS,CAAC;aAC3B,IAAI,CAAC,kBAAU,EAAE,KAAK,CAAC;aACvB,IAAI,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,IAAI,QA0Bf;AAEF,YAAI,CAAC,KAAK,GAAG;IACX,qBAAqB,EAAE,QAAQ;IAC/B,sBAAsB,EAAE,UAAU;IAClC,oBAAoB,EAAE,SAAS;CAChC,CAAC"}
|
package/lib/shape/utils.d.ts
CHANGED
|
@@ -2,20 +2,20 @@ import { Path as D3Path } from 'd3-path';
|
|
|
2
2
|
import { Coordinate } from '@antv/coord';
|
|
3
3
|
import { G2Theme, Primitive, Vector2 } from '../runtime';
|
|
4
4
|
import { Selection } from '../utils/selection';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
5
|
+
type A = ['a' | 'A', number, number, number, number, number, number, number];
|
|
6
|
+
type C = ['c' | 'C', number, number, number, number, number, number];
|
|
7
|
+
type O = ['o' | 'O', number, number];
|
|
8
|
+
type H = ['h' | 'H', number];
|
|
9
|
+
type L = ['l' | 'L', number, number];
|
|
10
|
+
type M = ['m' | 'M', number, number];
|
|
11
|
+
type R = ['r' | 'R', number, number, number, number];
|
|
12
|
+
type Q = ['q' | 'Q', number, number, number, number];
|
|
13
|
+
type S = ['s' | 'S', number, number, number, number, number, number, number];
|
|
14
|
+
type T = ['t' | 'T', number, number];
|
|
15
|
+
type V = ['v' | 'V', number];
|
|
16
|
+
type U = ['u' | 'U', number, number, number];
|
|
17
|
+
type Z = ['z' | 'Z'];
|
|
18
|
+
export type PathCommand = A | C | O | H | L | M | R | Q | S | T | V | U | Z;
|
|
19
19
|
export declare function applyStyle(selection: Selection, style: Record<string, Primitive>): void;
|
|
20
20
|
/**
|
|
21
21
|
* Draw polygon path with points.
|
|
@@ -23,15 +23,11 @@ export declare function applyStyle(selection: Selection, style: Record<string, P
|
|
|
23
23
|
* @param points
|
|
24
24
|
*/
|
|
25
25
|
export declare function appendPolygon(path: D3Path, points: Vector2[]): D3Path;
|
|
26
|
-
export
|
|
26
|
+
export type ArrowOptions = {
|
|
27
27
|
/**
|
|
28
28
|
* Arrow size, can be a px number, or a percentage string. Default: '40%'
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* todo
|
|
33
|
-
*/
|
|
34
|
-
symbol?: string;
|
|
30
|
+
arrowSize?: number | string;
|
|
35
31
|
};
|
|
36
32
|
/**
|
|
37
33
|
* Draw arrow between `from` and `to`.
|
|
@@ -49,7 +45,10 @@ export declare function arrowPoints(from: Vector2, to: Vector2, options: ArrowOp
|
|
|
49
45
|
* @param radius
|
|
50
46
|
*/
|
|
51
47
|
export declare function appendArc(path: D3Path, from: Vector2, to: Vector2, center: Vector2, radius: number): D3Path;
|
|
52
|
-
|
|
48
|
+
/**
|
|
49
|
+
* @todo Fix wrong key point.
|
|
50
|
+
*/
|
|
51
|
+
export declare function computeGradient(C: string[], X: number[], Y: number[], from?: string | boolean, mode?: 'between' | 'start' | 'end'): string;
|
|
53
52
|
export declare function reorder(points: Vector2[]): Vector2[];
|
|
54
53
|
export declare function getArcObject(coordinate: Coordinate, points: Vector2[], Y: [number, number]): {
|
|
55
54
|
startAngle: number;
|
|
@@ -63,4 +62,5 @@ export declare function getShapeTheme(theme: G2Theme, mark: string, shape: strin
|
|
|
63
62
|
* @param style
|
|
64
63
|
*/
|
|
65
64
|
export declare function getConnectStyle(style: Record<string, any>): Record<string, any>;
|
|
65
|
+
export declare function toOpacityKey(options: any): string;
|
|
66
66
|
export {};
|
package/lib/shape/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getConnectStyle = exports.getShapeTheme = exports.getArcObject = exports.reorder = exports.computeGradient = exports.appendArc = exports.arrowPoints = exports.appendPolygon = exports.applyStyle = void 0;
|
|
3
|
+
exports.toOpacityKey = exports.getConnectStyle = exports.getShapeTheme = exports.getArcObject = exports.reorder = exports.computeGradient = exports.appendArc = exports.arrowPoints = exports.appendPolygon = exports.applyStyle = void 0;
|
|
4
4
|
const d3_array_1 = require("d3-array");
|
|
5
5
|
const scale_1 = require("@antv/scale");
|
|
6
6
|
const util_1 = require("@antv/util");
|
|
@@ -31,23 +31,23 @@ exports.appendPolygon = appendPolygon;
|
|
|
31
31
|
* @returns
|
|
32
32
|
*/
|
|
33
33
|
function arrowPoints(from, to, options) {
|
|
34
|
-
const {
|
|
35
|
-
const
|
|
36
|
-
? (+parseFloat(
|
|
37
|
-
:
|
|
34
|
+
const { arrowSize } = options;
|
|
35
|
+
const size = typeof arrowSize === 'string'
|
|
36
|
+
? (+parseFloat(arrowSize) / 100) * (0, vector_1.dist)(from, to)
|
|
37
|
+
: arrowSize;
|
|
38
38
|
// TODO Use config from style.
|
|
39
39
|
// Default arrow rotate is 30°.
|
|
40
40
|
const arrowAngle = Math.PI / 6;
|
|
41
41
|
const angle = Math.atan2(to[1] - from[1], to[0] - from[0]);
|
|
42
42
|
const arrowAngle1 = Math.PI / 2 - angle - arrowAngle;
|
|
43
43
|
const arrow1 = [
|
|
44
|
-
to[0] -
|
|
45
|
-
to[1] -
|
|
44
|
+
to[0] - size * Math.sin(arrowAngle1),
|
|
45
|
+
to[1] - size * Math.cos(arrowAngle1),
|
|
46
46
|
];
|
|
47
47
|
const arrowAngle2 = angle - arrowAngle;
|
|
48
48
|
const arrow2 = [
|
|
49
|
-
to[0] -
|
|
50
|
-
to[1] -
|
|
49
|
+
to[0] - size * Math.cos(arrowAngle2),
|
|
50
|
+
to[1] - size * Math.sin(arrowAngle2),
|
|
51
51
|
];
|
|
52
52
|
return [arrow1, arrow2];
|
|
53
53
|
}
|
|
@@ -67,18 +67,34 @@ function appendArc(path, from, to, center, radius) {
|
|
|
67
67
|
return path;
|
|
68
68
|
}
|
|
69
69
|
exports.appendArc = appendArc;
|
|
70
|
-
|
|
70
|
+
/**
|
|
71
|
+
* @todo Fix wrong key point.
|
|
72
|
+
*/
|
|
73
|
+
function computeGradient(C, X, Y, from = 'y', mode = 'between') {
|
|
71
74
|
const P = from === 'y' || from === true ? Y : X;
|
|
72
75
|
const theta = from === 'y' || from === true ? 90 : 0;
|
|
73
76
|
const I = (0, array_1.indexOf)(P);
|
|
74
77
|
const [min, max] = (0, d3_array_1.extent)(I, (i) => P[i]);
|
|
78
|
+
// This need to improve for non-uniform distributed colors.
|
|
75
79
|
const p = new scale_1.Linear({
|
|
76
80
|
domain: [min, max],
|
|
77
81
|
range: [0, 100],
|
|
78
82
|
});
|
|
79
83
|
const percentage = (i) => p.map(P[i]);
|
|
84
|
+
const gradientMode = {
|
|
85
|
+
// Interpolate the colors for this segment.
|
|
86
|
+
between: (i) => `${C[i]} ${percentage(i)}%`,
|
|
87
|
+
// Use the color of the start point as the color for this segment.
|
|
88
|
+
start: (i) => i === 0
|
|
89
|
+
? `${C[i]} ${percentage(i)}%`
|
|
90
|
+
: `${C[i - 1]} ${percentage(i)}%, ${C[i]} ${percentage(i)}%`,
|
|
91
|
+
// Use the color of the end point as the color for this segment.
|
|
92
|
+
end: (i) => i === C.length - 1
|
|
93
|
+
? `${C[i]} ${percentage(i)}%`
|
|
94
|
+
: `${C[i]} ${percentage(i)}%, ${C[i + 1]} ${percentage(i)}%`,
|
|
95
|
+
};
|
|
80
96
|
const gradient = I.sort((a, b) => percentage(a) - percentage(b))
|
|
81
|
-
.map(
|
|
97
|
+
.map(gradientMode[mode] || gradientMode['between'])
|
|
82
98
|
.join(',');
|
|
83
99
|
return `linear-gradient(${theta}deg, ${gradient})`;
|
|
84
100
|
}
|
|
@@ -110,8 +126,7 @@ exports.getArcObject = getArcObject;
|
|
|
110
126
|
function getShapeTheme(theme, mark, shape, defaultShape) {
|
|
111
127
|
const { defaultColor } = theme;
|
|
112
128
|
const markTheme = theme[mark] || {};
|
|
113
|
-
return (markTheme[shape] ||
|
|
114
|
-
markTheme[defaultShape] || { fill: defaultColor, stroke: defaultColor });
|
|
129
|
+
return Object.assign({}, { fill: defaultColor, stroke: defaultColor }, markTheme[shape] || markTheme[defaultShape]);
|
|
115
130
|
}
|
|
116
131
|
exports.getShapeTheme = getShapeTheme;
|
|
117
132
|
/**
|
|
@@ -129,4 +144,9 @@ function getConnectStyle(style) {
|
|
|
129
144
|
.filter(([key]) => key !== undefined));
|
|
130
145
|
}
|
|
131
146
|
exports.getConnectStyle = getConnectStyle;
|
|
147
|
+
function toOpacityKey(options) {
|
|
148
|
+
const { opacityAttribute = 'fill' } = options;
|
|
149
|
+
return `${opacityAttribute}Opacity`;
|
|
150
|
+
}
|
|
151
|
+
exports.toOpacityKey = toOpacityKey;
|
|
132
152
|
//# sourceMappingURL=utils.js.map
|
package/lib/shape/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"src/","sources":["shape/utils.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAElC,uCAAqC;AACrC,qCAAwC;AAExC,oDAAkD;AAClD,4CAAsE;AAEtE,0CAAyC;AAkBzC,SAAgB,UAAU,CACxB,SAAoB,EACpB,KAAgC;IAEhC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAChD,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAC7B;AACH,CAAC;AAPD,gCAOC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,MAAiB;IAC3D,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CACxB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAC9D,CAAC;IACF,IAAI,CAAC,SAAS,EAAE,CAAC;IACjB,OAAO,IAAI,CAAC;AACd,CAAC;AAND,sCAMC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"src/","sources":["shape/utils.ts"],"names":[],"mappings":";;;AACA,uCAAkC;AAElC,uCAAqC;AACrC,qCAAwC;AAExC,oDAAkD;AAClD,4CAAsE;AAEtE,0CAAyC;AAkBzC,SAAgB,UAAU,CACxB,SAAoB,EACpB,KAAgC;IAEhC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAChD,SAAS,CAAC,KAAK,CA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AC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QACrB,IAAA,iBAAU,EAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1C,KAAK;KACN,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,CACxC,CAAC;AACJ,CAAC;AAbD,0CAaC;AAED,SAAgB,YAAY,CAAC,OAAO;IAClC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;IAC9C,OAAO,GAAG,gBAAgB,SAAS,CAAC;AACtC,CAAC;AAHD,oCAGC"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { ArrowOptions } from '../utils';
|
|
2
2
|
import { ShapeComponent as SC } from '../../runtime';
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
* Whether draw arrow, Default: false.
|
|
6
|
-
*/
|
|
7
|
-
arrow?: ArrowOptions;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
3
|
+
export type VectorOptions = ArrowOptions;
|
|
10
4
|
/**
|
|
11
5
|
* ----->
|
|
12
6
|
*/
|
|
@@ -20,13 +20,13 @@ const selection_1 = require("../../utils/selection");
|
|
|
20
20
|
* ----->
|
|
21
21
|
*/
|
|
22
22
|
const Vector = (options) => {
|
|
23
|
-
const {
|
|
23
|
+
const { arrowSize = '40%' } = options, style = __rest(options, ["arrowSize"]);
|
|
24
24
|
return (points, value, coordinate, theme) => {
|
|
25
25
|
const { mark, shape, defaultShape, color, transform } = value;
|
|
26
26
|
const _a = (0, utils_1.getShapeTheme)(theme, mark, shape, defaultShape), { fill, stroke } = _a, shapeTheme = __rest(_a, ["fill", "stroke"]);
|
|
27
27
|
const [from, to] = points;
|
|
28
28
|
// Calculate arrow end point.
|
|
29
|
-
const [arrow1, arrow2] = (0, utils_1.arrowPoints)(from, to,
|
|
29
|
+
const [arrow1, arrow2] = (0, utils_1.arrowPoints)(from, to, { arrowSize });
|
|
30
30
|
// Draw line
|
|
31
31
|
const path = (0, d3_path_1.path)();
|
|
32
32
|
path.moveTo(...from);
|
|
@@ -49,5 +49,7 @@ const Vector = (options) => {
|
|
|
49
49
|
exports.Vector = Vector;
|
|
50
50
|
exports.Vector.props = {
|
|
51
51
|
defaultEnterAnimation: 'fadeIn',
|
|
52
|
+
defaultUpdateAnimation: 'morphing',
|
|
53
|
+
defaultExitAnimation: 'fadeOut',
|
|
52
54
|
};
|
|
53
55
|
//# sourceMappingURL=vector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector.js","sourceRoot":"src/","sources":["shape/vector/vector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAyC;AACzC,+BAA+B;AAC/B,oCAAgF;AAChF,qDAA+C;
|
|
1
|
+
{"version":3,"file":"vector.js","sourceRoot":"src/","sources":["shape/vector/vector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAyC;AACzC,+BAA+B;AAC/B,oCAAgF;AAChF,qDAA+C;AAK/C;;GAEG;AACI,MAAM,MAAM,GAAsB,CAAC,OAAO,EAAE,EAAE;IACnD,MAAM,EAAE,SAAS,GAAG,KAAK,KAAe,OAAO,EAAjB,KAAK,UAAK,OAAO,EAAzC,aAA+B,CAAU,CAAC;IAChD,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;QAC1C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;QAC9D,MAAM,KAAkC,IAAA,qBAAa,EACnD,KAAK,EACL,IAAI,EACJ,KAAK,EACL,YAAY,CACb,EALK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CAChC,CAAC"}
|
package/lib/spec/action.d.ts
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
import { ActionComponent } from '../interaction';
|
|
2
2
|
import { FisheyeCoordinate } from './coordinate';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type Action = FisheyeFocusAction | CustomAction | SurfacePointSelectionAction | ActiveElementAction | HighlightElementAction | FilterElementAction | TriggerInfoSelectionAction | LegendItemSelectionAction | SetItemStateAction | PlotAction | FilterAction | CursorAction | TooltipAction | RecordTipAction | PoptipAction | RecordPointAction | RecordCurrentPointAction | RecordStateAction | RecordRegionAction | MaskAction | ButtonAction | MoveAction | ActiveRegionAction;
|
|
4
|
+
export type ActionTypes = 'fisheyeFocus' | 'surfacePointSelection' | 'elementSelection' | 'activeElement' | 'highlightElement' | 'filterElement' | 'triggerInfoSelection' | 'legendItemSelection' | 'setItemState' | 'plot' | 'filter' | 'cursor' | 'tooltip' | 'recordTip' | 'poptip' | 'recordState' | 'recordPoint' | 'recordCurrentPoint' | 'recordRegion' | 'mask' | 'button' | 'move' | 'activeRegion' | CustomAction;
|
|
5
|
+
export type FisheyeFocusAction = {
|
|
6
6
|
type?: 'fisheyeFocus';
|
|
7
7
|
} & Omit<FisheyeCoordinate, 'type'>;
|
|
8
|
-
export
|
|
8
|
+
export type SurfacePointSelectionAction = {
|
|
9
9
|
type?: 'surfacePointSelection';
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ActiveElementAction = {
|
|
12
12
|
type?: 'activeElement';
|
|
13
13
|
color?: string;
|
|
14
14
|
border?: number;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type HighlightElementAction = {
|
|
17
17
|
type?: 'highlightElement';
|
|
18
18
|
color?: string;
|
|
19
19
|
clear?: boolean;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type FilterElementAction = {
|
|
22
22
|
type?: 'filterElement';
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type CursorAction = {
|
|
25
25
|
type?: 'cursor';
|
|
26
26
|
cursor?: string;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type PlotAction = {
|
|
29
29
|
type?: 'plot';
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type FilterAction = {
|
|
32
32
|
type?: 'filter';
|
|
33
33
|
reset?: boolean;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type TooltipAction = {
|
|
36
36
|
type?: 'tooltip';
|
|
37
37
|
showMarkers?: boolean;
|
|
38
38
|
showCrosshairs?: boolean;
|
|
39
39
|
crosshairs?: any;
|
|
40
40
|
markers?: any;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type ElementSelectionAction = {
|
|
43
43
|
type?: 'elementSelection';
|
|
44
44
|
trigger?: 'item' | 'axis' | 'triggerInfo' | 'rect-mask' | 'polygon-mask';
|
|
45
|
-
|
|
45
|
+
filter?: 'x' | 'color';
|
|
46
46
|
toggle?: boolean;
|
|
47
47
|
multiple?: boolean;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type TriggerInfoSelectionAction = {
|
|
50
50
|
type?: 'triggerInfoSelection';
|
|
51
51
|
multiple?: boolean;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type LegendItemSelectionAction = {
|
|
54
54
|
type?: 'legendItemSelection';
|
|
55
55
|
from?: 'selectedElements' | 'triggerInfo';
|
|
56
56
|
};
|
|
57
|
-
export
|
|
57
|
+
export type SetItemStateAction = {
|
|
58
58
|
type?: 'setItemState';
|
|
59
59
|
color?: string;
|
|
60
60
|
items?: string[];
|
|
61
61
|
state?: string;
|
|
62
62
|
};
|
|
63
|
-
export
|
|
63
|
+
export type RecordStateAction = {
|
|
64
64
|
type?: 'recordState';
|
|
65
65
|
state?: string;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type RecordCurrentPointAction = {
|
|
68
68
|
type?: 'recordCurrentPoint';
|
|
69
69
|
clear?: boolean;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type RecordPointAction = {
|
|
72
72
|
type?: 'recordPoint';
|
|
73
73
|
clear?: boolean;
|
|
74
74
|
start?: boolean;
|
|
75
75
|
};
|
|
76
|
-
export
|
|
76
|
+
export type RecordRegionAction = {
|
|
77
77
|
type?: 'recordRegion';
|
|
78
78
|
dim?: 'x' | 'y';
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type MaskAction = {
|
|
81
81
|
type?: 'mask';
|
|
82
82
|
maskType?: 'rect' | 'rectX' | 'rectY' | 'polygon';
|
|
83
83
|
fill?: string;
|
|
84
84
|
fillOpacity?: number;
|
|
85
85
|
};
|
|
86
|
-
export
|
|
86
|
+
export type ButtonAction = {
|
|
87
87
|
type?: 'button';
|
|
88
88
|
position?: 'top-left' | 'top-right';
|
|
89
89
|
text?: string;
|
|
@@ -97,26 +97,26 @@ export declare type ButtonAction = {
|
|
|
97
97
|
padding?: number[];
|
|
98
98
|
hide?: boolean;
|
|
99
99
|
};
|
|
100
|
-
export
|
|
100
|
+
export type MoveAction = {
|
|
101
101
|
type?: 'move';
|
|
102
102
|
};
|
|
103
|
-
export
|
|
103
|
+
export type ActiveRegionAction = {
|
|
104
104
|
type?: 'activeRegion';
|
|
105
105
|
clear?: boolean;
|
|
106
106
|
fill?: string;
|
|
107
107
|
fillOpacity?: number;
|
|
108
108
|
};
|
|
109
|
-
export
|
|
109
|
+
export type RecordTipAction = {
|
|
110
110
|
type?: 'recordTip';
|
|
111
111
|
tip?: string;
|
|
112
112
|
};
|
|
113
|
-
export
|
|
113
|
+
export type PoptipAction = {
|
|
114
114
|
type?: 'poptip';
|
|
115
115
|
x?: number;
|
|
116
116
|
y?: number;
|
|
117
117
|
htmlStyle?: string;
|
|
118
118
|
};
|
|
119
|
-
export
|
|
119
|
+
export type CustomAction = {
|
|
120
120
|
type?: ActionComponent;
|
|
121
121
|
[key: string]: any;
|
|
122
122
|
};
|