@antv/g2 5.0.0-beta.11 → 5.0.0-beta.13
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 +3 -3
- package/dist/g2.min.js +3 -3
- package/esm/api/chart.d.ts +17 -3
- package/esm/api/chart.js +15 -5
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/base.d.ts +1 -1
- package/esm/api/composition/base.js +6 -17
- package/esm/api/composition/base.js.map +1 -1
- package/esm/api/composition/facetCircle.d.ts +2 -2
- package/esm/api/composition/facetCircle.js +2 -2
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +2 -2
- package/esm/api/composition/facetRect.js +2 -2
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +2 -2
- package/esm/api/composition/geoPath.js +2 -2
- package/esm/api/composition/geoPath.js.map +1 -1
- package/esm/api/composition/geoView.d.ts +2 -2
- package/esm/api/composition/geoView.js +2 -2
- package/esm/api/composition/geoView.js.map +1 -1
- package/esm/api/composition/index.d.ts +2 -2
- package/esm/api/composition/index.js +2 -2
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +2 -2
- package/esm/api/composition/repeatMatrix.js +2 -2
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +2 -2
- package/esm/api/composition/spaceFlex.js +2 -2
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +2 -2
- package/esm/api/composition/spaceLayer.js +2 -2
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -2
- package/esm/api/composition/timingKeyframe.js +2 -2
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +2 -2
- package/esm/api/composition/view.js +2 -2
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/index.d.ts +2 -0
- package/esm/api/index.js +2 -0
- package/esm/api/index.js.map +1 -1
- package/esm/api/mark/base.d.ts +1 -1
- package/esm/api/mark/base.js +7 -7
- package/esm/api/mark/base.js.map +1 -1
- package/esm/api/mark/index.d.ts +5 -1
- package/esm/api/mark/index.js +3 -1
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +46 -40
- package/esm/api/mark/mark.js +37 -27
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +3 -2
- package/esm/api/node.d.ts +1 -1
- package/esm/api/node.js +1 -1
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.d.ts +1 -1
- package/esm/api/props.js +26 -2
- package/esm/api/props.js.map +1 -1
- package/esm/api/types.d.ts +2 -2
- package/esm/component/axis.js +3 -3
- package/esm/component/axis.js.map +1 -1
- package/esm/component/scrollbar.js +3 -3
- package/esm/component/scrollbar.js.map +1 -1
- package/esm/component/slider.js +3 -3
- package/esm/component/slider.js.map +1 -1
- package/esm/component/title.js +3 -14
- package/esm/component/title.js.map +1 -1
- package/esm/composition/mark.d.ts +1 -1
- package/esm/composition/timingKeyframe.js +13 -7
- package/esm/composition/timingKeyframe.js.map +1 -1
- package/esm/coordinate/polar.d.ts +3 -2
- package/esm/coordinate/radial.d.ts +3 -2
- package/esm/coordinate/theta.d.ts +1 -0
- package/esm/data/arc.d.ts +1 -2
- package/esm/data/arc.js.map +1 -1
- package/esm/data/cluster.d.ts +1 -2
- package/esm/data/cluster.js.map +1 -1
- package/esm/data/sankey.d.ts +1 -2
- package/esm/data/sankey.js.map +1 -1
- package/esm/data/tree.d.ts +1 -2
- package/esm/data/tree.js.map +1 -1
- package/esm/data/wordCloud.d.ts +1 -2
- package/esm/data/wordCloud.js.map +1 -1
- package/esm/geo/index.d.ts +2 -2
- package/esm/index.d.ts +4 -3
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/interaction/{native/brushAxisHighlight.js → brushAxisHighlight.js} +1 -1
- package/esm/interaction/brushAxisHighlight.js.map +1 -0
- package/esm/interaction/{native/brushFilter.js → brushFilter.js} +3 -3
- package/esm/interaction/brushFilter.js.map +1 -0
- package/esm/interaction/{native/brushHighlight.js → brushHighlight.js} +1 -1
- package/esm/interaction/brushHighlight.js.map +1 -0
- package/esm/interaction/brushXFilter.js.map +1 -0
- package/esm/interaction/brushXHighlight.js.map +1 -0
- package/esm/interaction/brushYFilter.js.map +1 -0
- package/esm/interaction/brushYHighlight.js.map +1 -0
- package/esm/interaction/{native/chartIndex.js → chartIndex.js} +2 -2
- package/esm/interaction/chartIndex.js.map +1 -0
- package/esm/interaction/{native/elementHighlight.js → elementHighlight.js} +1 -1
- package/esm/interaction/elementHighlight.js.map +1 -0
- package/esm/interaction/elementHighlightByColor.js.map +1 -0
- package/esm/interaction/elementHighlightByX.js.map +1 -0
- package/esm/interaction/{native/elementSelect.js → elementSelect.js} +1 -1
- package/esm/interaction/elementSelect.js.map +1 -0
- package/esm/interaction/elementSelectByColor.js.map +1 -0
- package/esm/interaction/elementSelectByX.js.map +1 -0
- package/esm/interaction/event.d.ts +1 -0
- package/esm/interaction/event.js +103 -0
- package/esm/interaction/event.js.map +1 -0
- package/esm/interaction/fisheye.js.map +1 -0
- package/esm/interaction/index.d.ts +21 -22
- package/esm/interaction/index.js +21 -23
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/{native/legendFilter.js → legendFilter.js} +1 -1
- package/esm/interaction/legendFilter.js.map +1 -0
- package/esm/interaction/{native/legendHighlight.js → legendHighlight.js} +1 -1
- package/esm/interaction/legendHighlight.js.map +1 -0
- package/esm/interaction/{native/poptip.js → poptip.js} +2 -2
- package/esm/interaction/poptip.js.map +1 -0
- package/esm/interaction/{native/sliderFilter.js → sliderFilter.js} +3 -3
- package/esm/interaction/sliderFilter.js.map +1 -0
- package/esm/interaction/{native/tooltip.d.ts → tooltip.d.ts} +2 -3
- package/esm/interaction/{native/tooltip.js → tooltip.js} +69 -74
- package/esm/interaction/tooltip.js.map +1 -0
- package/esm/interaction/utils.d.ts +47 -3
- package/esm/interaction/utils.js +371 -32
- package/esm/interaction/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +2 -2
- package/esm/label-transform/contrastReverse.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +2 -2
- package/esm/label-transform/overlapDodgeY.d.ts +2 -2
- package/esm/label-transform/overlapHide.d.ts +2 -2
- package/esm/mark/area.d.ts +2 -2
- package/esm/mark/box.d.ts +2 -2
- package/esm/mark/cell.d.ts +2 -2
- package/esm/mark/image.d.ts +2 -2
- package/esm/mark/interval.d.ts +2 -2
- package/esm/mark/line.d.ts +2 -2
- package/esm/mark/link.d.ts +2 -2
- package/esm/mark/point.d.ts +2 -2
- package/esm/mark/polygon.d.ts +2 -2
- package/esm/mark/rect.d.ts +2 -2
- package/esm/mark/text.d.ts +2 -2
- package/esm/mark/utils.js +1 -5
- package/esm/mark/utils.js.map +1 -1
- package/esm/mark/vector.d.ts +2 -2
- package/esm/palette/index.d.ts +0 -36
- package/esm/palette/index.js +0 -18
- package/esm/palette/index.js.map +1 -1
- package/esm/runtime/mark.js +5 -3
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.js +36 -17
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/transform.d.ts +5 -0
- package/esm/runtime/transform.js +62 -4
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +7 -2
- package/esm/runtime/types/component.d.ts +2 -1
- package/esm/runtime/types/options.d.ts +6 -1
- package/esm/runtime/types/theme.d.ts +2 -2
- package/esm/spec/animate.d.ts +23 -1
- package/esm/spec/component.d.ts +68 -0
- package/esm/spec/component.js +2 -0
- package/esm/spec/component.js.map +1 -0
- package/esm/spec/composition.d.ts +26 -26
- package/esm/spec/coordinate.d.ts +23 -32
- package/esm/spec/coordinateTransform.d.ts +13 -0
- package/esm/spec/coordinateTransform.js +2 -0
- package/esm/spec/coordinateTransform.js.map +1 -0
- package/esm/spec/data.d.ts +4 -222
- package/esm/spec/dataTransform.d.ts +91 -0
- package/esm/spec/dataTransform.js +2 -0
- package/esm/spec/dataTransform.js.map +1 -0
- package/esm/spec/index.d.ts +15 -11
- package/esm/spec/index.js +12 -9
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/interaction.d.ts +9 -4
- package/esm/spec/labelTransform.d.ts +5 -5
- package/esm/spec/mark.d.ts +185 -0
- package/esm/spec/mark.js +2 -0
- package/esm/spec/mark.js.map +1 -0
- package/esm/spec/palette.d.ts +0 -54
- package/esm/spec/transform.d.ts +1 -1
- package/esm/spec/utils.d.ts +4 -0
- package/esm/stdlib/index.js +3 -28
- package/esm/stdlib/index.js.map +1 -1
- package/esm/transform/groupN.js +2 -2
- package/esm/transform/groupN.js.map +1 -1
- package/esm/transform/maybeTitle.js +13 -3
- package/esm/transform/maybeTitle.js.map +1 -1
- package/esm/transform/maybeTooltip.js +20 -20
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/transform/maybeZeroX.js +2 -2
- package/esm/transform/maybeZeroX.js.map +1 -1
- package/esm/transform/maybeZeroY.js +2 -2
- package/esm/transform/maybeZeroY.js.map +1 -1
- package/esm/transform/maybeZeroY1.js +2 -2
- package/esm/transform/maybeZeroY1.js.map +1 -1
- package/esm/transform/utils/helper.d.ts +12 -0
- package/esm/transform/utils/helper.js +8 -0
- package/esm/transform/utils/helper.js.map +1 -1
- package/esm/utils/helper.js +4 -1
- package/esm/utils/helper.js.map +1 -1
- package/lib/api/chart.d.ts +17 -3
- package/lib/api/chart.js +15 -5
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/base.d.ts +1 -1
- package/lib/api/composition/base.js +8 -18
- package/lib/api/composition/base.js.map +1 -1
- package/lib/api/composition/facetCircle.d.ts +2 -2
- package/lib/api/composition/facetCircle.js +1 -1
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +2 -2
- package/lib/api/composition/facetRect.js +1 -1
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +2 -2
- package/lib/api/composition/geoPath.js +1 -1
- package/lib/api/composition/geoPath.js.map +1 -1
- package/lib/api/composition/geoView.d.ts +2 -2
- package/lib/api/composition/geoView.js +1 -1
- package/lib/api/composition/geoView.js.map +1 -1
- package/lib/api/composition/index.d.ts +2 -2
- package/lib/api/composition/index.js +2 -2
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +2 -2
- package/lib/api/composition/repeatMatrix.js +1 -1
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +2 -2
- package/lib/api/composition/spaceFlex.js +1 -1
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +2 -2
- package/lib/api/composition/spaceLayer.js +1 -1
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -2
- package/lib/api/composition/timingKeyframe.js +1 -1
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +2 -2
- package/lib/api/composition/view.js +1 -1
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +5 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/mark/base.d.ts +1 -1
- package/lib/api/mark/base.js +9 -9
- package/lib/api/mark/base.js.map +1 -1
- package/lib/api/mark/index.d.ts +5 -1
- package/lib/api/mark/index.js +4 -1
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +46 -40
- package/lib/api/mark/mark.js +37 -27
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +3 -2
- package/lib/api/node.d.ts +1 -1
- package/lib/api/node.js +1 -1
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.d.ts +1 -1
- package/lib/api/props.js +26 -2
- package/lib/api/props.js.map +1 -1
- package/lib/api/types.d.ts +2 -2
- package/lib/component/axis.js +3 -3
- package/lib/component/axis.js.map +1 -1
- package/lib/component/scrollbar.js +3 -3
- package/lib/component/scrollbar.js.map +1 -1
- package/lib/component/slider.js +3 -3
- package/lib/component/slider.js.map +1 -1
- package/lib/component/title.js +3 -14
- package/lib/component/title.js.map +1 -1
- package/lib/composition/mark.d.ts +1 -1
- package/lib/composition/timingKeyframe.js +13 -7
- package/lib/composition/timingKeyframe.js.map +1 -1
- package/lib/coordinate/polar.d.ts +3 -2
- package/lib/coordinate/radial.d.ts +3 -2
- package/lib/coordinate/theta.d.ts +1 -0
- package/lib/data/arc.d.ts +1 -2
- package/lib/data/arc.js.map +1 -1
- package/lib/data/cluster.d.ts +1 -2
- package/lib/data/cluster.js.map +1 -1
- package/lib/data/sankey.d.ts +1 -2
- package/lib/data/sankey.js.map +1 -1
- package/lib/data/tree.d.ts +1 -2
- package/lib/data/tree.js.map +1 -1
- package/lib/data/wordCloud.d.ts +1 -2
- package/lib/data/wordCloud.js.map +1 -1
- package/lib/geo/index.d.ts +2 -2
- package/lib/index.d.ts +4 -3
- package/lib/index.js +15 -2
- package/lib/index.js.map +1 -1
- package/lib/interaction/{native/brushAxisHighlight.js → brushAxisHighlight.js} +1 -1
- package/lib/interaction/brushAxisHighlight.js.map +1 -0
- package/lib/interaction/{native/brushFilter.js → brushFilter.js} +3 -3
- package/lib/interaction/brushFilter.js.map +1 -0
- package/lib/interaction/{native/brushHighlight.js → brushHighlight.js} +1 -1
- package/lib/interaction/brushHighlight.js.map +1 -0
- package/lib/interaction/brushXFilter.js.map +1 -0
- package/lib/interaction/brushXHighlight.js.map +1 -0
- package/lib/interaction/brushYFilter.js.map +1 -0
- package/lib/interaction/brushYHighlight.js.map +1 -0
- package/lib/interaction/{native/chartIndex.js → chartIndex.js} +2 -2
- package/lib/interaction/chartIndex.js.map +1 -0
- package/lib/interaction/{native/elementHighlight.js → elementHighlight.js} +1 -1
- package/lib/interaction/elementHighlight.js.map +1 -0
- package/lib/interaction/elementHighlightByColor.js.map +1 -0
- package/lib/interaction/elementHighlightByX.js.map +1 -0
- package/lib/interaction/{native/elementSelect.js → elementSelect.js} +1 -1
- package/lib/interaction/elementSelect.js.map +1 -0
- package/lib/interaction/elementSelectByColor.js.map +1 -0
- package/lib/interaction/elementSelectByX.js.map +1 -0
- package/lib/interaction/event.d.ts +1 -0
- package/lib/interaction/event.js +107 -0
- package/lib/interaction/event.js.map +1 -0
- package/lib/interaction/fisheye.js.map +1 -0
- package/lib/interaction/index.d.ts +21 -22
- package/lib/interaction/index.js +23 -25
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/{native/legendFilter.js → legendFilter.js} +1 -1
- package/lib/interaction/legendFilter.js.map +1 -0
- package/lib/interaction/{native/legendHighlight.js → legendHighlight.js} +1 -1
- package/lib/interaction/legendHighlight.js.map +1 -0
- package/lib/interaction/{native/poptip.js → poptip.js} +2 -2
- package/lib/interaction/poptip.js.map +1 -0
- package/lib/interaction/{native/sliderFilter.js → sliderFilter.js} +3 -3
- package/lib/interaction/sliderFilter.js.map +1 -0
- package/lib/interaction/{native/tooltip.d.ts → tooltip.d.ts} +2 -3
- package/lib/interaction/{native/tooltip.js → tooltip.js} +68 -73
- package/lib/interaction/tooltip.js.map +1 -0
- package/lib/interaction/utils.d.ts +47 -3
- package/lib/interaction/utils.js +389 -34
- package/lib/interaction/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +2 -2
- package/lib/label-transform/contrastReverse.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +2 -2
- package/lib/label-transform/overlapDodgeY.d.ts +2 -2
- package/lib/label-transform/overlapHide.d.ts +2 -2
- package/lib/mark/area.d.ts +2 -2
- package/lib/mark/box.d.ts +2 -2
- package/lib/mark/cell.d.ts +2 -2
- package/lib/mark/image.d.ts +2 -2
- package/lib/mark/interval.d.ts +2 -2
- package/lib/mark/line.d.ts +2 -2
- package/lib/mark/link.d.ts +2 -2
- package/lib/mark/point.d.ts +2 -2
- package/lib/mark/polygon.d.ts +2 -2
- package/lib/mark/rect.d.ts +2 -2
- package/lib/mark/text.d.ts +2 -2
- package/lib/mark/utils.js +1 -5
- package/lib/mark/utils.js.map +1 -1
- package/lib/mark/vector.d.ts +2 -2
- package/lib/palette/index.d.ts +0 -36
- package/lib/palette/index.js +1 -37
- package/lib/palette/index.js.map +1 -1
- package/lib/runtime/mark.js +4 -2
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.js +36 -17
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/transform.d.ts +5 -0
- package/lib/runtime/transform.js +64 -4
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +7 -2
- package/lib/runtime/types/component.d.ts +2 -1
- package/lib/runtime/types/options.d.ts +6 -1
- package/lib/runtime/types/theme.d.ts +2 -2
- package/lib/spec/animate.d.ts +23 -1
- package/lib/spec/component.d.ts +68 -0
- package/lib/spec/{action.js → component.js} +1 -1
- package/lib/spec/component.js.map +1 -0
- package/lib/spec/composition.d.ts +26 -26
- package/lib/spec/coordinate.d.ts +23 -32
- package/lib/spec/coordinateTransform.d.ts +13 -0
- package/lib/spec/{title.js → coordinateTransform.js} +1 -1
- package/lib/spec/coordinateTransform.js.map +1 -0
- package/lib/spec/data.d.ts +4 -222
- package/lib/spec/dataTransform.d.ts +91 -0
- package/lib/spec/{geometry.js → dataTransform.js} +1 -1
- package/lib/spec/dataTransform.js.map +1 -0
- package/lib/spec/index.d.ts +15 -11
- package/lib/spec/index.js +12 -9
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/interaction.d.ts +9 -4
- package/lib/spec/labelTransform.d.ts +5 -5
- package/lib/spec/mark.d.ts +185 -0
- package/lib/{interaction/types.js → spec/mark.js} +1 -1
- package/lib/spec/mark.js.map +1 -0
- package/lib/spec/palette.d.ts +0 -54
- package/lib/spec/transform.d.ts +1 -1
- package/lib/spec/utils.d.ts +4 -0
- package/lib/stdlib/index.js +1 -15
- package/lib/stdlib/index.js.map +1 -1
- package/lib/transform/groupN.js +1 -1
- package/lib/transform/groupN.js.map +1 -1
- package/lib/transform/maybeTitle.js +12 -2
- package/lib/transform/maybeTitle.js.map +1 -1
- package/lib/transform/maybeTooltip.js +20 -20
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/transform/maybeZeroX.js +1 -1
- package/lib/transform/maybeZeroX.js.map +1 -1
- package/lib/transform/maybeZeroY.js +1 -1
- package/lib/transform/maybeZeroY.js.map +1 -1
- package/lib/transform/maybeZeroY1.js +1 -1
- package/lib/transform/maybeZeroY1.js.map +1 -1
- package/lib/transform/utils/helper.d.ts +12 -0
- package/lib/transform/utils/helper.js +11 -1
- package/lib/transform/utils/helper.js.map +1 -1
- package/lib/utils/helper.js +4 -1
- package/lib/utils/helper.js.map +1 -1
- package/package.json +1 -1
- package/src/api/chart.ts +33 -6
- package/src/api/composition/base.ts +5 -7
- package/src/api/composition/facetCircle.ts +2 -2
- package/src/api/composition/facetRect.ts +2 -2
- package/src/api/composition/geoPath.ts +3 -8
- package/src/api/composition/geoView.ts +2 -2
- package/src/api/composition/index.ts +2 -2
- package/src/api/composition/repeatMatrix.ts +2 -2
- package/src/api/composition/spaceFlex.ts +2 -2
- package/src/api/composition/spaceLayer.ts +2 -2
- package/src/api/composition/timingKeyframe.ts +2 -2
- package/src/api/composition/view.ts +2 -2
- package/src/api/index.ts +2 -0
- package/src/api/mark/base.ts +7 -7
- package/src/api/mark/index.ts +6 -0
- package/src/api/mark/mark.ts +64 -51
- package/src/api/mark/types.ts +3 -2
- package/src/api/node.ts +1 -1
- package/src/api/props.ts +28 -3
- package/src/api/types.ts +4 -2
- package/src/component/axis.ts +3 -0
- package/src/component/scrollbar.ts +2 -1
- package/src/component/slider.ts +2 -1
- package/src/component/title.ts +3 -3
- package/src/composition/mark.ts +1 -1
- package/src/composition/timingKeyframe.ts +13 -7
- package/src/data/arc.ts +1 -2
- package/src/data/cluster.ts +1 -2
- package/src/data/sankey.ts +1 -2
- package/src/data/tree.ts +1 -2
- package/src/data/wordCloud.ts +1 -2
- package/src/index.ts +15 -3
- package/src/interaction/{native/brushAxisHighlight.ts → brushAxisHighlight.ts} +1 -1
- package/src/interaction/{native/brushFilter.ts → brushFilter.ts} +4 -4
- package/src/interaction/{native/brushHighlight.ts → brushHighlight.ts} +1 -1
- package/src/interaction/{native/chartIndex.ts → chartIndex.ts} +2 -2
- package/src/interaction/{native/elementHighlight.ts → elementHighlight.ts} +1 -1
- package/src/interaction/{native/elementSelect.ts → elementSelect.ts} +1 -1
- package/src/interaction/event.ts +119 -0
- package/src/interaction/index.ts +21 -56
- package/src/interaction/{native/legendFilter.ts → legendFilter.ts} +1 -1
- package/src/interaction/{native/legendHighlight.ts → legendHighlight.ts} +1 -1
- package/src/interaction/{native/poptip.ts → poptip.ts} +2 -2
- package/src/interaction/{native/sliderFilter.ts → sliderFilter.ts} +3 -3
- package/src/interaction/{native/tooltip.ts → tooltip.ts} +67 -93
- package/src/interaction/utils.ts +446 -56
- package/src/label-transform/contrastReverse.ts +5 -2
- package/src/label-transform/overflowHide.ts +2 -2
- package/src/label-transform/overlapDodgeY.ts +2 -2
- package/src/label-transform/overlapHide.ts +2 -2
- package/src/mark/area.ts +2 -2
- package/src/mark/box.ts +2 -2
- package/src/mark/cell.ts +2 -2
- package/src/mark/image.ts +2 -2
- package/src/mark/interval.ts +2 -2
- package/src/mark/line.ts +2 -2
- package/src/mark/link.ts +2 -2
- package/src/mark/point.ts +2 -2
- package/src/mark/polygon.ts +2 -2
- package/src/mark/rect.ts +2 -2
- package/src/mark/text.ts +2 -2
- package/src/mark/utils.ts +1 -5
- package/src/mark/vector.ts +2 -2
- package/src/palette/index.ts +0 -37
- package/src/runtime/mark.ts +6 -2
- package/src/runtime/plot.ts +47 -20
- package/src/runtime/transform.ts +71 -4
- package/src/runtime/types/common.ts +8 -2
- package/src/runtime/types/component.ts +2 -0
- package/src/runtime/types/options.ts +6 -1
- package/src/runtime/types/theme.ts +1 -1
- package/src/spec/animate.ts +50 -4
- package/src/spec/component.ts +94 -0
- package/src/spec/composition.ts +40 -28
- package/src/spec/coordinate.ts +20 -36
- package/src/spec/coordinateTransform.ts +16 -0
- package/src/spec/data.ts +12 -271
- package/src/spec/dataTransform.ts +125 -0
- package/src/spec/index.ts +15 -11
- package/src/spec/interaction.ts +8 -5
- package/src/spec/labelTransform.ts +8 -8
- package/src/spec/mark.ts +359 -0
- package/src/spec/palette.ts +0 -80
- package/src/spec/transform.ts +1 -1
- package/src/spec/utils.ts +11 -2
- package/src/stdlib/index.ts +3 -64
- package/src/transform/groupN.ts +2 -2
- package/src/transform/maybeTitle.ts +11 -3
- package/src/transform/maybeTooltip.ts +17 -21
- package/src/transform/maybeZeroX.ts +2 -2
- package/src/transform/maybeZeroY.ts +2 -2
- package/src/transform/maybeZeroY1.ts +2 -2
- package/src/transform/utils/helper.ts +10 -0
- package/src/utils/helper.ts +6 -1
- package/esm/data/voronoi.d.ts +0 -1
- package/esm/data/voronoi.js +0 -6
- package/esm/data/voronoi.js.map +0 -1
- package/esm/interaction/action/index.d.ts +0 -44
- package/esm/interaction/action/index.js +0 -24
- package/esm/interaction/action/index.js.map +0 -1
- package/esm/interaction/action/service/elementSelection.d.ts +0 -4
- package/esm/interaction/action/service/elementSelection.js +0 -90
- package/esm/interaction/action/service/elementSelection.js.map +0 -1
- package/esm/interaction/action/service/fisheyeFocus.d.ts +0 -4
- package/esm/interaction/action/service/fisheyeFocus.js +0 -51
- package/esm/interaction/action/service/fisheyeFocus.js.map +0 -1
- package/esm/interaction/action/service/legendItemSelection.d.ts +0 -4
- package/esm/interaction/action/service/legendItemSelection.js +0 -17
- package/esm/interaction/action/service/legendItemSelection.js.map +0 -1
- package/esm/interaction/action/service/recordCurrentPoint.d.ts +0 -4
- package/esm/interaction/action/service/recordCurrentPoint.js +0 -16
- package/esm/interaction/action/service/recordCurrentPoint.js.map +0 -1
- package/esm/interaction/action/service/recordPoint.d.ts +0 -4
- package/esm/interaction/action/service/recordPoint.js +0 -28
- package/esm/interaction/action/service/recordPoint.js.map +0 -1
- package/esm/interaction/action/service/recordRegion.d.ts +0 -4
- package/esm/interaction/action/service/recordRegion.js +0 -30
- package/esm/interaction/action/service/recordRegion.js.map +0 -1
- package/esm/interaction/action/service/recordState.d.ts +0 -4
- package/esm/interaction/action/service/recordState.js +0 -10
- package/esm/interaction/action/service/recordState.js.map +0 -1
- package/esm/interaction/action/service/recordTip.d.ts +0 -8
- package/esm/interaction/action/service/recordTip.js +0 -15
- package/esm/interaction/action/service/recordTip.js.map +0 -1
- package/esm/interaction/action/service/surfacePointSelection.d.ts +0 -4
- package/esm/interaction/action/service/surfacePointSelection.js +0 -19
- package/esm/interaction/action/service/surfacePointSelection.js.map +0 -1
- package/esm/interaction/action/service/triggerInfoSelection.d.ts +0 -4
- package/esm/interaction/action/service/triggerInfoSelection.js +0 -18
- package/esm/interaction/action/service/triggerInfoSelection.js.map +0 -1
- package/esm/interaction/action/transformer/activeElement.d.ts +0 -4
- package/esm/interaction/action/transformer/activeElement.js +0 -23
- package/esm/interaction/action/transformer/activeElement.js.map +0 -1
- package/esm/interaction/action/transformer/activeRegion.d.ts +0 -4
- package/esm/interaction/action/transformer/activeRegion.js +0 -52
- package/esm/interaction/action/transformer/activeRegion.js.map +0 -1
- package/esm/interaction/action/transformer/button.d.ts +0 -4
- package/esm/interaction/action/transformer/button.js +0 -76
- package/esm/interaction/action/transformer/button.js.map +0 -1
- package/esm/interaction/action/transformer/cursor.d.ts +0 -4
- package/esm/interaction/action/transformer/cursor.js +0 -15
- package/esm/interaction/action/transformer/cursor.js.map +0 -1
- package/esm/interaction/action/transformer/filter.d.ts +0 -7
- package/esm/interaction/action/transformer/filter.js +0 -47
- package/esm/interaction/action/transformer/filter.js.map +0 -1
- package/esm/interaction/action/transformer/filterElement.d.ts +0 -4
- package/esm/interaction/action/transformer/filterElement.js +0 -41
- package/esm/interaction/action/transformer/filterElement.js.map +0 -1
- package/esm/interaction/action/transformer/highlightElement.d.ts +0 -4
- package/esm/interaction/action/transformer/highlightElement.js +0 -48
- package/esm/interaction/action/transformer/highlightElement.js.map +0 -1
- package/esm/interaction/action/transformer/mask.d.ts +0 -7
- package/esm/interaction/action/transformer/mask.js +0 -106
- package/esm/interaction/action/transformer/mask.js.map +0 -1
- package/esm/interaction/action/transformer/move.d.ts +0 -7
- package/esm/interaction/action/transformer/move.js +0 -70
- package/esm/interaction/action/transformer/move.js.map +0 -1
- package/esm/interaction/action/transformer/plot.d.ts +0 -4
- package/esm/interaction/action/transformer/plot.js +0 -10
- package/esm/interaction/action/transformer/plot.js.map +0 -1
- package/esm/interaction/action/transformer/poptip.d.ts +0 -4
- package/esm/interaction/action/transformer/poptip.js +0 -39
- package/esm/interaction/action/transformer/poptip.js.map +0 -1
- package/esm/interaction/action/transformer/setItemState.d.ts +0 -4
- package/esm/interaction/action/transformer/setItemState.js +0 -31
- package/esm/interaction/action/transformer/setItemState.js.map +0 -1
- package/esm/interaction/action/transformer/tooltip.d.ts +0 -9
- package/esm/interaction/action/transformer/tooltip.js +0 -289
- package/esm/interaction/action/transformer/tooltip.js.map +0 -1
- package/esm/interaction/builtin/activeRegion.d.ts +0 -17
- package/esm/interaction/builtin/activeRegion.js +0 -18
- package/esm/interaction/builtin/activeRegion.js.map +0 -1
- package/esm/interaction/builtin/brush.d.ts +0 -132
- package/esm/interaction/builtin/brush.js +0 -93
- package/esm/interaction/builtin/brush.js.map +0 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +0 -98
- package/esm/interaction/builtin/brushHighlight.js +0 -111
- package/esm/interaction/builtin/brushHighlight.js.map +0 -1
- package/esm/interaction/builtin/brushVisible.d.ts +0 -88
- package/esm/interaction/builtin/brushVisible.js +0 -62
- package/esm/interaction/builtin/brushVisible.js.map +0 -1
- package/esm/interaction/builtin/elementActive.d.ts +0 -20
- package/esm/interaction/builtin/elementActive.js +0 -25
- package/esm/interaction/builtin/elementActive.js.map +0 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +0 -19
- package/esm/interaction/builtin/elementHighlight.js +0 -24
- package/esm/interaction/builtin/elementHighlight.js.map +0 -1
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +0 -25
- package/esm/interaction/builtin/elementHighlightByColor.js +0 -24
- package/esm/interaction/builtin/elementHighlightByColor.js.map +0 -1
- package/esm/interaction/builtin/elementHighlightByX.d.ts +0 -25
- package/esm/interaction/builtin/elementHighlightByX.js +0 -24
- package/esm/interaction/builtin/elementHighlightByX.js.map +0 -1
- package/esm/interaction/builtin/elementListHighlight.d.ts +0 -43
- package/esm/interaction/builtin/elementListHighlight.js +0 -28
- package/esm/interaction/builtin/elementListHighlight.js.map +0 -1
- package/esm/interaction/builtin/elementSelected.d.ts +0 -18
- package/esm/interaction/builtin/elementSelected.js +0 -18
- package/esm/interaction/builtin/elementSelected.js.map +0 -1
- package/esm/interaction/builtin/ellipsisText.d.ts +0 -16
- package/esm/interaction/builtin/ellipsisText.js +0 -17
- package/esm/interaction/builtin/ellipsisText.js.map +0 -1
- package/esm/interaction/builtin/fisheye.d.ts +0 -41
- package/esm/interaction/builtin/fisheye.js +0 -20
- package/esm/interaction/builtin/fisheye.js.map +0 -1
- package/esm/interaction/builtin/legendActive.d.ts +0 -43
- package/esm/interaction/builtin/legendActive.js +0 -30
- package/esm/interaction/builtin/legendActive.js.map +0 -1
- package/esm/interaction/builtin/legendHighlight.d.ts +0 -43
- package/esm/interaction/builtin/legendHighlight.js +0 -30
- package/esm/interaction/builtin/legendHighlight.js.map +0 -1
- package/esm/interaction/builtin/tooltip.d.ts +0 -44
- package/esm/interaction/builtin/tooltip.js +0 -28
- package/esm/interaction/builtin/tooltip.js.map +0 -1
- package/esm/interaction/create.d.ts +0 -3
- package/esm/interaction/create.js +0 -96
- package/esm/interaction/create.js.map +0 -1
- package/esm/interaction/interactor/index.d.ts +0 -4
- package/esm/interaction/interactor/index.js +0 -3
- package/esm/interaction/interactor/index.js.map +0 -1
- package/esm/interaction/interactor/mousePosition.d.ts +0 -3
- package/esm/interaction/interactor/mousePosition.js +0 -10
- package/esm/interaction/interactor/mousePosition.js.map +0 -1
- package/esm/interaction/interactor/touchPosition.d.ts +0 -3
- package/esm/interaction/interactor/touchPosition.js +0 -10
- package/esm/interaction/interactor/touchPosition.js.map +0 -1
- package/esm/interaction/native/brushAxisHighlight.js.map +0 -1
- package/esm/interaction/native/brushFilter.js.map +0 -1
- package/esm/interaction/native/brushHighlight.js.map +0 -1
- package/esm/interaction/native/brushXFilter.js.map +0 -1
- package/esm/interaction/native/brushXHighlight.js.map +0 -1
- package/esm/interaction/native/brushYFilter.js.map +0 -1
- package/esm/interaction/native/brushYHighlight.js.map +0 -1
- package/esm/interaction/native/chartIndex.js.map +0 -1
- package/esm/interaction/native/elementHighlight.js.map +0 -1
- package/esm/interaction/native/elementHighlightByColor.js.map +0 -1
- package/esm/interaction/native/elementHighlightByX.js.map +0 -1
- package/esm/interaction/native/elementSelect.js.map +0 -1
- package/esm/interaction/native/elementSelectByColor.js.map +0 -1
- package/esm/interaction/native/elementSelectByX.js.map +0 -1
- package/esm/interaction/native/fisheye.js.map +0 -1
- package/esm/interaction/native/legendFilter.js.map +0 -1
- package/esm/interaction/native/legendHighlight.js.map +0 -1
- package/esm/interaction/native/poptip.js.map +0 -1
- package/esm/interaction/native/sliderFilter.js.map +0 -1
- package/esm/interaction/native/tooltip.js.map +0 -1
- package/esm/interaction/native/utils.d.ts +0 -47
- package/esm/interaction/native/utils.js +0 -379
- package/esm/interaction/native/utils.js.map +0 -1
- package/esm/interaction/stdlib.d.ts +0 -2
- package/esm/interaction/stdlib.js +0 -32
- package/esm/interaction/stdlib.js.map +0 -1
- package/esm/interaction/types.d.ts +0 -57
- package/esm/interaction/types.js +0 -2
- package/esm/interaction/types.js.map +0 -1
- package/esm/palette/divergingGreenRed.d.ts +0 -7
- package/esm/palette/divergingGreenRed.js +0 -26
- package/esm/palette/divergingGreenRed.js.map +0 -1
- package/esm/palette/divergingGreenYellow.d.ts +0 -7
- package/esm/palette/divergingGreenYellow.js +0 -26
- package/esm/palette/divergingGreenYellow.js.map +0 -1
- package/esm/palette/divergingRedBlue.d.ts +0 -7
- package/esm/palette/divergingRedBlue.js +0 -26
- package/esm/palette/divergingRedBlue.js.map +0 -1
- package/esm/palette/divergingRedPurple.d.ts +0 -7
- package/esm/palette/divergingRedPurple.js +0 -26
- package/esm/palette/divergingRedPurple.js.map +0 -1
- package/esm/palette/sequentialBlue.d.ts +0 -7
- package/esm/palette/sequentialBlue.js +0 -18
- package/esm/palette/sequentialBlue.js.map +0 -1
- package/esm/palette/sequentialDarkBlue.d.ts +0 -7
- package/esm/palette/sequentialDarkBlue.js +0 -18
- package/esm/palette/sequentialDarkBlue.js.map +0 -1
- package/esm/palette/sequentialDarkGreen.d.ts +0 -7
- package/esm/palette/sequentialDarkGreen.js +0 -18
- package/esm/palette/sequentialDarkGreen.js.map +0 -1
- package/esm/palette/sequentialGreen.d.ts +0 -7
- package/esm/palette/sequentialGreen.js +0 -18
- package/esm/palette/sequentialGreen.js.map +0 -1
- package/esm/palette/sequentialGreenBlue.d.ts +0 -7
- package/esm/palette/sequentialGreenBlue.js +0 -18
- package/esm/palette/sequentialGreenBlue.js.map +0 -1
- package/esm/palette/sequentialGrey.d.ts +0 -7
- package/esm/palette/sequentialGrey.js +0 -18
- package/esm/palette/sequentialGrey.js.map +0 -1
- package/esm/palette/sequentialOrange.d.ts +0 -7
- package/esm/palette/sequentialOrange.js +0 -18
- package/esm/palette/sequentialOrange.js.map +0 -1
- package/esm/palette/sequentialPink.d.ts +0 -7
- package/esm/palette/sequentialPink.js +0 -18
- package/esm/palette/sequentialPink.js.map +0 -1
- package/esm/palette/sequentialPinkPurple.d.ts +0 -7
- package/esm/palette/sequentialPinkPurple.js +0 -18
- package/esm/palette/sequentialPinkPurple.js.map +0 -1
- package/esm/palette/sequentialPurple.d.ts +0 -7
- package/esm/palette/sequentialPurple.js +0 -18
- package/esm/palette/sequentialPurple.js.map +0 -1
- package/esm/palette/sequentialRed.d.ts +0 -7
- package/esm/palette/sequentialRed.js +0 -18
- package/esm/palette/sequentialRed.js.map +0 -1
- package/esm/palette/sequentialYellow.d.ts +0 -7
- package/esm/palette/sequentialYellow.js +0 -18
- package/esm/palette/sequentialYellow.js.map +0 -1
- package/esm/palette/sequentialYellowGreen.d.ts +0 -7
- package/esm/palette/sequentialYellowGreen.js +0 -18
- package/esm/palette/sequentialYellowGreen.js.map +0 -1
- package/esm/palette/sequentialYellowOrange.d.ts +0 -7
- package/esm/palette/sequentialYellowOrange.js +0 -18
- package/esm/palette/sequentialYellowOrange.js.map +0 -1
- package/esm/spec/action.d.ts +0 -122
- package/esm/spec/action.js +0 -2
- package/esm/spec/action.js.map +0 -1
- package/esm/spec/geometry.d.ts +0 -146
- package/esm/spec/geometry.js +0 -2
- package/esm/spec/geometry.js.map +0 -1
- package/esm/spec/title.d.ts +0 -2
- package/esm/spec/title.js +0 -2
- package/esm/spec/title.js.map +0 -1
- package/lib/data/voronoi.d.ts +0 -1
- package/lib/data/voronoi.js +0 -7
- package/lib/data/voronoi.js.map +0 -1
- package/lib/interaction/action/index.d.ts +0 -44
- package/lib/interaction/action/index.js +0 -50
- package/lib/interaction/action/index.js.map +0 -1
- package/lib/interaction/action/service/elementSelection.d.ts +0 -4
- package/lib/interaction/action/service/elementSelection.js +0 -94
- package/lib/interaction/action/service/elementSelection.js.map +0 -1
- package/lib/interaction/action/service/fisheyeFocus.d.ts +0 -4
- package/lib/interaction/action/service/fisheyeFocus.js +0 -55
- package/lib/interaction/action/service/fisheyeFocus.js.map +0 -1
- package/lib/interaction/action/service/legendItemSelection.d.ts +0 -4
- package/lib/interaction/action/service/legendItemSelection.js +0 -21
- package/lib/interaction/action/service/legendItemSelection.js.map +0 -1
- package/lib/interaction/action/service/recordCurrentPoint.d.ts +0 -4
- package/lib/interaction/action/service/recordCurrentPoint.js +0 -20
- package/lib/interaction/action/service/recordCurrentPoint.js.map +0 -1
- package/lib/interaction/action/service/recordPoint.d.ts +0 -4
- package/lib/interaction/action/service/recordPoint.js +0 -32
- package/lib/interaction/action/service/recordPoint.js.map +0 -1
- package/lib/interaction/action/service/recordRegion.d.ts +0 -4
- package/lib/interaction/action/service/recordRegion.js +0 -34
- package/lib/interaction/action/service/recordRegion.js.map +0 -1
- package/lib/interaction/action/service/recordState.d.ts +0 -4
- package/lib/interaction/action/service/recordState.js +0 -14
- package/lib/interaction/action/service/recordState.js.map +0 -1
- package/lib/interaction/action/service/recordTip.d.ts +0 -8
- package/lib/interaction/action/service/recordTip.js +0 -19
- package/lib/interaction/action/service/recordTip.js.map +0 -1
- package/lib/interaction/action/service/surfacePointSelection.d.ts +0 -4
- package/lib/interaction/action/service/surfacePointSelection.js +0 -23
- package/lib/interaction/action/service/surfacePointSelection.js.map +0 -1
- package/lib/interaction/action/service/triggerInfoSelection.d.ts +0 -4
- package/lib/interaction/action/service/triggerInfoSelection.js +0 -22
- package/lib/interaction/action/service/triggerInfoSelection.js.map +0 -1
- package/lib/interaction/action/transformer/activeElement.d.ts +0 -4
- package/lib/interaction/action/transformer/activeElement.js +0 -27
- package/lib/interaction/action/transformer/activeElement.js.map +0 -1
- package/lib/interaction/action/transformer/activeRegion.d.ts +0 -4
- package/lib/interaction/action/transformer/activeRegion.js +0 -56
- package/lib/interaction/action/transformer/activeRegion.js.map +0 -1
- package/lib/interaction/action/transformer/button.d.ts +0 -4
- package/lib/interaction/action/transformer/button.js +0 -80
- package/lib/interaction/action/transformer/button.js.map +0 -1
- package/lib/interaction/action/transformer/cursor.d.ts +0 -4
- package/lib/interaction/action/transformer/cursor.js +0 -19
- package/lib/interaction/action/transformer/cursor.js.map +0 -1
- package/lib/interaction/action/transformer/filter.d.ts +0 -7
- package/lib/interaction/action/transformer/filter.js +0 -51
- package/lib/interaction/action/transformer/filter.js.map +0 -1
- package/lib/interaction/action/transformer/filterElement.d.ts +0 -4
- package/lib/interaction/action/transformer/filterElement.js +0 -45
- package/lib/interaction/action/transformer/filterElement.js.map +0 -1
- package/lib/interaction/action/transformer/highlightElement.d.ts +0 -4
- package/lib/interaction/action/transformer/highlightElement.js +0 -52
- package/lib/interaction/action/transformer/highlightElement.js.map +0 -1
- package/lib/interaction/action/transformer/mask.d.ts +0 -7
- package/lib/interaction/action/transformer/mask.js +0 -110
- package/lib/interaction/action/transformer/mask.js.map +0 -1
- package/lib/interaction/action/transformer/move.d.ts +0 -7
- package/lib/interaction/action/transformer/move.js +0 -74
- package/lib/interaction/action/transformer/move.js.map +0 -1
- package/lib/interaction/action/transformer/plot.d.ts +0 -4
- package/lib/interaction/action/transformer/plot.js +0 -14
- package/lib/interaction/action/transformer/plot.js.map +0 -1
- package/lib/interaction/action/transformer/poptip.d.ts +0 -4
- package/lib/interaction/action/transformer/poptip.js +0 -43
- package/lib/interaction/action/transformer/poptip.js.map +0 -1
- package/lib/interaction/action/transformer/setItemState.d.ts +0 -4
- package/lib/interaction/action/transformer/setItemState.js +0 -35
- package/lib/interaction/action/transformer/setItemState.js.map +0 -1
- package/lib/interaction/action/transformer/tooltip.d.ts +0 -9
- package/lib/interaction/action/transformer/tooltip.js +0 -293
- package/lib/interaction/action/transformer/tooltip.js.map +0 -1
- package/lib/interaction/builtin/activeRegion.d.ts +0 -17
- package/lib/interaction/builtin/activeRegion.js +0 -22
- package/lib/interaction/builtin/activeRegion.js.map +0 -1
- package/lib/interaction/builtin/brush.d.ts +0 -132
- package/lib/interaction/builtin/brush.js +0 -97
- package/lib/interaction/builtin/brush.js.map +0 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +0 -98
- package/lib/interaction/builtin/brushHighlight.js +0 -115
- package/lib/interaction/builtin/brushHighlight.js.map +0 -1
- package/lib/interaction/builtin/brushVisible.d.ts +0 -88
- package/lib/interaction/builtin/brushVisible.js +0 -66
- package/lib/interaction/builtin/brushVisible.js.map +0 -1
- package/lib/interaction/builtin/elementActive.d.ts +0 -20
- package/lib/interaction/builtin/elementActive.js +0 -29
- package/lib/interaction/builtin/elementActive.js.map +0 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +0 -19
- package/lib/interaction/builtin/elementHighlight.js +0 -28
- package/lib/interaction/builtin/elementHighlight.js.map +0 -1
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +0 -25
- package/lib/interaction/builtin/elementHighlightByColor.js +0 -28
- package/lib/interaction/builtin/elementHighlightByColor.js.map +0 -1
- package/lib/interaction/builtin/elementHighlightByX.d.ts +0 -25
- package/lib/interaction/builtin/elementHighlightByX.js +0 -28
- package/lib/interaction/builtin/elementHighlightByX.js.map +0 -1
- package/lib/interaction/builtin/elementListHighlight.d.ts +0 -43
- package/lib/interaction/builtin/elementListHighlight.js +0 -32
- package/lib/interaction/builtin/elementListHighlight.js.map +0 -1
- package/lib/interaction/builtin/elementSelected.d.ts +0 -18
- package/lib/interaction/builtin/elementSelected.js +0 -22
- package/lib/interaction/builtin/elementSelected.js.map +0 -1
- package/lib/interaction/builtin/ellipsisText.d.ts +0 -16
- package/lib/interaction/builtin/ellipsisText.js +0 -21
- package/lib/interaction/builtin/ellipsisText.js.map +0 -1
- package/lib/interaction/builtin/fisheye.d.ts +0 -41
- package/lib/interaction/builtin/fisheye.js +0 -24
- package/lib/interaction/builtin/fisheye.js.map +0 -1
- package/lib/interaction/builtin/legendActive.d.ts +0 -43
- package/lib/interaction/builtin/legendActive.js +0 -34
- package/lib/interaction/builtin/legendActive.js.map +0 -1
- package/lib/interaction/builtin/legendHighlight.d.ts +0 -43
- package/lib/interaction/builtin/legendHighlight.js +0 -34
- package/lib/interaction/builtin/legendHighlight.js.map +0 -1
- package/lib/interaction/builtin/tooltip.d.ts +0 -44
- package/lib/interaction/builtin/tooltip.js +0 -32
- package/lib/interaction/builtin/tooltip.js.map +0 -1
- package/lib/interaction/create.d.ts +0 -3
- package/lib/interaction/create.js +0 -100
- package/lib/interaction/create.js.map +0 -1
- package/lib/interaction/interactor/index.d.ts +0 -4
- package/lib/interaction/interactor/index.js +0 -8
- package/lib/interaction/interactor/index.js.map +0 -1
- package/lib/interaction/interactor/mousePosition.d.ts +0 -3
- package/lib/interaction/interactor/mousePosition.js +0 -14
- package/lib/interaction/interactor/mousePosition.js.map +0 -1
- package/lib/interaction/interactor/touchPosition.d.ts +0 -3
- package/lib/interaction/interactor/touchPosition.js +0 -14
- package/lib/interaction/interactor/touchPosition.js.map +0 -1
- package/lib/interaction/native/brushAxisHighlight.js.map +0 -1
- package/lib/interaction/native/brushFilter.js.map +0 -1
- package/lib/interaction/native/brushHighlight.js.map +0 -1
- package/lib/interaction/native/brushXFilter.js.map +0 -1
- package/lib/interaction/native/brushXHighlight.js.map +0 -1
- package/lib/interaction/native/brushYFilter.js.map +0 -1
- package/lib/interaction/native/brushYHighlight.js.map +0 -1
- package/lib/interaction/native/chartIndex.js.map +0 -1
- package/lib/interaction/native/elementHighlight.js.map +0 -1
- package/lib/interaction/native/elementHighlightByColor.js.map +0 -1
- package/lib/interaction/native/elementHighlightByX.js.map +0 -1
- package/lib/interaction/native/elementSelect.js.map +0 -1
- package/lib/interaction/native/elementSelectByColor.js.map +0 -1
- package/lib/interaction/native/elementSelectByX.js.map +0 -1
- package/lib/interaction/native/fisheye.js.map +0 -1
- package/lib/interaction/native/legendFilter.js.map +0 -1
- package/lib/interaction/native/legendHighlight.js.map +0 -1
- package/lib/interaction/native/poptip.js.map +0 -1
- package/lib/interaction/native/sliderFilter.js.map +0 -1
- package/lib/interaction/native/tooltip.js.map +0 -1
- package/lib/interaction/native/utils.d.ts +0 -47
- package/lib/interaction/native/utils.js +0 -400
- package/lib/interaction/native/utils.js.map +0 -1
- package/lib/interaction/stdlib.d.ts +0 -2
- package/lib/interaction/stdlib.js +0 -36
- package/lib/interaction/stdlib.js.map +0 -1
- package/lib/interaction/types.d.ts +0 -57
- package/lib/interaction/types.js.map +0 -1
- package/lib/palette/divergingGreenRed.d.ts +0 -7
- package/lib/palette/divergingGreenRed.js +0 -30
- package/lib/palette/divergingGreenRed.js.map +0 -1
- package/lib/palette/divergingGreenYellow.d.ts +0 -7
- package/lib/palette/divergingGreenYellow.js +0 -30
- package/lib/palette/divergingGreenYellow.js.map +0 -1
- package/lib/palette/divergingRedBlue.d.ts +0 -7
- package/lib/palette/divergingRedBlue.js +0 -30
- package/lib/palette/divergingRedBlue.js.map +0 -1
- package/lib/palette/divergingRedPurple.d.ts +0 -7
- package/lib/palette/divergingRedPurple.js +0 -30
- package/lib/palette/divergingRedPurple.js.map +0 -1
- package/lib/palette/sequentialBlue.d.ts +0 -7
- package/lib/palette/sequentialBlue.js +0 -22
- package/lib/palette/sequentialBlue.js.map +0 -1
- package/lib/palette/sequentialDarkBlue.d.ts +0 -7
- package/lib/palette/sequentialDarkBlue.js +0 -22
- package/lib/palette/sequentialDarkBlue.js.map +0 -1
- package/lib/palette/sequentialDarkGreen.d.ts +0 -7
- package/lib/palette/sequentialDarkGreen.js +0 -22
- package/lib/palette/sequentialDarkGreen.js.map +0 -1
- package/lib/palette/sequentialGreen.d.ts +0 -7
- package/lib/palette/sequentialGreen.js +0 -22
- package/lib/palette/sequentialGreen.js.map +0 -1
- package/lib/palette/sequentialGreenBlue.d.ts +0 -7
- package/lib/palette/sequentialGreenBlue.js +0 -22
- package/lib/palette/sequentialGreenBlue.js.map +0 -1
- package/lib/palette/sequentialGrey.d.ts +0 -7
- package/lib/palette/sequentialGrey.js +0 -22
- package/lib/palette/sequentialGrey.js.map +0 -1
- package/lib/palette/sequentialOrange.d.ts +0 -7
- package/lib/palette/sequentialOrange.js +0 -22
- package/lib/palette/sequentialOrange.js.map +0 -1
- package/lib/palette/sequentialPink.d.ts +0 -7
- package/lib/palette/sequentialPink.js +0 -22
- package/lib/palette/sequentialPink.js.map +0 -1
- package/lib/palette/sequentialPinkPurple.d.ts +0 -7
- package/lib/palette/sequentialPinkPurple.js +0 -22
- package/lib/palette/sequentialPinkPurple.js.map +0 -1
- package/lib/palette/sequentialPurple.d.ts +0 -7
- package/lib/palette/sequentialPurple.js +0 -22
- package/lib/palette/sequentialPurple.js.map +0 -1
- package/lib/palette/sequentialRed.d.ts +0 -7
- package/lib/palette/sequentialRed.js +0 -22
- package/lib/palette/sequentialRed.js.map +0 -1
- package/lib/palette/sequentialYellow.d.ts +0 -7
- package/lib/palette/sequentialYellow.js +0 -22
- package/lib/palette/sequentialYellow.js.map +0 -1
- package/lib/palette/sequentialYellowGreen.d.ts +0 -7
- package/lib/palette/sequentialYellowGreen.js +0 -22
- package/lib/palette/sequentialYellowGreen.js.map +0 -1
- package/lib/palette/sequentialYellowOrange.d.ts +0 -7
- package/lib/palette/sequentialYellowOrange.js +0 -22
- package/lib/palette/sequentialYellowOrange.js.map +0 -1
- package/lib/spec/action.d.ts +0 -122
- package/lib/spec/action.js.map +0 -1
- package/lib/spec/geometry.d.ts +0 -146
- package/lib/spec/geometry.js.map +0 -1
- package/lib/spec/title.d.ts +0 -2
- package/lib/spec/title.js.map +0 -1
- package/src/.DS_Store +0 -0
- package/src/data/.DS_Store +0 -0
- package/src/data/voronoi.ts +0 -32
- package/src/interaction/action/index.ts +0 -45
- package/src/interaction/action/service/elementSelection.ts +0 -125
- package/src/interaction/action/service/fisheyeFocus.ts +0 -75
- package/src/interaction/action/service/legendItemSelection.ts +0 -33
- package/src/interaction/action/service/recordCurrentPoint.ts +0 -22
- package/src/interaction/action/service/recordPoint.ts +0 -35
- package/src/interaction/action/service/recordRegion.ts +0 -41
- package/src/interaction/action/service/recordState.ts +0 -15
- package/src/interaction/action/service/recordTip.ts +0 -20
- package/src/interaction/action/service/surfacePointSelection.ts +0 -28
- package/src/interaction/action/service/triggerInfoSelection.ts +0 -33
- package/src/interaction/action/transformer/activeElement.ts +0 -32
- package/src/interaction/action/transformer/activeRegion.ts +0 -73
- package/src/interaction/action/transformer/button.ts +0 -113
- package/src/interaction/action/transformer/cursor.ts +0 -21
- package/src/interaction/action/transformer/filter.ts +0 -58
- package/src/interaction/action/transformer/filterElement.ts +0 -54
- package/src/interaction/action/transformer/highlightElement.ts +0 -61
- package/src/interaction/action/transformer/mask.ts +0 -115
- package/src/interaction/action/transformer/move.ts +0 -76
- package/src/interaction/action/transformer/plot.ts +0 -15
- package/src/interaction/action/transformer/poptip.ts +0 -51
- package/src/interaction/action/transformer/setItemState.ts +0 -38
- package/src/interaction/action/transformer/tooltip.ts +0 -404
- package/src/interaction/builtin/activeRegion.ts +0 -26
- package/src/interaction/builtin/brush.ts +0 -100
- package/src/interaction/builtin/brushHighlight.ts +0 -123
- package/src/interaction/builtin/brushVisible.ts +0 -70
- package/src/interaction/builtin/elementActive.ts +0 -33
- package/src/interaction/builtin/elementHighlight.ts +0 -32
- package/src/interaction/builtin/elementHighlightByColor.ts +0 -36
- package/src/interaction/builtin/elementHighlightByX.ts +0 -36
- package/src/interaction/builtin/elementListHighlight.ts +0 -40
- package/src/interaction/builtin/elementSelected.ts +0 -26
- package/src/interaction/builtin/ellipsisText.ts +0 -25
- package/src/interaction/builtin/fisheye.ts +0 -26
- package/src/interaction/builtin/legendActive.ts +0 -38
- package/src/interaction/builtin/legendHighlight.ts +0 -38
- package/src/interaction/builtin/tooltip.ts +0 -34
- package/src/interaction/create.ts +0 -153
- package/src/interaction/interactor/index.ts +0 -5
- package/src/interaction/interactor/mousePosition.ts +0 -13
- package/src/interaction/interactor/touchPosition.ts +0 -13
- package/src/interaction/native/utils.ts +0 -455
- package/src/interaction/stdlib.ts +0 -57
- package/src/interaction/types.ts +0 -80
- package/src/palette/divergingGreenRed.ts +0 -33
- package/src/palette/divergingGreenYellow.ts +0 -36
- package/src/palette/divergingRedBlue.ts +0 -33
- package/src/palette/divergingRedPurple.ts +0 -33
- package/src/palette/sequentialBlue.ts +0 -23
- package/src/palette/sequentialDarkBlue.ts +0 -25
- package/src/palette/sequentialDarkGreen.ts +0 -28
- package/src/palette/sequentialGreen.ts +0 -23
- package/src/palette/sequentialGreenBlue.ts +0 -28
- package/src/palette/sequentialGrey.ts +0 -23
- package/src/palette/sequentialOrange.ts +0 -25
- package/src/palette/sequentialPink.ts +0 -23
- package/src/palette/sequentialPinkPurple.ts +0 -28
- package/src/palette/sequentialPurple.ts +0 -25
- package/src/palette/sequentialRed.ts +0 -23
- package/src/palette/sequentialYellow.ts +0 -25
- package/src/palette/sequentialYellowGreen.ts +0 -28
- package/src/palette/sequentialYellowOrange.ts +0 -28
- package/src/shape/.DS_Store +0 -0
- package/src/spec/action.ts +0 -196
- package/src/spec/geometry.ts +0 -327
- package/src/spec/title.ts +0 -3
- /package/esm/interaction/{native/brushAxisHighlight.d.ts → brushAxisHighlight.d.ts} +0 -0
- /package/esm/interaction/{native/brushFilter.d.ts → brushFilter.d.ts} +0 -0
- /package/esm/interaction/{native/brushHighlight.d.ts → brushHighlight.d.ts} +0 -0
- /package/esm/interaction/{native/brushXFilter.d.ts → brushXFilter.d.ts} +0 -0
- /package/esm/interaction/{native/brushXFilter.js → brushXFilter.js} +0 -0
- /package/esm/interaction/{native/brushXHighlight.d.ts → brushXHighlight.d.ts} +0 -0
- /package/esm/interaction/{native/brushXHighlight.js → brushXHighlight.js} +0 -0
- /package/esm/interaction/{native/brushYFilter.d.ts → brushYFilter.d.ts} +0 -0
- /package/esm/interaction/{native/brushYFilter.js → brushYFilter.js} +0 -0
- /package/esm/interaction/{native/brushYHighlight.d.ts → brushYHighlight.d.ts} +0 -0
- /package/esm/interaction/{native/brushYHighlight.js → brushYHighlight.js} +0 -0
- /package/esm/interaction/{native/chartIndex.d.ts → chartIndex.d.ts} +0 -0
- /package/esm/interaction/{native/elementHighlight.d.ts → elementHighlight.d.ts} +0 -0
- /package/esm/interaction/{native/elementHighlightByColor.d.ts → elementHighlightByColor.d.ts} +0 -0
- /package/esm/interaction/{native/elementHighlightByColor.js → elementHighlightByColor.js} +0 -0
- /package/esm/interaction/{native/elementHighlightByX.d.ts → elementHighlightByX.d.ts} +0 -0
- /package/esm/interaction/{native/elementHighlightByX.js → elementHighlightByX.js} +0 -0
- /package/esm/interaction/{native/elementSelect.d.ts → elementSelect.d.ts} +0 -0
- /package/esm/interaction/{native/elementSelectByColor.d.ts → elementSelectByColor.d.ts} +0 -0
- /package/esm/interaction/{native/elementSelectByColor.js → elementSelectByColor.js} +0 -0
- /package/esm/interaction/{native/elementSelectByX.d.ts → elementSelectByX.d.ts} +0 -0
- /package/esm/interaction/{native/elementSelectByX.js → elementSelectByX.js} +0 -0
- /package/esm/interaction/{native/fisheye.d.ts → fisheye.d.ts} +0 -0
- /package/esm/interaction/{native/fisheye.js → fisheye.js} +0 -0
- /package/esm/interaction/{native/legendFilter.d.ts → legendFilter.d.ts} +0 -0
- /package/esm/interaction/{native/legendHighlight.d.ts → legendHighlight.d.ts} +0 -0
- /package/esm/interaction/{native/poptip.d.ts → poptip.d.ts} +0 -0
- /package/esm/interaction/{native/sliderFilter.d.ts → sliderFilter.d.ts} +0 -0
- /package/lib/interaction/{native/brushAxisHighlight.d.ts → brushAxisHighlight.d.ts} +0 -0
- /package/lib/interaction/{native/brushFilter.d.ts → brushFilter.d.ts} +0 -0
- /package/lib/interaction/{native/brushHighlight.d.ts → brushHighlight.d.ts} +0 -0
- /package/lib/interaction/{native/brushXFilter.d.ts → brushXFilter.d.ts} +0 -0
- /package/lib/interaction/{native/brushXFilter.js → brushXFilter.js} +0 -0
- /package/lib/interaction/{native/brushXHighlight.d.ts → brushXHighlight.d.ts} +0 -0
- /package/lib/interaction/{native/brushXHighlight.js → brushXHighlight.js} +0 -0
- /package/lib/interaction/{native/brushYFilter.d.ts → brushYFilter.d.ts} +0 -0
- /package/lib/interaction/{native/brushYFilter.js → brushYFilter.js} +0 -0
- /package/lib/interaction/{native/brushYHighlight.d.ts → brushYHighlight.d.ts} +0 -0
- /package/lib/interaction/{native/brushYHighlight.js → brushYHighlight.js} +0 -0
- /package/lib/interaction/{native/chartIndex.d.ts → chartIndex.d.ts} +0 -0
- /package/lib/interaction/{native/elementHighlight.d.ts → elementHighlight.d.ts} +0 -0
- /package/lib/interaction/{native/elementHighlightByColor.d.ts → elementHighlightByColor.d.ts} +0 -0
- /package/lib/interaction/{native/elementHighlightByColor.js → elementHighlightByColor.js} +0 -0
- /package/lib/interaction/{native/elementHighlightByX.d.ts → elementHighlightByX.d.ts} +0 -0
- /package/lib/interaction/{native/elementHighlightByX.js → elementHighlightByX.js} +0 -0
- /package/lib/interaction/{native/elementSelect.d.ts → elementSelect.d.ts} +0 -0
- /package/lib/interaction/{native/elementSelectByColor.d.ts → elementSelectByColor.d.ts} +0 -0
- /package/lib/interaction/{native/elementSelectByColor.js → elementSelectByColor.js} +0 -0
- /package/lib/interaction/{native/elementSelectByX.d.ts → elementSelectByX.d.ts} +0 -0
- /package/lib/interaction/{native/elementSelectByX.js → elementSelectByX.js} +0 -0
- /package/lib/interaction/{native/fisheye.d.ts → fisheye.d.ts} +0 -0
- /package/lib/interaction/{native/fisheye.js → fisheye.js} +0 -0
- /package/lib/interaction/{native/legendFilter.d.ts → legendFilter.d.ts} +0 -0
- /package/lib/interaction/{native/legendHighlight.d.ts → legendHighlight.d.ts} +0 -0
- /package/lib/interaction/{native/poptip.d.ts → poptip.d.ts} +0 -0
- /package/lib/interaction/{native/sliderFilter.d.ts → sliderFilter.d.ts} +0 -0
- /package/src/interaction/{native/brushXFilter.ts → brushXFilter.ts} +0 -0
- /package/src/interaction/{native/brushXHighlight.ts → brushXHighlight.ts} +0 -0
- /package/src/interaction/{native/brushYFilter.ts → brushYFilter.ts} +0 -0
- /package/src/interaction/{native/brushYHighlight.ts → brushYHighlight.ts} +0 -0
- /package/src/interaction/{native/elementHighlightByColor.ts → elementHighlightByColor.ts} +0 -0
- /package/src/interaction/{native/elementHighlightByX.ts → elementHighlightByX.ts} +0 -0
- /package/src/interaction/{native/elementSelectByColor.ts → elementSelectByColor.ts} +0 -0
- /package/src/interaction/{native/elementSelectByX.ts → elementSelectByX.ts} +0 -0
- /package/src/interaction/{native/fisheye.ts → fisheye.ts} +0 -0
package/lib/spec/data.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type Data = FetchConnector | InlineConnector
|
|
1
|
+
import { DataTransform } from './dataTransform';
|
|
2
|
+
export type Data = FetchConnector | InlineConnector;
|
|
3
|
+
export type DataTypes = 'inline' | 'fetch';
|
|
3
4
|
export type FetchConnector = {
|
|
4
5
|
type?: 'fetch';
|
|
5
6
|
value?: string;
|
|
@@ -13,223 +14,4 @@ export type InlineConnector = {
|
|
|
13
14
|
type?: 'inline';
|
|
14
15
|
value?: any;
|
|
15
16
|
transform?: DataTransform[];
|
|
16
|
-
};
|
|
17
|
-
export type DataTransform = SortByTransform | SortTransform | PickTransform | RenameTransform | FoldTransform | JoinTransform | FilterDataTransform | MapTransform | SliceTransform | CustomTransform;
|
|
18
|
-
export type DataTransformTypes = 'sortBy' | 'sort' | 'pick' | 'rename' | 'fold' | 'join' | 'filter' | 'map' | 'slice' | 'custom' | DataComponent;
|
|
19
|
-
export type SortByTransform = {
|
|
20
|
-
type?: 'sortBy';
|
|
21
|
-
/** type: [field, order]; order: true => ascend, false => descend */
|
|
22
|
-
fields?: (string | [string, boolean?])[];
|
|
23
|
-
};
|
|
24
|
-
export type PickTransform = {
|
|
25
|
-
type?: 'pick';
|
|
26
|
-
fields?: string[];
|
|
27
|
-
};
|
|
28
|
-
export type RenameTransform = {
|
|
29
|
-
type?: 'rename';
|
|
30
|
-
[key: string]: string;
|
|
31
|
-
};
|
|
32
|
-
export type FilterDataTransform = {
|
|
33
|
-
type?: 'filter';
|
|
34
|
-
/**
|
|
35
|
-
* The filter condition, same with [Array.prototype.filter](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
|
|
36
|
-
*/
|
|
37
|
-
callback?: (v: any, idx: number, arr: any[]) => boolean;
|
|
38
|
-
};
|
|
39
|
-
export type SliceTransform = {
|
|
40
|
-
type?: 'slice';
|
|
41
|
-
/**
|
|
42
|
-
* The start index for slice. Default is 0.
|
|
43
|
-
*/
|
|
44
|
-
start?: number;
|
|
45
|
-
/**
|
|
46
|
-
* The end index for slice. Default is arr.length - 1
|
|
47
|
-
*/
|
|
48
|
-
end?: number;
|
|
49
|
-
};
|
|
50
|
-
export type SortTransform = {
|
|
51
|
-
type?: 'sort';
|
|
52
|
-
/**
|
|
53
|
-
* The sort comparator, same with [Array.prototype.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
|
|
54
|
-
*/
|
|
55
|
-
callback?: (a: any, b: any) => number;
|
|
56
|
-
};
|
|
57
|
-
export type FoldTransform = {
|
|
58
|
-
type?: 'fold';
|
|
59
|
-
/**
|
|
60
|
-
* Set fields will be folded.
|
|
61
|
-
*/
|
|
62
|
-
fields?: string[];
|
|
63
|
-
/**
|
|
64
|
-
* Fold key field, default is `key`.
|
|
65
|
-
*/
|
|
66
|
-
key?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Fold value field, default is `value`.
|
|
69
|
-
*/
|
|
70
|
-
value?: string;
|
|
71
|
-
};
|
|
72
|
-
export type CustomDataTransform = {
|
|
73
|
-
type?: 'custom';
|
|
74
|
-
callback?: (d: any) => any;
|
|
75
|
-
};
|
|
76
|
-
export type JoinTransform = {
|
|
77
|
-
type?: 'join';
|
|
78
|
-
/**
|
|
79
|
-
* The dataset to be joined.
|
|
80
|
-
*/
|
|
81
|
-
join: Record<string, any>[];
|
|
82
|
-
/**
|
|
83
|
-
* Join keys of 2 dataset, [k1, k2] means join on ds1.k1 === ds2.k2.
|
|
84
|
-
*/
|
|
85
|
-
on: [string | ((d: any) => string), string | ((d: any) => string)];
|
|
86
|
-
/**
|
|
87
|
-
* Select fields from joined dataset.
|
|
88
|
-
*/
|
|
89
|
-
select: string[];
|
|
90
|
-
/**
|
|
91
|
-
* Rename the select fields, default: keep the original name.
|
|
92
|
-
*/
|
|
93
|
-
as?: string[];
|
|
94
|
-
/**
|
|
95
|
-
* When not matched, use `unknown` instead.
|
|
96
|
-
*/
|
|
97
|
-
unknown?: any;
|
|
98
|
-
};
|
|
99
|
-
export type CustomTransform = {
|
|
100
|
-
type?: DataComponent;
|
|
101
|
-
[key: string]: any;
|
|
102
|
-
};
|
|
103
|
-
export type SankeyTransform = {
|
|
104
|
-
type?: 'sankey';
|
|
105
|
-
nodeId?: (node: any) => string;
|
|
106
|
-
nodes?: (graph: any) => any;
|
|
107
|
-
links?: (graph: any) => any;
|
|
108
|
-
/**
|
|
109
|
-
* sankey.nodeSort(undefined) is the default and resorts by ascending breadth during each iteration.
|
|
110
|
-
* sankey.nodeSort(null) specifies the input order of nodes and never sorts.
|
|
111
|
-
* sankey.nodeSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
112
|
-
*/
|
|
113
|
-
nodeSort?: null | undefined | ((a: any, b: any) => number);
|
|
114
|
-
/**
|
|
115
|
-
* sankey.linkSort(undefined) is the default, indicating that vertical order of links within each node will be determined automatically by the layout. If
|
|
116
|
-
* sankey.linkSort(null) will resort by the input.
|
|
117
|
-
* sankey.linkSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
118
|
-
*/
|
|
119
|
-
linkSort?: null | undefined | ((a: any, b: any) => number);
|
|
120
|
-
nodeAlign?: 'left' | 'center' | 'right' | 'justify' | ((node: any, n: number) => number);
|
|
121
|
-
nodeWidth?: number;
|
|
122
|
-
nodePadding?: number;
|
|
123
|
-
iterations?: number;
|
|
124
|
-
nodeDepth?: (datum: any, maxDepth: number) => number;
|
|
125
|
-
};
|
|
126
|
-
export type WordCloudTransform = {
|
|
127
|
-
type?: 'wordCloud';
|
|
128
|
-
/**
|
|
129
|
-
* @description If specified, sets the rectangular [width, height] of the layout
|
|
130
|
-
* @default [1, 1]
|
|
131
|
-
*/
|
|
132
|
-
size?: [number, number];
|
|
133
|
-
font?: string | ((word: any) => string);
|
|
134
|
-
fontStyle?: string | ((word: any) => string);
|
|
135
|
-
fontWeight?: any | ((word: any) => any);
|
|
136
|
-
fontSize?: number | [number, number] | ((word: any) => number);
|
|
137
|
-
padding?: number | ((word: any) => number);
|
|
138
|
-
/**
|
|
139
|
-
* @description sets the text accessor function, which indicates the text for each word
|
|
140
|
-
* @default (d) => d.text
|
|
141
|
-
*/
|
|
142
|
-
text?: (word: any) => number;
|
|
143
|
-
rotate?: number | ((word: any) => number);
|
|
144
|
-
timeInterval?: number;
|
|
145
|
-
random?: number | (() => number);
|
|
146
|
-
/**
|
|
147
|
-
* @description sets the current type of spiral used for positioning words. This can either be one of the two built-in spirals, "archimedean" and "rectangular"
|
|
148
|
-
* @default "archimedean"
|
|
149
|
-
*/
|
|
150
|
-
spiral?: 'archimedean' | 'rectangular' | ((size: [number, number]) => (t: number) => number[]);
|
|
151
|
-
imageMask?: HTMLImageElement | string;
|
|
152
|
-
on?: ((type: 'end', details?: {
|
|
153
|
-
cloud: any;
|
|
154
|
-
words: any;
|
|
155
|
-
bounds: any;
|
|
156
|
-
}) => void) | ((type: 'word', details?: {
|
|
157
|
-
cloud: any;
|
|
158
|
-
word: any;
|
|
159
|
-
}) => void);
|
|
160
|
-
};
|
|
161
|
-
export type VoronoiTransform = {
|
|
162
|
-
type?: 'voronoi';
|
|
163
|
-
/**
|
|
164
|
-
* @description Sets the input fields from the data.
|
|
165
|
-
*/
|
|
166
|
-
fields: [string, string];
|
|
167
|
-
/**
|
|
168
|
-
* @description Sets the output fields into data.
|
|
169
|
-
*/
|
|
170
|
-
as: [string, string];
|
|
171
|
-
/**
|
|
172
|
-
* @description Sets region of canvas.
|
|
173
|
-
*/
|
|
174
|
-
extend: Vector2[];
|
|
175
|
-
};
|
|
176
|
-
/**
|
|
177
|
-
* For arc diagram(edge with weight) or chord diagram(with weight)
|
|
178
|
-
*/
|
|
179
|
-
export type ArcTransform = {
|
|
180
|
-
type?: 'arc';
|
|
181
|
-
/** Layout y position, default: 0 */
|
|
182
|
-
y?: number;
|
|
183
|
-
/** margin between nodes, [0, 1), default: 0.1 */
|
|
184
|
-
marginRatio?: number;
|
|
185
|
-
/** Thickness of node, default: 0.05 */
|
|
186
|
-
thickness?: number;
|
|
187
|
-
/** Whether calculate weight, default: false */
|
|
188
|
-
weight?: boolean;
|
|
189
|
-
/** Key of node, default: node.id */
|
|
190
|
-
id?: (node: any) => any;
|
|
191
|
-
/** Source key of edge, default: edge.source */
|
|
192
|
-
source?: (edge: any) => any;
|
|
193
|
-
/** Target key of edge, default: edge.target */
|
|
194
|
-
target?: (edge: any) => any;
|
|
195
|
-
/** Weight of source, default: edge.value || 1 */
|
|
196
|
-
sourceWeight?: (edge: any) => number;
|
|
197
|
-
/** Weight of target, default: edge.value || 1 */
|
|
198
|
-
targetWeight?: (edge: any) => number;
|
|
199
|
-
/** Sort method, default: null */
|
|
200
|
-
sortBy?: 'id' | 'weight' | 'frequency' | null | ((a: any, b: any) => number);
|
|
201
|
-
};
|
|
202
|
-
/**
|
|
203
|
-
* Cluster layout options.
|
|
204
|
-
*/
|
|
205
|
-
export type ClusterTransform = {
|
|
206
|
-
type?: 'cluster';
|
|
207
|
-
/**
|
|
208
|
-
* Layout field. Default: 'value'.
|
|
209
|
-
*/
|
|
210
|
-
field?: string;
|
|
211
|
-
/**
|
|
212
|
-
* Sets this cluster layout’s node size to the specified two-element array of numbers [width, height] and returns this cluster layout.
|
|
213
|
-
* Default: null.
|
|
214
|
-
*/
|
|
215
|
-
nodeSize?: any;
|
|
216
|
-
/**
|
|
217
|
-
* The separation accessor is used to separate neighboring leaves. Default: (a, b) => a.parent == b.parent ? 1 : 2;
|
|
218
|
-
*/
|
|
219
|
-
separation?: (a: any, b: any) => number;
|
|
220
|
-
/**
|
|
221
|
-
* Sort function by compare 2 nodes.
|
|
222
|
-
*/
|
|
223
|
-
sortBy?: (a: any, b: any) => number;
|
|
224
|
-
/**
|
|
225
|
-
* Layout infomation saved into fields. Default: ['x', 'y'].
|
|
226
|
-
*/
|
|
227
|
-
as?: [string, string];
|
|
228
|
-
};
|
|
229
|
-
export type TreeTransform = Omit<ClusterTransform, 'type'> & {
|
|
230
|
-
type?: 'tree';
|
|
231
|
-
};
|
|
232
|
-
export type MapTransform = {
|
|
233
|
-
type?: 'map';
|
|
234
|
-
callback?: (d: any) => any;
|
|
235
|
-
};
|
|
17
|
+
} | any;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { DataComponent } from '../runtime';
|
|
2
|
+
export type DataTransform = SortByTransform | SortTransform | PickTransform | RenameTransform | FoldTransform | JoinTransform | FilterDataTransform | MapTransform | SliceTransform | CustomTransform;
|
|
3
|
+
export type DataTransformTypes = 'sortBy' | 'sort' | 'pick' | 'rename' | 'fold' | 'join' | 'filter' | 'map' | 'slice' | 'custom' | DataComponent;
|
|
4
|
+
export type SortByTransform = {
|
|
5
|
+
type?: 'sortBy';
|
|
6
|
+
/** type: [field, order]; order: true => ascend, false => descend */
|
|
7
|
+
fields?: (string | [string, boolean?])[];
|
|
8
|
+
};
|
|
9
|
+
export type PickTransform = {
|
|
10
|
+
type?: 'pick';
|
|
11
|
+
fields?: string[];
|
|
12
|
+
};
|
|
13
|
+
export type RenameTransform = {
|
|
14
|
+
type?: 'rename';
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
export type FilterDataTransform = {
|
|
18
|
+
type?: 'filter';
|
|
19
|
+
/**
|
|
20
|
+
* The filter condition, same with [Array.prototype.filter](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
|
|
21
|
+
*/
|
|
22
|
+
callback?: (v: any, idx: number, arr: any[]) => boolean;
|
|
23
|
+
};
|
|
24
|
+
export type SliceTransform = {
|
|
25
|
+
type?: 'slice';
|
|
26
|
+
/**
|
|
27
|
+
* The start index for slice. Default is 0.
|
|
28
|
+
*/
|
|
29
|
+
start?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The end index for slice. Default is arr.length - 1
|
|
32
|
+
*/
|
|
33
|
+
end?: number;
|
|
34
|
+
};
|
|
35
|
+
export type SortTransform = {
|
|
36
|
+
type?: 'sort';
|
|
37
|
+
/**
|
|
38
|
+
* The sort comparator, same with [Array.prototype.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
|
|
39
|
+
*/
|
|
40
|
+
callback?: (a: any, b: any) => number;
|
|
41
|
+
};
|
|
42
|
+
export type FoldTransform = {
|
|
43
|
+
type?: 'fold';
|
|
44
|
+
/**
|
|
45
|
+
* Set fields will be folded.
|
|
46
|
+
*/
|
|
47
|
+
fields?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Fold key field, default is `key`.
|
|
50
|
+
*/
|
|
51
|
+
key?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Fold value field, default is `value`.
|
|
54
|
+
*/
|
|
55
|
+
value?: string;
|
|
56
|
+
};
|
|
57
|
+
export type JoinTransform = {
|
|
58
|
+
type?: 'join';
|
|
59
|
+
/**
|
|
60
|
+
* The dataset to be joined.
|
|
61
|
+
*/
|
|
62
|
+
join: Record<string, any>[];
|
|
63
|
+
/**
|
|
64
|
+
* Join keys of 2 dataset, [k1, k2] means join on ds1.k1 === ds2.k2.
|
|
65
|
+
*/
|
|
66
|
+
on: [string | ((d: any) => string), string | ((d: any) => string)];
|
|
67
|
+
/**
|
|
68
|
+
* Select fields from joined dataset.
|
|
69
|
+
*/
|
|
70
|
+
select: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Rename the select fields, default: keep the original name.
|
|
73
|
+
*/
|
|
74
|
+
as?: string[];
|
|
75
|
+
/**
|
|
76
|
+
* When not matched, use `unknown` instead.
|
|
77
|
+
*/
|
|
78
|
+
unknown?: any;
|
|
79
|
+
};
|
|
80
|
+
export type MapTransform = {
|
|
81
|
+
type?: 'map';
|
|
82
|
+
callback?: (d: any) => any;
|
|
83
|
+
};
|
|
84
|
+
export type CustomDataTransform = {
|
|
85
|
+
type?: 'custom';
|
|
86
|
+
callback?: (d: any) => any;
|
|
87
|
+
};
|
|
88
|
+
export type CustomTransform = {
|
|
89
|
+
type?: DataComponent;
|
|
90
|
+
[key: string]: any;
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataTransform.js","sourceRoot":"src/","sources":["spec/dataTransform.ts"],"names":[],"mappings":""}
|
package/lib/spec/index.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Composition } from './composition';
|
|
2
|
+
import { Mark } from './mark';
|
|
3
|
+
export type G2Spec = (Mark | Composition) & {
|
|
3
4
|
width?: number;
|
|
4
5
|
height?: number;
|
|
5
6
|
};
|
|
6
|
-
export * from './transform';
|
|
7
|
-
export * from './encode';
|
|
8
|
-
export * from './data';
|
|
9
|
-
export * from './scale';
|
|
10
|
-
export * from './palette';
|
|
11
|
-
export * from './coordinate';
|
|
12
|
-
export * from './geometry';
|
|
13
7
|
export * from './animate';
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './action';
|
|
8
|
+
export * from './component';
|
|
16
9
|
export * from './composition';
|
|
10
|
+
export * from './coordinate';
|
|
11
|
+
export * from './coordinateTransform';
|
|
12
|
+
export * from './data';
|
|
13
|
+
export * from './dataTransform';
|
|
14
|
+
export * from './encode';
|
|
15
|
+
export * from './interaction';
|
|
17
16
|
export * from './labelTransform';
|
|
17
|
+
export * from './mark';
|
|
18
|
+
export * from './scale';
|
|
19
|
+
export * from './palette';
|
|
20
|
+
export * from './theme';
|
|
21
|
+
export * from './transform';
|
package/lib/spec/index.js
CHANGED
|
@@ -14,16 +14,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./transform"), exports);
|
|
18
|
-
__exportStar(require("./encode"), exports);
|
|
19
|
-
__exportStar(require("./data"), exports);
|
|
20
|
-
__exportStar(require("./scale"), exports);
|
|
21
|
-
__exportStar(require("./palette"), exports);
|
|
22
|
-
__exportStar(require("./coordinate"), exports);
|
|
23
|
-
__exportStar(require("./geometry"), exports);
|
|
24
17
|
__exportStar(require("./animate"), exports);
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./action"), exports);
|
|
18
|
+
__exportStar(require("./component"), exports);
|
|
27
19
|
__exportStar(require("./composition"), exports);
|
|
20
|
+
__exportStar(require("./coordinate"), exports);
|
|
21
|
+
__exportStar(require("./coordinateTransform"), exports);
|
|
22
|
+
__exportStar(require("./data"), exports);
|
|
23
|
+
__exportStar(require("./dataTransform"), exports);
|
|
24
|
+
__exportStar(require("./encode"), exports);
|
|
25
|
+
__exportStar(require("./interaction"), exports);
|
|
28
26
|
__exportStar(require("./labelTransform"), exports);
|
|
27
|
+
__exportStar(require("./mark"), exports);
|
|
28
|
+
__exportStar(require("./scale"), exports);
|
|
29
|
+
__exportStar(require("./palette"), exports);
|
|
30
|
+
__exportStar(require("./theme"), exports);
|
|
31
|
+
__exportStar(require("./transform"), exports);
|
|
29
32
|
//# sourceMappingURL=index.js.map
|
package/lib/spec/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["spec/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAQA,4CAA0B;AAC1B,8CAA4B;AAC5B,gDAA8B;AAC9B,+CAA6B;AAC7B,wDAAsC;AACtC,yCAAuB;AACvB,kDAAgC;AAChC,2CAAyB;AACzB,gDAA8B;AAC9B,mDAAiC;AACjC,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,8CAA4B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InteractionComponent } from '../runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { FisheyeCoordinate } from './coordinateTransform';
|
|
3
|
+
import { TooltipItemValue } from './component';
|
|
4
|
+
import { AtheisticChanelTypes } from './mark';
|
|
4
5
|
export type Interaction = ElementHighlightInteraction | ElementHighlightByColorInteraction | ElementHighlightByXInteraction | ElementSelectByColorInteraction | ElementSelectByXInteraction | ElementSelectInteraction | TooltipInteraction | FisheyeInteraction | ChartIndexInteraction | CustomInteraction | LegendFilterInteraction | LegendHighlightInteraction | BrushHighlightInteraction | BrushXHighlightInteraction | BrushYHighlightInteraction | BrushAxisHighlightInteraction | BrushFilterInteraction | BrushYFilterInteraction | BrushXFilterInteraction | SliderFilterInteraction | PoptipInteraction;
|
|
5
6
|
export type InteractionTypes = 'elementHighlight' | 'elementHighlightByX' | 'elementHighlightByColor' | 'fisheye' | 'chartIndex' | 'elementSelect' | 'elementSelectByX' | 'elementSelectByColor' | 'fisheye' | 'tooltip' | 'legendFilter' | 'legendHighlight' | 'brushXHighlight' | 'brushYHighlight' | 'brushHighlight' | 'brushFilter' | 'brushXFilter' | 'brushYFilter' | 'sliderFilter' | 'poptip' | InteractionComponent;
|
|
6
7
|
export type BrushInteraction = {
|
|
@@ -95,7 +96,7 @@ export type PoptipInteraction = {
|
|
|
95
96
|
} & Record<`tip${any}`, any>;
|
|
96
97
|
export type LegendFilterInteraction = {
|
|
97
98
|
type?: 'legendFilter';
|
|
98
|
-
channel?:
|
|
99
|
+
channel?: AtheisticChanelTypes;
|
|
99
100
|
[key: string]: any;
|
|
100
101
|
} & Record<`${'marker' | 'label'}Unselected${any}`, any>;
|
|
101
102
|
export type LegendHighlightInteraction = {
|
|
@@ -120,7 +121,11 @@ export type TooltipInteraction = {
|
|
|
120
121
|
series?: boolean;
|
|
121
122
|
facet?: boolean;
|
|
122
123
|
crosshairs?: boolean;
|
|
123
|
-
|
|
124
|
+
render?: (event: any, // @todo
|
|
125
|
+
options: {
|
|
126
|
+
title: 'string';
|
|
127
|
+
items: TooltipItemValue[];
|
|
128
|
+
}) => HTMLElement | string;
|
|
124
129
|
};
|
|
125
130
|
export type FisheyeInteraction = {
|
|
126
131
|
type?: 'fisheye';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { DisplayObject } from '@antv/g';
|
|
2
|
-
export type LabelTransform =
|
|
3
|
-
export type
|
|
2
|
+
export type LabelTransform = OverlapHideLabelTransform | OverlapDodgeYLabelTransform | ContrastReverseLabelTransform | OverflowHideLabelTransform;
|
|
3
|
+
export type OverlapHideLabelTransform = {
|
|
4
4
|
type?: 'overlapHide';
|
|
5
5
|
/**
|
|
6
6
|
* The hide priority, is the comparator for label.sort().
|
|
7
7
|
*/
|
|
8
8
|
priority?: (a: DisplayObject, b: DisplayObject) => number;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type OverlapDodgeYLabelTransform = {
|
|
11
11
|
type?: 'overlapDodgeY';
|
|
12
12
|
maxIterations?: number;
|
|
13
13
|
maxError?: number;
|
|
14
14
|
padding?: number;
|
|
15
15
|
};
|
|
16
|
-
export type
|
|
16
|
+
export type ContrastReverseLabelTransform = {
|
|
17
17
|
type: 'contrastReverse';
|
|
18
18
|
/**
|
|
19
19
|
* Transform when the contrast ratio < threshold.
|
|
@@ -25,6 +25,6 @@ export type ContrastReverseTransform = {
|
|
|
25
25
|
*/
|
|
26
26
|
palette?: string[];
|
|
27
27
|
};
|
|
28
|
-
export type
|
|
28
|
+
export type OverflowHideLabelTransform = {
|
|
29
29
|
type: 'overflowHide';
|
|
30
30
|
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { MarkComponent } from '../runtime';
|
|
2
|
+
import { Encode } from './encode';
|
|
3
|
+
import { Transform } from './transform';
|
|
4
|
+
import { Scale } from './scale';
|
|
5
|
+
import { Coordinate } from './coordinate';
|
|
6
|
+
import { Animation } from './animate';
|
|
7
|
+
import { Interaction } from './interaction';
|
|
8
|
+
import { Theme } from './theme';
|
|
9
|
+
import { Data } from './data';
|
|
10
|
+
import { AxisComponent, LegendComponent, ScrollbarComponent, SliderComponent, TitleComponent, TooltipComponent } from './component';
|
|
11
|
+
import { Closeable, Literal2Object } from './utils';
|
|
12
|
+
export type Mark = IntervalMark | RectMark | LineMark | PointMark | TextMark | CellMark | AreaMark | NodeMark | EdgeMark | ImageMark | PolygonMark | BoxMark | VectorMark | LineXMark | LineYMark | RangeMark | RangeXMark | RangeYMark | ConnectorMark | SankeyMark | PathMark | TreemapMark | PackMark | BoxPlotMark | ShapeMark | ForceGraphMark | TreeMark | WordCloudMark | CustomMark;
|
|
13
|
+
export type MarkTypes = 'interval' | 'rect' | 'line' | 'point' | 'text' | 'cell' | 'area' | 'node' | 'edge' | 'link' | 'image' | 'polygon' | 'box' | 'vector' | 'lineX' | 'lineY' | 'connector' | 'range' | 'rangeX' | 'rangeY' | 'sankey' | 'path' | 'treemap' | 'pack' | 'boxplot' | 'shape' | 'forceGraph' | 'tree' | 'wordCloud' | MarkComponent;
|
|
14
|
+
export type ChannelTypes = 'x' | 'y' | 'x1' | 'y1' | 'series' | 'color' | 'opacity' | 'shape' | 'size' | 'key' | 'groupKey' | 'position' | 'series' | 'enterType' | 'enterEasing' | 'enterDuration' | 'enterDelay' | 'updateType' | 'updateEasing' | 'updateDuration' | 'updateDelay' | 'exitType' | 'exitEasing' | 'exitDuration' | 'exitDelay' | `position${number}`;
|
|
15
|
+
export type PositionChannelTypes = 'x' | 'y' | 'position' | `position${number}`;
|
|
16
|
+
export type AtheisticChanelTypes = 'size' | 'color' | 'shape' | 'opacity';
|
|
17
|
+
export type BaseMark<T extends MarkTypes, C extends string = ChannelTypes> = {
|
|
18
|
+
type?: T | string;
|
|
19
|
+
class?: string;
|
|
20
|
+
key?: string;
|
|
21
|
+
paddingLeft?: number;
|
|
22
|
+
paddingRight?: number;
|
|
23
|
+
paddingBottom?: number;
|
|
24
|
+
paddingTop?: number;
|
|
25
|
+
padding?: number;
|
|
26
|
+
inset?: number;
|
|
27
|
+
insetLeft?: number;
|
|
28
|
+
insetBottom?: number;
|
|
29
|
+
insetTop?: number;
|
|
30
|
+
insetRight?: number;
|
|
31
|
+
margin?: number;
|
|
32
|
+
marginLeft?: number;
|
|
33
|
+
marginBottom?: number;
|
|
34
|
+
marginTop?: number;
|
|
35
|
+
marginRight?: number;
|
|
36
|
+
facet?: boolean;
|
|
37
|
+
frame?: boolean;
|
|
38
|
+
zIndex?: number;
|
|
39
|
+
cartesian?: boolean;
|
|
40
|
+
clip?: boolean;
|
|
41
|
+
data?: Data;
|
|
42
|
+
transform?: Transform[];
|
|
43
|
+
layout?: Record<string, any>;
|
|
44
|
+
encode?: Partial<Record<C, Encode | Encode[]>>;
|
|
45
|
+
scale?: Partial<Record<C, Scale>>;
|
|
46
|
+
coordinate?: Coordinate;
|
|
47
|
+
style?: Record<string, any>;
|
|
48
|
+
state?: Partial<Record<'active' | 'selected' | 'inactive' | 'unselected', Record<string, any>>>;
|
|
49
|
+
animate?: Closeable<Partial<Record<'enter' | 'update' | 'exit', Closeable<Animation>>>>;
|
|
50
|
+
labels?: Record<string, any>[];
|
|
51
|
+
tooltip?: TooltipComponent;
|
|
52
|
+
axis?: Closeable<Partial<Record<PositionChannelTypes, Closeable<AxisComponent>>>>;
|
|
53
|
+
legend?: Closeable<Partial<Record<AtheisticChanelTypes, Closeable<LegendComponent>>>>;
|
|
54
|
+
slider?: Closeable<Partial<Record<PositionChannelTypes, Closeable<SliderComponent>>>>;
|
|
55
|
+
scrollbar?: Closeable<Partial<Record<PositionChannelTypes, Closeable<ScrollbarComponent>>>>;
|
|
56
|
+
title?: string | TitleComponent;
|
|
57
|
+
interaction?: Literal2Object<Interaction>;
|
|
58
|
+
theme?: Theme;
|
|
59
|
+
};
|
|
60
|
+
export type HOMMarkType = (options: Record<string, any>) => () => any[];
|
|
61
|
+
export type HOMMarkMark = BaseMark<HOMMarkType>;
|
|
62
|
+
export type IntervalMark = BaseMark<'interval', ChannelTypes | 'series'>;
|
|
63
|
+
export type RectMark = BaseMark<'rect', ChannelTypes>;
|
|
64
|
+
export type LineMark = BaseMark<'line', ChannelTypes | 'position' | `position${number}`>;
|
|
65
|
+
export type PointMark = BaseMark<'point'>;
|
|
66
|
+
export type TextMark = BaseMark<'text', ChannelTypes | 'text' | 'fontSize' | 'fontWeight' | 'rotate'>;
|
|
67
|
+
export type LineXMark = BaseMark<'lineX', ChannelTypes>;
|
|
68
|
+
export type LineYMark = BaseMark<'lineY', ChannelTypes>;
|
|
69
|
+
export type RangeMark = BaseMark<'range', ChannelTypes>;
|
|
70
|
+
export type RangeXMark = BaseMark<'rangeX', ChannelTypes>;
|
|
71
|
+
export type RangeYMark = BaseMark<'rangeY', ChannelTypes>;
|
|
72
|
+
export type ConnectorMark = BaseMark<'connector', ChannelTypes>;
|
|
73
|
+
export type CellMark = BaseMark<'cell'>;
|
|
74
|
+
export type AreaMark = BaseMark<'area', ChannelTypes>;
|
|
75
|
+
export type NodeMark = BaseMark<'node', ChannelTypes>;
|
|
76
|
+
export type EdgeMark = BaseMark<'edge', ChannelTypes>;
|
|
77
|
+
export type LinkMark = BaseMark<'link', ChannelTypes>;
|
|
78
|
+
export type ImageMark = BaseMark<'image', ChannelTypes | 'src'>;
|
|
79
|
+
export type PolygonMark = BaseMark<'polygon', ChannelTypes>;
|
|
80
|
+
export type BoxMark = BaseMark<'box', ChannelTypes>;
|
|
81
|
+
export type BoxPlotMark = BaseMark<'box', ChannelTypes>;
|
|
82
|
+
export type ShapeMark = BaseMark<'shape', ChannelTypes>;
|
|
83
|
+
export type VectorMark = BaseMark<'vector', ChannelTypes | 'rotate' | 'size'>;
|
|
84
|
+
export type SankeyMark = BaseMark<'sankey', 'source' | 'target' | 'value' | `node${Capitalize<ChannelTypes>}` | `link${Capitalize<ChannelTypes>}` | ChannelTypes> & {
|
|
85
|
+
layout?: {
|
|
86
|
+
nodeId?: (node: any) => string;
|
|
87
|
+
nodes?: (graph: any) => any;
|
|
88
|
+
links?: (graph: any) => any;
|
|
89
|
+
/**
|
|
90
|
+
* sankey.nodeSort(undefined) is the default and resorts by ascending breadth during each iteration.
|
|
91
|
+
* sankey.nodeSort(null) specifies the input order of nodes and never sorts.
|
|
92
|
+
* sankey.nodeSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
93
|
+
*/
|
|
94
|
+
nodeSort?: null | undefined | ((a: any, b: any) => number);
|
|
95
|
+
/**
|
|
96
|
+
* sankey.linkSort(undefined) is the default, indicating that vertical order of links within each node will be determined automatically by the layout. If
|
|
97
|
+
* sankey.linkSort(null) will resort by the input.
|
|
98
|
+
* sankey.linkSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
99
|
+
*/
|
|
100
|
+
linkSort?: null | undefined | ((a: any, b: any) => number);
|
|
101
|
+
nodeAlign?: 'left' | 'center' | 'right' | 'justify' | ((node: any, n: number) => number);
|
|
102
|
+
nodeWidth?: number;
|
|
103
|
+
nodePadding?: number;
|
|
104
|
+
iterations?: number;
|
|
105
|
+
nodeDepth?: (datum: any, maxDepth: number) => number;
|
|
106
|
+
};
|
|
107
|
+
nodeLabels: Record<string, any>[];
|
|
108
|
+
linkLabels: Record<string, any>[];
|
|
109
|
+
};
|
|
110
|
+
export type PathMark = BaseMark<'path', ChannelTypes>;
|
|
111
|
+
export type TreemapMark = BaseMark<'treemap', 'value' | ChannelTypes> & {
|
|
112
|
+
layout?: Record<string, any>;
|
|
113
|
+
};
|
|
114
|
+
export type PackMark = BaseMark<'pack', 'value' | ChannelTypes> & {
|
|
115
|
+
layout?: Record<string, any>;
|
|
116
|
+
};
|
|
117
|
+
export type ForceGraphMark = BaseMark<'forceGraph', 'source' | 'target' | 'color' | 'value' | `node${Capitalize<ChannelTypes>}` | `link${Capitalize<ChannelTypes>}`> & {
|
|
118
|
+
layout?: Record<string, any>;
|
|
119
|
+
nodeLabels: Record<string, any>[];
|
|
120
|
+
linkLabels: Record<string, any>[];
|
|
121
|
+
};
|
|
122
|
+
export type TreeMark = BaseMark<'tree', 'value' | ChannelTypes> & {
|
|
123
|
+
layout?: {
|
|
124
|
+
/**
|
|
125
|
+
* Layout field. Default: 'value'.
|
|
126
|
+
*/
|
|
127
|
+
field?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Sets this cluster layout’s node size to the specified two-element array of numbers [width, height] and returns this cluster layout.
|
|
130
|
+
* Default: null.
|
|
131
|
+
*/
|
|
132
|
+
nodeSize?: any;
|
|
133
|
+
/**
|
|
134
|
+
* The separation accessor is used to separate neighboring leaves. Default: (a, b) => a.parent == b.parent ? 1 : 2;
|
|
135
|
+
*/
|
|
136
|
+
separation?: (a: any, b: any) => number;
|
|
137
|
+
/**
|
|
138
|
+
* Sort function by compare 2 nodes.
|
|
139
|
+
*/
|
|
140
|
+
sortBy?: (a: any, b: any) => number;
|
|
141
|
+
/**
|
|
142
|
+
* Layout infomation saved into fields. Default: ['x', 'y'].
|
|
143
|
+
*/
|
|
144
|
+
as?: [string, string];
|
|
145
|
+
};
|
|
146
|
+
nodeLabels: Record<string, any>[];
|
|
147
|
+
linkLabels: Record<string, any>[];
|
|
148
|
+
};
|
|
149
|
+
export type WordCloudMark = BaseMark<'wordCloud', 'value' | ChannelTypes | 'text'> & {
|
|
150
|
+
layout?: {
|
|
151
|
+
/**
|
|
152
|
+
* @description If specified, sets the rectangular [width, height] of the layout
|
|
153
|
+
* @default [1, 1]
|
|
154
|
+
*/
|
|
155
|
+
size?: [number, number];
|
|
156
|
+
font?: string | ((word: any) => string);
|
|
157
|
+
fontStyle?: string | ((word: any) => string);
|
|
158
|
+
fontWeight?: any | ((word: any) => any);
|
|
159
|
+
fontSize?: number | [number, number] | ((word: any) => number);
|
|
160
|
+
padding?: number | ((word: any) => number);
|
|
161
|
+
/**
|
|
162
|
+
* @description sets the text accessor function, which indicates the text for each word
|
|
163
|
+
* @default (d) => d.text
|
|
164
|
+
*/
|
|
165
|
+
text?: (word: any) => number;
|
|
166
|
+
rotate?: number | ((word: any) => number);
|
|
167
|
+
timeInterval?: number;
|
|
168
|
+
random?: number | (() => number);
|
|
169
|
+
/**
|
|
170
|
+
* @description sets the current type of spiral used for positioning words. This can either be one of the two built-in spirals, "archimedean" and "rectangular"
|
|
171
|
+
* @default "archimedean"
|
|
172
|
+
*/
|
|
173
|
+
spiral?: 'archimedean' | 'rectangular' | ((size: [number, number]) => (t: number) => number[]);
|
|
174
|
+
imageMask?: HTMLImageElement | string;
|
|
175
|
+
on?: ((type: 'end', details?: {
|
|
176
|
+
cloud: any;
|
|
177
|
+
words: any;
|
|
178
|
+
bounds: any;
|
|
179
|
+
}) => void) | ((type: 'word', details?: {
|
|
180
|
+
cloud: any;
|
|
181
|
+
word: any;
|
|
182
|
+
}) => void);
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
export type CustomMark = BaseMark<MarkComponent, ChannelTypes>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark.js","sourceRoot":"src/","sources":["spec/mark.ts"],"names":[],"mappings":""}
|