@antv/g2 5.3.1 → 5.3.3-beta.0
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 +59 -0
- package/dist/g2.min.js +59 -0
- package/esm/animation/fadeIn.d.ts +7 -0
- package/esm/animation/fadeIn.js +20 -0
- package/esm/animation/fadeIn.js.map +1 -0
- package/esm/animation/fadeOut.d.ts +7 -0
- package/esm/animation/fadeOut.js +20 -0
- package/esm/animation/fadeOut.js.map +1 -0
- package/esm/animation/growInX.d.ts +7 -0
- package/esm/animation/growInX.js +24 -0
- package/esm/animation/growInX.js.map +1 -0
- package/esm/animation/growInY.d.ts +7 -0
- package/esm/animation/growInY.js +24 -0
- package/esm/animation/growInY.js.map +1 -0
- package/esm/animation/index.d.ts +24 -0
- package/esm/animation/index.js +14 -0
- package/esm/animation/index.js.map +1 -0
- package/esm/animation/morphing.d.ts +13 -0
- package/esm/animation/morphing.js +235 -0
- package/esm/animation/morphing.js.map +1 -0
- package/esm/animation/pathIn.d.ts +7 -0
- package/esm/animation/pathIn.js +17 -0
- package/esm/animation/pathIn.js.map +1 -0
- package/esm/animation/scaleInX.d.ts +7 -0
- package/esm/animation/scaleInX.js +46 -0
- package/esm/animation/scaleInX.js.map +1 -0
- package/esm/animation/scaleInY.d.ts +7 -0
- package/esm/animation/scaleInY.js +95 -0
- package/esm/animation/scaleInY.js.map +1 -0
- package/esm/animation/scaleOutX.d.ts +7 -0
- package/esm/animation/scaleOutX.js +43 -0
- package/esm/animation/scaleOutX.js.map +1 -0
- package/esm/animation/scaleOutY.d.ts +7 -0
- package/esm/animation/scaleOutY.js +43 -0
- package/esm/animation/scaleOutY.js.map +1 -0
- package/esm/animation/types.d.ts +6 -0
- package/esm/animation/types.js +2 -0
- package/esm/animation/types.js.map +1 -0
- package/esm/animation/utils.d.ts +12 -0
- package/esm/animation/utils.js +47 -0
- package/esm/animation/utils.js.map +1 -0
- package/esm/animation/waveIn.d.ts +7 -0
- package/esm/animation/waveIn.js +66 -0
- package/esm/animation/waveIn.js.map +1 -0
- package/esm/animation/zoomIn.d.ts +4 -0
- package/esm/animation/zoomIn.js +37 -0
- package/esm/animation/zoomIn.js.map +1 -0
- package/esm/animation/zoomOut.d.ts +4 -0
- package/esm/animation/zoomOut.js +31 -0
- package/esm/animation/zoomOut.js.map +1 -0
- package/esm/api/chart.d.ts +13 -0
- package/esm/api/chart.js +5 -0
- package/esm/api/chart.js.map +1 -0
- package/esm/api/composition.d.ts +37 -0
- package/esm/api/composition.js +87 -0
- package/esm/api/composition.js.map +1 -0
- package/esm/api/define.d.ts +14 -0
- package/esm/api/define.js +92 -0
- package/esm/api/define.js.map +1 -0
- package/esm/api/extend.d.ts +15 -0
- package/esm/api/extend.js +9 -0
- package/esm/api/extend.js.map +1 -0
- package/esm/api/index.d.ts +4 -0
- package/esm/api/index.js +5 -0
- package/esm/api/index.js.map +1 -0
- package/esm/api/library.d.ts +4 -0
- package/esm/api/library.js +10 -0
- package/esm/api/library.js.map +1 -0
- package/esm/api/mark.d.ts +29 -0
- package/esm/api/mark.js +66 -0
- package/esm/api/mark.js.map +1 -0
- package/esm/api/node.d.ts +40 -0
- package/esm/api/node.js +121 -0
- package/esm/api/node.js.map +1 -0
- package/esm/api/props.d.ts +171 -0
- package/esm/api/props.js +22 -0
- package/esm/api/props.js.map +1 -0
- package/esm/api/runtime.d.ts +67 -0
- package/esm/api/runtime.js +306 -0
- package/esm/api/runtime.js.map +1 -0
- package/esm/api/types.d.ts +65 -0
- package/esm/api/types.js +2 -0
- package/esm/api/types.js.map +1 -0
- package/esm/api/utils.d.ts +25 -0
- package/esm/api/utils.js +252 -0
- package/esm/api/utils.js.map +1 -0
- package/esm/component/axis.d.ts +29 -0
- package/esm/component/axis.js +404 -0
- package/esm/component/axis.js.map +1 -0
- package/esm/component/axisArc.d.ts +7 -0
- package/esm/component/axisArc.js +9 -0
- package/esm/component/axisArc.js.map +1 -0
- package/esm/component/axisRadar.d.ts +9 -0
- package/esm/component/axisRadar.js +47 -0
- package/esm/component/axisRadar.js.map +1 -0
- package/esm/component/axisX.d.ts +8 -0
- package/esm/component/axisX.js +15 -0
- package/esm/component/axisX.js.map +1 -0
- package/esm/component/axisY.d.ts +7 -0
- package/esm/component/axisY.js +13 -0
- package/esm/component/axisY.js.map +1 -0
- package/esm/component/constant.d.ts +14 -0
- package/esm/component/constant.js +241 -0
- package/esm/component/constant.js.map +1 -0
- package/esm/component/index.d.ts +26 -0
- package/esm/component/index.js +16 -0
- package/esm/component/index.js.map +1 -0
- package/esm/component/legendCategory.d.ts +15 -0
- package/esm/component/legendCategory.js +175 -0
- package/esm/component/legendCategory.js.map +1 -0
- package/esm/component/legendContinuous.d.ts +12 -0
- package/esm/component/legendContinuous.js +147 -0
- package/esm/component/legendContinuous.js.map +1 -0
- package/esm/component/legendContinuousBlock.d.ts +4 -0
- package/esm/component/legendContinuousBlock.js +6 -0
- package/esm/component/legendContinuousBlock.js.map +1 -0
- package/esm/component/legendContinuousBlockSize.d.ts +4 -0
- package/esm/component/legendContinuousBlockSize.js +7 -0
- package/esm/component/legendContinuousBlockSize.js.map +1 -0
- package/esm/component/legendContinuousSize.d.ts +4 -0
- package/esm/component/legendContinuousSize.js +17 -0
- package/esm/component/legendContinuousSize.js.map +1 -0
- package/esm/component/legends.d.ts +3 -0
- package/esm/component/legends.js +9 -0
- package/esm/component/legends.js.map +1 -0
- package/esm/component/scrollbar.d.ts +10 -0
- package/esm/component/scrollbar.js +41 -0
- package/esm/component/scrollbar.js.map +1 -0
- package/esm/component/scrollbarX.d.ts +7 -0
- package/esm/component/scrollbarX.js +9 -0
- package/esm/component/scrollbarX.js.map +1 -0
- package/esm/component/scrollbarY.d.ts +7 -0
- package/esm/component/scrollbarY.js +9 -0
- package/esm/component/scrollbarY.js.map +1 -0
- package/esm/component/slider.d.ts +13 -0
- package/esm/component/slider.js +95 -0
- package/esm/component/slider.js.map +1 -0
- package/esm/component/sliderX.d.ts +7 -0
- package/esm/component/sliderX.js +9 -0
- package/esm/component/sliderX.js.map +1 -0
- package/esm/component/sliderY.d.ts +7 -0
- package/esm/component/sliderY.js +9 -0
- package/esm/component/sliderY.js.map +1 -0
- package/esm/component/title.d.ts +6 -0
- package/esm/component/title.js +79 -0
- package/esm/component/title.js.map +1 -0
- package/esm/component/utils.d.ts +36 -0
- package/esm/component/utils.js +147 -0
- package/esm/component/utils.js.map +1 -0
- package/esm/composition/d3Projection.d.ts +1 -0
- package/esm/composition/d3Projection.js +2 -0
- package/esm/composition/d3Projection.js.map +1 -0
- package/esm/composition/facetCircle.d.ts +7 -0
- package/esm/composition/facetCircle.js +85 -0
- package/esm/composition/facetCircle.js.map +1 -0
- package/esm/composition/facetRect.d.ts +31 -0
- package/esm/composition/facetRect.js +296 -0
- package/esm/composition/facetRect.js.map +1 -0
- package/esm/composition/geoPath.d.ts +7 -0
- package/esm/composition/geoPath.js +37 -0
- package/esm/composition/geoPath.js.map +1 -0
- package/esm/composition/geoView.d.ts +7 -0
- package/esm/composition/geoView.js +219 -0
- package/esm/composition/geoView.js.map +1 -0
- package/esm/composition/index.d.ts +18 -0
- package/esm/composition/index.js +11 -0
- package/esm/composition/index.js.map +1 -0
- package/esm/composition/mark.d.ts +4 -0
- package/esm/composition/mark.js +51 -0
- package/esm/composition/mark.js.map +1 -0
- package/esm/composition/repeatMatrix.d.ts +8 -0
- package/esm/composition/repeatMatrix.js +152 -0
- package/esm/composition/repeatMatrix.js.map +1 -0
- package/esm/composition/spaceFlex.d.ts +7 -0
- package/esm/composition/spaceFlex.js +40 -0
- package/esm/composition/spaceFlex.js.map +1 -0
- package/esm/composition/spaceLayer.d.ts +7 -0
- package/esm/composition/spaceLayer.js +29 -0
- package/esm/composition/spaceLayer.js.map +1 -0
- package/esm/composition/timingKeyframe.d.ts +7 -0
- package/esm/composition/timingKeyframe.js +80 -0
- package/esm/composition/timingKeyframe.js.map +1 -0
- package/esm/composition/utils.d.ts +18 -0
- package/esm/composition/utils.js +41 -0
- package/esm/composition/utils.js.map +1 -0
- package/esm/composition/view.d.ts +9 -0
- package/esm/composition/view.js +33 -0
- package/esm/composition/view.js.map +1 -0
- package/esm/coordinate/cartesian.d.ts +7 -0
- package/esm/coordinate/cartesian.js +6 -0
- package/esm/coordinate/cartesian.js.map +1 -0
- package/esm/coordinate/fisheye.d.ts +7 -0
- package/esm/coordinate/fisheye.js +6 -0
- package/esm/coordinate/fisheye.js.map +1 -0
- package/esm/coordinate/helix.d.ts +7 -0
- package/esm/coordinate/helix.js +11 -0
- package/esm/coordinate/helix.js.map +1 -0
- package/esm/coordinate/index.d.ts +18 -0
- package/esm/coordinate/index.js +10 -0
- package/esm/coordinate/index.js.map +1 -0
- package/esm/coordinate/parallel.d.ts +7 -0
- package/esm/coordinate/parallel.js +6 -0
- package/esm/coordinate/parallel.js.map +1 -0
- package/esm/coordinate/polar.d.ts +15 -0
- package/esm/coordinate/polar.js +26 -0
- package/esm/coordinate/polar.js.map +1 -0
- package/esm/coordinate/radar.d.ts +7 -0
- package/esm/coordinate/radar.js +14 -0
- package/esm/coordinate/radar.js.map +1 -0
- package/esm/coordinate/radial.d.ts +14 -0
- package/esm/coordinate/radial.js +25 -0
- package/esm/coordinate/radial.js.map +1 -0
- package/esm/coordinate/theta.d.ts +15 -0
- package/esm/coordinate/theta.js +23 -0
- package/esm/coordinate/theta.js.map +1 -0
- package/esm/coordinate/transpose.d.ts +7 -0
- package/esm/coordinate/transpose.js +11 -0
- package/esm/coordinate/transpose.js.map +1 -0
- package/esm/data/arc.d.ts +6 -0
- package/esm/data/arc.js +11 -0
- package/esm/data/arc.js.map +1 -0
- package/esm/data/cluster.d.ts +7 -0
- package/esm/data/cluster.js +37 -0
- package/esm/data/cluster.js.map +1 -0
- package/esm/data/custom.d.ts +7 -0
- package/esm/data/custom.js +10 -0
- package/esm/data/custom.js.map +1 -0
- package/esm/data/ema.d.ts +10 -0
- package/esm/data/ema.js +44 -0
- package/esm/data/ema.js.map +1 -0
- package/esm/data/fetch.d.ts +4 -0
- package/esm/data/fetch.js +28 -0
- package/esm/data/fetch.js.map +1 -0
- package/esm/data/filter.d.ts +9 -0
- package/esm/data/filter.js +13 -0
- package/esm/data/filter.js.map +1 -0
- package/esm/data/fold.d.ts +10 -0
- package/esm/data/fold.js +18 -0
- package/esm/data/fold.js.map +1 -0
- package/esm/data/index.d.ts +42 -0
- package/esm/data/index.js +22 -0
- package/esm/data/index.js.map +1 -0
- package/esm/data/inline.d.ts +4 -0
- package/esm/data/inline.js +6 -0
- package/esm/data/inline.js.map +1 -0
- package/esm/data/join.d.ts +7 -0
- package/esm/data/join.js +22 -0
- package/esm/data/join.js.map +1 -0
- package/esm/data/kde.d.ts +10 -0
- package/esm/data/kde.js +30 -0
- package/esm/data/kde.js.map +1 -0
- package/esm/data/log.d.ts +7 -0
- package/esm/data/log.js +11 -0
- package/esm/data/log.js.map +1 -0
- package/esm/data/map.d.ts +7 -0
- package/esm/data/map.js +10 -0
- package/esm/data/map.js.map +1 -0
- package/esm/data/pick.d.ts +7 -0
- package/esm/data/pick.js +18 -0
- package/esm/data/pick.js.map +1 -0
- package/esm/data/rename.d.ts +8 -0
- package/esm/data/rename.js +16 -0
- package/esm/data/rename.js.map +1 -0
- package/esm/data/sankey.d.ts +7 -0
- package/esm/data/sankey.js +77 -0
- package/esm/data/sankey.js.map +1 -0
- package/esm/data/slice.d.ts +8 -0
- package/esm/data/slice.js +10 -0
- package/esm/data/slice.js.map +1 -0
- package/esm/data/sort.d.ts +8 -0
- package/esm/data/sort.js +12 -0
- package/esm/data/sort.js.map +1 -0
- package/esm/data/sortBy.d.ts +7 -0
- package/esm/data/sortBy.js +24 -0
- package/esm/data/sortBy.js.map +1 -0
- package/esm/data/tree.d.ts +3 -0
- package/esm/data/tree.js +7 -0
- package/esm/data/tree.js.map +1 -0
- package/esm/data/utils/arc/arc.d.ts +31 -0
- package/esm/data/utils/arc/arc.js +161 -0
- package/esm/data/utils/arc/arc.js.map +1 -0
- package/esm/data/utils/arc/index.d.ts +2 -0
- package/esm/data/utils/arc/index.js +2 -0
- package/esm/data/utils/arc/index.js.map +1 -0
- package/esm/data/utils/arc/sort.d.ts +4 -0
- package/esm/data/utils/arc/sort.js +13 -0
- package/esm/data/utils/arc/sort.js.map +1 -0
- package/esm/data/utils/arc/types.d.ts +51 -0
- package/esm/data/utils/arc/types.js +2 -0
- package/esm/data/utils/arc/types.js.map +1 -0
- package/esm/data/utils/d3-cloud/index.d.ts +1 -0
- package/esm/data/utils/d3-cloud/index.js +398 -0
- package/esm/data/utils/d3-cloud/index.js.map +1 -0
- package/esm/data/utils/d3-sankey/align.d.ts +4 -0
- package/esm/data/utils/d3-sankey/align.js +21 -0
- package/esm/data/utils/d3-sankey/align.js.map +1 -0
- package/esm/data/utils/d3-sankey/constant.d.ts +1 -0
- package/esm/data/utils/d3-sankey/constant.js +6 -0
- package/esm/data/utils/d3-sankey/constant.js.map +1 -0
- package/esm/data/utils/d3-sankey/index.d.ts +12 -0
- package/esm/data/utils/d3-sankey/index.js +13 -0
- package/esm/data/utils/d3-sankey/index.js.map +1 -0
- package/esm/data/utils/d3-sankey/sankey.d.ts +24 -0
- package/esm/data/utils/d3-sankey/sankey.js +388 -0
- package/esm/data/utils/d3-sankey/sankey.js.map +1 -0
- package/esm/data/utils/fields.d.ts +6 -0
- package/esm/data/utils/fields.js +15 -0
- package/esm/data/utils/fields.js.map +1 -0
- package/esm/data/utils/flow.d.ts +9 -0
- package/esm/data/utils/flow.js +45 -0
- package/esm/data/utils/flow.js.map +1 -0
- package/esm/data/utils/memo.d.ts +17 -0
- package/esm/data/utils/memo.js +79 -0
- package/esm/data/utils/memo.js.map +1 -0
- package/esm/data/utils/venn/circleintersection.d.ts +33 -0
- package/esm/data/utils/venn/circleintersection.js +192 -0
- package/esm/data/utils/venn/circleintersection.js.map +1 -0
- package/esm/data/utils/venn/diagram.d.ts +2 -0
- package/esm/data/utils/venn/diagram.js +44 -0
- package/esm/data/utils/venn/diagram.js.map +1 -0
- package/esm/data/utils/venn/index.d.ts +5 -0
- package/esm/data/utils/venn/index.js +6 -0
- package/esm/data/utils/venn/index.js.map +1 -0
- package/esm/data/utils/venn/layout.d.ts +27 -0
- package/esm/data/utils/venn/layout.js +607 -0
- package/esm/data/utils/venn/layout.js.map +1 -0
- package/esm/data/venn.d.ts +7 -0
- package/esm/data/venn.js +34 -0
- package/esm/data/venn.js.map +1 -0
- package/esm/data/wordCloud.d.ts +110 -0
- package/esm/data/wordCloud.js +121 -0
- package/esm/data/wordCloud.js.map +1 -0
- package/esm/encode/column.d.ts +7 -0
- package/esm/encode/column.js +8 -0
- package/esm/encode/column.js.map +1 -0
- package/esm/encode/constant.d.ts +7 -0
- package/esm/encode/constant.js +8 -0
- package/esm/encode/constant.js.map +1 -0
- package/esm/encode/field.d.ts +7 -0
- package/esm/encode/field.js +8 -0
- package/esm/encode/field.js.map +1 -0
- package/esm/encode/index.d.ts +8 -0
- package/esm/encode/index.js +5 -0
- package/esm/encode/index.js.map +1 -0
- package/esm/encode/transform.d.ts +9 -0
- package/esm/encode/transform.js +10 -0
- package/esm/encode/transform.js.map +1 -0
- package/esm/exports.d.ts +12 -0
- package/esm/exports.js +11 -0
- package/esm/exports.js.map +1 -0
- package/esm/index.d.ts +356 -0
- package/esm/index.js +10 -0
- package/esm/index.js.map +1 -0
- package/esm/interaction/brushAxisHighlight.d.ts +29 -0
- package/esm/interaction/brushAxisHighlight.js +281 -0
- package/esm/interaction/brushAxisHighlight.js.map +1 -0
- package/esm/interaction/brushFilter.d.ts +18 -0
- package/esm/interaction/brushFilter.js +144 -0
- package/esm/interaction/brushFilter.js.map +1 -0
- package/esm/interaction/brushHighlight.d.ts +48 -0
- package/esm/interaction/brushHighlight.js +586 -0
- package/esm/interaction/brushHighlight.js.map +1 -0
- package/esm/interaction/brushXFilter.d.ts +1 -0
- package/esm/interaction/brushXFilter.js +6 -0
- package/esm/interaction/brushXFilter.js.map +1 -0
- package/esm/interaction/brushXHighlight.d.ts +7 -0
- package/esm/interaction/brushXHighlight.js +9 -0
- package/esm/interaction/brushXHighlight.js.map +1 -0
- package/esm/interaction/brushYFilter.d.ts +1 -0
- package/esm/interaction/brushYFilter.js +6 -0
- package/esm/interaction/brushYFilter.js.map +1 -0
- package/esm/interaction/brushYHighlight.d.ts +7 -0
- package/esm/interaction/brushYHighlight.js +9 -0
- package/esm/interaction/brushYHighlight.js.map +1 -0
- package/esm/interaction/chartIndex.d.ts +9 -0
- package/esm/interaction/chartIndex.js +178 -0
- package/esm/interaction/chartIndex.js.map +1 -0
- package/esm/interaction/elementHighlight.d.ts +25 -0
- package/esm/interaction/elementHighlight.js +198 -0
- package/esm/interaction/elementHighlight.js.map +1 -0
- package/esm/interaction/elementHighlightByColor.d.ts +6 -0
- package/esm/interaction/elementHighlightByColor.js +9 -0
- package/esm/interaction/elementHighlightByColor.js.map +1 -0
- package/esm/interaction/elementHighlightByX.d.ts +6 -0
- package/esm/interaction/elementHighlightByX.js +9 -0
- package/esm/interaction/elementHighlightByX.js.map +1 -0
- package/esm/interaction/elementPointMove.d.ts +9 -0
- package/esm/interaction/elementPointMove.js +506 -0
- package/esm/interaction/elementPointMove.js.map +1 -0
- package/esm/interaction/elementSelect.d.ts +24 -0
- package/esm/interaction/elementSelect.js +235 -0
- package/esm/interaction/elementSelect.js.map +1 -0
- package/esm/interaction/elementSelectByColor.d.ts +6 -0
- package/esm/interaction/elementSelectByColor.js +9 -0
- package/esm/interaction/elementSelectByColor.js.map +1 -0
- package/esm/interaction/elementSelectByX.d.ts +6 -0
- package/esm/interaction/elementSelectByX.js +9 -0
- package/esm/interaction/elementSelectByX.js.map +1 -0
- package/esm/interaction/event.d.ts +6 -0
- package/esm/interaction/event.js +129 -0
- package/esm/interaction/event.js.map +1 -0
- package/esm/interaction/fisheye.d.ts +4 -0
- package/esm/interaction/fisheye.js +57 -0
- package/esm/interaction/fisheye.js.map +1 -0
- package/esm/interaction/index.d.ts +24 -0
- package/esm/interaction/index.js +25 -0
- package/esm/interaction/index.js.map +1 -0
- package/esm/interaction/legendFilter.d.ts +14 -0
- package/esm/interaction/legendFilter.js +292 -0
- package/esm/interaction/legendFilter.js.map +1 -0
- package/esm/interaction/legendHighlight.d.ts +1 -0
- package/esm/interaction/legendHighlight.js +125 -0
- package/esm/interaction/legendHighlight.js.map +1 -0
- package/esm/interaction/poptip.d.ts +10 -0
- package/esm/interaction/poptip.js +94 -0
- package/esm/interaction/poptip.js.map +1 -0
- package/esm/interaction/scrollbarFilter.d.ts +2 -0
- package/esm/interaction/scrollbarFilter.js +27 -0
- package/esm/interaction/scrollbarFilter.js.map +1 -0
- package/esm/interaction/sliderFilter.d.ts +5 -0
- package/esm/interaction/sliderFilter.js +173 -0
- package/esm/interaction/sliderFilter.js.map +1 -0
- package/esm/interaction/tooltip.d.ts +16 -0
- package/esm/interaction/tooltip.js +871 -0
- package/esm/interaction/tooltip.js.map +1 -0
- package/esm/interaction/treemapDrillDown.d.ts +10 -0
- package/esm/interaction/treemapDrillDown.js +232 -0
- package/esm/interaction/treemapDrillDown.js.map +1 -0
- package/esm/interaction/utils.d.ts +69 -0
- package/esm/interaction/utils.js +554 -0
- package/esm/interaction/utils.js.map +1 -0
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +50 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/exceedAdjust.d.ts +7 -0
- package/esm/label-transform/exceedAdjust.js +51 -0
- package/esm/label-transform/exceedAdjust.js.map +1 -0
- package/esm/label-transform/index.d.ts +10 -0
- package/esm/label-transform/index.js +6 -0
- package/esm/label-transform/index.js.map +1 -0
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +19 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/overlapDodgeY.js +75 -0
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +25 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/lib/builtinlib.d.ts +13 -0
- package/esm/lib/builtinlib.js +21 -0
- package/esm/lib/builtinlib.js.map +1 -0
- package/esm/lib/core.d.ts +158 -0
- package/esm/lib/core.js +173 -0
- package/esm/lib/core.js.map +1 -0
- package/esm/lib/geo.d.ts +4 -0
- package/esm/lib/geo.js +9 -0
- package/esm/lib/geo.js.map +1 -0
- package/esm/lib/graph.d.ts +10 -0
- package/esm/lib/graph.js +15 -0
- package/esm/lib/graph.js.map +1 -0
- package/esm/lib/index.d.ts +6 -0
- package/esm/lib/index.js +7 -0
- package/esm/lib/index.js.map +1 -0
- package/esm/lib/lite.d.ts +64 -0
- package/esm/lib/lite.js +78 -0
- package/esm/lib/lite.js.map +1 -0
- package/esm/lib/plot.d.ts +7 -0
- package/esm/lib/plot.js +12 -0
- package/esm/lib/plot.js.map +1 -0
- package/esm/lib/std.d.ts +171 -0
- package/esm/lib/std.js +8 -0
- package/esm/lib/std.js.map +1 -0
- package/esm/mark/area.d.ts +4 -0
- package/esm/mark/area.js +86 -0
- package/esm/mark/area.js.map +1 -0
- package/esm/mark/box.d.ts +34 -0
- package/esm/mark/box.js +96 -0
- package/esm/mark/box.js.map +1 -0
- package/esm/mark/boxplot.d.ts +4 -0
- package/esm/mark/boxplot.js +102 -0
- package/esm/mark/boxplot.js.map +1 -0
- package/esm/mark/cell.d.ts +9 -0
- package/esm/mark/cell.js +50 -0
- package/esm/mark/cell.js.map +1 -0
- package/esm/mark/chord.d.ts +4 -0
- package/esm/mark/chord.js +120 -0
- package/esm/mark/chord.js.map +1 -0
- package/esm/mark/connector.d.ts +4 -0
- package/esm/mark/connector.js +23 -0
- package/esm/mark/connector.js.map +1 -0
- package/esm/mark/density.d.ts +4 -0
- package/esm/mark/density.js +64 -0
- package/esm/mark/density.js.map +1 -0
- package/esm/mark/forceGraph.d.ts +4 -0
- package/esm/mark/forceGraph.js +115 -0
- package/esm/mark/forceGraph.js.map +1 -0
- package/esm/mark/gauge.d.ts +11 -0
- package/esm/mark/gauge.js +178 -0
- package/esm/mark/gauge.js.map +1 -0
- package/esm/mark/heatmap.d.ts +7 -0
- package/esm/mark/heatmap.js +41 -0
- package/esm/mark/heatmap.js.map +1 -0
- package/esm/mark/image.d.ts +4 -0
- package/esm/mark/image.js +40 -0
- package/esm/mark/image.js.map +1 -0
- package/esm/mark/index.d.ts +62 -0
- package/esm/mark/index.js +33 -0
- package/esm/mark/index.js.map +1 -0
- package/esm/mark/interval.d.ts +12 -0
- package/esm/mark/interval.js +77 -0
- package/esm/mark/interval.js.map +1 -0
- package/esm/mark/line.d.ts +7 -0
- package/esm/mark/line.js +96 -0
- package/esm/mark/line.js.map +1 -0
- package/esm/mark/lineX.d.ts +4 -0
- package/esm/mark/lineX.js +32 -0
- package/esm/mark/lineX.js.map +1 -0
- package/esm/mark/lineY.d.ts +4 -0
- package/esm/mark/lineY.js +32 -0
- package/esm/mark/lineY.js.map +1 -0
- package/esm/mark/link.d.ts +7 -0
- package/esm/mark/link.js +41 -0
- package/esm/mark/link.js.map +1 -0
- package/esm/mark/liquid.d.ts +7 -0
- package/esm/mark/liquid.js +84 -0
- package/esm/mark/liquid.js.map +1 -0
- package/esm/mark/pack.d.ts +4 -0
- package/esm/mark/pack.js +78 -0
- package/esm/mark/pack.js.map +1 -0
- package/esm/mark/path.d.ts +7 -0
- package/esm/mark/path.js +30 -0
- package/esm/mark/path.js.map +1 -0
- package/esm/mark/point.d.ts +9 -0
- package/esm/mark/point.js +84 -0
- package/esm/mark/point.js.map +1 -0
- package/esm/mark/polygon.d.ts +7 -0
- package/esm/mark/polygon.js +45 -0
- package/esm/mark/polygon.js.map +1 -0
- package/esm/mark/range.d.ts +8 -0
- package/esm/mark/range.js +47 -0
- package/esm/mark/range.js.map +1 -0
- package/esm/mark/rangeX.d.ts +4 -0
- package/esm/mark/rangeX.js +23 -0
- package/esm/mark/rangeX.js.map +1 -0
- package/esm/mark/rangeY.d.ts +4 -0
- package/esm/mark/rangeY.js +23 -0
- package/esm/mark/rangeY.js.map +1 -0
- package/esm/mark/rect.d.ts +4 -0
- package/esm/mark/rect.js +37 -0
- package/esm/mark/rect.js.map +1 -0
- package/esm/mark/sankey.d.ts +8 -0
- package/esm/mark/sankey.js +113 -0
- package/esm/mark/sankey.js.map +1 -0
- package/esm/mark/shape.d.ts +7 -0
- package/esm/mark/shape.js +40 -0
- package/esm/mark/shape.js.map +1 -0
- package/esm/mark/text.d.ts +4 -0
- package/esm/mark/text.js +43 -0
- package/esm/mark/text.js.map +1 -0
- package/esm/mark/tree.d.ts +4 -0
- package/esm/mark/tree.js +71 -0
- package/esm/mark/tree.js.map +1 -0
- package/esm/mark/treemap.d.ts +4 -0
- package/esm/mark/treemap.js +106 -0
- package/esm/mark/treemap.js.map +1 -0
- package/esm/mark/utils.d.ts +67 -0
- package/esm/mark/utils.js +110 -0
- package/esm/mark/utils.js.map +1 -0
- package/esm/mark/vector.d.ts +8 -0
- package/esm/mark/vector.js +44 -0
- package/esm/mark/vector.js.map +1 -0
- package/esm/mark/wordCloud.d.ts +4 -0
- package/esm/mark/wordCloud.js +67 -0
- package/esm/mark/wordCloud.js.map +1 -0
- package/esm/palette/category10.d.ts +7 -0
- package/esm/palette/category10.js +19 -0
- package/esm/palette/category10.js.map +1 -0
- package/esm/palette/category20.d.ts +7 -0
- package/esm/palette/category20.js +29 -0
- package/esm/palette/category20.js.map +1 -0
- package/esm/palette/index.d.ts +4 -0
- package/esm/palette/index.js +3 -0
- package/esm/palette/index.js.map +1 -0
- package/esm/runtime/component.d.ts +18 -0
- package/esm/runtime/component.js +771 -0
- package/esm/runtime/component.js.map +1 -0
- package/esm/runtime/constant.d.ts +9 -0
- package/esm/runtime/constant.js +10 -0
- package/esm/runtime/constant.js.map +1 -0
- package/esm/runtime/coordinate.d.ts +24 -0
- package/esm/runtime/coordinate.js +88 -0
- package/esm/runtime/coordinate.js.map +1 -0
- package/esm/runtime/index.d.ts +9 -0
- package/esm/runtime/index.js +10 -0
- package/esm/runtime/index.js.map +1 -0
- package/esm/runtime/layout.d.ts +10 -0
- package/esm/runtime/layout.js +582 -0
- package/esm/runtime/layout.js.map +1 -0
- package/esm/runtime/library.d.ts +5 -0
- package/esm/runtime/library.js +37 -0
- package/esm/runtime/library.js.map +1 -0
- package/esm/runtime/mark.d.ts +6 -0
- package/esm/runtime/mark.js +130 -0
- package/esm/runtime/mark.js.map +1 -0
- package/esm/runtime/option-preprocess/index.d.ts +2 -0
- package/esm/runtime/option-preprocess/index.js +16 -0
- package/esm/runtime/option-preprocess/index.js.map +1 -0
- package/esm/runtime/option-preprocess/style.d.ts +2 -0
- package/esm/runtime/option-preprocess/style.js +12 -0
- package/esm/runtime/option-preprocess/style.js.map +1 -0
- package/esm/runtime/plot.d.ts +5 -0
- package/esm/runtime/plot.js +1212 -0
- package/esm/runtime/plot.js.map +1 -0
- package/esm/runtime/render.d.ts +5 -0
- package/esm/runtime/render.js +166 -0
- package/esm/runtime/render.js.map +1 -0
- package/esm/runtime/scale.d.ts +14 -0
- package/esm/runtime/scale.js +558 -0
- package/esm/runtime/scale.js.map +1 -0
- package/esm/runtime/transform.d.ts +16 -0
- package/esm/runtime/transform.js +286 -0
- package/esm/runtime/transform.js.map +1 -0
- package/esm/runtime/types/common.d.ts +159 -0
- package/esm/runtime/types/common.js +2 -0
- package/esm/runtime/types/common.js.map +1 -0
- package/esm/runtime/types/component.d.ts +103 -0
- package/esm/runtime/types/component.js +2 -0
- package/esm/runtime/types/component.js.map +1 -0
- package/esm/runtime/types/data.d.ts +8 -0
- package/esm/runtime/types/data.js +2 -0
- package/esm/runtime/types/data.js.map +1 -0
- package/esm/runtime/types/encode.d.ts +23 -0
- package/esm/runtime/types/encode.js +2 -0
- package/esm/runtime/types/encode.js.map +1 -0
- package/esm/runtime/types/mark.d.ts +36 -0
- package/esm/runtime/types/mark.js +2 -0
- package/esm/runtime/types/mark.js.map +1 -0
- package/esm/runtime/types/options.d.ts +145 -0
- package/esm/runtime/types/options.js +2 -0
- package/esm/runtime/types/options.js.map +1 -0
- package/esm/runtime/types/scale.d.ts +21 -0
- package/esm/runtime/types/scale.js +22 -0
- package/esm/runtime/types/scale.js.map +1 -0
- package/esm/runtime/types/theme.d.ts +91 -0
- package/esm/runtime/types/theme.js +2 -0
- package/esm/runtime/types/theme.js.map +1 -0
- package/esm/runtime/types/transform.d.ts +14 -0
- package/esm/runtime/types/transform.js +2 -0
- package/esm/runtime/types/transform.js.map +1 -0
- package/esm/scale/band.d.ts +4 -0
- package/esm/scale/band.js +6 -0
- package/esm/scale/band.js.map +1 -0
- package/esm/scale/constant.d.ts +4 -0
- package/esm/scale/constant.js +6 -0
- package/esm/scale/constant.js.map +1 -0
- package/esm/scale/identity.d.ts +4 -0
- package/esm/scale/identity.js +6 -0
- package/esm/scale/identity.js.map +1 -0
- package/esm/scale/index.d.ts +28 -0
- package/esm/scale/index.js +15 -0
- package/esm/scale/index.js.map +1 -0
- package/esm/scale/linear.d.ts +4 -0
- package/esm/scale/linear.js +6 -0
- package/esm/scale/linear.js.map +1 -0
- package/esm/scale/log.d.ts +4 -0
- package/esm/scale/log.js +6 -0
- package/esm/scale/log.js.map +1 -0
- package/esm/scale/ordinal.d.ts +4 -0
- package/esm/scale/ordinal.js +6 -0
- package/esm/scale/ordinal.js.map +1 -0
- package/esm/scale/point.d.ts +4 -0
- package/esm/scale/point.js +6 -0
- package/esm/scale/point.js.map +1 -0
- package/esm/scale/pow.d.ts +4 -0
- package/esm/scale/pow.js +6 -0
- package/esm/scale/pow.js.map +1 -0
- package/esm/scale/quantile.d.ts +4 -0
- package/esm/scale/quantile.js +6 -0
- package/esm/scale/quantile.js.map +1 -0
- package/esm/scale/quantize.d.ts +4 -0
- package/esm/scale/quantize.js +6 -0
- package/esm/scale/quantize.js.map +1 -0
- package/esm/scale/sequential.d.ts +4 -0
- package/esm/scale/sequential.js +6 -0
- package/esm/scale/sequential.js.map +1 -0
- package/esm/scale/sqrt.d.ts +4 -0
- package/esm/scale/sqrt.js +6 -0
- package/esm/scale/sqrt.js.map +1 -0
- package/esm/scale/threshold.d.ts +4 -0
- package/esm/scale/threshold.js +6 -0
- package/esm/scale/threshold.js.map +1 -0
- package/esm/scale/time.d.ts +4 -0
- package/esm/scale/time.js +6 -0
- package/esm/scale/time.js.map +1 -0
- package/esm/shape/area/area.d.ts +3 -0
- package/esm/shape/area/area.js +12 -0
- package/esm/shape/area/area.js.map +1 -0
- package/esm/shape/area/curve.d.ts +8 -0
- package/esm/shape/area/curve.js +171 -0
- package/esm/shape/area/curve.js.map +1 -0
- package/esm/shape/area/hv.d.ts +3 -0
- package/esm/shape/area/hv.js +9 -0
- package/esm/shape/area/hv.js.map +1 -0
- package/esm/shape/area/hvh.d.ts +3 -0
- package/esm/shape/area/hvh.js +9 -0
- package/esm/shape/area/hvh.js.map +1 -0
- package/esm/shape/area/smooth.d.ts +3 -0
- package/esm/shape/area/smooth.js +28 -0
- package/esm/shape/area/smooth.js.map +1 -0
- package/esm/shape/area/vh.d.ts +3 -0
- package/esm/shape/area/vh.js +9 -0
- package/esm/shape/area/vh.js.map +1 -0
- package/esm/shape/box/box.d.ts +3 -0
- package/esm/shape/box/box.js +90 -0
- package/esm/shape/box/box.js.map +1 -0
- package/esm/shape/box/violin.d.ts +3 -0
- package/esm/shape/box/violin.js +84 -0
- package/esm/shape/box/violin.js.map +1 -0
- package/esm/shape/connector/connector.d.ts +11 -0
- package/esm/shape/connector/connector.js +82 -0
- package/esm/shape/connector/connector.js.map +1 -0
- package/esm/shape/density/density.d.ts +8 -0
- package/esm/shape/density/density.js +49 -0
- package/esm/shape/density/density.js.map +1 -0
- package/esm/shape/gauge/round.d.ts +3 -0
- package/esm/shape/gauge/round.js +40 -0
- package/esm/shape/gauge/round.js.map +1 -0
- package/esm/shape/heatmap/heatmap.d.ts +4 -0
- package/esm/shape/heatmap/heatmap.js +67 -0
- package/esm/shape/heatmap/heatmap.js.map +1 -0
- package/esm/shape/heatmap/renderer/gradient.d.ts +5 -0
- package/esm/shape/heatmap/renderer/gradient.js +13 -0
- package/esm/shape/heatmap/renderer/gradient.js.map +1 -0
- package/esm/shape/heatmap/renderer/index.d.ts +6 -0
- package/esm/shape/heatmap/renderer/index.js +122 -0
- package/esm/shape/heatmap/renderer/index.js.map +1 -0
- package/esm/shape/heatmap/renderer/types.d.ts +36 -0
- package/esm/shape/heatmap/renderer/types.js +2 -0
- package/esm/shape/heatmap/renderer/types.js.map +1 -0
- package/esm/shape/image/image.d.ts +3 -0
- package/esm/shape/image/image.js +46 -0
- package/esm/shape/image/image.js.map +1 -0
- package/esm/shape/index.d.ts +114 -0
- package/esm/shape/index.js +65 -0
- package/esm/shape/index.js.map +1 -0
- package/esm/shape/interval/color.d.ts +25 -0
- package/esm/shape/interval/color.js +133 -0
- package/esm/shape/interval/color.js.map +1 -0
- package/esm/shape/interval/funnel.d.ts +10 -0
- package/esm/shape/interval/funnel.js +57 -0
- package/esm/shape/interval/funnel.js.map +1 -0
- package/esm/shape/interval/hollow.d.ts +6 -0
- package/esm/shape/interval/hollow.js +9 -0
- package/esm/shape/interval/hollow.js.map +1 -0
- package/esm/shape/interval/pyramid.d.ts +6 -0
- package/esm/shape/interval/pyramid.js +38 -0
- package/esm/shape/interval/pyramid.js.map +1 -0
- package/esm/shape/interval/rect.d.ts +20 -0
- package/esm/shape/interval/rect.js +10 -0
- package/esm/shape/interval/rect.js.map +1 -0
- package/esm/shape/label/label.d.ts +13 -0
- package/esm/shape/label/label.js +71 -0
- package/esm/shape/label/label.js.map +1 -0
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +18 -0
- package/esm/shape/label/position/default.js +112 -0
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +18 -0
- package/esm/shape/label/position/outside.js +67 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +8 -0
- package/esm/shape/label/position/spider.js +50 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +35 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/shape/label/position/utils.d.ts +2 -0
- package/esm/shape/label/position/utils.js +68 -0
- package/esm/shape/label/position/utils.js.map +1 -0
- package/esm/shape/line/curve.d.ts +8 -0
- package/esm/shape/line/curve.js +136 -0
- package/esm/shape/line/curve.js.map +1 -0
- package/esm/shape/line/hv.d.ts +3 -0
- package/esm/shape/line/hv.js +7 -0
- package/esm/shape/line/hv.js.map +1 -0
- package/esm/shape/line/hvh.d.ts +3 -0
- package/esm/shape/line/hvh.js +7 -0
- package/esm/shape/line/hvh.js.map +1 -0
- package/esm/shape/line/line.d.ts +3 -0
- package/esm/shape/line/line.js +12 -0
- package/esm/shape/line/line.js.map +1 -0
- package/esm/shape/line/smooth.d.ts +3 -0
- package/esm/shape/line/smooth.js +28 -0
- package/esm/shape/line/smooth.js.map +1 -0
- package/esm/shape/line/trail.d.ts +3 -0
- package/esm/shape/line/trail.js +77 -0
- package/esm/shape/line/trail.js.map +1 -0
- package/esm/shape/line/vh.d.ts +3 -0
- package/esm/shape/line/vh.js +7 -0
- package/esm/shape/line/vh.js.map +1 -0
- package/esm/shape/lineXY/line.d.ts +24 -0
- package/esm/shape/lineXY/line.js +71 -0
- package/esm/shape/lineXY/line.js.map +1 -0
- package/esm/shape/link/arc.d.ts +8 -0
- package/esm/shape/link/arc.js +55 -0
- package/esm/shape/link/arc.js.map +1 -0
- package/esm/shape/link/link.d.ts +8 -0
- package/esm/shape/link/link.js +18 -0
- package/esm/shape/link/link.js.map +1 -0
- package/esm/shape/link/smooth.d.ts +6 -0
- package/esm/shape/link/smooth.js +43 -0
- package/esm/shape/link/smooth.js.map +1 -0
- package/esm/shape/link/vhv.d.ts +12 -0
- package/esm/shape/link/vhv.js +73 -0
- package/esm/shape/link/vhv.js.map +1 -0
- package/esm/shape/liquid/liquid.d.ts +3 -0
- package/esm/shape/liquid/liquid.js +79 -0
- package/esm/shape/liquid/liquid.js.map +1 -0
- package/esm/shape/liquid/shapes.d.ts +38 -0
- package/esm/shape/liquid/shapes.js +93 -0
- package/esm/shape/liquid/shapes.js.map +1 -0
- package/esm/shape/liquid/wave.d.ts +16 -0
- package/esm/shape/liquid/wave.js +192 -0
- package/esm/shape/liquid/wave.js.map +1 -0
- package/esm/shape/path/color.d.ts +9 -0
- package/esm/shape/path/color.js +38 -0
- package/esm/shape/path/color.js.map +1 -0
- package/esm/shape/path/hollow.d.ts +8 -0
- package/esm/shape/path/hollow.js +14 -0
- package/esm/shape/path/hollow.js.map +1 -0
- package/esm/shape/path/path.d.ts +8 -0
- package/esm/shape/path/path.js +14 -0
- package/esm/shape/path/path.js.map +1 -0
- package/esm/shape/point/bowtie.d.ts +6 -0
- package/esm/shape/point/bowtie.js +9 -0
- package/esm/shape/point/bowtie.js.map +1 -0
- package/esm/shape/point/circle.d.ts +16 -0
- package/esm/shape/point/circle.js +56 -0
- package/esm/shape/point/circle.js.map +1 -0
- package/esm/shape/point/color.d.ts +13 -0
- package/esm/shape/point/color.js +65 -0
- package/esm/shape/point/color.js.map +1 -0
- package/esm/shape/point/cross.d.ts +6 -0
- package/esm/shape/point/cross.js +9 -0
- package/esm/shape/point/cross.js.map +1 -0
- package/esm/shape/point/diamond.d.ts +6 -0
- package/esm/shape/point/diamond.js +9 -0
- package/esm/shape/point/diamond.js.map +1 -0
- package/esm/shape/point/hexagon.d.ts +6 -0
- package/esm/shape/point/hexagon.js +9 -0
- package/esm/shape/point/hexagon.js.map +1 -0
- package/esm/shape/point/hollow.d.ts +6 -0
- package/esm/shape/point/hollow.js +9 -0
- package/esm/shape/point/hollow.js.map +1 -0
- package/esm/shape/point/hollowBowtie.d.ts +6 -0
- package/esm/shape/point/hollowBowtie.js +9 -0
- package/esm/shape/point/hollowBowtie.js.map +1 -0
- package/esm/shape/point/hollowCircle.d.ts +6 -0
- package/esm/shape/point/hollowCircle.js +9 -0
- package/esm/shape/point/hollowCircle.js.map +1 -0
- package/esm/shape/point/hollowDiamond.d.ts +6 -0
- package/esm/shape/point/hollowDiamond.js +9 -0
- package/esm/shape/point/hollowDiamond.js.map +1 -0
- package/esm/shape/point/hollowHexagon.d.ts +6 -0
- package/esm/shape/point/hollowHexagon.js +9 -0
- package/esm/shape/point/hollowHexagon.js.map +1 -0
- package/esm/shape/point/hollowSquare.d.ts +6 -0
- package/esm/shape/point/hollowSquare.js +9 -0
- package/esm/shape/point/hollowSquare.js.map +1 -0
- package/esm/shape/point/hollowTriangle.d.ts +6 -0
- package/esm/shape/point/hollowTriangle.js +9 -0
- package/esm/shape/point/hollowTriangle.js.map +1 -0
- package/esm/shape/point/hollowTriangleDown.d.ts +6 -0
- package/esm/shape/point/hollowTriangleDown.js +9 -0
- package/esm/shape/point/hollowTriangleDown.js.map +1 -0
- package/esm/shape/point/hyphen.d.ts +6 -0
- package/esm/shape/point/hyphen.js +9 -0
- package/esm/shape/point/hyphen.js.map +1 -0
- package/esm/shape/point/line.d.ts +6 -0
- package/esm/shape/point/line.js +9 -0
- package/esm/shape/point/line.js.map +1 -0
- package/esm/shape/point/plus.d.ts +6 -0
- package/esm/shape/point/plus.js +9 -0
- package/esm/shape/point/plus.js.map +1 -0
- package/esm/shape/point/point.d.ts +6 -0
- package/esm/shape/point/point.js +9 -0
- package/esm/shape/point/point.js.map +1 -0
- package/esm/shape/point/square.d.ts +6 -0
- package/esm/shape/point/square.js +9 -0
- package/esm/shape/point/square.js.map +1 -0
- package/esm/shape/point/tick.d.ts +6 -0
- package/esm/shape/point/tick.js +9 -0
- package/esm/shape/point/tick.js.map +1 -0
- package/esm/shape/point/triangle.d.ts +6 -0
- package/esm/shape/point/triangle.js +9 -0
- package/esm/shape/point/triangle.js.map +1 -0
- package/esm/shape/point/triangleDown.d.ts +6 -0
- package/esm/shape/point/triangleDown.js +9 -0
- package/esm/shape/point/triangleDown.js.map +1 -0
- package/esm/shape/polygon/polygon.d.ts +3 -0
- package/esm/shape/polygon/polygon.js +70 -0
- package/esm/shape/polygon/polygon.js.map +1 -0
- package/esm/shape/polygon/ribbon.d.ts +15 -0
- package/esm/shape/polygon/ribbon.js +73 -0
- package/esm/shape/polygon/ribbon.js.map +1 -0
- package/esm/shape/shape/shape.d.ts +6 -0
- package/esm/shape/shape/shape.js +28 -0
- package/esm/shape/shape/shape.js.map +1 -0
- package/esm/shape/text/advance.d.ts +2 -0
- package/esm/shape/text/advance.js +176 -0
- package/esm/shape/text/advance.js.map +1 -0
- package/esm/shape/text/badge.d.ts +7 -0
- package/esm/shape/text/badge.js +78 -0
- package/esm/shape/text/badge.js.map +1 -0
- package/esm/shape/text/tag.d.ts +7 -0
- package/esm/shape/text/tag.js +40 -0
- package/esm/shape/text/tag.js.map +1 -0
- package/esm/shape/text/text.d.ts +6 -0
- package/esm/shape/text/text.js +35 -0
- package/esm/shape/text/text.js.map +1 -0
- package/esm/shape/utils.d.ts +56 -0
- package/esm/shape/utils.js +166 -0
- package/esm/shape/utils.js.map +1 -0
- package/esm/shape/vector/vector.d.ts +8 -0
- package/esm/shape/vector/vector.js +53 -0
- package/esm/shape/vector/vector.js.map +1 -0
- package/esm/spec/animate.d.ts +23 -0
- package/esm/spec/animate.js +2 -0
- package/esm/spec/animate.js.map +1 -0
- package/esm/spec/component.d.ts +72 -0
- package/esm/spec/component.js +2 -0
- package/esm/spec/component.js.map +1 -0
- package/esm/spec/composition.d.ts +196 -0
- package/esm/spec/composition.js +2 -0
- package/esm/spec/composition.js.map +1 -0
- package/esm/spec/coordinate.d.ts +56 -0
- package/esm/spec/coordinate.js +2 -0
- package/esm/spec/coordinate.js.map +1 -0
- 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 +17 -0
- package/esm/spec/data.js +2 -0
- package/esm/spec/data.js.map +1 -0
- package/esm/spec/dataTransform.d.ts +152 -0
- package/esm/spec/dataTransform.js +2 -0
- package/esm/spec/dataTransform.js.map +1 -0
- package/esm/spec/encode.d.ts +23 -0
- package/esm/spec/encode.js +2 -0
- package/esm/spec/encode.js.map +1 -0
- package/esm/spec/index.d.ts +24 -0
- package/esm/spec/index.js +16 -0
- package/esm/spec/index.js.map +1 -0
- package/esm/spec/interaction.d.ts +144 -0
- package/esm/spec/interaction.js +2 -0
- package/esm/spec/interaction.js.map +1 -0
- package/esm/spec/labelTransform.d.ts +33 -0
- package/esm/spec/labelTransform.js +2 -0
- package/esm/spec/labelTransform.js.map +1 -0
- package/esm/spec/mark.d.ts +209 -0
- package/esm/spec/mark.js +2 -0
- package/esm/spec/mark.js.map +1 -0
- package/esm/spec/palette.d.ts +13 -0
- package/esm/spec/palette.js +2 -0
- package/esm/spec/palette.js.map +1 -0
- package/esm/spec/scale.d.ts +39 -0
- package/esm/spec/scale.js +2 -0
- package/esm/spec/scale.js.map +1 -0
- package/esm/spec/theme.d.ts +21 -0
- package/esm/spec/theme.js +2 -0
- package/esm/spec/theme.js.map +1 -0
- package/esm/spec/transform.d.ts +166 -0
- package/esm/spec/transform.js +2 -0
- package/esm/spec/transform.js.map +1 -0
- package/esm/spec/utils.d.ts +12 -0
- package/esm/spec/utils.js +2 -0
- package/esm/spec/utils.js.map +1 -0
- package/esm/theme/academy.d.ts +20 -0
- package/esm/theme/academy.js +102 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/classic.d.ts +6 -0
- package/esm/theme/classic.js +13 -0
- package/esm/theme/classic.js.map +1 -0
- package/esm/theme/classicDark.d.ts +6 -0
- package/esm/theme/classicDark.js +12 -0
- package/esm/theme/classicDark.js.map +1 -0
- package/esm/theme/create.d.ts +443 -0
- package/esm/theme/create.js +427 -0
- package/esm/theme/create.js.map +1 -0
- package/esm/theme/dark.d.ts +20 -0
- package/esm/theme/dark.js +77 -0
- package/esm/theme/dark.js.map +1 -0
- package/esm/theme/index.d.ts +5 -0
- package/esm/theme/index.js +6 -0
- package/esm/theme/index.js.map +1 -0
- package/esm/theme/light.d.ts +23 -0
- package/esm/theme/light.js +60 -0
- package/esm/theme/light.js.map +1 -0
- package/esm/transform/bin.d.ts +12 -0
- package/esm/transform/bin.js +82 -0
- package/esm/transform/bin.js.map +1 -0
- package/esm/transform/binX.d.ts +4 -0
- package/esm/transform/binX.js +7 -0
- package/esm/transform/binX.js.map +1 -0
- package/esm/transform/diffY.d.ts +8 -0
- package/esm/transform/diffY.js +40 -0
- package/esm/transform/diffY.js.map +1 -0
- package/esm/transform/dodgeX.d.ts +9 -0
- package/esm/transform/dodgeX.js +65 -0
- package/esm/transform/dodgeX.js.map +1 -0
- package/esm/transform/filter.d.ts +7 -0
- package/esm/transform/filter.js +86 -0
- package/esm/transform/filter.js.map +1 -0
- package/esm/transform/flexX.d.ts +7 -0
- package/esm/transform/flexX.js +31 -0
- package/esm/transform/flexX.js.map +1 -0
- package/esm/transform/group.d.ts +10 -0
- package/esm/transform/group.js +23 -0
- package/esm/transform/group.js.map +1 -0
- package/esm/transform/groupColor.d.ts +7 -0
- package/esm/transform/groupColor.js +9 -0
- package/esm/transform/groupColor.js.map +1 -0
- package/esm/transform/groupN.d.ts +9 -0
- package/esm/transform/groupN.js +116 -0
- package/esm/transform/groupN.js.map +1 -0
- package/esm/transform/groupX.d.ts +7 -0
- package/esm/transform/groupX.js +9 -0
- package/esm/transform/groupX.js.map +1 -0
- package/esm/transform/groupY.d.ts +7 -0
- package/esm/transform/groupY.js +9 -0
- package/esm/transform/groupY.js.map +1 -0
- package/esm/transform/index.d.ts +89 -0
- package/esm/transform/index.js +47 -0
- package/esm/transform/index.js.map +1 -0
- package/esm/transform/jitter.d.ts +10 -0
- package/esm/transform/jitter.js +45 -0
- package/esm/transform/jitter.js.map +1 -0
- package/esm/transform/jitterX.d.ts +8 -0
- package/esm/transform/jitterX.js +25 -0
- package/esm/transform/jitterX.js.map +1 -0
- package/esm/transform/jitterY.d.ts +8 -0
- package/esm/transform/jitterY.js +25 -0
- package/esm/transform/jitterY.js.map +1 -0
- package/esm/transform/maybeDefaultX.d.ts +7 -0
- package/esm/transform/maybeDefaultX.js +29 -0
- package/esm/transform/maybeDefaultX.js.map +1 -0
- package/esm/transform/maybeDefaultY.d.ts +7 -0
- package/esm/transform/maybeDefaultY.js +29 -0
- package/esm/transform/maybeDefaultY.js.map +1 -0
- package/esm/transform/maybeFunctionAttribute.d.ts +6 -0
- package/esm/transform/maybeFunctionAttribute.js +19 -0
- package/esm/transform/maybeFunctionAttribute.js.map +1 -0
- package/esm/transform/maybeGradient.d.ts +7 -0
- package/esm/transform/maybeGradient.js +25 -0
- package/esm/transform/maybeGradient.js.map +1 -0
- package/esm/transform/maybeIdentityX.d.ts +7 -0
- package/esm/transform/maybeIdentityX.js +18 -0
- package/esm/transform/maybeIdentityX.js.map +1 -0
- package/esm/transform/maybeIdentityY.d.ts +7 -0
- package/esm/transform/maybeIdentityY.js +18 -0
- package/esm/transform/maybeIdentityY.js.map +1 -0
- package/esm/transform/maybeKey.d.ts +6 -0
- package/esm/transform/maybeKey.js +32 -0
- package/esm/transform/maybeKey.js.map +1 -0
- package/esm/transform/maybeSeries.d.ts +6 -0
- package/esm/transform/maybeSeries.js +17 -0
- package/esm/transform/maybeSeries.js.map +1 -0
- package/esm/transform/maybeSize.d.ts +7 -0
- package/esm/transform/maybeSize.js +20 -0
- package/esm/transform/maybeSize.js.map +1 -0
- package/esm/transform/maybeStackY.d.ts +9 -0
- package/esm/transform/maybeStackY.js +30 -0
- package/esm/transform/maybeStackY.js.map +1 -0
- package/esm/transform/maybeTitle.d.ts +8 -0
- package/esm/transform/maybeTitle.js +45 -0
- package/esm/transform/maybeTitle.js.map +1 -0
- package/esm/transform/maybeTooltip.d.ts +8 -0
- package/esm/transform/maybeTooltip.js +36 -0
- package/esm/transform/maybeTooltip.js.map +1 -0
- package/esm/transform/maybeTuple.d.ts +7 -0
- package/esm/transform/maybeTuple.js +19 -0
- package/esm/transform/maybeTuple.js.map +1 -0
- package/esm/transform/maybeTupleX.d.ts +7 -0
- package/esm/transform/maybeTupleX.js +16 -0
- package/esm/transform/maybeTupleX.js.map +1 -0
- package/esm/transform/maybeTupleY.d.ts +7 -0
- package/esm/transform/maybeTupleY.js +16 -0
- package/esm/transform/maybeTupleY.js.map +1 -0
- package/esm/transform/maybeVisualPosition.d.ts +7 -0
- package/esm/transform/maybeVisualPosition.js +45 -0
- package/esm/transform/maybeVisualPosition.js.map +1 -0
- package/esm/transform/maybeZeroPadding.d.ts +6 -0
- package/esm/transform/maybeZeroPadding.js +14 -0
- package/esm/transform/maybeZeroPadding.js.map +1 -0
- package/esm/transform/maybeZeroX.d.ts +7 -0
- package/esm/transform/maybeZeroX.js +23 -0
- package/esm/transform/maybeZeroX.js.map +1 -0
- package/esm/transform/maybeZeroY.d.ts +6 -0
- package/esm/transform/maybeZeroY.js +22 -0
- package/esm/transform/maybeZeroY.js.map +1 -0
- package/esm/transform/maybeZeroY1.d.ts +6 -0
- package/esm/transform/maybeZeroY1.js +21 -0
- package/esm/transform/maybeZeroY1.js.map +1 -0
- package/esm/transform/maybeZeroZ.d.ts +6 -0
- package/esm/transform/maybeZeroZ.js +22 -0
- package/esm/transform/maybeZeroZ.js.map +1 -0
- package/esm/transform/normalizeY.d.ts +9 -0
- package/esm/transform/normalizeY.js +74 -0
- package/esm/transform/normalizeY.js.map +1 -0
- package/esm/transform/pack.d.ts +9 -0
- package/esm/transform/pack.js +62 -0
- package/esm/transform/pack.js.map +1 -0
- package/esm/transform/sample.d.ts +8 -0
- package/esm/transform/sample.js +64 -0
- package/esm/transform/sample.js.map +1 -0
- package/esm/transform/select.d.ts +9 -0
- package/esm/transform/select.js +41 -0
- package/esm/transform/select.js.map +1 -0
- package/esm/transform/selectX.d.ts +7 -0
- package/esm/transform/selectX.js +21 -0
- package/esm/transform/selectX.js.map +1 -0
- package/esm/transform/selectY.d.ts +7 -0
- package/esm/transform/selectY.js +21 -0
- package/esm/transform/selectY.js.map +1 -0
- package/esm/transform/sort.d.ts +14 -0
- package/esm/transform/sort.js +60 -0
- package/esm/transform/sort.js.map +1 -0
- package/esm/transform/sortColor.d.ts +7 -0
- package/esm/transform/sortColor.js +9 -0
- package/esm/transform/sortColor.js.map +1 -0
- package/esm/transform/sortX.d.ts +7 -0
- package/esm/transform/sortX.js +9 -0
- package/esm/transform/sortX.js.map +1 -0
- package/esm/transform/sortY.d.ts +7 -0
- package/esm/transform/sortY.js +9 -0
- package/esm/transform/sortY.js.map +1 -0
- package/esm/transform/stackEnter.d.ts +14 -0
- package/esm/transform/stackEnter.js +72 -0
- package/esm/transform/stackEnter.js.map +1 -0
- package/esm/transform/stackY.d.ts +9 -0
- package/esm/transform/stackY.js +107 -0
- package/esm/transform/stackY.js.map +1 -0
- package/esm/transform/symmetryY.d.ts +8 -0
- package/esm/transform/symmetryY.js +60 -0
- package/esm/transform/symmetryY.js.map +1 -0
- package/esm/transform/utils/helper.d.ts +28 -0
- package/esm/transform/utils/helper.js +50 -0
- package/esm/transform/utils/helper.js.map +1 -0
- package/esm/transform/utils/lttb.d.ts +5 -0
- package/esm/transform/utils/lttb.js +56 -0
- package/esm/transform/utils/lttb.js.map +1 -0
- package/esm/transform/utils/order.d.ts +9 -0
- package/esm/transform/utils/order.js +74 -0
- package/esm/transform/utils/order.js.map +1 -0
- package/esm/utils/angle.d.ts +6 -0
- package/esm/utils/angle.js +25 -0
- package/esm/utils/angle.js.map +1 -0
- package/esm/utils/array.d.ts +22 -0
- package/esm/utils/array.js +77 -0
- package/esm/utils/array.js.map +1 -0
- package/esm/utils/bounds.d.ts +28 -0
- package/esm/utils/bounds.js +48 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/container.d.ts +8 -0
- package/esm/utils/container.js +16 -0
- package/esm/utils/container.js.map +1 -0
- package/esm/utils/coordinate.d.ts +16 -0
- package/esm/utils/coordinate.js +75 -0
- package/esm/utils/coordinate.js.map +1 -0
- package/esm/utils/createElement.d.ts +5 -0
- package/esm/utils/createElement.js +16 -0
- package/esm/utils/createElement.js.map +1 -0
- package/esm/utils/dateFormat.d.ts +1 -0
- package/esm/utils/dateFormat.js +18 -0
- package/esm/utils/dateFormat.js.map +1 -0
- package/esm/utils/event.d.ts +32 -0
- package/esm/utils/event.js +34 -0
- package/esm/utils/event.js.map +1 -0
- package/esm/utils/expr.d.ts +8 -0
- package/esm/utils/expr.js +51 -0
- package/esm/utils/expr.js.map +1 -0
- package/esm/utils/flow.d.ts +7 -0
- package/esm/utils/flow.js +12 -0
- package/esm/utils/flow.js.map +1 -0
- package/esm/utils/helper.d.ts +55 -0
- package/esm/utils/helper.js +195 -0
- package/esm/utils/helper.js.map +1 -0
- package/esm/utils/lru.d.ts +4 -0
- package/esm/utils/lru.js +18 -0
- package/esm/utils/lru.js.map +1 -0
- package/esm/utils/mark.d.ts +4 -0
- package/esm/utils/mark.js +29 -0
- package/esm/utils/mark.js.map +1 -0
- package/esm/utils/marker.d.ts +10 -0
- package/esm/utils/marker.js +250 -0
- package/esm/utils/marker.js.map +1 -0
- package/esm/utils/number.d.ts +8 -0
- package/esm/utils/number.js +15 -0
- package/esm/utils/number.js.map +1 -0
- package/esm/utils/scale.d.ts +6 -0
- package/esm/utils/scale.js +74 -0
- package/esm/utils/scale.js.map +1 -0
- package/esm/utils/selection.d.ts +67 -0
- package/esm/utils/selection.js +303 -0
- package/esm/utils/selection.js.map +1 -0
- package/esm/utils/size.d.ts +17 -0
- package/esm/utils/size.js +43 -0
- package/esm/utils/size.js.map +1 -0
- package/esm/utils/string.d.ts +12 -0
- package/esm/utils/string.js +19 -0
- package/esm/utils/string.js.map +1 -0
- package/esm/utils/style.d.ts +5 -0
- package/esm/utils/style.js +23 -0
- package/esm/utils/style.js.map +1 -0
- package/esm/utils/treeDataTransform.d.ts +28 -0
- package/esm/utils/treeDataTransform.js +94 -0
- package/esm/utils/treeDataTransform.js.map +1 -0
- package/esm/utils/vector.d.ts +20 -0
- package/esm/utils/vector.js +52 -0
- package/esm/utils/vector.js.map +1 -0
- package/lib/animation/fadeIn.d.ts +7 -0
- package/lib/animation/fadeIn.js +24 -0
- package/lib/animation/fadeIn.js.map +1 -0
- package/lib/animation/fadeOut.d.ts +7 -0
- package/lib/animation/fadeOut.js +24 -0
- package/lib/animation/fadeOut.js.map +1 -0
- package/lib/animation/growInX.d.ts +7 -0
- package/lib/animation/growInX.js +28 -0
- package/lib/animation/growInX.js.map +1 -0
- package/lib/animation/growInY.d.ts +7 -0
- package/lib/animation/growInY.js +28 -0
- package/lib/animation/growInY.js.map +1 -0
- package/lib/animation/index.d.ts +24 -0
- package/lib/animation/index.js +30 -0
- package/lib/animation/index.js.map +1 -0
- package/lib/animation/morphing.d.ts +13 -0
- package/lib/animation/morphing.js +239 -0
- package/lib/animation/morphing.js.map +1 -0
- package/lib/animation/pathIn.d.ts +7 -0
- package/lib/animation/pathIn.js +21 -0
- package/lib/animation/pathIn.js.map +1 -0
- package/lib/animation/scaleInX.d.ts +7 -0
- package/lib/animation/scaleInX.js +50 -0
- package/lib/animation/scaleInX.js.map +1 -0
- package/lib/animation/scaleInY.d.ts +7 -0
- package/lib/animation/scaleInY.js +99 -0
- package/lib/animation/scaleInY.js.map +1 -0
- package/lib/animation/scaleOutX.d.ts +7 -0
- package/lib/animation/scaleOutX.js +47 -0
- package/lib/animation/scaleOutX.js.map +1 -0
- package/lib/animation/scaleOutY.d.ts +7 -0
- package/lib/animation/scaleOutY.js +47 -0
- package/lib/animation/scaleOutY.js.map +1 -0
- package/lib/animation/types.d.ts +6 -0
- package/lib/animation/types.js +3 -0
- package/lib/animation/types.js.map +1 -0
- package/lib/animation/utils.d.ts +12 -0
- package/lib/animation/utils.js +51 -0
- package/lib/animation/utils.js.map +1 -0
- package/lib/animation/waveIn.d.ts +7 -0
- package/lib/animation/waveIn.js +70 -0
- package/lib/animation/waveIn.js.map +1 -0
- package/lib/animation/zoomIn.d.ts +4 -0
- package/lib/animation/zoomIn.js +41 -0
- package/lib/animation/zoomIn.js.map +1 -0
- package/lib/animation/zoomOut.d.ts +4 -0
- package/lib/animation/zoomOut.js +35 -0
- package/lib/animation/zoomOut.js.map +1 -0
- package/lib/api/chart.d.ts +13 -0
- package/lib/api/chart.js +8 -0
- package/lib/api/chart.js.map +1 -0
- package/lib/api/composition.d.ts +37 -0
- package/lib/api/composition.js +90 -0
- package/lib/api/composition.js.map +1 -0
- package/lib/api/define.d.ts +14 -0
- package/lib/api/define.js +97 -0
- package/lib/api/define.js.map +1 -0
- package/lib/api/extend.d.ts +15 -0
- package/lib/api/extend.js +13 -0
- package/lib/api/extend.js.map +1 -0
- package/lib/api/index.d.ts +4 -0
- package/lib/api/index.js +12 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/library.d.ts +4 -0
- package/lib/api/library.js +14 -0
- package/lib/api/library.js.map +1 -0
- package/lib/api/mark.d.ts +29 -0
- package/lib/api/mark.js +69 -0
- package/lib/api/mark.js.map +1 -0
- package/lib/api/node.d.ts +40 -0
- package/lib/api/node.js +125 -0
- package/lib/api/node.js.map +1 -0
- package/lib/api/props.d.ts +171 -0
- package/lib/api/props.js +25 -0
- package/lib/api/props.js.map +1 -0
- package/lib/api/runtime.d.ts +67 -0
- package/lib/api/runtime.js +313 -0
- package/lib/api/runtime.js.map +1 -0
- package/lib/api/types.d.ts +65 -0
- package/lib/api/types.js +3 -0
- package/lib/api/types.js.map +1 -0
- package/lib/api/utils.d.ts +25 -0
- package/lib/api/utils.js +263 -0
- package/lib/api/utils.js.map +1 -0
- package/lib/component/axis.d.ts +29 -0
- package/lib/component/axis.js +408 -0
- package/lib/component/axis.js.map +1 -0
- package/lib/component/axisArc.d.ts +7 -0
- package/lib/component/axisArc.js +13 -0
- package/lib/component/axisArc.js.map +1 -0
- package/lib/component/axisRadar.d.ts +9 -0
- package/lib/component/axisRadar.js +51 -0
- package/lib/component/axisRadar.js.map +1 -0
- package/lib/component/axisX.d.ts +8 -0
- package/lib/component/axisX.js +20 -0
- package/lib/component/axisX.js.map +1 -0
- package/lib/component/axisY.d.ts +7 -0
- package/lib/component/axisY.js +17 -0
- package/lib/component/axisY.js.map +1 -0
- package/lib/component/constant.d.ts +14 -0
- package/lib/component/constant.js +244 -0
- package/lib/component/constant.js.map +1 -0
- package/lib/component/index.d.ts +26 -0
- package/lib/component/index.js +35 -0
- package/lib/component/index.js.map +1 -0
- package/lib/component/legendCategory.d.ts +15 -0
- package/lib/component/legendCategory.js +179 -0
- package/lib/component/legendCategory.js.map +1 -0
- package/lib/component/legendContinuous.d.ts +12 -0
- package/lib/component/legendContinuous.js +151 -0
- package/lib/component/legendContinuous.js.map +1 -0
- package/lib/component/legendContinuousBlock.d.ts +4 -0
- package/lib/component/legendContinuousBlock.js +10 -0
- package/lib/component/legendContinuousBlock.js.map +1 -0
- package/lib/component/legendContinuousBlockSize.d.ts +4 -0
- package/lib/component/legendContinuousBlockSize.js +11 -0
- package/lib/component/legendContinuousBlockSize.js.map +1 -0
- package/lib/component/legendContinuousSize.d.ts +4 -0
- package/lib/component/legendContinuousSize.js +21 -0
- package/lib/component/legendContinuousSize.js.map +1 -0
- package/lib/component/legends.d.ts +3 -0
- package/lib/component/legends.js +13 -0
- package/lib/component/legends.js.map +1 -0
- package/lib/component/scrollbar.d.ts +10 -0
- package/lib/component/scrollbar.js +45 -0
- package/lib/component/scrollbar.js.map +1 -0
- package/lib/component/scrollbarX.d.ts +7 -0
- package/lib/component/scrollbarX.js +13 -0
- package/lib/component/scrollbarX.js.map +1 -0
- package/lib/component/scrollbarY.d.ts +7 -0
- package/lib/component/scrollbarY.js +13 -0
- package/lib/component/scrollbarY.js.map +1 -0
- package/lib/component/slider.d.ts +13 -0
- package/lib/component/slider.js +99 -0
- package/lib/component/slider.js.map +1 -0
- package/lib/component/sliderX.d.ts +7 -0
- package/lib/component/sliderX.js +13 -0
- package/lib/component/sliderX.js.map +1 -0
- package/lib/component/sliderY.d.ts +7 -0
- package/lib/component/sliderY.js +13 -0
- package/lib/component/sliderY.js.map +1 -0
- package/lib/component/title.d.ts +6 -0
- package/lib/component/title.js +83 -0
- package/lib/component/title.js.map +1 -0
- package/lib/component/utils.d.ts +36 -0
- package/lib/component/utils.js +162 -0
- package/lib/component/utils.js.map +1 -0
- package/lib/composition/d3Projection.d.ts +1 -0
- package/lib/composition/d3Projection.js +36 -0
- package/lib/composition/d3Projection.js.map +1 -0
- package/lib/composition/facetCircle.d.ts +7 -0
- package/lib/composition/facetCircle.js +89 -0
- package/lib/composition/facetCircle.js.map +1 -0
- package/lib/composition/facetRect.d.ts +31 -0
- package/lib/composition/facetRect.js +301 -0
- package/lib/composition/facetRect.js.map +1 -0
- package/lib/composition/geoPath.d.ts +7 -0
- package/lib/composition/geoPath.js +41 -0
- package/lib/composition/geoPath.js.map +1 -0
- package/lib/composition/geoView.d.ts +7 -0
- package/lib/composition/geoView.js +246 -0
- package/lib/composition/geoView.js.map +1 -0
- package/lib/composition/index.d.ts +18 -0
- package/lib/composition/index.js +24 -0
- package/lib/composition/index.js.map +1 -0
- package/lib/composition/mark.d.ts +4 -0
- package/lib/composition/mark.js +55 -0
- package/lib/composition/mark.js.map +1 -0
- package/lib/composition/repeatMatrix.d.ts +8 -0
- package/lib/composition/repeatMatrix.js +156 -0
- package/lib/composition/repeatMatrix.js.map +1 -0
- package/lib/composition/spaceFlex.d.ts +7 -0
- package/lib/composition/spaceFlex.js +44 -0
- package/lib/composition/spaceFlex.js.map +1 -0
- package/lib/composition/spaceLayer.d.ts +7 -0
- package/lib/composition/spaceLayer.js +33 -0
- package/lib/composition/spaceLayer.js.map +1 -0
- package/lib/composition/timingKeyframe.d.ts +7 -0
- package/lib/composition/timingKeyframe.js +84 -0
- package/lib/composition/timingKeyframe.js.map +1 -0
- package/lib/composition/utils.d.ts +18 -0
- package/lib/composition/utils.js +48 -0
- package/lib/composition/utils.js.map +1 -0
- package/lib/composition/view.d.ts +9 -0
- package/lib/composition/view.js +37 -0
- package/lib/composition/view.js.map +1 -0
- package/lib/coordinate/cartesian.d.ts +7 -0
- package/lib/coordinate/cartesian.js +10 -0
- package/lib/coordinate/cartesian.js.map +1 -0
- package/lib/coordinate/fisheye.d.ts +7 -0
- package/lib/coordinate/fisheye.js +10 -0
- package/lib/coordinate/fisheye.js.map +1 -0
- package/lib/coordinate/helix.d.ts +7 -0
- package/lib/coordinate/helix.js +15 -0
- package/lib/coordinate/helix.js.map +1 -0
- package/lib/coordinate/index.d.ts +18 -0
- package/lib/coordinate/index.js +25 -0
- package/lib/coordinate/index.js.map +1 -0
- package/lib/coordinate/parallel.d.ts +7 -0
- package/lib/coordinate/parallel.js +10 -0
- package/lib/coordinate/parallel.js.map +1 -0
- package/lib/coordinate/polar.d.ts +15 -0
- package/lib/coordinate/polar.js +31 -0
- package/lib/coordinate/polar.js.map +1 -0
- package/lib/coordinate/radar.d.ts +7 -0
- package/lib/coordinate/radar.js +18 -0
- package/lib/coordinate/radar.js.map +1 -0
- package/lib/coordinate/radial.d.ts +14 -0
- package/lib/coordinate/radial.js +30 -0
- package/lib/coordinate/radial.js.map +1 -0
- package/lib/coordinate/theta.d.ts +15 -0
- package/lib/coordinate/theta.js +28 -0
- package/lib/coordinate/theta.js.map +1 -0
- package/lib/coordinate/transpose.d.ts +7 -0
- package/lib/coordinate/transpose.js +15 -0
- package/lib/coordinate/transpose.js.map +1 -0
- package/lib/data/arc.d.ts +6 -0
- package/lib/data/arc.js +15 -0
- package/lib/data/arc.js.map +1 -0
- package/lib/data/cluster.d.ts +7 -0
- package/lib/data/cluster.js +42 -0
- package/lib/data/cluster.js.map +1 -0
- package/lib/data/custom.d.ts +7 -0
- package/lib/data/custom.js +14 -0
- package/lib/data/custom.js.map +1 -0
- package/lib/data/ema.d.ts +10 -0
- package/lib/data/ema.js +49 -0
- package/lib/data/ema.js.map +1 -0
- package/lib/data/fetch.d.ts +4 -0
- package/lib/data/fetch.js +32 -0
- package/lib/data/fetch.js.map +1 -0
- package/lib/data/filter.d.ts +9 -0
- package/lib/data/filter.js +18 -0
- package/lib/data/filter.js.map +1 -0
- package/lib/data/fold.d.ts +10 -0
- package/lib/data/fold.js +23 -0
- package/lib/data/fold.js.map +1 -0
- package/lib/data/index.d.ts +42 -0
- package/lib/data/index.js +46 -0
- package/lib/data/index.js.map +1 -0
- package/lib/data/inline.d.ts +4 -0
- package/lib/data/inline.js +10 -0
- package/lib/data/inline.js.map +1 -0
- package/lib/data/join.d.ts +7 -0
- package/lib/data/join.js +26 -0
- package/lib/data/join.js.map +1 -0
- package/lib/data/kde.d.ts +10 -0
- package/lib/data/kde.js +38 -0
- package/lib/data/kde.js.map +1 -0
- package/lib/data/log.d.ts +7 -0
- package/lib/data/log.js +15 -0
- package/lib/data/log.js.map +1 -0
- package/lib/data/map.d.ts +7 -0
- package/lib/data/map.js +14 -0
- package/lib/data/map.js.map +1 -0
- package/lib/data/pick.d.ts +7 -0
- package/lib/data/pick.js +22 -0
- package/lib/data/pick.js.map +1 -0
- package/lib/data/rename.d.ts +8 -0
- package/lib/data/rename.js +21 -0
- package/lib/data/rename.js.map +1 -0
- package/lib/data/sankey.d.ts +7 -0
- package/lib/data/sankey.js +81 -0
- package/lib/data/sankey.js.map +1 -0
- package/lib/data/slice.d.ts +8 -0
- package/lib/data/slice.js +14 -0
- package/lib/data/slice.js.map +1 -0
- package/lib/data/sort.d.ts +8 -0
- package/lib/data/sort.js +17 -0
- package/lib/data/sort.js.map +1 -0
- package/lib/data/sortBy.d.ts +7 -0
- package/lib/data/sortBy.js +28 -0
- package/lib/data/sortBy.js.map +1 -0
- package/lib/data/tree.d.ts +3 -0
- package/lib/data/tree.js +11 -0
- package/lib/data/tree.js.map +1 -0
- package/lib/data/utils/arc/arc.d.ts +31 -0
- package/lib/data/utils/arc/arc.js +188 -0
- package/lib/data/utils/arc/arc.js.map +1 -0
- package/lib/data/utils/arc/index.d.ts +2 -0
- package/lib/data/utils/arc/index.js +6 -0
- package/lib/data/utils/arc/index.js.map +1 -0
- package/lib/data/utils/arc/sort.d.ts +4 -0
- package/lib/data/utils/arc/sort.js +20 -0
- package/lib/data/utils/arc/sort.js.map +1 -0
- package/lib/data/utils/arc/types.d.ts +51 -0
- package/lib/data/utils/arc/types.js +3 -0
- package/lib/data/utils/arc/types.js.map +1 -0
- package/lib/data/utils/d3-cloud/index.d.ts +1 -0
- package/lib/data/utils/d3-cloud/index.js +402 -0
- package/lib/data/utils/d3-cloud/index.js.map +1 -0
- package/lib/data/utils/d3-sankey/align.d.ts +4 -0
- package/lib/data/utils/d3-sankey/align.js +28 -0
- package/lib/data/utils/d3-sankey/align.js.map +1 -0
- package/lib/data/utils/d3-sankey/constant.d.ts +1 -0
- package/lib/data/utils/d3-sankey/constant.js +10 -0
- package/lib/data/utils/d3-sankey/constant.js.map +1 -0
- package/lib/data/utils/d3-sankey/index.d.ts +12 -0
- package/lib/data/utils/d3-sankey/index.js +20 -0
- package/lib/data/utils/d3-sankey/index.js.map +1 -0
- package/lib/data/utils/d3-sankey/sankey.d.ts +24 -0
- package/lib/data/utils/d3-sankey/sankey.js +392 -0
- package/lib/data/utils/d3-sankey/sankey.js.map +1 -0
- package/lib/data/utils/fields.d.ts +6 -0
- package/lib/data/utils/fields.js +19 -0
- package/lib/data/utils/fields.js.map +1 -0
- package/lib/data/utils/flow.d.ts +9 -0
- package/lib/data/utils/flow.js +49 -0
- package/lib/data/utils/flow.js.map +1 -0
- package/lib/data/utils/memo.d.ts +17 -0
- package/lib/data/utils/memo.js +85 -0
- package/lib/data/utils/memo.js.map +1 -0
- package/lib/data/utils/venn/circleintersection.d.ts +33 -0
- package/lib/data/utils/venn/circleintersection.js +202 -0
- package/lib/data/utils/venn/circleintersection.js.map +1 -0
- package/lib/data/utils/venn/diagram.d.ts +2 -0
- package/lib/data/utils/venn/diagram.js +48 -0
- package/lib/data/utils/venn/diagram.js.map +1 -0
- package/lib/data/utils/venn/index.d.ts +5 -0
- package/lib/data/utils/venn/index.js +12 -0
- package/lib/data/utils/venn/index.js.map +1 -0
- package/lib/data/utils/venn/layout.d.ts +27 -0
- package/lib/data/utils/venn/layout.js +620 -0
- package/lib/data/utils/venn/layout.js.map +1 -0
- package/lib/data/venn.d.ts +7 -0
- package/lib/data/venn.js +38 -0
- package/lib/data/venn.js.map +1 -0
- package/lib/data/wordCloud.d.ts +110 -0
- package/lib/data/wordCloud.js +127 -0
- package/lib/data/wordCloud.js.map +1 -0
- package/lib/encode/column.d.ts +7 -0
- package/lib/encode/column.js +12 -0
- package/lib/encode/column.js.map +1 -0
- package/lib/encode/constant.d.ts +7 -0
- package/lib/encode/constant.js +12 -0
- package/lib/encode/constant.js.map +1 -0
- package/lib/encode/field.d.ts +7 -0
- package/lib/encode/field.js +12 -0
- package/lib/encode/field.js.map +1 -0
- package/lib/encode/index.d.ts +8 -0
- package/lib/encode/index.js +12 -0
- package/lib/encode/index.js.map +1 -0
- package/lib/encode/transform.d.ts +9 -0
- package/lib/encode/transform.js +14 -0
- package/lib/encode/transform.js.map +1 -0
- package/lib/exports.d.ts +12 -0
- package/lib/exports.js +55 -0
- package/lib/exports.js.map +1 -0
- package/lib/index.d.ts +356 -0
- package/lib/index.js +31 -0
- package/lib/index.js.map +1 -0
- package/lib/interaction/brushAxisHighlight.d.ts +29 -0
- package/lib/interaction/brushAxisHighlight.js +286 -0
- package/lib/interaction/brushAxisHighlight.js.map +1 -0
- package/lib/interaction/brushFilter.d.ts +18 -0
- package/lib/interaction/brushFilter.js +149 -0
- package/lib/interaction/brushFilter.js.map +1 -0
- package/lib/interaction/brushHighlight.d.ts +48 -0
- package/lib/interaction/brushHighlight.js +592 -0
- package/lib/interaction/brushHighlight.js.map +1 -0
- package/lib/interaction/brushXFilter.d.ts +1 -0
- package/lib/interaction/brushXFilter.js +10 -0
- package/lib/interaction/brushXFilter.js.map +1 -0
- package/lib/interaction/brushXHighlight.d.ts +7 -0
- package/lib/interaction/brushXHighlight.js +14 -0
- package/lib/interaction/brushXHighlight.js.map +1 -0
- package/lib/interaction/brushYFilter.d.ts +1 -0
- package/lib/interaction/brushYFilter.js +10 -0
- package/lib/interaction/brushYFilter.js.map +1 -0
- package/lib/interaction/brushYHighlight.d.ts +7 -0
- package/lib/interaction/brushYHighlight.js +14 -0
- package/lib/interaction/brushYHighlight.js.map +1 -0
- package/lib/interaction/chartIndex.d.ts +9 -0
- package/lib/interaction/chartIndex.js +182 -0
- package/lib/interaction/chartIndex.js.map +1 -0
- package/lib/interaction/elementHighlight.d.ts +25 -0
- package/lib/interaction/elementHighlight.js +203 -0
- package/lib/interaction/elementHighlight.js.map +1 -0
- package/lib/interaction/elementHighlightByColor.d.ts +6 -0
- package/lib/interaction/elementHighlightByColor.js +13 -0
- package/lib/interaction/elementHighlightByColor.js.map +1 -0
- package/lib/interaction/elementHighlightByX.d.ts +6 -0
- package/lib/interaction/elementHighlightByX.js +13 -0
- package/lib/interaction/elementHighlightByX.js.map +1 -0
- package/lib/interaction/elementPointMove.d.ts +9 -0
- package/lib/interaction/elementPointMove.js +510 -0
- package/lib/interaction/elementPointMove.js.map +1 -0
- package/lib/interaction/elementSelect.d.ts +24 -0
- package/lib/interaction/elementSelect.js +240 -0
- package/lib/interaction/elementSelect.js.map +1 -0
- package/lib/interaction/elementSelectByColor.d.ts +6 -0
- package/lib/interaction/elementSelectByColor.js +13 -0
- package/lib/interaction/elementSelectByColor.js.map +1 -0
- package/lib/interaction/elementSelectByX.d.ts +6 -0
- package/lib/interaction/elementSelectByX.js +13 -0
- package/lib/interaction/elementSelectByX.js.map +1 -0
- package/lib/interaction/event.d.ts +6 -0
- package/lib/interaction/event.js +133 -0
- package/lib/interaction/event.js.map +1 -0
- package/lib/interaction/fisheye.d.ts +4 -0
- package/lib/interaction/fisheye.js +61 -0
- package/lib/interaction/fisheye.js.map +1 -0
- package/lib/interaction/index.d.ts +24 -0
- package/lib/interaction/index.js +52 -0
- package/lib/interaction/index.js.map +1 -0
- package/lib/interaction/legendFilter.d.ts +14 -0
- package/lib/interaction/legendFilter.js +304 -0
- package/lib/interaction/legendFilter.js.map +1 -0
- package/lib/interaction/legendHighlight.d.ts +1 -0
- package/lib/interaction/legendHighlight.js +129 -0
- package/lib/interaction/legendHighlight.js.map +1 -0
- package/lib/interaction/poptip.d.ts +10 -0
- package/lib/interaction/poptip.js +98 -0
- package/lib/interaction/poptip.js.map +1 -0
- package/lib/interaction/scrollbarFilter.d.ts +2 -0
- package/lib/interaction/scrollbarFilter.js +31 -0
- package/lib/interaction/scrollbarFilter.js.map +1 -0
- package/lib/interaction/sliderFilter.d.ts +5 -0
- package/lib/interaction/sliderFilter.js +177 -0
- package/lib/interaction/sliderFilter.js.map +1 -0
- package/lib/interaction/tooltip.d.ts +16 -0
- package/lib/interaction/tooltip.js +877 -0
- package/lib/interaction/tooltip.js.map +1 -0
- package/lib/interaction/treemapDrillDown.d.ts +10 -0
- package/lib/interaction/treemapDrillDown.js +236 -0
- package/lib/interaction/treemapDrillDown.js.map +1 -0
- package/lib/interaction/utils.d.ts +69 -0
- package/lib/interaction/utils.js +584 -0
- package/lib/interaction/utils.js.map +1 -0
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +54 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/exceedAdjust.d.ts +7 -0
- package/lib/label-transform/exceedAdjust.js +55 -0
- package/lib/label-transform/exceedAdjust.js.map +1 -0
- package/lib/label-transform/index.d.ts +10 -0
- package/lib/label-transform/index.js +14 -0
- package/lib/label-transform/index.js.map +1 -0
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +23 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/overlapDodgeY.js +79 -0
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +29 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/lib/builtinlib.d.ts +13 -0
- package/lib/lib/builtinlib.js +25 -0
- package/lib/lib/builtinlib.js.map +1 -0
- package/lib/lib/core.d.ts +158 -0
- package/lib/lib/core.js +177 -0
- package/lib/lib/core.js.map +1 -0
- package/lib/lib/geo.d.ts +4 -0
- package/lib/lib/geo.js +13 -0
- package/lib/lib/geo.js.map +1 -0
- package/lib/lib/graph.d.ts +10 -0
- package/lib/lib/graph.js +19 -0
- package/lib/lib/graph.js.map +1 -0
- package/lib/lib/index.d.ts +6 -0
- package/lib/lib/index.js +16 -0
- package/lib/lib/index.js.map +1 -0
- package/lib/lib/lite.d.ts +64 -0
- package/lib/lib/lite.js +82 -0
- package/lib/lib/lite.js.map +1 -0
- package/lib/lib/plot.d.ts +7 -0
- package/lib/lib/plot.js +16 -0
- package/lib/lib/plot.js.map +1 -0
- package/lib/lib/std.d.ts +171 -0
- package/lib/lib/std.js +12 -0
- package/lib/lib/std.js.map +1 -0
- package/lib/mark/area.d.ts +4 -0
- package/lib/mark/area.js +90 -0
- package/lib/mark/area.js.map +1 -0
- package/lib/mark/box.d.ts +34 -0
- package/lib/mark/box.js +100 -0
- package/lib/mark/box.js.map +1 -0
- package/lib/mark/boxplot.d.ts +4 -0
- package/lib/mark/boxplot.js +106 -0
- package/lib/mark/boxplot.js.map +1 -0
- package/lib/mark/cell.d.ts +9 -0
- package/lib/mark/cell.js +54 -0
- package/lib/mark/cell.js.map +1 -0
- package/lib/mark/chord.d.ts +4 -0
- package/lib/mark/chord.js +124 -0
- package/lib/mark/chord.js.map +1 -0
- package/lib/mark/connector.d.ts +4 -0
- package/lib/mark/connector.js +27 -0
- package/lib/mark/connector.js.map +1 -0
- package/lib/mark/density.d.ts +4 -0
- package/lib/mark/density.js +68 -0
- package/lib/mark/density.js.map +1 -0
- package/lib/mark/forceGraph.d.ts +4 -0
- package/lib/mark/forceGraph.js +119 -0
- package/lib/mark/forceGraph.js.map +1 -0
- package/lib/mark/gauge.d.ts +11 -0
- package/lib/mark/gauge.js +182 -0
- package/lib/mark/gauge.js.map +1 -0
- package/lib/mark/heatmap.d.ts +7 -0
- package/lib/mark/heatmap.js +45 -0
- package/lib/mark/heatmap.js.map +1 -0
- package/lib/mark/image.d.ts +4 -0
- package/lib/mark/image.js +44 -0
- package/lib/mark/image.js.map +1 -0
- package/lib/mark/index.d.ts +62 -0
- package/lib/mark/index.js +68 -0
- package/lib/mark/index.js.map +1 -0
- package/lib/mark/interval.d.ts +12 -0
- package/lib/mark/interval.js +81 -0
- package/lib/mark/interval.js.map +1 -0
- package/lib/mark/line.d.ts +7 -0
- package/lib/mark/line.js +100 -0
- package/lib/mark/line.js.map +1 -0
- package/lib/mark/lineX.d.ts +4 -0
- package/lib/mark/lineX.js +36 -0
- package/lib/mark/lineX.js.map +1 -0
- package/lib/mark/lineY.d.ts +4 -0
- package/lib/mark/lineY.js +36 -0
- package/lib/mark/lineY.js.map +1 -0
- package/lib/mark/link.d.ts +7 -0
- package/lib/mark/link.js +45 -0
- package/lib/mark/link.js.map +1 -0
- package/lib/mark/liquid.d.ts +7 -0
- package/lib/mark/liquid.js +88 -0
- package/lib/mark/liquid.js.map +1 -0
- package/lib/mark/pack.d.ts +4 -0
- package/lib/mark/pack.js +82 -0
- package/lib/mark/pack.js.map +1 -0
- package/lib/mark/path.d.ts +7 -0
- package/lib/mark/path.js +34 -0
- package/lib/mark/path.js.map +1 -0
- package/lib/mark/point.d.ts +9 -0
- package/lib/mark/point.js +88 -0
- package/lib/mark/point.js.map +1 -0
- package/lib/mark/polygon.d.ts +7 -0
- package/lib/mark/polygon.js +49 -0
- package/lib/mark/polygon.js.map +1 -0
- package/lib/mark/range.d.ts +8 -0
- package/lib/mark/range.js +52 -0
- package/lib/mark/range.js.map +1 -0
- package/lib/mark/rangeX.d.ts +4 -0
- package/lib/mark/rangeX.js +27 -0
- package/lib/mark/rangeX.js.map +1 -0
- package/lib/mark/rangeY.d.ts +4 -0
- package/lib/mark/rangeY.js +27 -0
- package/lib/mark/rangeY.js.map +1 -0
- package/lib/mark/rect.d.ts +4 -0
- package/lib/mark/rect.js +41 -0
- package/lib/mark/rect.js.map +1 -0
- package/lib/mark/sankey.d.ts +8 -0
- package/lib/mark/sankey.js +117 -0
- package/lib/mark/sankey.js.map +1 -0
- package/lib/mark/shape.d.ts +7 -0
- package/lib/mark/shape.js +44 -0
- package/lib/mark/shape.js.map +1 -0
- package/lib/mark/text.d.ts +4 -0
- package/lib/mark/text.js +47 -0
- package/lib/mark/text.js.map +1 -0
- package/lib/mark/tree.d.ts +4 -0
- package/lib/mark/tree.js +75 -0
- package/lib/mark/tree.js.map +1 -0
- package/lib/mark/treemap.d.ts +4 -0
- package/lib/mark/treemap.js +110 -0
- package/lib/mark/treemap.js.map +1 -0
- package/lib/mark/utils.d.ts +67 -0
- package/lib/mark/utils.js +129 -0
- package/lib/mark/utils.js.map +1 -0
- package/lib/mark/vector.d.ts +8 -0
- package/lib/mark/vector.js +48 -0
- package/lib/mark/vector.js.map +1 -0
- package/lib/mark/wordCloud.d.ts +4 -0
- package/lib/mark/wordCloud.js +71 -0
- package/lib/mark/wordCloud.js.map +1 -0
- package/lib/palette/category10.d.ts +7 -0
- package/lib/palette/category10.js +23 -0
- package/lib/palette/category10.js.map +1 -0
- package/lib/palette/category20.d.ts +7 -0
- package/lib/palette/category20.js +33 -0
- package/lib/palette/category20.js.map +1 -0
- package/lib/palette/index.d.ts +4 -0
- package/lib/palette/index.js +8 -0
- package/lib/palette/index.js.map +1 -0
- package/lib/runtime/component.d.ts +18 -0
- package/lib/runtime/component.js +784 -0
- package/lib/runtime/component.js.map +1 -0
- package/lib/runtime/constant.d.ts +9 -0
- package/lib/runtime/constant.js +13 -0
- package/lib/runtime/constant.js.map +1 -0
- package/lib/runtime/coordinate.d.ts +24 -0
- package/lib/runtime/coordinate.js +103 -0
- package/lib/runtime/coordinate.js.map +1 -0
- package/lib/runtime/index.d.ts +9 -0
- package/lib/runtime/index.js +30 -0
- package/lib/runtime/index.js.map +1 -0
- package/lib/runtime/layout.d.ts +10 -0
- package/lib/runtime/layout.js +589 -0
- package/lib/runtime/layout.js.map +1 -0
- package/lib/runtime/library.d.ts +5 -0
- package/lib/runtime/library.js +42 -0
- package/lib/runtime/library.js.map +1 -0
- package/lib/runtime/mark.d.ts +6 -0
- package/lib/runtime/mark.js +135 -0
- package/lib/runtime/mark.js.map +1 -0
- package/lib/runtime/option-preprocess/index.d.ts +2 -0
- package/lib/runtime/option-preprocess/index.js +20 -0
- package/lib/runtime/option-preprocess/index.js.map +1 -0
- package/lib/runtime/option-preprocess/style.d.ts +2 -0
- package/lib/runtime/option-preprocess/style.js +16 -0
- package/lib/runtime/option-preprocess/style.js.map +1 -0
- package/lib/runtime/plot.d.ts +5 -0
- package/lib/runtime/plot.js +1217 -0
- package/lib/runtime/plot.js.map +1 -0
- package/lib/runtime/render.d.ts +5 -0
- package/lib/runtime/render.js +175 -0
- package/lib/runtime/render.js.map +1 -0
- package/lib/runtime/scale.d.ts +14 -0
- package/lib/runtime/scale.js +594 -0
- package/lib/runtime/scale.js.map +1 -0
- package/lib/runtime/transform.d.ts +16 -0
- package/lib/runtime/transform.js +300 -0
- package/lib/runtime/transform.js.map +1 -0
- package/lib/runtime/types/common.d.ts +159 -0
- package/lib/runtime/types/common.js +3 -0
- package/lib/runtime/types/common.js.map +1 -0
- package/lib/runtime/types/component.d.ts +103 -0
- package/lib/runtime/types/component.js +3 -0
- package/lib/runtime/types/component.js.map +1 -0
- package/lib/runtime/types/data.d.ts +8 -0
- package/lib/runtime/types/data.js +3 -0
- package/lib/runtime/types/data.js.map +1 -0
- package/lib/runtime/types/encode.d.ts +23 -0
- package/lib/runtime/types/encode.js +3 -0
- package/lib/runtime/types/encode.js.map +1 -0
- package/lib/runtime/types/mark.d.ts +36 -0
- package/lib/runtime/types/mark.js +3 -0
- package/lib/runtime/types/mark.js.map +1 -0
- package/lib/runtime/types/options.d.ts +145 -0
- package/lib/runtime/types/options.js +3 -0
- package/lib/runtime/types/options.js.map +1 -0
- package/lib/runtime/types/scale.d.ts +21 -0
- package/lib/runtime/types/scale.js +25 -0
- package/lib/runtime/types/scale.js.map +1 -0
- package/lib/runtime/types/theme.d.ts +91 -0
- package/lib/runtime/types/theme.js +3 -0
- package/lib/runtime/types/theme.js.map +1 -0
- package/lib/runtime/types/transform.d.ts +14 -0
- package/lib/runtime/types/transform.js +3 -0
- package/lib/runtime/types/transform.js.map +1 -0
- package/lib/scale/band.d.ts +4 -0
- package/lib/scale/band.js +10 -0
- package/lib/scale/band.js.map +1 -0
- package/lib/scale/constant.d.ts +4 -0
- package/lib/scale/constant.js +10 -0
- package/lib/scale/constant.js.map +1 -0
- package/lib/scale/identity.d.ts +4 -0
- package/lib/scale/identity.js +10 -0
- package/lib/scale/identity.js.map +1 -0
- package/lib/scale/index.d.ts +28 -0
- package/lib/scale/index.js +32 -0
- package/lib/scale/index.js.map +1 -0
- package/lib/scale/linear.d.ts +4 -0
- package/lib/scale/linear.js +10 -0
- package/lib/scale/linear.js.map +1 -0
- package/lib/scale/log.d.ts +4 -0
- package/lib/scale/log.js +10 -0
- package/lib/scale/log.js.map +1 -0
- package/lib/scale/ordinal.d.ts +4 -0
- package/lib/scale/ordinal.js +10 -0
- package/lib/scale/ordinal.js.map +1 -0
- package/lib/scale/point.d.ts +4 -0
- package/lib/scale/point.js +10 -0
- package/lib/scale/point.js.map +1 -0
- package/lib/scale/pow.d.ts +4 -0
- package/lib/scale/pow.js +10 -0
- package/lib/scale/pow.js.map +1 -0
- package/lib/scale/quantile.d.ts +4 -0
- package/lib/scale/quantile.js +10 -0
- package/lib/scale/quantile.js.map +1 -0
- package/lib/scale/quantize.d.ts +4 -0
- package/lib/scale/quantize.js +10 -0
- package/lib/scale/quantize.js.map +1 -0
- package/lib/scale/sequential.d.ts +4 -0
- package/lib/scale/sequential.js +10 -0
- package/lib/scale/sequential.js.map +1 -0
- package/lib/scale/sqrt.d.ts +4 -0
- package/lib/scale/sqrt.js +10 -0
- package/lib/scale/sqrt.js.map +1 -0
- package/lib/scale/threshold.d.ts +4 -0
- package/lib/scale/threshold.js +10 -0
- package/lib/scale/threshold.js.map +1 -0
- package/lib/scale/time.d.ts +4 -0
- package/lib/scale/time.js +10 -0
- package/lib/scale/time.js.map +1 -0
- package/lib/shape/area/area.d.ts +3 -0
- package/lib/shape/area/area.js +16 -0
- package/lib/shape/area/area.js.map +1 -0
- package/lib/shape/area/curve.d.ts +8 -0
- package/lib/shape/area/curve.js +175 -0
- package/lib/shape/area/curve.js.map +1 -0
- package/lib/shape/area/hv.d.ts +3 -0
- package/lib/shape/area/hv.js +13 -0
- package/lib/shape/area/hv.js.map +1 -0
- package/lib/shape/area/hvh.d.ts +3 -0
- package/lib/shape/area/hvh.js +13 -0
- package/lib/shape/area/hvh.js.map +1 -0
- package/lib/shape/area/smooth.d.ts +3 -0
- package/lib/shape/area/smooth.js +32 -0
- package/lib/shape/area/smooth.js.map +1 -0
- package/lib/shape/area/vh.d.ts +3 -0
- package/lib/shape/area/vh.js +13 -0
- package/lib/shape/area/vh.js.map +1 -0
- package/lib/shape/box/box.d.ts +3 -0
- package/lib/shape/box/box.js +94 -0
- package/lib/shape/box/box.js.map +1 -0
- package/lib/shape/box/violin.d.ts +3 -0
- package/lib/shape/box/violin.js +88 -0
- package/lib/shape/box/violin.js.map +1 -0
- package/lib/shape/connector/connector.d.ts +11 -0
- package/lib/shape/connector/connector.js +86 -0
- package/lib/shape/connector/connector.js.map +1 -0
- package/lib/shape/density/density.d.ts +8 -0
- package/lib/shape/density/density.js +53 -0
- package/lib/shape/density/density.js.map +1 -0
- package/lib/shape/gauge/round.d.ts +3 -0
- package/lib/shape/gauge/round.js +44 -0
- package/lib/shape/gauge/round.js.map +1 -0
- package/lib/shape/heatmap/heatmap.d.ts +4 -0
- package/lib/shape/heatmap/heatmap.js +71 -0
- package/lib/shape/heatmap/heatmap.js.map +1 -0
- package/lib/shape/heatmap/renderer/gradient.d.ts +5 -0
- package/lib/shape/heatmap/renderer/gradient.js +17 -0
- package/lib/shape/heatmap/renderer/gradient.js.map +1 -0
- package/lib/shape/heatmap/renderer/index.d.ts +6 -0
- package/lib/shape/heatmap/renderer/index.js +126 -0
- package/lib/shape/heatmap/renderer/index.js.map +1 -0
- package/lib/shape/heatmap/renderer/types.d.ts +36 -0
- package/lib/shape/heatmap/renderer/types.js +3 -0
- package/lib/shape/heatmap/renderer/types.js.map +1 -0
- package/lib/shape/image/image.d.ts +3 -0
- package/lib/shape/image/image.js +50 -0
- package/lib/shape/image/image.js.map +1 -0
- package/lib/shape/index.d.ts +114 -0
- package/lib/shape/index.js +133 -0
- package/lib/shape/index.js.map +1 -0
- package/lib/shape/interval/color.d.ts +25 -0
- package/lib/shape/interval/color.js +138 -0
- package/lib/shape/interval/color.js.map +1 -0
- package/lib/shape/interval/funnel.d.ts +10 -0
- package/lib/shape/interval/funnel.js +61 -0
- package/lib/shape/interval/funnel.js.map +1 -0
- package/lib/shape/interval/hollow.d.ts +6 -0
- package/lib/shape/interval/hollow.js +13 -0
- package/lib/shape/interval/hollow.js.map +1 -0
- package/lib/shape/interval/pyramid.d.ts +6 -0
- package/lib/shape/interval/pyramid.js +42 -0
- package/lib/shape/interval/pyramid.js.map +1 -0
- package/lib/shape/interval/rect.d.ts +20 -0
- package/lib/shape/interval/rect.js +14 -0
- package/lib/shape/interval/rect.js.map +1 -0
- package/lib/shape/label/label.d.ts +13 -0
- package/lib/shape/label/label.js +98 -0
- package/lib/shape/label/label.js.map +1 -0
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +18 -0
- package/lib/shape/label/position/default.js +121 -0
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +18 -0
- package/lib/shape/label/position/outside.js +75 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +8 -0
- package/lib/shape/label/position/spider.js +54 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +39 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/shape/label/position/utils.d.ts +2 -0
- package/lib/shape/label/position/utils.js +73 -0
- package/lib/shape/label/position/utils.js.map +1 -0
- package/lib/shape/line/curve.d.ts +8 -0
- package/lib/shape/line/curve.js +140 -0
- package/lib/shape/line/curve.js.map +1 -0
- package/lib/shape/line/hv.d.ts +3 -0
- package/lib/shape/line/hv.js +11 -0
- package/lib/shape/line/hv.js.map +1 -0
- package/lib/shape/line/hvh.d.ts +3 -0
- package/lib/shape/line/hvh.js +11 -0
- package/lib/shape/line/hvh.js.map +1 -0
- package/lib/shape/line/line.d.ts +3 -0
- package/lib/shape/line/line.js +16 -0
- package/lib/shape/line/line.js.map +1 -0
- package/lib/shape/line/smooth.d.ts +3 -0
- package/lib/shape/line/smooth.js +32 -0
- package/lib/shape/line/smooth.js.map +1 -0
- package/lib/shape/line/trail.d.ts +3 -0
- package/lib/shape/line/trail.js +81 -0
- package/lib/shape/line/trail.js.map +1 -0
- package/lib/shape/line/vh.d.ts +3 -0
- package/lib/shape/line/vh.js +11 -0
- package/lib/shape/line/vh.js.map +1 -0
- package/lib/shape/lineXY/line.d.ts +24 -0
- package/lib/shape/lineXY/line.js +75 -0
- package/lib/shape/lineXY/line.js.map +1 -0
- package/lib/shape/link/arc.d.ts +8 -0
- package/lib/shape/link/arc.js +59 -0
- package/lib/shape/link/arc.js.map +1 -0
- package/lib/shape/link/link.d.ts +8 -0
- package/lib/shape/link/link.js +22 -0
- package/lib/shape/link/link.js.map +1 -0
- package/lib/shape/link/smooth.d.ts +6 -0
- package/lib/shape/link/smooth.js +47 -0
- package/lib/shape/link/smooth.js.map +1 -0
- package/lib/shape/link/vhv.d.ts +12 -0
- package/lib/shape/link/vhv.js +77 -0
- package/lib/shape/link/vhv.js.map +1 -0
- package/lib/shape/liquid/liquid.d.ts +3 -0
- package/lib/shape/liquid/liquid.js +83 -0
- package/lib/shape/liquid/liquid.js.map +1 -0
- package/lib/shape/liquid/shapes.d.ts +38 -0
- package/lib/shape/liquid/shapes.js +96 -0
- package/lib/shape/liquid/shapes.js.map +1 -0
- package/lib/shape/liquid/wave.d.ts +16 -0
- package/lib/shape/liquid/wave.js +196 -0
- package/lib/shape/liquid/wave.js.map +1 -0
- package/lib/shape/path/color.d.ts +9 -0
- package/lib/shape/path/color.js +42 -0
- package/lib/shape/path/color.js.map +1 -0
- package/lib/shape/path/hollow.d.ts +8 -0
- package/lib/shape/path/hollow.js +18 -0
- package/lib/shape/path/hollow.js.map +1 -0
- package/lib/shape/path/path.d.ts +8 -0
- package/lib/shape/path/path.js +18 -0
- package/lib/shape/path/path.js.map +1 -0
- package/lib/shape/point/bowtie.d.ts +6 -0
- package/lib/shape/point/bowtie.js +13 -0
- package/lib/shape/point/bowtie.js.map +1 -0
- package/lib/shape/point/circle.d.ts +16 -0
- package/lib/shape/point/circle.js +61 -0
- package/lib/shape/point/circle.js.map +1 -0
- package/lib/shape/point/color.d.ts +13 -0
- package/lib/shape/point/color.js +70 -0
- package/lib/shape/point/color.js.map +1 -0
- package/lib/shape/point/cross.d.ts +6 -0
- package/lib/shape/point/cross.js +13 -0
- package/lib/shape/point/cross.js.map +1 -0
- package/lib/shape/point/diamond.d.ts +6 -0
- package/lib/shape/point/diamond.js +13 -0
- package/lib/shape/point/diamond.js.map +1 -0
- package/lib/shape/point/hexagon.d.ts +6 -0
- package/lib/shape/point/hexagon.js +13 -0
- package/lib/shape/point/hexagon.js.map +1 -0
- package/lib/shape/point/hollow.d.ts +6 -0
- package/lib/shape/point/hollow.js +13 -0
- package/lib/shape/point/hollow.js.map +1 -0
- package/lib/shape/point/hollowBowtie.d.ts +6 -0
- package/lib/shape/point/hollowBowtie.js +13 -0
- package/lib/shape/point/hollowBowtie.js.map +1 -0
- package/lib/shape/point/hollowCircle.d.ts +6 -0
- package/lib/shape/point/hollowCircle.js +13 -0
- package/lib/shape/point/hollowCircle.js.map +1 -0
- package/lib/shape/point/hollowDiamond.d.ts +6 -0
- package/lib/shape/point/hollowDiamond.js +13 -0
- package/lib/shape/point/hollowDiamond.js.map +1 -0
- package/lib/shape/point/hollowHexagon.d.ts +6 -0
- package/lib/shape/point/hollowHexagon.js +13 -0
- package/lib/shape/point/hollowHexagon.js.map +1 -0
- package/lib/shape/point/hollowSquare.d.ts +6 -0
- package/lib/shape/point/hollowSquare.js +13 -0
- package/lib/shape/point/hollowSquare.js.map +1 -0
- package/lib/shape/point/hollowTriangle.d.ts +6 -0
- package/lib/shape/point/hollowTriangle.js +13 -0
- package/lib/shape/point/hollowTriangle.js.map +1 -0
- package/lib/shape/point/hollowTriangleDown.d.ts +6 -0
- package/lib/shape/point/hollowTriangleDown.js +13 -0
- package/lib/shape/point/hollowTriangleDown.js.map +1 -0
- package/lib/shape/point/hyphen.d.ts +6 -0
- package/lib/shape/point/hyphen.js +13 -0
- package/lib/shape/point/hyphen.js.map +1 -0
- package/lib/shape/point/line.d.ts +6 -0
- package/lib/shape/point/line.js +13 -0
- package/lib/shape/point/line.js.map +1 -0
- package/lib/shape/point/plus.d.ts +6 -0
- package/lib/shape/point/plus.js +13 -0
- package/lib/shape/point/plus.js.map +1 -0
- package/lib/shape/point/point.d.ts +6 -0
- package/lib/shape/point/point.js +13 -0
- package/lib/shape/point/point.js.map +1 -0
- package/lib/shape/point/square.d.ts +6 -0
- package/lib/shape/point/square.js +13 -0
- package/lib/shape/point/square.js.map +1 -0
- package/lib/shape/point/tick.d.ts +6 -0
- package/lib/shape/point/tick.js +13 -0
- package/lib/shape/point/tick.js.map +1 -0
- package/lib/shape/point/triangle.d.ts +6 -0
- package/lib/shape/point/triangle.js +13 -0
- package/lib/shape/point/triangle.js.map +1 -0
- package/lib/shape/point/triangleDown.d.ts +6 -0
- package/lib/shape/point/triangleDown.js +13 -0
- package/lib/shape/point/triangleDown.js.map +1 -0
- package/lib/shape/polygon/polygon.d.ts +3 -0
- package/lib/shape/polygon/polygon.js +74 -0
- package/lib/shape/polygon/polygon.js.map +1 -0
- package/lib/shape/polygon/ribbon.d.ts +15 -0
- package/lib/shape/polygon/ribbon.js +77 -0
- package/lib/shape/polygon/ribbon.js.map +1 -0
- package/lib/shape/shape/shape.d.ts +6 -0
- package/lib/shape/shape/shape.js +32 -0
- package/lib/shape/shape/shape.js.map +1 -0
- package/lib/shape/text/advance.d.ts +2 -0
- package/lib/shape/text/advance.js +179 -0
- package/lib/shape/text/advance.js.map +1 -0
- package/lib/shape/text/badge.d.ts +7 -0
- package/lib/shape/text/badge.js +82 -0
- package/lib/shape/text/badge.js.map +1 -0
- package/lib/shape/text/tag.d.ts +7 -0
- package/lib/shape/text/tag.js +44 -0
- package/lib/shape/text/tag.js.map +1 -0
- package/lib/shape/text/text.d.ts +6 -0
- package/lib/shape/text/text.js +39 -0
- package/lib/shape/text/text.js.map +1 -0
- package/lib/shape/utils.d.ts +56 -0
- package/lib/shape/utils.js +180 -0
- package/lib/shape/utils.js.map +1 -0
- package/lib/shape/vector/vector.d.ts +8 -0
- package/lib/shape/vector/vector.js +57 -0
- package/lib/shape/vector/vector.js.map +1 -0
- package/lib/spec/animate.d.ts +23 -0
- package/lib/spec/animate.js +3 -0
- package/lib/spec/animate.js.map +1 -0
- package/lib/spec/component.d.ts +72 -0
- package/lib/spec/component.js +3 -0
- package/lib/spec/component.js.map +1 -0
- package/lib/spec/composition.d.ts +196 -0
- package/lib/spec/composition.js +3 -0
- package/lib/spec/composition.js.map +1 -0
- package/lib/spec/coordinate.d.ts +56 -0
- package/lib/spec/coordinate.js +3 -0
- package/lib/spec/coordinate.js.map +1 -0
- package/lib/spec/coordinateTransform.d.ts +13 -0
- package/lib/spec/coordinateTransform.js +3 -0
- package/lib/spec/coordinateTransform.js.map +1 -0
- package/lib/spec/data.d.ts +17 -0
- package/lib/spec/data.js +3 -0
- package/lib/spec/data.js.map +1 -0
- package/lib/spec/dataTransform.d.ts +152 -0
- package/lib/spec/dataTransform.js +3 -0
- package/lib/spec/dataTransform.js.map +1 -0
- package/lib/spec/encode.d.ts +23 -0
- package/lib/spec/encode.js +3 -0
- package/lib/spec/encode.js.map +1 -0
- package/lib/spec/index.d.ts +24 -0
- package/lib/spec/index.js +32 -0
- package/lib/spec/index.js.map +1 -0
- package/lib/spec/interaction.d.ts +144 -0
- package/lib/spec/interaction.js +3 -0
- package/lib/spec/interaction.js.map +1 -0
- package/lib/spec/labelTransform.d.ts +33 -0
- package/lib/spec/labelTransform.js +3 -0
- package/lib/spec/labelTransform.js.map +1 -0
- package/lib/spec/mark.d.ts +209 -0
- package/lib/spec/mark.js +3 -0
- package/lib/spec/mark.js.map +1 -0
- package/lib/spec/palette.d.ts +13 -0
- package/lib/spec/palette.js +3 -0
- package/lib/spec/palette.js.map +1 -0
- package/lib/spec/scale.d.ts +39 -0
- package/lib/spec/scale.js +3 -0
- package/lib/spec/scale.js.map +1 -0
- package/lib/spec/theme.d.ts +21 -0
- package/lib/spec/theme.js +3 -0
- package/lib/spec/theme.js.map +1 -0
- package/lib/spec/transform.d.ts +166 -0
- package/lib/spec/transform.js +3 -0
- package/lib/spec/transform.js.map +1 -0
- package/lib/spec/utils.d.ts +12 -0
- package/lib/spec/utils.js +3 -0
- package/lib/spec/utils.js.map +1 -0
- package/lib/theme/academy.d.ts +20 -0
- package/lib/theme/academy.js +106 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/classic.d.ts +6 -0
- package/lib/theme/classic.js +17 -0
- package/lib/theme/classic.js.map +1 -0
- package/lib/theme/classicDark.d.ts +6 -0
- package/lib/theme/classicDark.js +16 -0
- package/lib/theme/classicDark.js.map +1 -0
- package/lib/theme/create.d.ts +443 -0
- package/lib/theme/create.js +431 -0
- package/lib/theme/create.js.map +1 -0
- package/lib/theme/dark.d.ts +20 -0
- package/lib/theme/dark.js +81 -0
- package/lib/theme/dark.js.map +1 -0
- package/lib/theme/index.d.ts +5 -0
- package/lib/theme/index.js +14 -0
- package/lib/theme/index.js.map +1 -0
- package/lib/theme/light.d.ts +23 -0
- package/lib/theme/light.js +64 -0
- package/lib/theme/light.js.map +1 -0
- package/lib/transform/bin.d.ts +12 -0
- package/lib/transform/bin.js +86 -0
- package/lib/transform/bin.js.map +1 -0
- package/lib/transform/binX.d.ts +4 -0
- package/lib/transform/binX.js +11 -0
- package/lib/transform/binX.js.map +1 -0
- package/lib/transform/diffY.d.ts +8 -0
- package/lib/transform/diffY.js +44 -0
- package/lib/transform/diffY.js.map +1 -0
- package/lib/transform/dodgeX.d.ts +9 -0
- package/lib/transform/dodgeX.js +69 -0
- package/lib/transform/dodgeX.js.map +1 -0
- package/lib/transform/filter.d.ts +7 -0
- package/lib/transform/filter.js +90 -0
- package/lib/transform/filter.js.map +1 -0
- package/lib/transform/flexX.d.ts +7 -0
- package/lib/transform/flexX.js +35 -0
- package/lib/transform/flexX.js.map +1 -0
- package/lib/transform/group.d.ts +10 -0
- package/lib/transform/group.js +27 -0
- package/lib/transform/group.js.map +1 -0
- package/lib/transform/groupColor.d.ts +7 -0
- package/lib/transform/groupColor.js +13 -0
- package/lib/transform/groupColor.js.map +1 -0
- package/lib/transform/groupN.d.ts +9 -0
- package/lib/transform/groupN.js +120 -0
- package/lib/transform/groupN.js.map +1 -0
- package/lib/transform/groupX.d.ts +7 -0
- package/lib/transform/groupX.js +13 -0
- package/lib/transform/groupX.js.map +1 -0
- package/lib/transform/groupY.d.ts +7 -0
- package/lib/transform/groupY.js +13 -0
- package/lib/transform/groupY.js.map +1 -0
- package/lib/transform/index.d.ts +89 -0
- package/lib/transform/index.js +96 -0
- package/lib/transform/index.js.map +1 -0
- package/lib/transform/jitter.d.ts +10 -0
- package/lib/transform/jitter.js +51 -0
- package/lib/transform/jitter.js.map +1 -0
- package/lib/transform/jitterX.d.ts +8 -0
- package/lib/transform/jitterX.js +29 -0
- package/lib/transform/jitterX.js.map +1 -0
- package/lib/transform/jitterY.d.ts +8 -0
- package/lib/transform/jitterY.js +29 -0
- package/lib/transform/jitterY.js.map +1 -0
- package/lib/transform/maybeDefaultX.d.ts +7 -0
- package/lib/transform/maybeDefaultX.js +33 -0
- package/lib/transform/maybeDefaultX.js.map +1 -0
- package/lib/transform/maybeDefaultY.d.ts +7 -0
- package/lib/transform/maybeDefaultY.js +33 -0
- package/lib/transform/maybeDefaultY.js.map +1 -0
- package/lib/transform/maybeFunctionAttribute.d.ts +6 -0
- package/lib/transform/maybeFunctionAttribute.js +23 -0
- package/lib/transform/maybeFunctionAttribute.js.map +1 -0
- package/lib/transform/maybeGradient.d.ts +7 -0
- package/lib/transform/maybeGradient.js +29 -0
- package/lib/transform/maybeGradient.js.map +1 -0
- package/lib/transform/maybeIdentityX.d.ts +7 -0
- package/lib/transform/maybeIdentityX.js +22 -0
- package/lib/transform/maybeIdentityX.js.map +1 -0
- package/lib/transform/maybeIdentityY.d.ts +7 -0
- package/lib/transform/maybeIdentityY.js +22 -0
- package/lib/transform/maybeIdentityY.js.map +1 -0
- package/lib/transform/maybeKey.d.ts +6 -0
- package/lib/transform/maybeKey.js +36 -0
- package/lib/transform/maybeKey.js.map +1 -0
- package/lib/transform/maybeSeries.d.ts +6 -0
- package/lib/transform/maybeSeries.js +21 -0
- package/lib/transform/maybeSeries.js.map +1 -0
- package/lib/transform/maybeSize.d.ts +7 -0
- package/lib/transform/maybeSize.js +24 -0
- package/lib/transform/maybeSize.js.map +1 -0
- package/lib/transform/maybeStackY.d.ts +9 -0
- package/lib/transform/maybeStackY.js +34 -0
- package/lib/transform/maybeStackY.js.map +1 -0
- package/lib/transform/maybeTitle.d.ts +8 -0
- package/lib/transform/maybeTitle.js +49 -0
- package/lib/transform/maybeTitle.js.map +1 -0
- package/lib/transform/maybeTooltip.d.ts +8 -0
- package/lib/transform/maybeTooltip.js +40 -0
- package/lib/transform/maybeTooltip.js.map +1 -0
- package/lib/transform/maybeTuple.d.ts +7 -0
- package/lib/transform/maybeTuple.js +23 -0
- package/lib/transform/maybeTuple.js.map +1 -0
- package/lib/transform/maybeTupleX.d.ts +7 -0
- package/lib/transform/maybeTupleX.js +20 -0
- package/lib/transform/maybeTupleX.js.map +1 -0
- package/lib/transform/maybeTupleY.d.ts +7 -0
- package/lib/transform/maybeTupleY.js +20 -0
- package/lib/transform/maybeTupleY.js.map +1 -0
- package/lib/transform/maybeVisualPosition.d.ts +7 -0
- package/lib/transform/maybeVisualPosition.js +49 -0
- package/lib/transform/maybeVisualPosition.js.map +1 -0
- package/lib/transform/maybeZeroPadding.d.ts +6 -0
- package/lib/transform/maybeZeroPadding.js +18 -0
- package/lib/transform/maybeZeroPadding.js.map +1 -0
- package/lib/transform/maybeZeroX.d.ts +7 -0
- package/lib/transform/maybeZeroX.js +27 -0
- package/lib/transform/maybeZeroX.js.map +1 -0
- package/lib/transform/maybeZeroY.d.ts +6 -0
- package/lib/transform/maybeZeroY.js +26 -0
- package/lib/transform/maybeZeroY.js.map +1 -0
- package/lib/transform/maybeZeroY1.d.ts +6 -0
- package/lib/transform/maybeZeroY1.js +25 -0
- package/lib/transform/maybeZeroY1.js.map +1 -0
- package/lib/transform/maybeZeroZ.d.ts +6 -0
- package/lib/transform/maybeZeroZ.js +26 -0
- package/lib/transform/maybeZeroZ.js.map +1 -0
- package/lib/transform/normalizeY.d.ts +9 -0
- package/lib/transform/normalizeY.js +78 -0
- package/lib/transform/normalizeY.js.map +1 -0
- package/lib/transform/pack.d.ts +9 -0
- package/lib/transform/pack.js +66 -0
- package/lib/transform/pack.js.map +1 -0
- package/lib/transform/sample.d.ts +8 -0
- package/lib/transform/sample.js +68 -0
- package/lib/transform/sample.js.map +1 -0
- package/lib/transform/select.d.ts +9 -0
- package/lib/transform/select.js +45 -0
- package/lib/transform/select.js.map +1 -0
- package/lib/transform/selectX.d.ts +7 -0
- package/lib/transform/selectX.js +25 -0
- package/lib/transform/selectX.js.map +1 -0
- package/lib/transform/selectY.d.ts +7 -0
- package/lib/transform/selectY.js +25 -0
- package/lib/transform/selectY.js.map +1 -0
- package/lib/transform/sort.d.ts +14 -0
- package/lib/transform/sort.js +64 -0
- package/lib/transform/sort.js.map +1 -0
- package/lib/transform/sortColor.d.ts +7 -0
- package/lib/transform/sortColor.js +13 -0
- package/lib/transform/sortColor.js.map +1 -0
- package/lib/transform/sortX.d.ts +7 -0
- package/lib/transform/sortX.js +13 -0
- package/lib/transform/sortX.js.map +1 -0
- package/lib/transform/sortY.d.ts +7 -0
- package/lib/transform/sortY.js +13 -0
- package/lib/transform/sortY.js.map +1 -0
- package/lib/transform/stackEnter.d.ts +14 -0
- package/lib/transform/stackEnter.js +76 -0
- package/lib/transform/stackEnter.js.map +1 -0
- package/lib/transform/stackY.d.ts +9 -0
- package/lib/transform/stackY.js +111 -0
- package/lib/transform/stackY.js.map +1 -0
- package/lib/transform/symmetryY.d.ts +8 -0
- package/lib/transform/symmetryY.js +64 -0
- package/lib/transform/symmetryY.js.map +1 -0
- package/lib/transform/utils/helper.d.ts +28 -0
- package/lib/transform/utils/helper.js +61 -0
- package/lib/transform/utils/helper.js.map +1 -0
- package/lib/transform/utils/lttb.d.ts +5 -0
- package/lib/transform/utils/lttb.js +60 -0
- package/lib/transform/utils/lttb.js.map +1 -0
- package/lib/transform/utils/order.d.ts +9 -0
- package/lib/transform/utils/order.js +81 -0
- package/lib/transform/utils/order.js.map +1 -0
- package/lib/utils/angle.d.ts +6 -0
- package/lib/utils/angle.js +31 -0
- package/lib/utils/angle.js.map +1 -0
- package/lib/utils/array.d.ts +22 -0
- package/lib/utils/array.js +89 -0
- package/lib/utils/array.js.map +1 -0
- package/lib/utils/bounds.d.ts +28 -0
- package/lib/utils/bounds.js +55 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/container.d.ts +8 -0
- package/lib/utils/container.js +19 -0
- package/lib/utils/container.js.map +1 -0
- package/lib/utils/coordinate.d.ts +16 -0
- package/lib/utils/coordinate.js +92 -0
- package/lib/utils/coordinate.js.map +1 -0
- package/lib/utils/createElement.d.ts +5 -0
- package/lib/utils/createElement.js +20 -0
- package/lib/utils/createElement.js.map +1 -0
- package/lib/utils/dateFormat.d.ts +1 -0
- package/lib/utils/dateFormat.js +22 -0
- package/lib/utils/dateFormat.js.map +1 -0
- package/lib/utils/event.d.ts +32 -0
- package/lib/utils/event.js +37 -0
- package/lib/utils/event.js.map +1 -0
- package/lib/utils/expr.d.ts +8 -0
- package/lib/utils/expr.js +55 -0
- package/lib/utils/expr.js.map +1 -0
- package/lib/utils/flow.d.ts +7 -0
- package/lib/utils/flow.js +16 -0
- package/lib/utils/flow.js.map +1 -0
- package/lib/utils/helper.d.ts +55 -0
- package/lib/utils/helper.js +221 -0
- package/lib/utils/helper.js.map +1 -0
- package/lib/utils/lru.d.ts +4 -0
- package/lib/utils/lru.js +25 -0
- package/lib/utils/lru.js.map +1 -0
- package/lib/utils/mark.d.ts +4 -0
- package/lib/utils/mark.js +36 -0
- package/lib/utils/mark.js.map +1 -0
- package/lib/utils/marker.d.ts +10 -0
- package/lib/utils/marker.js +256 -0
- package/lib/utils/marker.js.map +1 -0
- package/lib/utils/number.d.ts +8 -0
- package/lib/utils/number.js +20 -0
- package/lib/utils/number.js.map +1 -0
- package/lib/utils/scale.d.ts +6 -0
- package/lib/utils/scale.js +83 -0
- package/lib/utils/scale.js.map +1 -0
- package/lib/utils/selection.d.ts +67 -0
- package/lib/utils/selection.js +308 -0
- package/lib/utils/selection.js.map +1 -0
- package/lib/utils/size.d.ts +17 -0
- package/lib/utils/size.js +48 -0
- package/lib/utils/size.js.map +1 -0
- package/lib/utils/string.d.ts +12 -0
- package/lib/utils/string.js +24 -0
- package/lib/utils/string.js.map +1 -0
- package/lib/utils/style.d.ts +5 -0
- package/lib/utils/style.js +30 -0
- package/lib/utils/style.js.map +1 -0
- package/lib/utils/treeDataTransform.d.ts +28 -0
- package/lib/utils/treeDataTransform.js +98 -0
- package/lib/utils/treeDataTransform.js.map +1 -0
- package/lib/utils/vector.d.ts +20 -0
- package/lib/utils/vector.js +63 -0
- package/lib/utils/vector.js.map +1 -0
- package/package.json +2 -1
- package/src/interaction/brushFilter.ts +1 -0
- package/src/interaction/elementHighlight.ts +44 -8
- package/src/interaction/elementSelect.ts +11 -8
- package/src/interaction/treemapDrillDown.ts +10 -5
- package/src/interaction/utils.ts +113 -12
- package/src/mark/treemap.ts +2 -1
- package/src/mark/wordCloud.ts +9 -0
- package/src/spec/interaction.ts +3 -2
|
@@ -0,0 +1,1217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.applyStyle = exports.plot = void 0;
|
|
24
|
+
const g_1 = require("@antv/g");
|
|
25
|
+
const util_1 = require("@antv/util");
|
|
26
|
+
const d3_array_1 = require("@antv/vendor/d3-array");
|
|
27
|
+
const d3_format_1 = require("@antv/vendor/d3-format");
|
|
28
|
+
const array_1 = require("../utils/array");
|
|
29
|
+
const event_1 = require("../utils/event");
|
|
30
|
+
const helper_1 = require("../utils/helper");
|
|
31
|
+
const selection_1 = require("../utils/selection");
|
|
32
|
+
const component_1 = require("./component");
|
|
33
|
+
const constant_1 = require("./constant");
|
|
34
|
+
const coordinate_1 = require("./coordinate");
|
|
35
|
+
const layout_1 = require("./layout");
|
|
36
|
+
const library_1 = require("./library");
|
|
37
|
+
const mark_1 = require("./mark");
|
|
38
|
+
const scale_1 = require("./scale");
|
|
39
|
+
const transform_1 = require("./transform");
|
|
40
|
+
function plot(options, selection, context) {
|
|
41
|
+
var _a;
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const { library } = context;
|
|
44
|
+
const [useComposition] = (0, library_1.useLibrary)('composition', library);
|
|
45
|
+
const [useInteraction] = (0, library_1.useLibrary)('interaction', library);
|
|
46
|
+
// Some helper functions.
|
|
47
|
+
const marks = new Set(Object.keys(library)
|
|
48
|
+
.map((d) => { var _a; return (_a = /mark\.(.*)/.exec(d)) === null || _a === void 0 ? void 0 : _a[1]; })
|
|
49
|
+
.filter(helper_1.defined));
|
|
50
|
+
const staticMarks = new Set(Object.keys(library)
|
|
51
|
+
.map((d) => { var _a; return (_a = /component\.(.*)/.exec(d)) === null || _a === void 0 ? void 0 : _a[1]; })
|
|
52
|
+
.filter(helper_1.defined));
|
|
53
|
+
const typeOf = (node) => {
|
|
54
|
+
const { type } = node;
|
|
55
|
+
if (typeof type === 'function') {
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
const { props = {} } = type;
|
|
58
|
+
const { composite = true } = props;
|
|
59
|
+
if (composite)
|
|
60
|
+
return 'mark';
|
|
61
|
+
}
|
|
62
|
+
if (typeof type !== 'string')
|
|
63
|
+
return type;
|
|
64
|
+
if (marks.has(type) || staticMarks.has(type))
|
|
65
|
+
return 'mark';
|
|
66
|
+
return type;
|
|
67
|
+
};
|
|
68
|
+
const isMark = (node) => typeOf(node) === 'mark';
|
|
69
|
+
const isStandardView = (node) => typeOf(node) === 'standardView';
|
|
70
|
+
const isStaticMark = (node) => {
|
|
71
|
+
const { type } = node;
|
|
72
|
+
if (typeof type !== 'string')
|
|
73
|
+
return false;
|
|
74
|
+
if (staticMarks.has(type))
|
|
75
|
+
return true;
|
|
76
|
+
return false;
|
|
77
|
+
};
|
|
78
|
+
const transform = (node) => {
|
|
79
|
+
if (isStandardView(node))
|
|
80
|
+
return [node];
|
|
81
|
+
const type = typeOf(node);
|
|
82
|
+
const composition = useComposition({ type, static: isStaticMark(node) });
|
|
83
|
+
return composition(node);
|
|
84
|
+
};
|
|
85
|
+
// Some temporary variables help parse the view tree.
|
|
86
|
+
const views = [];
|
|
87
|
+
const viewNode = new Map();
|
|
88
|
+
const nodeState = new Map();
|
|
89
|
+
const discovered = [options];
|
|
90
|
+
const nodeGenerators = [];
|
|
91
|
+
while (discovered.length) {
|
|
92
|
+
const node = discovered.shift();
|
|
93
|
+
if (isStandardView(node)) {
|
|
94
|
+
// Initialize view to get data to be visualized. If the marks
|
|
95
|
+
// of the view have already been initialized (facet view),
|
|
96
|
+
// initialize the view based on the initialized mark states,
|
|
97
|
+
// otherwise initialize it from beginning.
|
|
98
|
+
const state = nodeState.get(node);
|
|
99
|
+
const [view, children] = state
|
|
100
|
+
? initializeState(state, node, library)
|
|
101
|
+
: yield initializeView(node, context);
|
|
102
|
+
viewNode.set(view, node);
|
|
103
|
+
views.push(view);
|
|
104
|
+
// Transform children, they will be transformed into
|
|
105
|
+
// standardView if they are mark or view node.
|
|
106
|
+
const transformedNodes = children
|
|
107
|
+
.flatMap(transform)
|
|
108
|
+
.map((d) => (0, coordinate_1.coordinate2Transform)(d, library));
|
|
109
|
+
discovered.push(...transformedNodes);
|
|
110
|
+
// Only StandardView can be treated as facet and it
|
|
111
|
+
// should sync position scales among facets normally.
|
|
112
|
+
if (transformedNodes.every(isStandardView)) {
|
|
113
|
+
const states = yield Promise.all(transformedNodes.map((d) => initializeMarks(d, context)));
|
|
114
|
+
// Note!!!
|
|
115
|
+
// This will mutate scales for marks.
|
|
116
|
+
(0, scale_1.syncFacetsScales)(states);
|
|
117
|
+
for (let i = 0; i < transformedNodes.length; i++) {
|
|
118
|
+
const nodeT = transformedNodes[i];
|
|
119
|
+
const state = states[i];
|
|
120
|
+
nodeState.set(nodeT, state);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
// Apply transform to get data in advance for non-mark composition
|
|
126
|
+
// node, which makes sure that composition node can preprocess the
|
|
127
|
+
// data to produce more nodes based on it.
|
|
128
|
+
const n = isMark(node) ? node : yield applyTransform(node, context);
|
|
129
|
+
const N = transform(n);
|
|
130
|
+
if (Array.isArray(N))
|
|
131
|
+
discovered.push(...N);
|
|
132
|
+
else if (typeof N === 'function')
|
|
133
|
+
nodeGenerators.push(N());
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
context.emitter.emit(event_1.ChartEvent.BEFORE_PAINT);
|
|
137
|
+
// Plot chart.
|
|
138
|
+
const enterContainer = new Map();
|
|
139
|
+
const updateContainer = new Map();
|
|
140
|
+
const transitions = [];
|
|
141
|
+
selection
|
|
142
|
+
.selectAll(className(constant_1.VIEW_CLASS_NAME))
|
|
143
|
+
.data(views, (d) => d.key)
|
|
144
|
+
.join((enter) => enter
|
|
145
|
+
.append('g')
|
|
146
|
+
.attr('className', constant_1.VIEW_CLASS_NAME)
|
|
147
|
+
.attr('id', (view) => view.key)
|
|
148
|
+
.call(applyTranslate)
|
|
149
|
+
.each(function (view, i, element) {
|
|
150
|
+
plotView(view, (0, selection_1.select)(element), transitions, context);
|
|
151
|
+
enterContainer.set(view, element);
|
|
152
|
+
}), (update) => update.call(applyTranslate).each(function (view, i, element) {
|
|
153
|
+
plotView(view, (0, selection_1.select)(element), transitions, context);
|
|
154
|
+
updateContainer.set(view, element);
|
|
155
|
+
}), (exit) => exit
|
|
156
|
+
.each(function (d, i, element) {
|
|
157
|
+
// Remove existed interactions.
|
|
158
|
+
const interactions = element['nameInteraction'].values();
|
|
159
|
+
for (const interaction of interactions) {
|
|
160
|
+
interaction.destroy();
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
.remove());
|
|
164
|
+
// Apply interactions.
|
|
165
|
+
const viewInstanceof = (viewContainer, updateInteractions, oldStore) => {
|
|
166
|
+
return Array.from(viewContainer.entries()).map(([view, container]) => {
|
|
167
|
+
// Index state by component or interaction name,
|
|
168
|
+
// such as legend, scrollbar, brushFilter.
|
|
169
|
+
// Each state transform options to another options.
|
|
170
|
+
const store = oldStore || new Map();
|
|
171
|
+
const setState = (key, reducer = (x) => x) => store.set(key, reducer);
|
|
172
|
+
const options = viewNode.get(view);
|
|
173
|
+
const update = createUpdateView((0, selection_1.select)(container), options, context);
|
|
174
|
+
return {
|
|
175
|
+
view,
|
|
176
|
+
container,
|
|
177
|
+
options,
|
|
178
|
+
setState,
|
|
179
|
+
update: (from, updateTypes) => __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
// Apply all state functions to get new options.
|
|
181
|
+
const reducer = (0, helper_1.compose)(Array.from(store.values()));
|
|
182
|
+
const newOptions = reducer(options);
|
|
183
|
+
return yield update(newOptions, from, () => {
|
|
184
|
+
if ((0, util_1.isArray)(updateTypes)) {
|
|
185
|
+
updateInteractions(viewContainer, updateTypes, store);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}),
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
const updateInteractions = (container = updateContainer, updateType, oldStore) => {
|
|
193
|
+
var _a;
|
|
194
|
+
// Interactions for update views.
|
|
195
|
+
const updateViewInstances = viewInstanceof(container, updateInteractions, oldStore);
|
|
196
|
+
for (const target of updateViewInstances) {
|
|
197
|
+
const { options, container } = target;
|
|
198
|
+
const nameInteraction = container['nameInteraction'];
|
|
199
|
+
let typeOptions = inferInteraction(options);
|
|
200
|
+
if (updateType) {
|
|
201
|
+
typeOptions = typeOptions.filter((v) => updateType.includes(v[0]));
|
|
202
|
+
}
|
|
203
|
+
for (const typeOption of typeOptions) {
|
|
204
|
+
const [type, option] = typeOption;
|
|
205
|
+
// Remove interaction for existed views.
|
|
206
|
+
const prevInteraction = nameInteraction.get(type);
|
|
207
|
+
if (prevInteraction)
|
|
208
|
+
(_a = prevInteraction.destroy) === null || _a === void 0 ? void 0 : _a.call(prevInteraction);
|
|
209
|
+
// Apply new interaction.
|
|
210
|
+
if (option) {
|
|
211
|
+
const interaction = useThemeInteraction(target.view, type, option, useInteraction);
|
|
212
|
+
const destroy = interaction(target, updateViewInstances, context.emitter);
|
|
213
|
+
nameInteraction.set(type, { destroy });
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
// Interactions for enter views.
|
|
219
|
+
const enterViewInstances = viewInstanceof(enterContainer, updateInteractions);
|
|
220
|
+
for (const target of enterViewInstances) {
|
|
221
|
+
const { options } = target;
|
|
222
|
+
// A Map index interaction by interaction name.
|
|
223
|
+
const nameInteraction = new Map();
|
|
224
|
+
target.container['nameInteraction'] = nameInteraction;
|
|
225
|
+
// Apply interactions.
|
|
226
|
+
for (const typeOption of inferInteraction(options)) {
|
|
227
|
+
const [type, option] = typeOption;
|
|
228
|
+
if (option) {
|
|
229
|
+
const interaction = useThemeInteraction(target.view, type, option, useInteraction);
|
|
230
|
+
const destroy = interaction(target, enterViewInstances, context.emitter);
|
|
231
|
+
nameInteraction.set(type, { destroy });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
updateInteractions();
|
|
236
|
+
// Author animations.
|
|
237
|
+
const { width, height } = options;
|
|
238
|
+
const keyframes = [];
|
|
239
|
+
for (const nodeGenerator of nodeGenerators) {
|
|
240
|
+
// Delay the rendering of animation keyframe. Different animation
|
|
241
|
+
// created by different nodeGenerator will play in the same time.
|
|
242
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
243
|
+
const keyframe = new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
for (const node of nodeGenerator) {
|
|
245
|
+
const sizedNode = Object.assign({ width, height }, node);
|
|
246
|
+
yield plot(sizedNode, selection, context);
|
|
247
|
+
}
|
|
248
|
+
resolve();
|
|
249
|
+
}));
|
|
250
|
+
keyframes.push(keyframe);
|
|
251
|
+
}
|
|
252
|
+
context.views = views;
|
|
253
|
+
// Clear and update animation.
|
|
254
|
+
(_a = context.animations) === null || _a === void 0 ? void 0 : _a.forEach((animation) => animation === null || animation === void 0 ? void 0 : animation.cancel());
|
|
255
|
+
context.animations = transitions;
|
|
256
|
+
context.emitter.emit(event_1.ChartEvent.AFTER_PAINT);
|
|
257
|
+
// Note!!!
|
|
258
|
+
// The returned promise will never resolved if one of nodeGenerator
|
|
259
|
+
// never stop to yield node, which may created by a keyframe composition
|
|
260
|
+
// with iteration count set to infinite.
|
|
261
|
+
const finished = transitions
|
|
262
|
+
.filter(helper_1.defined)
|
|
263
|
+
.map(cancel)
|
|
264
|
+
.map((d) => d.finished);
|
|
265
|
+
return Promise.all([...finished, ...keyframes]);
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
exports.plot = plot;
|
|
269
|
+
function applyTranslate(selection) {
|
|
270
|
+
selection.style('transform', (d) => `translate(${d.layout.x}, ${d.layout.y})`);
|
|
271
|
+
}
|
|
272
|
+
function definedInteraction(library) {
|
|
273
|
+
const [, createInteraction] = (0, library_1.useLibrary)('interaction', library);
|
|
274
|
+
return (d) => {
|
|
275
|
+
const [name, options] = d;
|
|
276
|
+
try {
|
|
277
|
+
return [name, createInteraction(name)];
|
|
278
|
+
}
|
|
279
|
+
catch (_a) {
|
|
280
|
+
return [name, options.type];
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
function createUpdateView(selection, options, context) {
|
|
285
|
+
const { library } = context;
|
|
286
|
+
const createDefinedInteraction = definedInteraction(library);
|
|
287
|
+
const filter = (d) => d[1] && d[1].props && d[1].props.reapplyWhenUpdate;
|
|
288
|
+
const interactions = inferInteraction(options);
|
|
289
|
+
const updates = interactions
|
|
290
|
+
.map(createDefinedInteraction)
|
|
291
|
+
.filter(filter)
|
|
292
|
+
.map((d) => d[0]);
|
|
293
|
+
return (newOptions, source, callback) => __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
const transitions = [];
|
|
295
|
+
const [newView, newChildren] = yield initializeView(newOptions, context);
|
|
296
|
+
plotView(newView, selection, transitions, context);
|
|
297
|
+
// Update interaction need to reapply when update.
|
|
298
|
+
for (const name of updates.filter((d) => d !== source)) {
|
|
299
|
+
updateInteraction(name, selection, newOptions, newView, context);
|
|
300
|
+
}
|
|
301
|
+
for (const child of newChildren) {
|
|
302
|
+
plot(child, selection, context);
|
|
303
|
+
}
|
|
304
|
+
callback();
|
|
305
|
+
return { options: newOptions, view: newView };
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
function updateInteraction(name, selection, options, view, context) {
|
|
309
|
+
var _a;
|
|
310
|
+
const { library } = context;
|
|
311
|
+
const [useInteraction] = (0, library_1.useLibrary)('interaction', library);
|
|
312
|
+
// Instances for interaction.
|
|
313
|
+
const container = selection.node();
|
|
314
|
+
const nameInteraction = container['nameInteraction'];
|
|
315
|
+
const interactionOptions = inferInteraction(options).find(([d]) => d === name);
|
|
316
|
+
// Destroy older interaction.
|
|
317
|
+
const interaction = nameInteraction.get(name);
|
|
318
|
+
if (!interaction)
|
|
319
|
+
return;
|
|
320
|
+
(_a = interaction.destroy) === null || _a === void 0 ? void 0 : _a.call(interaction);
|
|
321
|
+
if (!interactionOptions[1])
|
|
322
|
+
return;
|
|
323
|
+
// Apply new interaction.
|
|
324
|
+
const applyInteraction = useThemeInteraction(view, name, interactionOptions[1], useInteraction);
|
|
325
|
+
const target = {
|
|
326
|
+
options,
|
|
327
|
+
view,
|
|
328
|
+
container: selection.node(),
|
|
329
|
+
update: (options) => Promise.resolve(options),
|
|
330
|
+
};
|
|
331
|
+
const destroy = applyInteraction(target, [], context.emitter);
|
|
332
|
+
nameInteraction.set(name, { destroy });
|
|
333
|
+
}
|
|
334
|
+
function initializeView(options, context) {
|
|
335
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
const { library } = context;
|
|
337
|
+
const flattenOptions = yield transformMarks(options, context);
|
|
338
|
+
const mergedOptions = bubbleOptions(flattenOptions);
|
|
339
|
+
// @todo Remove this.
|
|
340
|
+
// !!! NOTE: Mute original view options.
|
|
341
|
+
// Update interaction and coordinate for this view.
|
|
342
|
+
options.interaction = mergedOptions.interaction;
|
|
343
|
+
options.coordinate = mergedOptions.coordinate;
|
|
344
|
+
// @ts-ignore
|
|
345
|
+
options.marks = [...mergedOptions.marks, ...mergedOptions.components];
|
|
346
|
+
const transformedOptions = (0, coordinate_1.coordinate2Transform)(mergedOptions, library);
|
|
347
|
+
const state = yield initializeMarks(transformedOptions, context);
|
|
348
|
+
return initializeState(state, transformedOptions, library);
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function bubbleOptions(options) {
|
|
352
|
+
const { coordinate: viewCoordinate = {}, interaction: viewInteraction = {}, style: viewStyle = {}, marks } = options, rest = __rest(options, ["coordinate", "interaction", "style", "marks"]);
|
|
353
|
+
const markCoordinates = marks.map((d) => d.coordinate || {});
|
|
354
|
+
const markInteractions = marks.map((d) => d.interaction || {});
|
|
355
|
+
const markViewStyles = marks.map((d) => d.viewStyle || {});
|
|
356
|
+
const newCoordinate = [...markCoordinates, viewCoordinate].reduceRight((prev, cur) => (0, util_1.deepMix)(prev, cur), {});
|
|
357
|
+
const newInteraction = [viewInteraction, ...markInteractions].reduce((prev, cur) => (0, util_1.deepMix)(prev, cur), {});
|
|
358
|
+
const newStyle = [...markViewStyles, viewStyle].reduce((prev, cur) => (0, util_1.deepMix)(prev, cur), {});
|
|
359
|
+
return Object.assign(Object.assign({}, rest), { marks, coordinate: newCoordinate, interaction: newInteraction, style: newStyle });
|
|
360
|
+
}
|
|
361
|
+
function transformMarks(options, context) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
+
const { library } = context;
|
|
364
|
+
const [useMark, createMark] = (0, library_1.useLibrary)('mark', library);
|
|
365
|
+
const staticMarks = new Set(Object.keys(library)
|
|
366
|
+
.map((d) => { var _a; return (_a = /component\.(.*)/.exec(d)) === null || _a === void 0 ? void 0 : _a[1]; })
|
|
367
|
+
.filter(helper_1.defined));
|
|
368
|
+
const { marks } = options;
|
|
369
|
+
const flattenMarks = [];
|
|
370
|
+
const components = [];
|
|
371
|
+
const discovered = [...marks];
|
|
372
|
+
const { width, height } = (0, layout_1.computeRoughPlotSize)(options);
|
|
373
|
+
const markOptions = { options, width, height };
|
|
374
|
+
// Pre order traversal.
|
|
375
|
+
while (discovered.length) {
|
|
376
|
+
const [node] = discovered.splice(0, 1);
|
|
377
|
+
// Apply data transform to get data.
|
|
378
|
+
const mark = (yield applyTransform(node, context));
|
|
379
|
+
const { type = (0, helper_1.error)('G2Mark type is required.'), key } = mark;
|
|
380
|
+
// For components.
|
|
381
|
+
if (staticMarks.has(type))
|
|
382
|
+
components.push(mark);
|
|
383
|
+
else {
|
|
384
|
+
const { props = {} } = createMark(type);
|
|
385
|
+
const { composite = true } = props;
|
|
386
|
+
if (!composite)
|
|
387
|
+
flattenMarks.push(mark);
|
|
388
|
+
else {
|
|
389
|
+
// Unwrap data from { value: data } to data,
|
|
390
|
+
// then the composite mark can process the normalized data.
|
|
391
|
+
const { data } = mark;
|
|
392
|
+
const newMark = Object.assign(Object.assign({}, mark), { data: data ? (Array.isArray(data) ? data : data.value) : data });
|
|
393
|
+
// Convert composite mark to marks.
|
|
394
|
+
const marks = yield useMark(newMark, markOptions);
|
|
395
|
+
const M = Array.isArray(marks) ? marks : [marks];
|
|
396
|
+
discovered.unshift(...M.map((d, i) => (Object.assign(Object.assign({}, d), { key: `${key}-${i}` }))));
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return Object.assign(Object.assign({}, options), { marks: flattenMarks, components });
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
function initializeMarks(options, context) {
|
|
404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
+
const { library } = context;
|
|
406
|
+
const [useTheme] = (0, library_1.useLibrary)('theme', library);
|
|
407
|
+
const [, createMark] = (0, library_1.useLibrary)('mark', library);
|
|
408
|
+
const { theme: partialTheme, marks: partialMarks, coordinates = [], } = options;
|
|
409
|
+
const theme = useTheme(inferTheme(partialTheme));
|
|
410
|
+
const markState = new Map();
|
|
411
|
+
// Initialize channels for marks.
|
|
412
|
+
for (const markOptions of partialMarks) {
|
|
413
|
+
const { type } = markOptions;
|
|
414
|
+
const { props = {} } = createMark(type);
|
|
415
|
+
const markAndState = yield (0, mark_1.initializeMark)(markOptions, props, context);
|
|
416
|
+
if (markAndState) {
|
|
417
|
+
const [initializedMark, state] = markAndState;
|
|
418
|
+
markState.set(initializedMark, state);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
// Group channels by scale key, each group has scale.
|
|
422
|
+
const scaleChannels = (0, d3_array_1.group)(Array.from(markState.values()).flatMap((d) => d.channels), ({ scaleKey }) => scaleKey);
|
|
423
|
+
// Infer scale for each channel groups.
|
|
424
|
+
for (const channels of scaleChannels.values()) {
|
|
425
|
+
// Merge scale options for these channels.
|
|
426
|
+
const scaleOptions = channels.reduce((total, { scale }) => (0, util_1.deepMix)(total, scale), {});
|
|
427
|
+
const { scaleKey } = channels[0];
|
|
428
|
+
// Use the fields of the first channel as the title.
|
|
429
|
+
const { values: FV } = channels[0];
|
|
430
|
+
const fields = Array.from(new Set(FV.map((d) => d.field).filter(helper_1.defined)));
|
|
431
|
+
const options = (0, util_1.deepMix)({
|
|
432
|
+
guide: { title: fields.length === 0 ? undefined : fields },
|
|
433
|
+
field: fields[0],
|
|
434
|
+
}, scaleOptions);
|
|
435
|
+
// Use the name of the first channel as the scale name.
|
|
436
|
+
const { name } = channels[0];
|
|
437
|
+
const values = channels.flatMap(({ values }) => values.map((d) => d.value));
|
|
438
|
+
const scale = Object.assign(Object.assign({}, (0, scale_1.inferScale)(name, values, options, coordinates, theme, library)), { uid: Symbol('scale'), key: scaleKey });
|
|
439
|
+
channels.forEach((channel) => (channel.scale = scale));
|
|
440
|
+
}
|
|
441
|
+
return markState;
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function useThemeInteraction(view, type, option, useInteraction) {
|
|
445
|
+
const theme = view.theme;
|
|
446
|
+
const defaults = typeof type === 'string' ? theme[type] || {} : {};
|
|
447
|
+
const interaction = useInteraction((0, util_1.deepMix)(defaults, Object.assign({ type }, option)));
|
|
448
|
+
return interaction;
|
|
449
|
+
}
|
|
450
|
+
function initializeState(markState, options, library) {
|
|
451
|
+
var _a;
|
|
452
|
+
const [useMark] = (0, library_1.useLibrary)('mark', library);
|
|
453
|
+
const [useTheme] = (0, library_1.useLibrary)('theme', library);
|
|
454
|
+
const [useLabelTransform] = (0, library_1.useLibrary)('labelTransform', library);
|
|
455
|
+
const { key, frame = false, theme: partialTheme, clip, style = {}, labelTransform = [], } = options;
|
|
456
|
+
const theme = useTheme(inferTheme(partialTheme));
|
|
457
|
+
// Infer components and compute layout.
|
|
458
|
+
const states = Array.from(markState.values());
|
|
459
|
+
const scales = (0, scale_1.collectScales)(states, options);
|
|
460
|
+
const components = (0, component_1.normalizeComponents)((0, component_1.inferComponent)(inferComponentScales(Array.from(scales), states, markState), options, library));
|
|
461
|
+
const layout = (0, layout_1.computeLayout)(components, options, theme, library);
|
|
462
|
+
const coordinate = (0, coordinate_1.createCoordinate)(layout, options, library);
|
|
463
|
+
const framedStyle = frame
|
|
464
|
+
? (0, util_1.deepMix)({ mainLineWidth: 1, mainStroke: '#000' }, style)
|
|
465
|
+
: style;
|
|
466
|
+
// Place components and mutate their bbox.
|
|
467
|
+
(0, layout_1.placeComponents)((0, component_1.groupComponents)(components), coordinate, layout);
|
|
468
|
+
// AxisZ need a copy of axisX and axisY to show grids in X-Z & Y-Z planes.
|
|
469
|
+
(0, layout_1.processAxisZ)(components);
|
|
470
|
+
// Index scale instance by uid.
|
|
471
|
+
const uidScale = new Map(Array.from(markState.values()).flatMap((state) => {
|
|
472
|
+
const { channels } = state;
|
|
473
|
+
return channels.map(({ scale }) => [
|
|
474
|
+
scale.uid,
|
|
475
|
+
(0, scale_1.useRelationScale)(scale, library),
|
|
476
|
+
]);
|
|
477
|
+
}));
|
|
478
|
+
(0, scale_1.groupTransform)(markState, uidScale);
|
|
479
|
+
// Scale from marks and components.
|
|
480
|
+
const scaleInstance = {};
|
|
481
|
+
// Initialize scale from components.
|
|
482
|
+
for (const component of components) {
|
|
483
|
+
const { scales: scaleDescriptors = [] } = component;
|
|
484
|
+
const scales = [];
|
|
485
|
+
for (const descriptor of scaleDescriptors) {
|
|
486
|
+
const { name, uid } = descriptor;
|
|
487
|
+
const scale = (_a = uidScale.get(uid)) !== null && _a !== void 0 ? _a : (0, scale_1.useRelationScale)(descriptor, library);
|
|
488
|
+
scales.push(scale);
|
|
489
|
+
// Delivery the scale of axisX to the AxisY,
|
|
490
|
+
// in order to calculate the angle of axisY component when rendering radar chart.
|
|
491
|
+
if (name === 'y') {
|
|
492
|
+
scale.update(Object.assign(Object.assign({}, scale.getOptions()), { xScale: scaleInstance.x }));
|
|
493
|
+
}
|
|
494
|
+
(0, scale_1.assignScale)(scaleInstance, { [name]: scale });
|
|
495
|
+
}
|
|
496
|
+
component.scaleInstances = scales;
|
|
497
|
+
}
|
|
498
|
+
// Calc data to be rendered for each mark.
|
|
499
|
+
// @todo More readable APIs for Container which stays
|
|
500
|
+
// the same style with JS standard and lodash APIs.
|
|
501
|
+
// @todo More proper way to index scale for different marks.
|
|
502
|
+
const children = [];
|
|
503
|
+
for (const [mark, state] of markState.entries()) {
|
|
504
|
+
const {
|
|
505
|
+
// scale,
|
|
506
|
+
// Callback to create children options based on this mark.
|
|
507
|
+
children: createChildren,
|
|
508
|
+
// The total count of data (both show and hide)for this facet.
|
|
509
|
+
// This is for unit visualization to sync data domain.
|
|
510
|
+
dataDomain, modifier, key: markKey, } = mark;
|
|
511
|
+
const { index, channels, tooltip } = state;
|
|
512
|
+
const scale = Object.fromEntries(channels.map(({ name, scale }) => [name, scale]));
|
|
513
|
+
// Transform abstract value to visual value by scales.
|
|
514
|
+
const markScaleInstance = (0, array_1.mapObject)(scale, ({ uid }) => uidScale.get(uid));
|
|
515
|
+
(0, scale_1.assignScale)(scaleInstance, markScaleInstance);
|
|
516
|
+
const value = (0, scale_1.applyScale)(channels, markScaleInstance);
|
|
517
|
+
// Calc points and transformation for each data,
|
|
518
|
+
// and then transform visual value to visual data.
|
|
519
|
+
const calcPoints = useMark(mark);
|
|
520
|
+
const [I, P, S] = filterValid(calcPoints(index, markScaleInstance, value, coordinate));
|
|
521
|
+
const count = dataDomain || I.length;
|
|
522
|
+
const T = modifier ? modifier(P, count, layout) : [];
|
|
523
|
+
const titleOf = (i) => { var _a, _b; return (_b = (_a = tooltip.title) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.value; };
|
|
524
|
+
const itemsOf = (i) => tooltip.items.map((V) => V[i]);
|
|
525
|
+
const visualData = I.map((d, i) => {
|
|
526
|
+
const datum = Object.assign({ points: P[i], transform: T[i], index: d, markKey, viewKey: key }, (tooltip && {
|
|
527
|
+
title: titleOf(d),
|
|
528
|
+
items: itemsOf(d),
|
|
529
|
+
}));
|
|
530
|
+
for (const [k, V] of Object.entries(value)) {
|
|
531
|
+
datum[k] = V[d];
|
|
532
|
+
if (S)
|
|
533
|
+
datum[`series${(0, util_1.upperFirst)(k)}`] = S[i].map((i) => V[i]);
|
|
534
|
+
}
|
|
535
|
+
if (S)
|
|
536
|
+
datum['seriesIndex'] = S[i];
|
|
537
|
+
if (S && tooltip) {
|
|
538
|
+
datum['seriesItems'] = S[i].map((si) => itemsOf(si));
|
|
539
|
+
datum['seriesTitle'] = S[i].map((si) => titleOf(si));
|
|
540
|
+
}
|
|
541
|
+
return datum;
|
|
542
|
+
});
|
|
543
|
+
state.data = visualData;
|
|
544
|
+
state.index = I;
|
|
545
|
+
// Create children options by children callback,
|
|
546
|
+
// and then propagate data to each child.
|
|
547
|
+
const markChildren = createChildren === null || createChildren === void 0 ? void 0 : createChildren(visualData, markScaleInstance, layout);
|
|
548
|
+
children.push(...(markChildren || []));
|
|
549
|
+
}
|
|
550
|
+
const view = {
|
|
551
|
+
layout,
|
|
552
|
+
theme,
|
|
553
|
+
coordinate,
|
|
554
|
+
markState,
|
|
555
|
+
key,
|
|
556
|
+
clip,
|
|
557
|
+
scale: scaleInstance,
|
|
558
|
+
style: framedStyle,
|
|
559
|
+
components,
|
|
560
|
+
labelTransform: (0, helper_1.compose)(labelTransform.map(useLabelTransform)),
|
|
561
|
+
};
|
|
562
|
+
return [view, children];
|
|
563
|
+
}
|
|
564
|
+
function plotView(view, selection, transitions, context) {
|
|
565
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
566
|
+
const { library } = context;
|
|
567
|
+
const { components, theme, layout, markState, coordinate, key, style, clip, scale, } = view;
|
|
568
|
+
// Render background for the different areas.
|
|
569
|
+
const { x, y, width, height } = layout, rest = __rest(layout, ["x", "y", "width", "height"]);
|
|
570
|
+
const areaKeys = ['view', 'plot', 'main', 'content'];
|
|
571
|
+
const I = areaKeys.map((_, i) => i);
|
|
572
|
+
const sizeKeys = ['a', 'margin', 'padding', 'inset'];
|
|
573
|
+
const areaStyles = areaKeys.map((d) => (0, helper_1.maybeSubObject)(Object.assign({}, theme.view, style), d));
|
|
574
|
+
const areaSizes = sizeKeys.map((d) => (0, helper_1.subObject)(rest, d));
|
|
575
|
+
const styleArea = (selection) => selection
|
|
576
|
+
.style('x', (i) => areaLayouts[i].x)
|
|
577
|
+
.style('y', (i) => areaLayouts[i].y)
|
|
578
|
+
.style('width', (i) => areaLayouts[i].width)
|
|
579
|
+
.style('height', (i) => areaLayouts[i].height)
|
|
580
|
+
.each(function (i, d, element) {
|
|
581
|
+
applyStyle((0, selection_1.select)(element), areaStyles[i]);
|
|
582
|
+
});
|
|
583
|
+
let px = 0;
|
|
584
|
+
let py = 0;
|
|
585
|
+
let pw = width;
|
|
586
|
+
let ph = height;
|
|
587
|
+
const areaLayouts = I.map((i) => {
|
|
588
|
+
const size = areaSizes[i];
|
|
589
|
+
const { left = 0, top = 0, bottom = 0, right = 0 } = size;
|
|
590
|
+
px += left;
|
|
591
|
+
py += top;
|
|
592
|
+
pw -= left + right;
|
|
593
|
+
ph -= top + bottom;
|
|
594
|
+
return {
|
|
595
|
+
x: px,
|
|
596
|
+
y: py,
|
|
597
|
+
width: pw,
|
|
598
|
+
height: ph,
|
|
599
|
+
};
|
|
600
|
+
});
|
|
601
|
+
selection
|
|
602
|
+
.selectAll(className(constant_1.AREA_CLASS_NAME))
|
|
603
|
+
.data(
|
|
604
|
+
// Only render area with defined style.
|
|
605
|
+
I.filter((i) => (0, helper_1.defined)(areaStyles[i])), (i) => areaKeys[i])
|
|
606
|
+
.join((enter) => enter
|
|
607
|
+
.append('rect')
|
|
608
|
+
.attr('className', constant_1.AREA_CLASS_NAME)
|
|
609
|
+
.style('zIndex', -2)
|
|
610
|
+
.call(styleArea), (update) => update.call(styleArea), (exit) => exit.remove());
|
|
611
|
+
const animationExtent = computeAnimationExtent(markState);
|
|
612
|
+
const componentAnimateOptions = animationExtent
|
|
613
|
+
? { duration: animationExtent[1] }
|
|
614
|
+
: false;
|
|
615
|
+
// Render components.
|
|
616
|
+
// @todo renderComponent return ctor and options.
|
|
617
|
+
// Key for each type of component.
|
|
618
|
+
// Index them grouped by position.
|
|
619
|
+
for (const [, C] of (0, d3_array_1.groups)(components, (d) => `${d.type}-${d.position}`)) {
|
|
620
|
+
C.forEach((d, i) => (d.index = i));
|
|
621
|
+
}
|
|
622
|
+
const componentsTransitions = selection
|
|
623
|
+
.selectAll(className(constant_1.COMPONENT_CLASS_NAME))
|
|
624
|
+
.data(components, (d) => `${d.type}-${d.position}-${d.index}`)
|
|
625
|
+
.join((enter) => enter
|
|
626
|
+
.append('g')
|
|
627
|
+
.style('zIndex', ({ zIndex }) => zIndex || -1)
|
|
628
|
+
.attr('className', constant_1.COMPONENT_CLASS_NAME)
|
|
629
|
+
.append((options) => (0, component_1.renderComponent)((0, util_1.deepMix)({ animate: componentAnimateOptions, scale }, options), coordinate, theme, library, markState)), (update) => update.transition(function (options, i, element) {
|
|
630
|
+
const { preserve = false } = options;
|
|
631
|
+
if (preserve)
|
|
632
|
+
return;
|
|
633
|
+
const newComponent = (0, component_1.renderComponent)((0, util_1.deepMix)({ animate: componentAnimateOptions, scale }, options), coordinate, theme, library, markState);
|
|
634
|
+
const { attributes } = newComponent;
|
|
635
|
+
const [node] = element.childNodes;
|
|
636
|
+
return node.update(attributes, false);
|
|
637
|
+
}))
|
|
638
|
+
.transitions();
|
|
639
|
+
transitions.push(...componentsTransitions.flat().filter(helper_1.defined));
|
|
640
|
+
// Main layer is for showing the main visual representation such as marks. There
|
|
641
|
+
// may be multiple main layers for a view, each main layer correspond to one of marks.
|
|
642
|
+
// @todo Test DOM structure.
|
|
643
|
+
const T = selection
|
|
644
|
+
.selectAll(className(constant_1.PLOT_CLASS_NAME))
|
|
645
|
+
.data([layout], () => key)
|
|
646
|
+
.join((enter) => enter
|
|
647
|
+
// Make this layer interactive, such as click and mousemove events.
|
|
648
|
+
.append('rect')
|
|
649
|
+
.style('zIndex', 0)
|
|
650
|
+
.style('fill', 'transparent')
|
|
651
|
+
.attr('className', constant_1.PLOT_CLASS_NAME)
|
|
652
|
+
.call(updateBBox)
|
|
653
|
+
.call(updateLayers, Array.from(markState.keys()))
|
|
654
|
+
.call(applyClip, clip), (update) => update
|
|
655
|
+
.call(updateLayers, Array.from(markState.keys()))
|
|
656
|
+
.call((selection) => {
|
|
657
|
+
return animationExtent
|
|
658
|
+
? animateBBox(selection, animationExtent)
|
|
659
|
+
: updateBBox(selection);
|
|
660
|
+
})
|
|
661
|
+
.call(applyClip, clip))
|
|
662
|
+
.transitions();
|
|
663
|
+
transitions.push(...T.flat());
|
|
664
|
+
// Render marks with corresponding data.
|
|
665
|
+
for (const [mark, state] of markState.entries()) {
|
|
666
|
+
const { data } = state;
|
|
667
|
+
const { key, class: cls, type } = mark;
|
|
668
|
+
const viewNode = selection.select(`#${key}`);
|
|
669
|
+
const shapeFunction = createMarkShapeFunction(mark, state, view, context);
|
|
670
|
+
const enterFunction = createEnterFunction(mark, state, view, library);
|
|
671
|
+
const updateFunction = createUpdateFunction(mark, state, view, library);
|
|
672
|
+
const exitFunction = createExitFunction(mark, state, view, library);
|
|
673
|
+
const facetElements = selectFacetElements(selection, viewNode, cls, 'element');
|
|
674
|
+
const T = viewNode
|
|
675
|
+
.selectAll(className(constant_1.ELEMENT_CLASS_NAME))
|
|
676
|
+
.selectFacetAll(facetElements)
|
|
677
|
+
.data(data, (d) => d.key, (d) => d.groupKey)
|
|
678
|
+
.join((enter) => enter
|
|
679
|
+
.append(shapeFunction)
|
|
680
|
+
// Note!!! Only one className can be set.
|
|
681
|
+
// Using attribute as alternative for other classNames.
|
|
682
|
+
.attr('className', constant_1.ELEMENT_CLASS_NAME)
|
|
683
|
+
.attr('markType', type)
|
|
684
|
+
.transition(function (data, i, element) {
|
|
685
|
+
return enterFunction(data, [element]);
|
|
686
|
+
}), (update) => update.call((selection) => {
|
|
687
|
+
const parent = selection.parent();
|
|
688
|
+
const origin = (0, helper_1.useMemo)((node) => {
|
|
689
|
+
const [x, y] = node.getBounds().min;
|
|
690
|
+
return [x, y];
|
|
691
|
+
});
|
|
692
|
+
selection
|
|
693
|
+
.transition(function (data, index, element) {
|
|
694
|
+
maybeFacetElement(element, parent, origin);
|
|
695
|
+
const node = shapeFunction(data, index);
|
|
696
|
+
const animation = updateFunction(data, [element], [node]);
|
|
697
|
+
if (animation === null || animation === void 0 ? void 0 : animation.length)
|
|
698
|
+
return animation;
|
|
699
|
+
if (element.nodeName === node.nodeName &&
|
|
700
|
+
node.nodeName !== 'g') {
|
|
701
|
+
(0, helper_1.copyAttributes)(element, node);
|
|
702
|
+
}
|
|
703
|
+
else {
|
|
704
|
+
element.parentNode.replaceChild(node, element);
|
|
705
|
+
node.className = constant_1.ELEMENT_CLASS_NAME;
|
|
706
|
+
// @ts-ignore
|
|
707
|
+
node.markType = type;
|
|
708
|
+
// @ts-ignore
|
|
709
|
+
node.__data__ = element.__data__;
|
|
710
|
+
}
|
|
711
|
+
return animation;
|
|
712
|
+
})
|
|
713
|
+
.attr('markType', type)
|
|
714
|
+
.attr('className', constant_1.ELEMENT_CLASS_NAME);
|
|
715
|
+
}), (exit) => {
|
|
716
|
+
return exit
|
|
717
|
+
.each(function (d, i, element) {
|
|
718
|
+
element.__removed__ = true;
|
|
719
|
+
})
|
|
720
|
+
.transition(function (data, i, element) {
|
|
721
|
+
return exitFunction(data, [element]);
|
|
722
|
+
})
|
|
723
|
+
.remove();
|
|
724
|
+
}, (merge) => merge
|
|
725
|
+
// Append elements to be merged.
|
|
726
|
+
.append(shapeFunction)
|
|
727
|
+
.attr('className', constant_1.ELEMENT_CLASS_NAME)
|
|
728
|
+
.attr('markType', type)
|
|
729
|
+
.transition(function (data, i, element) {
|
|
730
|
+
// Remove merged elements after animation finishing.
|
|
731
|
+
const { __fromElements__: fromElements } = element;
|
|
732
|
+
const transition = updateFunction(data, fromElements, [element]);
|
|
733
|
+
const exit = new selection_1.Selection(fromElements, null, element.parentNode);
|
|
734
|
+
exit.transition(transition).remove();
|
|
735
|
+
return transition;
|
|
736
|
+
}), (split) => split
|
|
737
|
+
.transition(function (data, i, element) {
|
|
738
|
+
// Append splitted shapes.
|
|
739
|
+
const enter = new selection_1.Selection([], element.__toData__, element.parentNode);
|
|
740
|
+
const toElements = enter
|
|
741
|
+
.append(shapeFunction)
|
|
742
|
+
.attr('className', constant_1.ELEMENT_CLASS_NAME)
|
|
743
|
+
.attr('markType', type)
|
|
744
|
+
.nodes();
|
|
745
|
+
return updateFunction(data, [element], toElements);
|
|
746
|
+
})
|
|
747
|
+
// Remove elements to be splitted after animation finishing.
|
|
748
|
+
.remove())
|
|
749
|
+
.transitions();
|
|
750
|
+
transitions.push(...T.flat());
|
|
751
|
+
}
|
|
752
|
+
// Plot label for this view.
|
|
753
|
+
plotLabel(view, selection, transitions, library, context);
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Auto hide labels be specify label layout.
|
|
758
|
+
*/
|
|
759
|
+
function plotLabel(view, selection, transitions, library, context) {
|
|
760
|
+
const [useLabelTransform] = (0, library_1.useLibrary)('labelTransform', library);
|
|
761
|
+
const { markState, labelTransform } = view;
|
|
762
|
+
const labelLayer = selection.select(className(constant_1.LABEL_LAYER_CLASS_NAME)).node();
|
|
763
|
+
// A Map index shapeFunction by label.
|
|
764
|
+
const labelShapeFunction = new Map();
|
|
765
|
+
// A Map index options by label.
|
|
766
|
+
const labelDescriptor = new Map();
|
|
767
|
+
// Get all labels for this view.
|
|
768
|
+
const labels = Array.from(markState.entries()).flatMap(([mark, state]) => {
|
|
769
|
+
const { labels: labelOptions = [], key } = mark;
|
|
770
|
+
const shapeFunction = createLabelShapeFunction(mark, state, view, library, context);
|
|
771
|
+
const elements = selection
|
|
772
|
+
.select(`#${key}`)
|
|
773
|
+
.selectAll(className(constant_1.ELEMENT_CLASS_NAME))
|
|
774
|
+
.nodes()
|
|
775
|
+
// Only select the valid element.
|
|
776
|
+
.filter((n) => !n.__removed__);
|
|
777
|
+
return labelOptions.flatMap((labelOption, i) => {
|
|
778
|
+
const { transform = [] } = labelOption, options = __rest(labelOption, ["transform"]);
|
|
779
|
+
return elements.flatMap((e) => {
|
|
780
|
+
const L = getLabels(options, i, e);
|
|
781
|
+
L.forEach((l) => {
|
|
782
|
+
labelShapeFunction.set(l, (data) => shapeFunction(Object.assign(Object.assign({}, data), { element: e })));
|
|
783
|
+
labelDescriptor.set(l, labelOption);
|
|
784
|
+
});
|
|
785
|
+
return L;
|
|
786
|
+
});
|
|
787
|
+
});
|
|
788
|
+
});
|
|
789
|
+
// Render all labels.
|
|
790
|
+
const labelShapes = (0, selection_1.select)(labelLayer)
|
|
791
|
+
.selectAll(className(constant_1.LABEL_CLASS_NAME))
|
|
792
|
+
.data(labels, (d) => d.key)
|
|
793
|
+
.join((enter) => enter
|
|
794
|
+
.append((d) => labelShapeFunction.get(d)(d))
|
|
795
|
+
.attr('className', constant_1.LABEL_CLASS_NAME), (update) => update.each(function (d, i, element) {
|
|
796
|
+
// @todo Handle Label with different type.
|
|
797
|
+
const shapeFunction = labelShapeFunction.get(d);
|
|
798
|
+
const node = shapeFunction(d);
|
|
799
|
+
(0, helper_1.copyAttributes)(element, node);
|
|
800
|
+
}), (exit) => exit.remove())
|
|
801
|
+
.nodes();
|
|
802
|
+
// Apply group-level transforms.
|
|
803
|
+
const labelGroups = (0, d3_array_1.group)(labelShapes, (d) => labelDescriptor.get(d.__data__));
|
|
804
|
+
const { coordinate, layout } = view;
|
|
805
|
+
const labelTransformContext = {
|
|
806
|
+
canvas: context.canvas,
|
|
807
|
+
coordinate,
|
|
808
|
+
layout,
|
|
809
|
+
};
|
|
810
|
+
for (const [label, shapes] of labelGroups) {
|
|
811
|
+
const { transform = [] } = label;
|
|
812
|
+
const transformFunction = (0, helper_1.compose)(transform.map(useLabelTransform));
|
|
813
|
+
transformFunction(shapes, labelTransformContext);
|
|
814
|
+
}
|
|
815
|
+
// Apply view-level transform.
|
|
816
|
+
if (labelTransform) {
|
|
817
|
+
labelTransform(labelShapes, labelTransformContext);
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
function getLabels(label, labelIndex, element) {
|
|
821
|
+
const { seriesIndex: SI, seriesKey, points, key, index } = element.__data__;
|
|
822
|
+
const bounds = getLocalBounds(element);
|
|
823
|
+
if (!SI) {
|
|
824
|
+
return [
|
|
825
|
+
Object.assign(Object.assign({}, label), { key: `${key}-${labelIndex}`, bounds,
|
|
826
|
+
index,
|
|
827
|
+
points, dependentElement: element }),
|
|
828
|
+
];
|
|
829
|
+
}
|
|
830
|
+
const selector = normalizeLabelSelector(label);
|
|
831
|
+
const F = SI.map((index, i) => (Object.assign(Object.assign({}, label), { key: `${seriesKey[i]}-${labelIndex}`, bounds: [points[i]], index,
|
|
832
|
+
points, dependentElement: element })));
|
|
833
|
+
return selector ? selector(F) : F;
|
|
834
|
+
}
|
|
835
|
+
function filterValid([I, P, S]) {
|
|
836
|
+
if (S)
|
|
837
|
+
return [I, P, S];
|
|
838
|
+
const definedIndex = [];
|
|
839
|
+
const definedPoints = [];
|
|
840
|
+
for (let i = 0; i < I.length; i++) {
|
|
841
|
+
const d = I[i];
|
|
842
|
+
const p = P[i];
|
|
843
|
+
if (p.every(([x, y]) => (0, helper_1.defined)(x) && (0, helper_1.defined)(y))) {
|
|
844
|
+
definedIndex.push(d);
|
|
845
|
+
definedPoints.push(p);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
return [definedIndex, definedPoints];
|
|
849
|
+
}
|
|
850
|
+
function normalizeLabelSelector(label) {
|
|
851
|
+
const { selector } = label;
|
|
852
|
+
if (!selector)
|
|
853
|
+
return null;
|
|
854
|
+
if (typeof selector === 'function')
|
|
855
|
+
return selector;
|
|
856
|
+
if (selector === 'first')
|
|
857
|
+
return (I) => [I[0]];
|
|
858
|
+
if (selector === 'last')
|
|
859
|
+
return (I) => [I[I.length - 1]];
|
|
860
|
+
throw new Error(`Unknown selector: ${selector}`);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Avoid getting error bounds caused by element animations.
|
|
864
|
+
* @todo Remove this temporary handle method, if runtime supports
|
|
865
|
+
* correct process: drawElement, do label layout and then do
|
|
866
|
+
* transitions together.
|
|
867
|
+
*/
|
|
868
|
+
function getLocalBounds(element) {
|
|
869
|
+
const cloneElement = element.cloneNode();
|
|
870
|
+
const animations = element.getAnimations();
|
|
871
|
+
cloneElement.style.visibility = 'hidden';
|
|
872
|
+
animations.forEach((animation) => {
|
|
873
|
+
const keyframes = animation.effect.getKeyframes();
|
|
874
|
+
cloneElement.attr(keyframes[keyframes.length - 1]);
|
|
875
|
+
});
|
|
876
|
+
element.parentNode.appendChild(cloneElement);
|
|
877
|
+
const bounds = cloneElement.getLocalBounds();
|
|
878
|
+
cloneElement.destroy();
|
|
879
|
+
const { min, max } = bounds;
|
|
880
|
+
return [min, max];
|
|
881
|
+
}
|
|
882
|
+
function createLabelShapeFunction(mark, state, view, library, context) {
|
|
883
|
+
const [useShape] = (0, library_1.useLibrary)('shape', library);
|
|
884
|
+
const { data: abstractData, encode } = mark;
|
|
885
|
+
const { data: visualData, defaultLabelShape } = state;
|
|
886
|
+
const point2d = visualData.map((d) => d.points);
|
|
887
|
+
const channel = (0, array_1.mapObject)(encode, (d) => d.value);
|
|
888
|
+
// Assemble Context.
|
|
889
|
+
const { theme, coordinate } = view;
|
|
890
|
+
const shapeContext = Object.assign(Object.assign({}, context), { document: (0, library_1.documentOf)(context), theme,
|
|
891
|
+
coordinate });
|
|
892
|
+
return (options) => {
|
|
893
|
+
// Computed values from data and styles.
|
|
894
|
+
const { index, points } = options;
|
|
895
|
+
const datum = abstractData[index];
|
|
896
|
+
const { formatter = (d) => `${d}`, transform, style: abstractStyle, render, selector, element } = options, abstractOptions = __rest(options, ["formatter", "transform", "style", "render", "selector", "element"]);
|
|
897
|
+
const visualOptions = (0, array_1.mapObject)(Object.assign(Object.assign({}, abstractOptions), abstractStyle), (d) => valueOf(d, datum, index, abstractData, {
|
|
898
|
+
channel,
|
|
899
|
+
element,
|
|
900
|
+
}));
|
|
901
|
+
const { shape = defaultLabelShape, text } = visualOptions, style = __rest(visualOptions, ["shape", "text"]);
|
|
902
|
+
const f = typeof formatter === 'string' ? (0, d3_format_1.format)(formatter) : formatter;
|
|
903
|
+
const value = Object.assign(Object.assign({}, style), { text: f(text, datum, index, abstractData), datum });
|
|
904
|
+
// Params for create shape.
|
|
905
|
+
const shapeOptions = Object.assign({ type: `label.${shape}`, render }, style);
|
|
906
|
+
const shapeFunction = useShape(shapeOptions, shapeContext);
|
|
907
|
+
const defaults = getDefaultsStyle(theme, 'label', shape, 'label');
|
|
908
|
+
return shapeFunction(points, value, defaults, point2d);
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
function valueOf(value, datum, i, data, options) {
|
|
912
|
+
if (typeof value === 'function')
|
|
913
|
+
return value(datum, i, data, options);
|
|
914
|
+
if (typeof value !== 'string')
|
|
915
|
+
return value;
|
|
916
|
+
if ((0, helper_1.isStrictObject)(datum) && datum[value] !== undefined)
|
|
917
|
+
return datum[value];
|
|
918
|
+
return value;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Compute max duration for this frame.
|
|
922
|
+
*/
|
|
923
|
+
function computeAnimationExtent(markState) {
|
|
924
|
+
let maxDuration = -Infinity;
|
|
925
|
+
let minDelay = Infinity;
|
|
926
|
+
for (const [mark, state] of markState) {
|
|
927
|
+
const { animate = {} } = mark;
|
|
928
|
+
const { data } = state;
|
|
929
|
+
const { enter = {}, update = {}, exit = {} } = animate;
|
|
930
|
+
const { type: defaultUpdateType, duration: defaultUpdateDuration = 300, delay: defaultUpdateDelay = 0, } = update;
|
|
931
|
+
const { type: defaultEnterType, duration: defaultEnterDuration = 300, delay: defaultEnterDelay = 0, } = enter;
|
|
932
|
+
const { type: defaultExitType, duration: defaultExitDuration = 300, delay: defaultExitDelay = 0, } = exit;
|
|
933
|
+
for (const d of data) {
|
|
934
|
+
const { updateType = defaultUpdateType, updateDuration = defaultUpdateDuration, updateDelay = defaultUpdateDelay, enterType = defaultEnterType, enterDuration = defaultEnterDuration, enterDelay = defaultEnterDelay, exitDuration = defaultExitDuration, exitDelay = defaultExitDelay, exitType = defaultExitType, } = d;
|
|
935
|
+
if (updateType === undefined || updateType) {
|
|
936
|
+
maxDuration = Math.max(maxDuration, updateDuration + updateDelay);
|
|
937
|
+
minDelay = Math.min(minDelay, updateDelay);
|
|
938
|
+
}
|
|
939
|
+
if (exitType === undefined || exitType) {
|
|
940
|
+
maxDuration = Math.max(maxDuration, exitDuration + exitDelay);
|
|
941
|
+
minDelay = Math.min(minDelay, exitDelay);
|
|
942
|
+
}
|
|
943
|
+
if (enterType === undefined || enterType) {
|
|
944
|
+
maxDuration = Math.max(maxDuration, enterDuration + enterDelay);
|
|
945
|
+
minDelay = Math.min(minDelay, enterDelay);
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if (maxDuration === -Infinity)
|
|
950
|
+
return null;
|
|
951
|
+
return [minDelay, maxDuration - minDelay];
|
|
952
|
+
}
|
|
953
|
+
function selectFacetElements(selection, current, facetClassName, elementClassName) {
|
|
954
|
+
const group = selection.node().parentElement;
|
|
955
|
+
return group
|
|
956
|
+
.findAll((node) => node.style.facet !== undefined &&
|
|
957
|
+
node.style.facet === facetClassName &&
|
|
958
|
+
node !== current.node())
|
|
959
|
+
.flatMap((node) => node.getElementsByClassName(elementClassName));
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Update the parent of element and apply transform to make it
|
|
963
|
+
* stay in original position.
|
|
964
|
+
*/
|
|
965
|
+
function maybeFacetElement(element, parent, originOf) {
|
|
966
|
+
if (!element.__facet__)
|
|
967
|
+
return;
|
|
968
|
+
// element -> g#main -> rect#plot
|
|
969
|
+
const prePlot = element.parentNode.parentNode;
|
|
970
|
+
// g#main -> rect#plot
|
|
971
|
+
const newPlot = parent.parentNode;
|
|
972
|
+
const [px, py] = originOf(prePlot);
|
|
973
|
+
const [x, y] = originOf(newPlot);
|
|
974
|
+
const translate = `translate(${px - x}, ${py - y})`;
|
|
975
|
+
(0, helper_1.appendTransform)(element, translate);
|
|
976
|
+
parent.append(element);
|
|
977
|
+
}
|
|
978
|
+
function createMarkShapeFunction(mark, state, view, context) {
|
|
979
|
+
const { library } = context;
|
|
980
|
+
const [useShape] = (0, library_1.useLibrary)('shape', library);
|
|
981
|
+
const { data: abstractData, encode } = mark;
|
|
982
|
+
const { defaultShape, data, shape: shapeLibrary } = state;
|
|
983
|
+
const channel = (0, array_1.mapObject)(encode, (d) => d.value);
|
|
984
|
+
const point2d = data.map((d) => d.points);
|
|
985
|
+
const { theme, coordinate } = view;
|
|
986
|
+
const { type: markType, style = {} } = mark;
|
|
987
|
+
const shapeContext = Object.assign(Object.assign({}, context), { document: (0, library_1.documentOf)(context), coordinate,
|
|
988
|
+
theme });
|
|
989
|
+
return (data) => {
|
|
990
|
+
const { shape: styleShape = defaultShape } = style;
|
|
991
|
+
const { shape = styleShape, points, seriesIndex, index: i } = data, v = __rest(data, ["shape", "points", "seriesIndex", "index"]);
|
|
992
|
+
const value = Object.assign(Object.assign({}, v), { index: i });
|
|
993
|
+
// Get data-driven style.
|
|
994
|
+
// If it is a series shape, such as area and line,
|
|
995
|
+
// provides the series of abstract data and indices
|
|
996
|
+
// for this shape, otherwise the single datum and
|
|
997
|
+
// index.
|
|
998
|
+
const abstractDatum = seriesIndex
|
|
999
|
+
? seriesIndex.map((i) => abstractData[i])
|
|
1000
|
+
: abstractData[i];
|
|
1001
|
+
const I = seriesIndex ? seriesIndex : i;
|
|
1002
|
+
const visualStyle = (0, array_1.mapObject)(style, (d) => valueOf(d, abstractDatum, I, abstractData, { channel }));
|
|
1003
|
+
// Try get shape from mark first, then from library.
|
|
1004
|
+
const shapeFunction = shapeLibrary[shape]
|
|
1005
|
+
? shapeLibrary[shape](visualStyle, shapeContext)
|
|
1006
|
+
: useShape(Object.assign(Object.assign({}, visualStyle), { type: shapeName(mark, shape) }), shapeContext);
|
|
1007
|
+
const defaults = getDefaultsStyle(theme, markType, shape, defaultShape);
|
|
1008
|
+
return shapeFunction(points, value, defaults, point2d);
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function getDefaultsStyle(theme, mark, shape, defaultShape) {
|
|
1012
|
+
if (typeof mark !== 'string')
|
|
1013
|
+
return;
|
|
1014
|
+
const { color } = theme;
|
|
1015
|
+
const markTheme = theme[mark] || {};
|
|
1016
|
+
const shapeTheme = markTheme[shape] || markTheme[defaultShape];
|
|
1017
|
+
return Object.assign({ color }, shapeTheme);
|
|
1018
|
+
}
|
|
1019
|
+
function createAnimationFunction(type, mark, state, view, library) {
|
|
1020
|
+
var _a, _b;
|
|
1021
|
+
const [, createShape] = (0, library_1.useLibrary)('shape', library);
|
|
1022
|
+
const [useAnimation] = (0, library_1.useLibrary)('animation', library);
|
|
1023
|
+
const { defaultShape, shape: shapeLibrary } = state;
|
|
1024
|
+
const { theme, coordinate } = view;
|
|
1025
|
+
const upperType = (0, util_1.upperFirst)(type);
|
|
1026
|
+
const key = `default${upperType}Animation`;
|
|
1027
|
+
// Get shape from mark first, then from library.
|
|
1028
|
+
const { [key]: defaultAnimation } = ((_a = shapeLibrary[defaultShape]) === null || _a === void 0 ? void 0 : _a.props) ||
|
|
1029
|
+
createShape(shapeName(mark, defaultShape)).props;
|
|
1030
|
+
const { [type]: defaultEffectTiming = {} } = theme;
|
|
1031
|
+
const animate = ((_b = mark.animate) === null || _b === void 0 ? void 0 : _b[type]) || {};
|
|
1032
|
+
const context = { coordinate };
|
|
1033
|
+
return (data, from, to) => {
|
|
1034
|
+
const { [`${type}Type`]: animation, [`${type}Delay`]: delay, [`${type}Duration`]: duration, [`${type}Easing`]: easing, } = data;
|
|
1035
|
+
const options = Object.assign({ type: animation || defaultAnimation }, animate);
|
|
1036
|
+
if (!options.type)
|
|
1037
|
+
return null;
|
|
1038
|
+
const animateFunction = useAnimation(options, context);
|
|
1039
|
+
const value = { delay, duration, easing };
|
|
1040
|
+
const A = animateFunction(from, to, (0, util_1.deepMix)(defaultEffectTiming, value));
|
|
1041
|
+
let an = [];
|
|
1042
|
+
if (!Array.isArray(A)) {
|
|
1043
|
+
an = [A];
|
|
1044
|
+
}
|
|
1045
|
+
else {
|
|
1046
|
+
an = A;
|
|
1047
|
+
}
|
|
1048
|
+
return an.filter(Boolean);
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
function createEnterFunction(mark, state, view, library) {
|
|
1052
|
+
return createAnimationFunction('enter', mark, state, view, library);
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* Animation will not cancel automatically, it should be canceled
|
|
1056
|
+
* manually. This is very important for performance.
|
|
1057
|
+
*/
|
|
1058
|
+
function cancel(animation) {
|
|
1059
|
+
animation.finished.then(() => {
|
|
1060
|
+
animation.cancel();
|
|
1061
|
+
});
|
|
1062
|
+
return animation;
|
|
1063
|
+
}
|
|
1064
|
+
function createUpdateFunction(mark, state, view, library) {
|
|
1065
|
+
return createAnimationFunction('update', mark, state, view, library);
|
|
1066
|
+
}
|
|
1067
|
+
function createExitFunction(mark, state, view, library) {
|
|
1068
|
+
return createAnimationFunction('exit', mark, state, view, library);
|
|
1069
|
+
}
|
|
1070
|
+
function inferTheme(theme = {}) {
|
|
1071
|
+
if (typeof theme === 'string')
|
|
1072
|
+
return { type: theme };
|
|
1073
|
+
const { type = 'light' } = theme, rest = __rest(theme, ["type"]);
|
|
1074
|
+
return Object.assign(Object.assign({}, rest), { type });
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* @todo Infer builtin tooltips.
|
|
1078
|
+
*/
|
|
1079
|
+
function inferInteraction(view) {
|
|
1080
|
+
const defaults = {
|
|
1081
|
+
event: true,
|
|
1082
|
+
tooltip: true,
|
|
1083
|
+
// @todo Inferred by slider self.
|
|
1084
|
+
sliderFilter: true,
|
|
1085
|
+
legendFilter: true,
|
|
1086
|
+
scrollbarFilter: true,
|
|
1087
|
+
};
|
|
1088
|
+
const { interaction = {} } = view;
|
|
1089
|
+
return Object.entries((0, util_1.deepMix)(defaults, interaction)).reverse();
|
|
1090
|
+
}
|
|
1091
|
+
function applyTransform(node, context) {
|
|
1092
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1093
|
+
const { data } = node, rest = __rest(node, ["data"]);
|
|
1094
|
+
if (data == undefined)
|
|
1095
|
+
return node;
|
|
1096
|
+
const [, { data: newData }] = yield (0, transform_1.applyDataTransform)([], { data }, context);
|
|
1097
|
+
return Object.assign({ data: newData }, rest);
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
function updateBBox(selection) {
|
|
1101
|
+
selection
|
|
1102
|
+
.style('transform', (d) => `translate(${d.paddingLeft + d.marginLeft}, ${d.paddingTop + d.marginTop})`)
|
|
1103
|
+
.style('width', (d) => d.innerWidth)
|
|
1104
|
+
.style('height', (d) => d.innerHeight);
|
|
1105
|
+
}
|
|
1106
|
+
function animateBBox(selection, extent) {
|
|
1107
|
+
const [delay, duration] = extent;
|
|
1108
|
+
selection.transition(function (data, i, element) {
|
|
1109
|
+
const { transform, width, height } = element.style;
|
|
1110
|
+
const { paddingLeft, paddingTop, innerWidth, innerHeight, marginLeft, marginTop, } = data;
|
|
1111
|
+
const keyframes = [
|
|
1112
|
+
{
|
|
1113
|
+
transform,
|
|
1114
|
+
width,
|
|
1115
|
+
height,
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
transform: `translate(${paddingLeft + marginLeft}, ${paddingTop + marginTop})`,
|
|
1119
|
+
width: innerWidth,
|
|
1120
|
+
height: innerHeight,
|
|
1121
|
+
},
|
|
1122
|
+
];
|
|
1123
|
+
return element.animate(keyframes, { delay, duration, fill: 'both' });
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
function shapeName(mark, name) {
|
|
1127
|
+
const { type } = mark;
|
|
1128
|
+
if (typeof name === 'string')
|
|
1129
|
+
return `${type}.${name}`;
|
|
1130
|
+
return name;
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Create and update layer for each mark.
|
|
1134
|
+
* All the layers created here are treated as main layers.
|
|
1135
|
+
*/
|
|
1136
|
+
function updateLayers(selection, marks) {
|
|
1137
|
+
const facet = (d) => (d.class !== undefined ? `${d.class}` : '');
|
|
1138
|
+
// Skip for empty selection, it can't append nodes.
|
|
1139
|
+
const nodes = selection.nodes();
|
|
1140
|
+
if (nodes.length === 0)
|
|
1141
|
+
return;
|
|
1142
|
+
selection
|
|
1143
|
+
.selectAll(className(constant_1.MAIN_LAYER_CLASS_NAME))
|
|
1144
|
+
.data(marks, (d) => d.key)
|
|
1145
|
+
.join((enter) => enter
|
|
1146
|
+
.append('g')
|
|
1147
|
+
.attr('className', constant_1.MAIN_LAYER_CLASS_NAME)
|
|
1148
|
+
.attr('id', (d) => d.key)
|
|
1149
|
+
.style('facet', facet)
|
|
1150
|
+
.style('fill', 'transparent')
|
|
1151
|
+
.style('zIndex', (d) => { var _a; return (_a = d.zIndex) !== null && _a !== void 0 ? _a : 0; }), (update) => update
|
|
1152
|
+
.style('facet', facet)
|
|
1153
|
+
.style('fill', 'transparent')
|
|
1154
|
+
.style('zIndex', (d) => { var _a; return (_a = d.zIndex) !== null && _a !== void 0 ? _a : 0; }), (exit) => exit.remove());
|
|
1155
|
+
const labelLayer = selection.select(className(constant_1.LABEL_LAYER_CLASS_NAME)).node();
|
|
1156
|
+
if (labelLayer)
|
|
1157
|
+
return;
|
|
1158
|
+
selection
|
|
1159
|
+
.append('g')
|
|
1160
|
+
.attr('className', constant_1.LABEL_LAYER_CLASS_NAME)
|
|
1161
|
+
.style('zIndex', 0);
|
|
1162
|
+
}
|
|
1163
|
+
function className(...names) {
|
|
1164
|
+
return names.map((d) => `.${d}`).join('');
|
|
1165
|
+
}
|
|
1166
|
+
function applyClip(selection, clip) {
|
|
1167
|
+
if (!selection.node())
|
|
1168
|
+
return;
|
|
1169
|
+
selection.style('clipPath', (data) => {
|
|
1170
|
+
if (!clip)
|
|
1171
|
+
return null;
|
|
1172
|
+
const { paddingTop: y, paddingLeft: x, marginLeft: x1, marginTop: y1, innerWidth: width, innerHeight: height, } = data;
|
|
1173
|
+
return new g_1.Rect({ style: { x: x + x1, y: y + y1, width, height } });
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
function inferComponentScales(scales, states, markState) {
|
|
1177
|
+
// add shape scale to state.
|
|
1178
|
+
var _a;
|
|
1179
|
+
// for cell, omit shape scale.
|
|
1180
|
+
// @todo support shape scale for cell.
|
|
1181
|
+
for (const [key] of markState.entries()) {
|
|
1182
|
+
if (key.type === 'cell') {
|
|
1183
|
+
return scales.filter((scale) => scale.name !== 'shape');
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
// can't infer shape scale if there are multiple states.
|
|
1187
|
+
if (states.length !== 1 || scales.some((scale) => scale.name === 'shape')) {
|
|
1188
|
+
return scales;
|
|
1189
|
+
}
|
|
1190
|
+
const { defaultShape: shape } = states[0];
|
|
1191
|
+
const acceptMarkTypes = ['point', 'line', 'rect', 'hollow'];
|
|
1192
|
+
if (!acceptMarkTypes.includes(shape))
|
|
1193
|
+
return scales;
|
|
1194
|
+
const shapeMap = {
|
|
1195
|
+
point: 'point',
|
|
1196
|
+
line: 'hyphen',
|
|
1197
|
+
rect: 'square',
|
|
1198
|
+
hollow: 'hollow',
|
|
1199
|
+
};
|
|
1200
|
+
// create shape scale
|
|
1201
|
+
const field = ((_a = scales.find((scale) => scale.name === 'color')) === null || _a === void 0 ? void 0 : _a.field) || null;
|
|
1202
|
+
const shapeScale = {
|
|
1203
|
+
field,
|
|
1204
|
+
name: 'shape',
|
|
1205
|
+
type: 'constant',
|
|
1206
|
+
domain: [],
|
|
1207
|
+
range: [shapeMap[shape]],
|
|
1208
|
+
};
|
|
1209
|
+
return [...scales, shapeScale];
|
|
1210
|
+
}
|
|
1211
|
+
function applyStyle(selection, style) {
|
|
1212
|
+
for (const [key, value] of Object.entries(style)) {
|
|
1213
|
+
selection.style(key, value);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
exports.applyStyle = applyStyle;
|
|
1217
|
+
//# sourceMappingURL=plot.js.map
|