@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/src/spec/composition.ts
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
import { Geometry } from './geometry';
|
|
2
1
|
import { Theme } from './theme';
|
|
3
|
-
import { Coordinate
|
|
2
|
+
import { Coordinate } from './coordinate';
|
|
4
3
|
import { Interaction } from './interaction';
|
|
5
4
|
import { Transform } from './transform';
|
|
6
5
|
import { Scale } from './scale';
|
|
7
|
-
import { Title } from './title';
|
|
8
6
|
import { Data } from './data';
|
|
9
7
|
import { LabelTransform } from './labelTransform';
|
|
10
|
-
import { Encode } from './encode';
|
|
11
8
|
import { Literal2Object } from './utils';
|
|
9
|
+
import { TitleComponent } from './component';
|
|
10
|
+
import { Mark } from './mark';
|
|
12
11
|
|
|
13
|
-
export type
|
|
14
|
-
| MarkComposition
|
|
12
|
+
export type Composition =
|
|
15
13
|
| ViewComposition
|
|
14
|
+
| GeoViewComposition
|
|
15
|
+
| GeoPathComposition
|
|
16
16
|
| SpaceLayerComposition
|
|
17
17
|
| SpaceFlexComposition
|
|
18
18
|
| RepeatMatrixComposition
|
|
19
19
|
| FacetRectComposition
|
|
20
20
|
| FacetCircleComposition
|
|
21
|
-
| GeoViewComposition
|
|
22
21
|
| TimingKeyframeComposition;
|
|
23
22
|
|
|
24
|
-
export type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
export type CompositionTypes =
|
|
24
|
+
| 'view'
|
|
25
|
+
| 'getView'
|
|
26
|
+
| 'geoPath'
|
|
27
|
+
| 'spaceLayer'
|
|
28
|
+
| 'spaceFlex'
|
|
29
|
+
| 'facetRect'
|
|
30
|
+
| 'facetCircle'
|
|
31
|
+
| 'repeatMatrix'
|
|
32
|
+
| 'timingKeyframe';
|
|
28
33
|
|
|
29
34
|
export type ViewComposition = {
|
|
30
35
|
type?: 'view';
|
|
@@ -48,12 +53,12 @@ export type ViewComposition = {
|
|
|
48
53
|
insetTop?: number;
|
|
49
54
|
insetBottom?: number;
|
|
50
55
|
insetRight?: number;
|
|
51
|
-
coordinate?: Coordinate
|
|
56
|
+
coordinate?: Coordinate;
|
|
52
57
|
interaction?: Literal2Object<Interaction>;
|
|
53
58
|
transform?: Transform[];
|
|
54
|
-
title?:
|
|
59
|
+
title?: string | TitleComponent;
|
|
55
60
|
theme?: Theme;
|
|
56
|
-
children?:
|
|
61
|
+
children?: Mark[];
|
|
57
62
|
scale?: Record<string, Scale>;
|
|
58
63
|
labelTransform?: LabelTransform[];
|
|
59
64
|
// @todo
|
|
@@ -65,6 +70,19 @@ export type ViewComposition = {
|
|
|
65
70
|
clip?: boolean;
|
|
66
71
|
};
|
|
67
72
|
|
|
73
|
+
export type GeoViewComposition = Omit<ViewComposition, 'type'> & {
|
|
74
|
+
type?: 'geoView';
|
|
75
|
+
// @todo
|
|
76
|
+
coordinate?: Record<string, any>;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export type GeoPathComposition = Omit<ViewComposition, 'type'> & {
|
|
80
|
+
type?: 'geoPath';
|
|
81
|
+
// @todo
|
|
82
|
+
coordinate?: Record<string, any>;
|
|
83
|
+
[key: string]: any; // @todo
|
|
84
|
+
};
|
|
85
|
+
|
|
68
86
|
export type SpaceLayerComposition = {
|
|
69
87
|
type?: 'spaceLayer';
|
|
70
88
|
key?: string;
|
|
@@ -107,7 +125,7 @@ export type FacetRectComposition = {
|
|
|
107
125
|
marginTop?: number;
|
|
108
126
|
marginRight?: number;
|
|
109
127
|
key?: string;
|
|
110
|
-
title?:
|
|
128
|
+
title?: string | TitleComponent;
|
|
111
129
|
encode?: {
|
|
112
130
|
x?: string;
|
|
113
131
|
y?: string;
|
|
@@ -115,6 +133,7 @@ export type FacetRectComposition = {
|
|
|
115
133
|
scale?: {
|
|
116
134
|
x?: Scale;
|
|
117
135
|
y?: Scale;
|
|
136
|
+
color?: Scale;
|
|
118
137
|
};
|
|
119
138
|
shareData?: boolean;
|
|
120
139
|
shareSize?: boolean;
|
|
@@ -137,7 +156,7 @@ export type RepeatMatrixComposition = {
|
|
|
137
156
|
marginTop?: number;
|
|
138
157
|
marginRight?: number;
|
|
139
158
|
transform?: Transform;
|
|
140
|
-
title?:
|
|
159
|
+
title?: string | TitleComponent;
|
|
141
160
|
data?: Data;
|
|
142
161
|
key?: string;
|
|
143
162
|
encode?: {
|
|
@@ -148,6 +167,7 @@ export type RepeatMatrixComposition = {
|
|
|
148
167
|
scale?: {
|
|
149
168
|
x?: Scale;
|
|
150
169
|
y?: Scale;
|
|
170
|
+
color?: Scale;
|
|
151
171
|
};
|
|
152
172
|
// @todo
|
|
153
173
|
axis?: Record<string, any>;
|
|
@@ -168,7 +188,7 @@ export type FacetCircleComposition = {
|
|
|
168
188
|
marginTop?: number;
|
|
169
189
|
marginRight?: number;
|
|
170
190
|
transform?: Transform;
|
|
171
|
-
title?:
|
|
191
|
+
title?: string | TitleComponent;
|
|
172
192
|
data?: Data;
|
|
173
193
|
key?: string;
|
|
174
194
|
encode?: {
|
|
@@ -177,6 +197,7 @@ export type FacetCircleComposition = {
|
|
|
177
197
|
scale?: {
|
|
178
198
|
x?: Scale;
|
|
179
199
|
y?: Scale;
|
|
200
|
+
color?: Scale;
|
|
180
201
|
};
|
|
181
202
|
children?: Node[] | ((facet: FacetContext) => Node);
|
|
182
203
|
// @todo
|
|
@@ -186,7 +207,7 @@ export type FacetCircleComposition = {
|
|
|
186
207
|
};
|
|
187
208
|
|
|
188
209
|
export type TimingKeyframeComposition = {
|
|
189
|
-
type?: '
|
|
210
|
+
type?: 'timingKeyframe';
|
|
190
211
|
duration?: number;
|
|
191
212
|
key?: string;
|
|
192
213
|
easing?: string;
|
|
@@ -195,13 +216,4 @@ export type TimingKeyframeComposition = {
|
|
|
195
216
|
children?: Node[];
|
|
196
217
|
};
|
|
197
218
|
|
|
198
|
-
|
|
199
|
-
type?: 'geoView';
|
|
200
|
-
// @todo
|
|
201
|
-
coordinate?: Record<string, any>;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
export type GeoPathComposition = Omit<GeoViewComposition, 'type'> & {
|
|
205
|
-
type?: 'geoView';
|
|
206
|
-
encode?: Record<string, Encode>;
|
|
207
|
-
};
|
|
219
|
+
type Node = Mark | Composition;
|
package/src/spec/coordinate.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { CoordinateComponent } from '../runtime';
|
|
2
|
+
import { CoordinateTransform } from './coordinateTransform';
|
|
2
3
|
|
|
3
4
|
export type Coordinate =
|
|
4
5
|
| PolarCoordinate
|
|
5
6
|
| HelixCoordinate
|
|
6
|
-
| TransposeCoordinate
|
|
7
7
|
| ThetaCoordinate
|
|
8
8
|
| CustomCoordinate
|
|
9
9
|
| CartesianCoordinate
|
|
10
10
|
| ParallelCoordinate
|
|
11
|
-
| FisheyeCoordinate
|
|
12
11
|
| RadialCoordinate
|
|
13
12
|
| RadarCoordinate
|
|
14
13
|
| GeoCoordinate;
|
|
@@ -25,77 +24,62 @@ export type CoordinateTypes =
|
|
|
25
24
|
| 'radar'
|
|
26
25
|
| string;
|
|
27
26
|
|
|
28
|
-
export type
|
|
27
|
+
export type BaseCoordinate<T> = T & { transform?: CoordinateTransform[] };
|
|
29
28
|
|
|
30
|
-
export type
|
|
31
|
-
|
|
32
|
-
export type PolarCoordinate = {
|
|
29
|
+
export type PolarCoordinate = BaseCoordinate<{
|
|
33
30
|
type?: 'polar';
|
|
34
31
|
startAngle?: number;
|
|
35
32
|
endAngle?: number;
|
|
36
33
|
innerRadius?: number;
|
|
37
34
|
outerRadius?: number;
|
|
38
|
-
}
|
|
35
|
+
}>;
|
|
39
36
|
|
|
40
|
-
export type HelixCoordinate = {
|
|
37
|
+
export type HelixCoordinate = BaseCoordinate<{
|
|
41
38
|
type?: 'helix';
|
|
42
39
|
startAngle?: number;
|
|
43
40
|
endAngle?: number;
|
|
44
41
|
innerRadius?: number;
|
|
45
42
|
outerRadius?: number;
|
|
46
|
-
}
|
|
43
|
+
}>;
|
|
47
44
|
|
|
48
|
-
export type RadarCoordinate = {
|
|
45
|
+
export type RadarCoordinate = BaseCoordinate<{
|
|
49
46
|
type?: 'radar';
|
|
50
47
|
startAngle?: number;
|
|
51
48
|
endAngle?: number;
|
|
52
49
|
innerRadius?: number;
|
|
53
50
|
outerRadius?: number;
|
|
54
|
-
}
|
|
51
|
+
}>;
|
|
55
52
|
|
|
56
|
-
export type ThetaCoordinate = {
|
|
53
|
+
export type ThetaCoordinate = BaseCoordinate<{
|
|
57
54
|
type?: 'theta';
|
|
58
55
|
startAngle?: number;
|
|
59
56
|
endAngle?: number;
|
|
60
57
|
innerRadius?: number;
|
|
61
58
|
outerRadius?: number;
|
|
62
|
-
}
|
|
59
|
+
}>;
|
|
63
60
|
|
|
64
|
-
export type RadialCoordinate = {
|
|
61
|
+
export type RadialCoordinate = BaseCoordinate<{
|
|
65
62
|
type?: 'radial';
|
|
66
63
|
startAngle?: number;
|
|
67
64
|
endAngle?: number;
|
|
68
65
|
innerRadius?: number;
|
|
69
66
|
outerRadius?: number;
|
|
70
|
-
}
|
|
67
|
+
}>;
|
|
71
68
|
|
|
72
|
-
export type CartesianCoordinate = {
|
|
69
|
+
export type CartesianCoordinate = BaseCoordinate<{
|
|
73
70
|
type?: 'cartesian';
|
|
74
|
-
}
|
|
71
|
+
}>;
|
|
75
72
|
|
|
76
|
-
export type ParallelCoordinate = {
|
|
73
|
+
export type ParallelCoordinate = BaseCoordinate<{
|
|
77
74
|
type?: 'parallel';
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type TransposeCoordinate = {
|
|
81
|
-
type?: 'transpose';
|
|
82
|
-
};
|
|
75
|
+
}>;
|
|
83
76
|
|
|
84
|
-
export type GeoCoordinate = {
|
|
77
|
+
export type GeoCoordinate = BaseCoordinate<{
|
|
85
78
|
type: string;
|
|
86
79
|
[key: string]: any; // @todo d3-geo types
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export type FisheyeCoordinate = {
|
|
90
|
-
type?: 'fisheye';
|
|
91
|
-
focusX?: number;
|
|
92
|
-
focusY?: number;
|
|
93
|
-
distortionX?: number;
|
|
94
|
-
distortionY?: number;
|
|
95
|
-
isVisual?: boolean;
|
|
96
|
-
};
|
|
80
|
+
}>;
|
|
97
81
|
|
|
98
|
-
export type CustomCoordinate = {
|
|
82
|
+
export type CustomCoordinate = BaseCoordinate<{
|
|
99
83
|
type: CoordinateComponent;
|
|
100
84
|
[key: string]: any;
|
|
101
|
-
}
|
|
85
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type CoordinateTransform = TransposeCoordinate | FisheyeCoordinate;
|
|
2
|
+
|
|
3
|
+
export type CoordinateTransformTypes = 'transpose' | 'fisheye';
|
|
4
|
+
|
|
5
|
+
export type TransposeCoordinate = {
|
|
6
|
+
type?: 'transpose';
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type FisheyeCoordinate = {
|
|
10
|
+
type?: 'fisheye';
|
|
11
|
+
focusX?: number;
|
|
12
|
+
focusY?: number;
|
|
13
|
+
distortionX?: number;
|
|
14
|
+
distortionY?: number;
|
|
15
|
+
isVisual?: boolean;
|
|
16
|
+
};
|
package/src/spec/data.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DataTransform } from './dataTransform';
|
|
2
|
+
|
|
3
|
+
export type Data = FetchConnector | InlineConnector;
|
|
4
|
+
|
|
5
|
+
export type DataTypes = 'inline' | 'fetch';
|
|
3
6
|
|
|
4
7
|
export type FetchConnector = {
|
|
5
8
|
type?: 'fetch';
|
|
@@ -12,272 +15,10 @@ export type FetchConnector = {
|
|
|
12
15
|
transform?: DataTransform[];
|
|
13
16
|
};
|
|
14
17
|
|
|
15
|
-
export type InlineConnector =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| SortByTransform
|
|
23
|
-
| SortTransform
|
|
24
|
-
| PickTransform
|
|
25
|
-
| RenameTransform
|
|
26
|
-
| FoldTransform
|
|
27
|
-
| JoinTransform
|
|
28
|
-
| FilterDataTransform
|
|
29
|
-
| MapTransform
|
|
30
|
-
| SliceTransform
|
|
31
|
-
| CustomTransform;
|
|
32
|
-
|
|
33
|
-
export type DataTransformTypes =
|
|
34
|
-
| 'sortBy'
|
|
35
|
-
| 'sort'
|
|
36
|
-
| 'pick'
|
|
37
|
-
| 'rename'
|
|
38
|
-
| 'fold'
|
|
39
|
-
| 'join'
|
|
40
|
-
| 'filter'
|
|
41
|
-
| 'map'
|
|
42
|
-
| 'slice'
|
|
43
|
-
| 'custom'
|
|
44
|
-
| DataComponent;
|
|
45
|
-
|
|
46
|
-
export type SortByTransform = {
|
|
47
|
-
type?: 'sortBy';
|
|
48
|
-
/** type: [field, order]; order: true => ascend, false => descend */
|
|
49
|
-
fields?: (string | [string, boolean?])[];
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export type PickTransform = {
|
|
53
|
-
type?: 'pick';
|
|
54
|
-
fields?: string[];
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export type RenameTransform = {
|
|
58
|
-
type?: 'rename';
|
|
59
|
-
[key: string]: string;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export type FilterDataTransform = {
|
|
63
|
-
type?: 'filter';
|
|
64
|
-
/**
|
|
65
|
-
* The filter condition, same with [Array.prototype.filter](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
|
|
66
|
-
*/
|
|
67
|
-
callback?: (v: any, idx: number, arr: any[]) => boolean;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export type SliceTransform = {
|
|
71
|
-
type?: 'slice';
|
|
72
|
-
/**
|
|
73
|
-
* The start index for slice. Default is 0.
|
|
74
|
-
*/
|
|
75
|
-
start?: number;
|
|
76
|
-
/**
|
|
77
|
-
* The end index for slice. Default is arr.length - 1
|
|
78
|
-
*/
|
|
79
|
-
end?: number;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export type SortTransform = {
|
|
83
|
-
type?: 'sort';
|
|
84
|
-
/**
|
|
85
|
-
* The sort comparator, same with [Array.prototype.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
|
|
86
|
-
*/
|
|
87
|
-
callback?: (a: any, b: any) => number;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export type FoldTransform = {
|
|
91
|
-
type?: 'fold';
|
|
92
|
-
/**
|
|
93
|
-
* Set fields will be folded.
|
|
94
|
-
*/
|
|
95
|
-
fields?: string[];
|
|
96
|
-
/**
|
|
97
|
-
* Fold key field, default is `key`.
|
|
98
|
-
*/
|
|
99
|
-
key?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Fold value field, default is `value`.
|
|
102
|
-
*/
|
|
103
|
-
value?: string;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export type CustomDataTransform = {
|
|
107
|
-
type?: 'custom';
|
|
108
|
-
callback?: (d: any) => any;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export type JoinTransform = {
|
|
112
|
-
type?: 'join';
|
|
113
|
-
/**
|
|
114
|
-
* The dataset to be joined.
|
|
115
|
-
*/
|
|
116
|
-
join: Record<string, any>[];
|
|
117
|
-
/**
|
|
118
|
-
* Join keys of 2 dataset, [k1, k2] means join on ds1.k1 === ds2.k2.
|
|
119
|
-
*/
|
|
120
|
-
on: [string | ((d: any) => string), string | ((d: any) => string)];
|
|
121
|
-
/**
|
|
122
|
-
* Select fields from joined dataset.
|
|
123
|
-
*/
|
|
124
|
-
select: string[];
|
|
125
|
-
/**
|
|
126
|
-
* Rename the select fields, default: keep the original name.
|
|
127
|
-
*/
|
|
128
|
-
as?: string[];
|
|
129
|
-
/**
|
|
130
|
-
* When not matched, use `unknown` instead.
|
|
131
|
-
*/
|
|
132
|
-
unknown?: any;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export type CustomTransform = {
|
|
136
|
-
type?: DataComponent;
|
|
137
|
-
[key: string]: any;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// Transforms for graph.
|
|
141
|
-
export type SankeyTransform = {
|
|
142
|
-
type?: 'sankey';
|
|
143
|
-
nodeId?: (node: any) => string;
|
|
144
|
-
nodes?: (graph: any) => any;
|
|
145
|
-
links?: (graph: any) => any;
|
|
146
|
-
/**
|
|
147
|
-
* sankey.nodeSort(undefined) is the default and resorts by ascending breadth during each iteration.
|
|
148
|
-
* sankey.nodeSort(null) specifies the input order of nodes and never sorts.
|
|
149
|
-
* sankey.nodeSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
150
|
-
*/
|
|
151
|
-
nodeSort?: null | undefined | ((a: any, b: any) => number);
|
|
152
|
-
/**
|
|
153
|
-
* sankey.linkSort(undefined) is the default, indicating that vertical order of links within each node will be determined automatically by the layout. If
|
|
154
|
-
* sankey.linkSort(null) will resort by the input.
|
|
155
|
-
* sankey.linkSort(function) specifies the given order as a comparator function and sorts once on initialization.
|
|
156
|
-
*/
|
|
157
|
-
linkSort?: null | undefined | ((a: any, b: any) => number);
|
|
158
|
-
nodeAlign?:
|
|
159
|
-
| 'left'
|
|
160
|
-
| 'center'
|
|
161
|
-
| 'right'
|
|
162
|
-
| 'justify'
|
|
163
|
-
| ((node: any, n: number) => number);
|
|
164
|
-
nodeWidth?: number;
|
|
165
|
-
nodePadding?: number;
|
|
166
|
-
iterations?: number;
|
|
167
|
-
// support config the depth of node
|
|
168
|
-
nodeDepth?: (datum: any, maxDepth: number) => number;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export type WordCloudTransform = {
|
|
172
|
-
type?: 'wordCloud';
|
|
173
|
-
/**
|
|
174
|
-
* @description If specified, sets the rectangular [width, height] of the layout
|
|
175
|
-
* @default [1, 1]
|
|
176
|
-
*/
|
|
177
|
-
size?: [number, number];
|
|
178
|
-
font?: string | ((word: any) => string);
|
|
179
|
-
fontStyle?: string | ((word: any) => string);
|
|
180
|
-
fontWeight?: any | ((word: any) => any);
|
|
181
|
-
fontSize?: number | [number, number] | ((word: any) => number);
|
|
182
|
-
padding?: number | ((word: any) => number);
|
|
183
|
-
/**
|
|
184
|
-
* @description sets the text accessor function, which indicates the text for each word
|
|
185
|
-
* @default (d) => d.text
|
|
186
|
-
*/
|
|
187
|
-
text?: (word: any) => number;
|
|
188
|
-
rotate?: number | ((word: any) => number);
|
|
189
|
-
timeInterval?: number;
|
|
190
|
-
random?: number | (() => number);
|
|
191
|
-
/**
|
|
192
|
-
* @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"
|
|
193
|
-
* @default "archimedean"
|
|
194
|
-
*/
|
|
195
|
-
spiral?:
|
|
196
|
-
| 'archimedean'
|
|
197
|
-
| 'rectangular'
|
|
198
|
-
| ((size: [number, number]) => (t: number) => number[]);
|
|
199
|
-
imageMask?: HTMLImageElement | string;
|
|
200
|
-
on?:
|
|
201
|
-
| ((type: 'end', details?: { cloud; words; bounds }) => void)
|
|
202
|
-
| ((type: 'word', details?: { cloud; word }) => void);
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
export type VoronoiTransform = {
|
|
206
|
-
type?: 'voronoi';
|
|
207
|
-
/**
|
|
208
|
-
* @description Sets the input fields from the data.
|
|
209
|
-
*/
|
|
210
|
-
fields: [string, string];
|
|
211
|
-
/**
|
|
212
|
-
* @description Sets the output fields into data.
|
|
213
|
-
*/
|
|
214
|
-
as: [string, string];
|
|
215
|
-
/**
|
|
216
|
-
* @description Sets region of canvas.
|
|
217
|
-
*/
|
|
218
|
-
extend: Vector2[];
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* For arc diagram(edge with weight) or chord diagram(with weight)
|
|
223
|
-
*/
|
|
224
|
-
export type ArcTransform = {
|
|
225
|
-
type?: 'arc';
|
|
226
|
-
/** Layout y position, default: 0 */
|
|
227
|
-
y?: number;
|
|
228
|
-
/** margin between nodes, [0, 1), default: 0.1 */
|
|
229
|
-
marginRatio?: number;
|
|
230
|
-
/** Thickness of node, default: 0.05 */
|
|
231
|
-
thickness?: number;
|
|
232
|
-
/** Whether calculate weight, default: false */
|
|
233
|
-
weight?: boolean;
|
|
234
|
-
/** Key of node, default: node.id */
|
|
235
|
-
id?: (node: any) => any;
|
|
236
|
-
/** Source key of edge, default: edge.source */
|
|
237
|
-
source?: (edge: any) => any;
|
|
238
|
-
/** Target key of edge, default: edge.target */
|
|
239
|
-
target?: (edge: any) => any;
|
|
240
|
-
/** Weight of source, default: edge.value || 1 */
|
|
241
|
-
sourceWeight?: (edge: any) => number;
|
|
242
|
-
/** Weight of target, default: edge.value || 1 */
|
|
243
|
-
targetWeight?: (edge: any) => number;
|
|
244
|
-
/** Sort method, default: null */
|
|
245
|
-
sortBy?: 'id' | 'weight' | 'frequency' | null | ((a: any, b: any) => number);
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Cluster layout options.
|
|
250
|
-
*/
|
|
251
|
-
export type ClusterTransform = {
|
|
252
|
-
type?: 'cluster';
|
|
253
|
-
/**
|
|
254
|
-
* Layout field. Default: 'value'.
|
|
255
|
-
*/
|
|
256
|
-
field?: string;
|
|
257
|
-
/**
|
|
258
|
-
* Sets this cluster layout’s node size to the specified two-element array of numbers [width, height] and returns this cluster layout.
|
|
259
|
-
* Default: null.
|
|
260
|
-
*/
|
|
261
|
-
nodeSize?: any;
|
|
262
|
-
/**
|
|
263
|
-
* The separation accessor is used to separate neighboring leaves. Default: (a, b) => a.parent == b.parent ? 1 : 2;
|
|
264
|
-
*/
|
|
265
|
-
separation?: (a, b) => number;
|
|
266
|
-
/**
|
|
267
|
-
* Sort function by compare 2 nodes.
|
|
268
|
-
*/
|
|
269
|
-
sortBy?: (a, b) => number;
|
|
270
|
-
/**
|
|
271
|
-
* Layout infomation saved into fields. Default: ['x', 'y'].
|
|
272
|
-
*/
|
|
273
|
-
as?: [string, string];
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
export type TreeTransform = Omit<ClusterTransform, 'type'> & {
|
|
277
|
-
type?: 'tree';
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
export type MapTransform = {
|
|
281
|
-
type?: 'map';
|
|
282
|
-
callback?: (d: any) => any;
|
|
283
|
-
};
|
|
18
|
+
export type InlineConnector =
|
|
19
|
+
| {
|
|
20
|
+
type?: 'inline';
|
|
21
|
+
value?: any;
|
|
22
|
+
transform?: DataTransform[];
|
|
23
|
+
}
|
|
24
|
+
| any;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { DataComponent } from '../runtime';
|
|
2
|
+
|
|
3
|
+
export type DataTransform =
|
|
4
|
+
| SortByTransform
|
|
5
|
+
| SortTransform
|
|
6
|
+
| PickTransform
|
|
7
|
+
| RenameTransform
|
|
8
|
+
| FoldTransform
|
|
9
|
+
| JoinTransform
|
|
10
|
+
| FilterDataTransform
|
|
11
|
+
| MapTransform
|
|
12
|
+
| SliceTransform
|
|
13
|
+
| CustomTransform;
|
|
14
|
+
|
|
15
|
+
export type DataTransformTypes =
|
|
16
|
+
| 'sortBy'
|
|
17
|
+
| 'sort'
|
|
18
|
+
| 'pick'
|
|
19
|
+
| 'rename'
|
|
20
|
+
| 'fold'
|
|
21
|
+
| 'join'
|
|
22
|
+
| 'filter'
|
|
23
|
+
| 'map'
|
|
24
|
+
| 'slice'
|
|
25
|
+
| 'custom'
|
|
26
|
+
| DataComponent;
|
|
27
|
+
|
|
28
|
+
export type SortByTransform = {
|
|
29
|
+
type?: 'sortBy';
|
|
30
|
+
/** type: [field, order]; order: true => ascend, false => descend */
|
|
31
|
+
fields?: (string | [string, boolean?])[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type PickTransform = {
|
|
35
|
+
type?: 'pick';
|
|
36
|
+
fields?: string[];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type RenameTransform = {
|
|
40
|
+
type?: 'rename';
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type FilterDataTransform = {
|
|
45
|
+
type?: 'filter';
|
|
46
|
+
/**
|
|
47
|
+
* The filter condition, same with [Array.prototype.filter](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
|
|
48
|
+
*/
|
|
49
|
+
callback?: (v: any, idx: number, arr: any[]) => boolean;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type SliceTransform = {
|
|
53
|
+
type?: 'slice';
|
|
54
|
+
/**
|
|
55
|
+
* The start index for slice. Default is 0.
|
|
56
|
+
*/
|
|
57
|
+
start?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The end index for slice. Default is arr.length - 1
|
|
60
|
+
*/
|
|
61
|
+
end?: number;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export type SortTransform = {
|
|
65
|
+
type?: 'sort';
|
|
66
|
+
/**
|
|
67
|
+
* The sort comparator, same with [Array.prototype.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
|
|
68
|
+
*/
|
|
69
|
+
callback?: (a: any, b: any) => number;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type FoldTransform = {
|
|
73
|
+
type?: 'fold';
|
|
74
|
+
/**
|
|
75
|
+
* Set fields will be folded.
|
|
76
|
+
*/
|
|
77
|
+
fields?: string[];
|
|
78
|
+
/**
|
|
79
|
+
* Fold key field, default is `key`.
|
|
80
|
+
*/
|
|
81
|
+
key?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Fold value field, default is `value`.
|
|
84
|
+
*/
|
|
85
|
+
value?: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type JoinTransform = {
|
|
89
|
+
type?: 'join';
|
|
90
|
+
/**
|
|
91
|
+
* The dataset to be joined.
|
|
92
|
+
*/
|
|
93
|
+
join: Record<string, any>[];
|
|
94
|
+
/**
|
|
95
|
+
* Join keys of 2 dataset, [k1, k2] means join on ds1.k1 === ds2.k2.
|
|
96
|
+
*/
|
|
97
|
+
on: [string | ((d: any) => string), string | ((d: any) => string)];
|
|
98
|
+
/**
|
|
99
|
+
* Select fields from joined dataset.
|
|
100
|
+
*/
|
|
101
|
+
select: string[];
|
|
102
|
+
/**
|
|
103
|
+
* Rename the select fields, default: keep the original name.
|
|
104
|
+
*/
|
|
105
|
+
as?: string[];
|
|
106
|
+
/**
|
|
107
|
+
* When not matched, use `unknown` instead.
|
|
108
|
+
*/
|
|
109
|
+
unknown?: any;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export type MapTransform = {
|
|
113
|
+
type?: 'map';
|
|
114
|
+
callback?: (d: any) => any;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export type CustomDataTransform = {
|
|
118
|
+
type?: 'custom';
|
|
119
|
+
callback?: (d: any) => any;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type CustomTransform = {
|
|
123
|
+
type?: DataComponent;
|
|
124
|
+
[key: string]: any;
|
|
125
|
+
};
|