@antv/g2 5.0.0-alpha.2 → 5.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g2-lite.min.js +2 -5
- package/dist/g2.min.js +2 -5
- package/esm/animation/index.d.ts +4 -0
- package/esm/animation/index.js +3 -0
- package/esm/animation/index.js.map +1 -1
- package/esm/animation/morphing.js +3 -24
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/utils.d.ts +3 -0
- package/esm/animation/utils.js +20 -0
- package/esm/animation/utils.js.map +1 -1
- package/esm/animation/waveIn.d.ts +7 -0
- package/esm/animation/waveIn.js +62 -0
- package/esm/animation/waveIn.js.map +1 -0
- package/esm/animation/zoomIn.d.ts +4 -0
- package/esm/animation/zoomIn.js +39 -0
- package/esm/animation/zoomIn.js.map +1 -0
- package/esm/animation/zoomOut.d.ts +4 -0
- package/esm/animation/zoomOut.js +34 -0
- package/esm/animation/zoomOut.js.map +1 -0
- package/esm/api/chart.d.ts +9 -0
- package/esm/api/chart.js +54 -7
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/facetCircle.d.ts +21 -0
- package/esm/api/composition/facetCircle.js +30 -0
- package/esm/api/composition/facetCircle.js.map +1 -0
- package/esm/api/composition/facetRect.d.ts +23 -0
- package/esm/api/composition/facetRect.js +32 -0
- package/esm/api/composition/facetRect.js.map +1 -0
- package/esm/api/composition/index.d.ts +19 -19
- package/esm/api/composition/index.js +13 -13
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +21 -0
- package/esm/api/composition/repeatMatrix.js +30 -0
- package/esm/api/composition/repeatMatrix.js.map +1 -0
- package/esm/api/composition/spaceFlex.d.ts +17 -0
- package/esm/api/composition/spaceFlex.js +26 -0
- package/esm/api/composition/spaceFlex.js.map +1 -0
- package/esm/api/composition/spaceLayer.d.ts +14 -0
- package/esm/api/composition/spaceLayer.js +23 -0
- package/esm/api/composition/spaceLayer.js.map +1 -0
- package/esm/api/composition/timingKeyframe.d.ts +17 -0
- package/esm/api/composition/timingKeyframe.js +26 -0
- package/esm/api/composition/timingKeyframe.js.map +1 -0
- package/esm/api/mark/index.d.ts +17 -17
- package/esm/api/mark/index.js +9 -9
- package/esm/api/mark/index.js.map +1 -1
- package/esm/api/mark/mark.d.ts +23 -23
- package/esm/api/mark/mark.js +46 -44
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +2 -0
- package/esm/api/node.d.ts +7 -0
- package/esm/api/node.js +56 -1
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.d.ts +1 -1
- package/esm/api/props.js +33 -12
- package/esm/api/props.js.map +1 -1
- package/esm/api/types.d.ts +1 -1
- package/esm/component/axis.d.ts +8 -2
- package/esm/component/axis.js +167 -99
- package/esm/component/axis.js.map +1 -1
- package/esm/component/legendCategory.d.ts +5 -1
- package/esm/component/legendCategory.js +7 -10
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +1 -0
- package/esm/component/legendContinuous.js +4 -3
- package/esm/component/legendContinuous.js.map +1 -1
- 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 +306 -0
- package/esm/composition/facetRect.js.map +1 -0
- package/esm/composition/index.d.ts +12 -12
- package/esm/composition/index.js +6 -6
- package/esm/composition/index.js.map +1 -1
- package/esm/composition/mark.js +13 -2
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.d.ts +8 -0
- package/esm/composition/repeatMatrix.js +149 -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 +32 -0
- package/esm/composition/spaceLayer.js.map +1 -0
- package/esm/composition/timingKeyframe.d.ts +7 -0
- package/esm/composition/timingKeyframe.js +75 -0
- package/esm/composition/timingKeyframe.js.map +1 -0
- package/esm/composition/view.js +3 -3
- package/esm/composition/view.js.map +1 -1
- package/esm/coordinate/index.d.ts +2 -0
- package/esm/coordinate/index.js +1 -0
- package/esm/coordinate/index.js.map +1 -1
- package/esm/coordinate/radial.d.ts +7 -0
- package/esm/coordinate/radial.js +12 -0
- package/esm/coordinate/radial.js.map +1 -0
- package/esm/data/index.d.ts +2 -0
- package/esm/data/index.js +1 -0
- package/esm/data/index.js.map +1 -1
- package/esm/data/wordCloud.d.ts +6 -1
- package/esm/data/wordCloud.js +102 -7
- package/esm/data/wordCloud.js.map +1 -1
- package/esm/interaction/action/service/triggerInfoSelection.js.map +1 -1
- package/esm/interaction/builtin/activeRegion.js.map +1 -1
- package/esm/interaction/builtin/brush.js.map +1 -1
- package/esm/interaction/builtin/brushHighlight.js.map +1 -1
- package/esm/interaction/builtin/brushVisible.js.map +1 -1
- package/esm/interaction/builtin/elementActive.d.ts +0 -2
- package/esm/interaction/builtin/elementActive.js.map +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +0 -2
- package/esm/interaction/builtin/elementHighlight.js.map +1 -1
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +0 -2
- package/esm/interaction/builtin/elementHighlightByColor.js.map +1 -1
- package/esm/interaction/builtin/elementHighlightByX.d.ts +0 -2
- package/esm/interaction/builtin/elementHighlightByX.js.map +1 -1
- package/esm/interaction/builtin/elementListHighlight.js.map +1 -1
- package/esm/interaction/builtin/elementSelected.d.ts +1 -3
- package/esm/interaction/builtin/elementSelected.js.map +1 -1
- package/esm/interaction/builtin/ellipsisText.js.map +1 -1
- package/esm/interaction/builtin/fisheye.d.ts +6 -0
- package/esm/interaction/builtin/fisheye.js.map +1 -1
- package/esm/interaction/builtin/legendActive.js.map +1 -1
- package/esm/interaction/builtin/legendHighlight.js.map +1 -1
- package/esm/interaction/builtin/tooltip.d.ts +2 -2
- package/esm/interaction/builtin/tooltip.js.map +1 -1
- package/esm/interaction/index.d.ts +8 -18
- package/esm/interaction/index.js +40 -17
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/chartIndex.d.ts +4 -0
- package/esm/interaction/native/chartIndex.js +168 -0
- package/esm/interaction/native/chartIndex.js.map +1 -0
- package/esm/interaction/native/elementActive.d.ts +10 -0
- package/esm/interaction/native/elementActive.js +69 -0
- package/esm/interaction/native/elementActive.js.map +1 -0
- package/esm/interaction/native/elementActiveByColor.d.ts +4 -0
- package/esm/interaction/native/elementActiveByColor.js +12 -0
- package/esm/interaction/native/elementActiveByColor.js.map +1 -0
- package/esm/interaction/native/elementActiveByX.d.ts +8 -0
- package/esm/interaction/native/elementActiveByX.js +13 -0
- package/esm/interaction/native/elementActiveByX.js.map +1 -0
- package/esm/interaction/native/elementSelect.d.ts +11 -0
- package/esm/interaction/native/elementSelect.js +111 -0
- package/esm/interaction/native/elementSelect.js.map +1 -0
- package/esm/interaction/native/elementSelectByColor.d.ts +1 -0
- package/esm/interaction/native/elementSelectByColor.js +9 -0
- package/esm/interaction/native/elementSelectByColor.js.map +1 -0
- package/esm/interaction/native/elementSelectByX.d.ts +1 -0
- package/esm/interaction/native/elementSelectByX.js +9 -0
- package/esm/interaction/native/elementSelectByX.js.map +1 -0
- package/esm/interaction/native/fisheye.d.ts +4 -0
- package/esm/interaction/native/fisheye.js +44 -0
- package/esm/interaction/native/fisheye.js.map +1 -0
- package/esm/interaction/native/utils.d.ts +28 -0
- package/esm/interaction/native/utils.js +173 -0
- package/esm/interaction/native/utils.js.map +1 -0
- package/esm/label-transform/dodgeY.d.ts +7 -0
- package/esm/label-transform/dodgeY.js +67 -0
- package/esm/label-transform/dodgeY.js.map +1 -0
- package/esm/label-transform/hideOverlap.d.ts +4 -0
- package/esm/{labelLayout → label-transform}/hideOverlap.js +0 -0
- package/esm/label-transform/hideOverlap.js.map +1 -0
- package/esm/label-transform/index.d.ts +4 -0
- package/esm/label-transform/index.js +3 -0
- package/esm/label-transform/index.js.map +1 -0
- package/esm/mark/area.d.ts +4 -0
- package/esm/mark/area.js +71 -0
- package/esm/mark/area.js.map +1 -0
- package/esm/mark/box.d.ts +34 -0
- package/esm/mark/box.js +90 -0
- package/esm/mark/box.js.map +1 -0
- package/esm/mark/cell.d.ts +9 -0
- package/esm/mark/cell.js +47 -0
- package/esm/mark/cell.js.map +1 -0
- package/esm/mark/connector.d.ts +4 -0
- package/esm/mark/connector.js +18 -0
- package/esm/mark/connector.js.map +1 -0
- package/esm/mark/image.d.ts +4 -0
- package/esm/mark/image.js +31 -0
- package/esm/mark/image.js.map +1 -0
- package/esm/mark/index.d.ts +36 -0
- package/esm/mark/index.js +19 -0
- package/esm/mark/index.js.map +1 -0
- package/esm/mark/interval.d.ts +12 -0
- package/esm/mark/interval.js +71 -0
- package/esm/mark/interval.js.map +1 -0
- package/esm/mark/line.d.ts +7 -0
- package/esm/mark/line.js +80 -0
- package/esm/mark/line.js.map +1 -0
- package/esm/mark/lineX.d.ts +4 -0
- package/esm/mark/lineX.js +21 -0
- package/esm/mark/lineX.js.map +1 -0
- package/esm/mark/lineY.d.ts +4 -0
- package/esm/mark/lineY.js +21 -0
- package/esm/mark/lineY.js.map +1 -0
- package/esm/mark/link.d.ts +7 -0
- package/esm/mark/link.js +36 -0
- package/esm/mark/link.js.map +1 -0
- package/esm/mark/point.d.ts +9 -0
- package/esm/mark/point.js +79 -0
- package/esm/mark/point.js.map +1 -0
- package/esm/mark/polygon.d.ts +7 -0
- package/esm/mark/polygon.js +43 -0
- package/esm/mark/polygon.js.map +1 -0
- package/esm/mark/range.d.ts +8 -0
- package/esm/mark/range.js +44 -0
- package/esm/mark/range.js.map +1 -0
- package/esm/mark/rangeX.d.ts +4 -0
- package/esm/mark/rangeX.js +14 -0
- package/esm/mark/rangeX.js.map +1 -0
- package/esm/mark/rangeY.d.ts +4 -0
- package/esm/mark/rangeY.js +14 -0
- package/esm/mark/rangeY.js.map +1 -0
- package/esm/mark/rect.d.ts +4 -0
- package/esm/mark/rect.js +31 -0
- package/esm/mark/rect.js.map +1 -0
- package/esm/mark/text.d.ts +4 -0
- package/esm/mark/text.js +32 -0
- package/esm/mark/text.js.map +1 -0
- package/esm/mark/utils.d.ts +5 -0
- package/esm/mark/utils.js +18 -0
- package/esm/mark/utils.js.map +1 -1
- package/esm/mark/vector.d.ts +8 -0
- package/esm/mark/vector.js +43 -0
- package/esm/mark/vector.js.map +1 -0
- package/esm/palette/divergingGreenRed.d.ts +7 -0
- package/esm/palette/divergingGreenRed.js +26 -0
- package/esm/palette/divergingGreenRed.js.map +1 -0
- package/esm/palette/divergingGreenYellow.d.ts +7 -0
- package/esm/palette/divergingGreenYellow.js +26 -0
- package/esm/palette/divergingGreenYellow.js.map +1 -0
- package/esm/palette/divergingRedBlue.d.ts +7 -0
- package/esm/palette/divergingRedBlue.js +26 -0
- package/esm/palette/divergingRedBlue.js.map +1 -0
- package/esm/palette/divergingRedPurple.d.ts +7 -0
- package/esm/palette/divergingRedPurple.js +26 -0
- package/esm/palette/divergingRedPurple.js.map +1 -0
- package/esm/palette/index.d.ts +36 -0
- package/esm/palette/index.js +18 -0
- package/esm/palette/index.js.map +1 -1
- package/esm/palette/sequentialBlue.d.ts +7 -0
- package/esm/palette/sequentialBlue.js +18 -0
- package/esm/palette/sequentialBlue.js.map +1 -0
- package/esm/palette/sequentialDarkBlue.d.ts +7 -0
- package/esm/palette/sequentialDarkBlue.js +18 -0
- package/esm/palette/sequentialDarkBlue.js.map +1 -0
- package/esm/palette/sequentialDarkGreen.d.ts +7 -0
- package/esm/palette/sequentialDarkGreen.js +18 -0
- package/esm/palette/sequentialDarkGreen.js.map +1 -0
- package/esm/palette/sequentialGreen.d.ts +7 -0
- package/esm/palette/sequentialGreen.js +18 -0
- package/esm/palette/sequentialGreen.js.map +1 -0
- package/esm/palette/sequentialGreenBlue.d.ts +7 -0
- package/esm/palette/sequentialGreenBlue.js +18 -0
- package/esm/palette/sequentialGreenBlue.js.map +1 -0
- package/esm/palette/sequentialGrey.d.ts +7 -0
- package/esm/palette/sequentialGrey.js +18 -0
- package/esm/palette/sequentialGrey.js.map +1 -0
- package/esm/palette/sequentialOrange.d.ts +7 -0
- package/esm/palette/sequentialOrange.js +18 -0
- package/esm/palette/sequentialOrange.js.map +1 -0
- package/esm/palette/sequentialPink.d.ts +7 -0
- package/esm/palette/sequentialPink.js +18 -0
- package/esm/palette/sequentialPink.js.map +1 -0
- package/esm/palette/sequentialPinkPurple.d.ts +7 -0
- package/esm/palette/sequentialPinkPurple.js +18 -0
- package/esm/palette/sequentialPinkPurple.js.map +1 -0
- package/esm/palette/sequentialPurple.d.ts +7 -0
- package/esm/palette/sequentialPurple.js +18 -0
- package/esm/palette/sequentialPurple.js.map +1 -0
- package/esm/palette/sequentialRed.d.ts +7 -0
- package/esm/palette/sequentialRed.js +18 -0
- package/esm/palette/sequentialRed.js.map +1 -0
- package/esm/palette/sequentialYellow.d.ts +7 -0
- package/esm/palette/sequentialYellow.js +18 -0
- package/esm/palette/sequentialYellow.js.map +1 -0
- package/esm/palette/sequentialYellowGreen.d.ts +7 -0
- package/esm/palette/sequentialYellowGreen.js +18 -0
- package/esm/palette/sequentialYellowGreen.js.map +1 -0
- package/esm/palette/sequentialYellowOrange.d.ts +7 -0
- package/esm/palette/sequentialYellowOrange.js +18 -0
- package/esm/palette/sequentialYellowOrange.js.map +1 -0
- package/esm/runtime/component.js +35 -11
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/constant.d.ts +8 -0
- package/esm/runtime/constant.js +9 -0
- package/esm/runtime/constant.js.map +1 -0
- package/esm/runtime/coordinate.d.ts +1 -0
- package/esm/runtime/coordinate.js +6 -8
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/index.d.ts +2 -1
- package/esm/runtime/index.js +2 -1
- package/esm/runtime/index.js.map +1 -1
- package/esm/runtime/layout.js +107 -17
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/mark.js +2 -1
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.d.ts +2 -0
- package/esm/runtime/plot.js +259 -120
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +11 -0
- package/esm/runtime/render.js +66 -5
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +1 -0
- package/esm/runtime/scale.js +151 -26
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.d.ts +1 -0
- package/esm/runtime/transform.js +30 -0
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +16 -39
- package/esm/runtime/types/component.d.ts +5 -4
- package/esm/runtime/types/options.d.ts +22 -4
- package/esm/runtime/types/theme.d.ts +64 -0
- package/esm/runtime/types/theme.js +2 -0
- package/esm/runtime/types/theme.js.map +1 -0
- package/esm/scale/index.d.ts +4 -0
- package/esm/scale/index.js +2 -0
- package/esm/scale/index.js.map +1 -1
- 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/shape/area/area.js +3 -3
- package/esm/shape/area/area.js.map +1 -1
- package/esm/shape/area/curve.d.ts +8 -0
- package/esm/shape/area/curve.js +165 -0
- package/esm/shape/area/curve.js.map +1 -0
- package/esm/shape/area/smooth.d.ts +5 -0
- package/esm/shape/area/smooth.js +23 -0
- package/esm/shape/area/smooth.js.map +1 -0
- package/esm/shape/area/step.d.ts +3 -0
- package/esm/shape/area/step.js +9 -0
- package/esm/shape/area/step.js.map +1 -0
- package/esm/shape/box/box.js +8 -7
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.d.ts +17 -0
- package/esm/shape/connector/connector.js +106 -0
- package/esm/shape/connector/connector.js.map +1 -0
- package/esm/shape/createElement.d.ts +5 -0
- package/esm/shape/createElement.js +16 -0
- package/esm/shape/createElement.js.map +1 -0
- package/esm/shape/image/image.js +5 -3
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/index.d.ts +16 -16
- package/esm/shape/index.js +9 -10
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +12 -0
- package/esm/shape/interval/color.js +88 -0
- package/esm/shape/interval/color.js.map +1 -0
- package/esm/shape/interval/funnel.js +2 -2
- package/esm/shape/interval/funnel.js.map +1 -1
- 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/rect.js +3 -3
- package/esm/shape/interval/rect.js.map +1 -1
- package/esm/shape/label/label.js +14 -88
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position.d.ts +25 -0
- package/esm/shape/label/position.js +128 -0
- package/esm/shape/label/position.js.map +1 -0
- package/esm/shape/line/curve.d.ts +8 -0
- package/esm/shape/line/curve.js +117 -0
- package/esm/shape/line/curve.js.map +1 -0
- package/esm/shape/line/hv.js +3 -3
- package/esm/shape/line/hv.js.map +1 -1
- package/esm/shape/line/hvh.js +3 -3
- package/esm/shape/line/hvh.js.map +1 -1
- package/esm/shape/line/line.js +3 -3
- package/esm/shape/line/line.js.map +1 -1
- package/esm/shape/line/smooth.js +3 -3
- package/esm/shape/line/smooth.js.map +1 -1
- package/esm/shape/line/vh.js +3 -3
- package/esm/shape/line/vh.js.map +1 -1
- package/esm/shape/lineXY/line.d.ts +3 -0
- package/esm/shape/lineXY/line.js +58 -0
- package/esm/shape/lineXY/line.js.map +1 -0
- package/esm/shape/link/arc.js +5 -3
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.js +5 -3
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.d.ts +6 -0
- package/esm/shape/link/smooth.js +41 -0
- package/esm/shape/link/smooth.js.map +1 -0
- package/esm/shape/link/vhv.d.ts +2 -2
- package/esm/shape/link/vhv.js +7 -5
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/point/bowtie.js +3 -3
- package/esm/shape/point/bowtie.js.map +1 -1
- package/esm/shape/point/color.d.ts +11 -0
- package/esm/shape/point/color.js +66 -0
- package/esm/shape/point/color.js.map +1 -0
- package/esm/shape/point/cross.js +3 -3
- package/esm/shape/point/cross.js.map +1 -1
- package/esm/shape/point/diamond.js +3 -3
- package/esm/shape/point/diamond.js.map +1 -1
- package/esm/shape/point/hexagon.js +3 -3
- package/esm/shape/point/hexagon.js.map +1 -1
- package/esm/shape/point/{hollowPoint.d.ts → hollow.d.ts} +0 -0
- package/esm/shape/point/hollow.js +9 -0
- package/esm/shape/point/hollow.js.map +1 -0
- package/esm/shape/point/hollowBowtie.js +3 -3
- package/esm/shape/point/hollowBowtie.js.map +1 -1
- package/esm/shape/point/hollowDiamond.js +3 -3
- package/esm/shape/point/hollowDiamond.js.map +1 -1
- package/esm/shape/point/hollowHexagon.js +3 -3
- package/esm/shape/point/hollowHexagon.js.map +1 -1
- package/esm/shape/point/hollowSquare.js +3 -3
- package/esm/shape/point/hollowSquare.js.map +1 -1
- package/esm/shape/point/hollowTriangle.js +3 -3
- package/esm/shape/point/hollowTriangle.js.map +1 -1
- package/esm/shape/point/hollowTriangleDown.js +3 -3
- package/esm/shape/point/hollowTriangleDown.js.map +1 -1
- package/esm/shape/point/hyphen.js +3 -3
- package/esm/shape/point/hyphen.js.map +1 -1
- package/esm/shape/point/line.js +3 -3
- package/esm/shape/point/line.js.map +1 -1
- package/esm/shape/point/plus.js +3 -3
- package/esm/shape/point/plus.js.map +1 -1
- package/esm/shape/point/point.js +3 -3
- package/esm/shape/point/point.js.map +1 -1
- package/esm/shape/point/square.js +3 -3
- package/esm/shape/point/square.js.map +1 -1
- package/esm/shape/point/symbol.js +3 -2
- package/esm/shape/point/symbol.js.map +1 -1
- package/esm/shape/point/tick.js +3 -3
- package/esm/shape/point/tick.js.map +1 -1
- package/esm/shape/point/triangle.js +3 -3
- package/esm/shape/point/triangle.js.map +1 -1
- package/esm/shape/point/triangleDown.js +3 -3
- package/esm/shape/point/triangleDown.js.map +1 -1
- package/esm/shape/polygon/polygon.js +6 -5
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.js +6 -5
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/text/badge.d.ts +11 -0
- package/esm/shape/text/badge.js +98 -0
- package/esm/shape/text/badge.js.map +1 -0
- package/esm/shape/text/text.d.ts +15 -1
- package/esm/shape/text/text.js +145 -10
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +9 -2
- package/esm/shape/utils.js +41 -11
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.js +6 -5
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/animate.d.ts +1 -1
- package/esm/spec/composition.d.ts +41 -15
- package/esm/spec/coordinate.d.ts +9 -2
- package/esm/spec/geometry.d.ts +39 -11
- package/esm/spec/index.d.ts +1 -1
- package/esm/spec/index.js +1 -1
- package/esm/spec/index.js.map +1 -1
- package/esm/spec/interaction.d.ts +33 -21
- package/esm/spec/labelTransform.d.ts +10 -0
- package/esm/spec/labelTransform.js +2 -0
- package/esm/spec/labelTransform.js.map +1 -0
- package/esm/spec/palette.d.ts +54 -0
- package/esm/spec/scale.d.ts +12 -5
- package/esm/spec/transform.d.ts +46 -6
- package/esm/stdlib/index.js +157 -93
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/dark.d.ts +6 -0
- package/esm/theme/dark.js +246 -0
- package/esm/theme/dark.js.map +1 -0
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.d.ts +0 -1
- package/esm/theme/light.js +220 -6
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/diffY.d.ts +8 -0
- package/esm/transform/diffY.js +43 -0
- package/esm/transform/diffY.js.map +1 -0
- package/esm/transform/group.d.ts +10 -0
- package/esm/transform/group.js +101 -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/groupX.d.ts +0 -2
- package/esm/transform/groupX.js +2 -80
- package/esm/transform/groupX.js.map +1 -1
- 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 +26 -2
- package/esm/transform/index.js +13 -1
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/jitter.d.ts +1 -0
- package/esm/transform/jitter.js +14 -5
- package/esm/transform/jitter.js.map +1 -1
- 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/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/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/maybeZeroPadding.d.ts +6 -0
- package/esm/transform/maybeZeroPadding.js +14 -0
- package/esm/transform/maybeZeroPadding.js.map +1 -0
- package/esm/transform/maybeZeroX.js +1 -0
- package/esm/transform/maybeZeroX.js.map +1 -1
- package/esm/transform/maybeZeroY.js +1 -0
- package/esm/transform/maybeZeroY.js.map +1 -1
- package/esm/transform/normalizeY.js +13 -10
- package/esm/transform/normalizeY.js.map +1 -1
- package/esm/transform/pack.d.ts +8 -0
- package/esm/transform/pack.js +56 -0
- package/esm/transform/pack.js.map +1 -0
- package/esm/transform/sort.d.ts +14 -0
- package/esm/transform/sort.js +64 -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 +1 -2
- package/esm/transform/sortX.js +3 -54
- package/esm/transform/sortX.js.map +1 -1
- 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/utils/coordinate.d.ts +2 -0
- package/esm/utils/coordinate.js +9 -1
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/event.d.ts +16 -0
- package/esm/utils/event.js +35 -0
- package/esm/utils/event.js.map +1 -0
- package/esm/utils/helper.d.ts +2 -0
- package/esm/utils/helper.js +11 -0
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/selection.d.ts +2 -0
- package/esm/utils/selection.js +21 -10
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.d.ts +21 -0
- package/esm/utils/size.js +42 -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/vector.d.ts +7 -1
- package/esm/utils/vector.js +10 -3
- package/esm/utils/vector.js.map +1 -1
- package/lib/animation/index.d.ts +4 -0
- package/lib/animation/index.js +7 -1
- package/lib/animation/index.js.map +1 -1
- package/lib/animation/morphing.js +2 -23
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/utils.d.ts +3 -0
- package/lib/animation/utils.js +22 -1
- package/lib/animation/utils.js.map +1 -1
- package/lib/animation/waveIn.d.ts +7 -0
- package/lib/animation/waveIn.js +66 -0
- package/lib/animation/waveIn.js.map +1 -0
- package/lib/animation/zoomIn.d.ts +4 -0
- package/lib/animation/zoomIn.js +43 -0
- package/lib/animation/zoomIn.js.map +1 -0
- package/lib/animation/zoomOut.d.ts +4 -0
- package/lib/animation/zoomOut.js +38 -0
- package/lib/animation/zoomOut.js.map +1 -0
- package/lib/api/chart.d.ts +9 -0
- package/lib/api/chart.js +55 -7
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/facetCircle.d.ts +21 -0
- package/lib/api/composition/facetCircle.js +33 -0
- package/lib/api/composition/facetCircle.js.map +1 -0
- package/lib/api/composition/facetRect.d.ts +23 -0
- package/lib/api/composition/facetRect.js +35 -0
- package/lib/api/composition/facetRect.js.map +1 -0
- package/lib/api/composition/index.d.ts +19 -19
- package/lib/api/composition/index.js +19 -19
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +21 -0
- package/lib/api/composition/repeatMatrix.js +33 -0
- package/lib/api/composition/repeatMatrix.js.map +1 -0
- package/lib/api/composition/spaceFlex.d.ts +17 -0
- package/lib/api/composition/spaceFlex.js +29 -0
- package/lib/api/composition/spaceFlex.js.map +1 -0
- package/lib/api/composition/spaceLayer.d.ts +14 -0
- package/lib/api/composition/spaceLayer.js +26 -0
- package/lib/api/composition/spaceLayer.js.map +1 -0
- package/lib/api/composition/timingKeyframe.d.ts +17 -0
- package/lib/api/composition/timingKeyframe.js +29 -0
- package/lib/api/composition/timingKeyframe.js.map +1 -0
- package/lib/api/mark/index.d.ts +17 -17
- package/lib/api/mark/index.js +8 -8
- package/lib/api/mark/index.js.map +1 -1
- package/lib/api/mark/mark.d.ts +23 -23
- package/lib/api/mark/mark.js +47 -45
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +2 -0
- package/lib/api/node.d.ts +7 -0
- package/lib/api/node.js +56 -1
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.d.ts +1 -1
- package/lib/api/props.js +32 -11
- package/lib/api/props.js.map +1 -1
- package/lib/api/types.d.ts +1 -1
- package/lib/component/axis.d.ts +8 -2
- package/lib/component/axis.js +166 -98
- package/lib/component/axis.js.map +1 -1
- package/lib/component/legendCategory.d.ts +5 -1
- package/lib/component/legendCategory.js +7 -10
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +1 -0
- package/lib/component/legendContinuous.js +4 -3
- package/lib/component/legendContinuous.js.map +1 -1
- 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 +311 -0
- package/lib/composition/facetRect.js.map +1 -0
- package/lib/composition/index.d.ts +12 -12
- package/lib/composition/index.js +13 -13
- package/lib/composition/index.js.map +1 -1
- package/lib/composition/mark.js +13 -2
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.d.ts +8 -0
- package/lib/composition/repeatMatrix.js +153 -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 +36 -0
- package/lib/composition/spaceLayer.js.map +1 -0
- package/lib/composition/timingKeyframe.d.ts +7 -0
- package/lib/composition/timingKeyframe.js +79 -0
- package/lib/composition/timingKeyframe.js.map +1 -0
- package/lib/composition/view.js +3 -3
- package/lib/composition/view.js.map +1 -1
- package/lib/coordinate/index.d.ts +2 -0
- package/lib/coordinate/index.js +3 -1
- package/lib/coordinate/index.js.map +1 -1
- package/lib/coordinate/radial.d.ts +7 -0
- package/lib/coordinate/radial.js +16 -0
- package/lib/coordinate/radial.js.map +1 -0
- package/lib/data/index.d.ts +2 -0
- package/lib/data/index.js +3 -1
- package/lib/data/index.js.map +1 -1
- package/lib/data/wordCloud.d.ts +6 -1
- package/lib/data/wordCloud.js +106 -6
- package/lib/data/wordCloud.js.map +1 -1
- package/lib/interaction/action/service/triggerInfoSelection.js.map +1 -1
- package/lib/interaction/builtin/activeRegion.js.map +1 -1
- package/lib/interaction/builtin/brush.js.map +1 -1
- package/lib/interaction/builtin/brushHighlight.js.map +1 -1
- package/lib/interaction/builtin/brushVisible.js.map +1 -1
- package/lib/interaction/builtin/elementActive.d.ts +0 -2
- package/lib/interaction/builtin/elementActive.js.map +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +0 -2
- package/lib/interaction/builtin/elementHighlight.js.map +1 -1
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +0 -2
- package/lib/interaction/builtin/elementHighlightByColor.js.map +1 -1
- package/lib/interaction/builtin/elementHighlightByX.d.ts +0 -2
- package/lib/interaction/builtin/elementHighlightByX.js.map +1 -1
- package/lib/interaction/builtin/elementListHighlight.js.map +1 -1
- package/lib/interaction/builtin/elementSelected.d.ts +1 -3
- package/lib/interaction/builtin/elementSelected.js.map +1 -1
- package/lib/interaction/builtin/ellipsisText.js.map +1 -1
- package/lib/interaction/builtin/fisheye.d.ts +6 -0
- package/lib/interaction/builtin/fisheye.js.map +1 -1
- package/lib/interaction/builtin/legendActive.js.map +1 -1
- package/lib/interaction/builtin/legendHighlight.js.map +1 -1
- package/lib/interaction/builtin/tooltip.d.ts +2 -2
- package/lib/interaction/builtin/tooltip.js.map +1 -1
- package/lib/interaction/index.d.ts +8 -18
- package/lib/interaction/index.js +47 -33
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/chartIndex.d.ts +4 -0
- package/lib/interaction/native/chartIndex.js +172 -0
- package/lib/interaction/native/chartIndex.js.map +1 -0
- package/lib/interaction/native/elementActive.d.ts +10 -0
- package/lib/interaction/native/elementActive.js +74 -0
- package/lib/interaction/native/elementActive.js.map +1 -0
- package/lib/interaction/native/elementActiveByColor.d.ts +4 -0
- package/lib/interaction/native/elementActiveByColor.js +16 -0
- package/lib/interaction/native/elementActiveByColor.js.map +1 -0
- package/lib/interaction/native/elementActiveByX.d.ts +8 -0
- package/lib/interaction/native/elementActiveByX.js +17 -0
- package/lib/interaction/native/elementActiveByX.js.map +1 -0
- package/lib/interaction/native/elementSelect.d.ts +11 -0
- package/lib/interaction/native/elementSelect.js +116 -0
- package/lib/interaction/native/elementSelect.js.map +1 -0
- package/lib/interaction/native/elementSelectByColor.d.ts +1 -0
- package/lib/interaction/native/elementSelectByColor.js +13 -0
- package/lib/interaction/native/elementSelectByColor.js.map +1 -0
- package/lib/interaction/native/elementSelectByX.d.ts +1 -0
- package/lib/interaction/native/elementSelectByX.js +13 -0
- package/lib/interaction/native/elementSelectByX.js.map +1 -0
- package/lib/interaction/native/fisheye.d.ts +4 -0
- package/lib/interaction/native/fisheye.js +48 -0
- package/lib/interaction/native/fisheye.js.map +1 -0
- package/lib/interaction/native/utils.d.ts +28 -0
- package/lib/interaction/native/utils.js +186 -0
- package/lib/interaction/native/utils.js.map +1 -0
- package/lib/label-transform/dodgeY.d.ts +7 -0
- package/lib/label-transform/dodgeY.js +71 -0
- package/lib/label-transform/dodgeY.js.map +1 -0
- package/lib/label-transform/hideOverlap.d.ts +4 -0
- package/lib/{labelLayout → label-transform}/hideOverlap.js +0 -0
- package/lib/label-transform/hideOverlap.js.map +1 -0
- package/lib/label-transform/index.d.ts +4 -0
- package/lib/label-transform/index.js +8 -0
- package/lib/label-transform/index.js.map +1 -0
- package/lib/mark/area.d.ts +4 -0
- package/lib/mark/area.js +75 -0
- package/lib/mark/area.js.map +1 -0
- package/lib/mark/box.d.ts +34 -0
- package/lib/mark/box.js +94 -0
- package/lib/mark/box.js.map +1 -0
- package/lib/mark/cell.d.ts +9 -0
- package/lib/mark/cell.js +51 -0
- package/lib/mark/cell.js.map +1 -0
- package/lib/mark/connector.d.ts +4 -0
- package/lib/mark/connector.js +22 -0
- package/lib/mark/connector.js.map +1 -0
- package/lib/mark/image.d.ts +4 -0
- package/lib/mark/image.js +35 -0
- package/lib/mark/image.js.map +1 -0
- package/lib/mark/index.d.ts +36 -0
- package/lib/mark/index.js +40 -0
- package/lib/mark/index.js.map +1 -0
- package/lib/mark/interval.d.ts +12 -0
- package/lib/mark/interval.js +75 -0
- package/lib/mark/interval.js.map +1 -0
- package/lib/mark/line.d.ts +7 -0
- package/lib/mark/line.js +84 -0
- package/lib/mark/line.js.map +1 -0
- package/lib/mark/lineX.d.ts +4 -0
- package/lib/mark/lineX.js +25 -0
- package/lib/mark/lineX.js.map +1 -0
- package/lib/mark/lineY.d.ts +4 -0
- package/lib/mark/lineY.js +25 -0
- package/lib/mark/lineY.js.map +1 -0
- package/lib/mark/link.d.ts +7 -0
- package/lib/mark/link.js +40 -0
- package/lib/mark/link.js.map +1 -0
- package/lib/mark/point.d.ts +9 -0
- package/lib/mark/point.js +83 -0
- package/lib/mark/point.js.map +1 -0
- package/lib/mark/polygon.d.ts +7 -0
- package/lib/mark/polygon.js +47 -0
- package/lib/mark/polygon.js.map +1 -0
- package/lib/mark/range.d.ts +8 -0
- package/lib/mark/range.js +49 -0
- package/lib/mark/range.js.map +1 -0
- package/lib/mark/rangeX.d.ts +4 -0
- package/lib/mark/rangeX.js +18 -0
- package/lib/mark/rangeX.js.map +1 -0
- package/lib/mark/rangeY.d.ts +4 -0
- package/lib/mark/rangeY.js +18 -0
- package/lib/mark/rangeY.js.map +1 -0
- package/lib/mark/rect.d.ts +4 -0
- package/lib/mark/rect.js +35 -0
- package/lib/mark/rect.js.map +1 -0
- package/lib/mark/text.d.ts +4 -0
- package/lib/mark/text.js +36 -0
- package/lib/mark/text.js.map +1 -0
- package/lib/mark/utils.d.ts +5 -0
- package/lib/mark/utils.js +21 -1
- package/lib/mark/utils.js.map +1 -1
- package/lib/mark/vector.d.ts +8 -0
- package/lib/mark/vector.js +47 -0
- package/lib/mark/vector.js.map +1 -0
- package/lib/palette/divergingGreenRed.d.ts +7 -0
- package/lib/palette/divergingGreenRed.js +30 -0
- package/lib/palette/divergingGreenRed.js.map +1 -0
- package/lib/palette/divergingGreenYellow.d.ts +7 -0
- package/lib/palette/divergingGreenYellow.js +30 -0
- package/lib/palette/divergingGreenYellow.js.map +1 -0
- package/lib/palette/divergingRedBlue.d.ts +7 -0
- package/lib/palette/divergingRedBlue.js +30 -0
- package/lib/palette/divergingRedBlue.js.map +1 -0
- package/lib/palette/divergingRedPurple.d.ts +7 -0
- package/lib/palette/divergingRedPurple.js +30 -0
- package/lib/palette/divergingRedPurple.js.map +1 -0
- package/lib/palette/index.d.ts +36 -0
- package/lib/palette/index.js +37 -1
- package/lib/palette/index.js.map +1 -1
- package/lib/palette/sequentialBlue.d.ts +7 -0
- package/lib/palette/sequentialBlue.js +22 -0
- package/lib/palette/sequentialBlue.js.map +1 -0
- package/lib/palette/sequentialDarkBlue.d.ts +7 -0
- package/lib/palette/sequentialDarkBlue.js +22 -0
- package/lib/palette/sequentialDarkBlue.js.map +1 -0
- package/lib/palette/sequentialDarkGreen.d.ts +7 -0
- package/lib/palette/sequentialDarkGreen.js +22 -0
- package/lib/palette/sequentialDarkGreen.js.map +1 -0
- package/lib/palette/sequentialGreen.d.ts +7 -0
- package/lib/palette/sequentialGreen.js +22 -0
- package/lib/palette/sequentialGreen.js.map +1 -0
- package/lib/palette/sequentialGreenBlue.d.ts +7 -0
- package/lib/palette/sequentialGreenBlue.js +22 -0
- package/lib/palette/sequentialGreenBlue.js.map +1 -0
- package/lib/palette/sequentialGrey.d.ts +7 -0
- package/lib/palette/sequentialGrey.js +22 -0
- package/lib/palette/sequentialGrey.js.map +1 -0
- package/lib/palette/sequentialOrange.d.ts +7 -0
- package/lib/palette/sequentialOrange.js +22 -0
- package/lib/palette/sequentialOrange.js.map +1 -0
- package/lib/palette/sequentialPink.d.ts +7 -0
- package/lib/palette/sequentialPink.js +22 -0
- package/lib/palette/sequentialPink.js.map +1 -0
- package/lib/palette/sequentialPinkPurple.d.ts +7 -0
- package/lib/palette/sequentialPinkPurple.js +22 -0
- package/lib/palette/sequentialPinkPurple.js.map +1 -0
- package/lib/palette/sequentialPurple.d.ts +7 -0
- package/lib/palette/sequentialPurple.js +22 -0
- package/lib/palette/sequentialPurple.js.map +1 -0
- package/lib/palette/sequentialRed.d.ts +7 -0
- package/lib/palette/sequentialRed.js +22 -0
- package/lib/palette/sequentialRed.js.map +1 -0
- package/lib/palette/sequentialYellow.d.ts +7 -0
- package/lib/palette/sequentialYellow.js +22 -0
- package/lib/palette/sequentialYellow.js.map +1 -0
- package/lib/palette/sequentialYellowGreen.d.ts +7 -0
- package/lib/palette/sequentialYellowGreen.js +22 -0
- package/lib/palette/sequentialYellowGreen.js.map +1 -0
- package/lib/palette/sequentialYellowOrange.d.ts +7 -0
- package/lib/palette/sequentialYellowOrange.js +22 -0
- package/lib/palette/sequentialYellowOrange.js.map +1 -0
- package/lib/runtime/component.js +34 -10
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/constant.d.ts +8 -0
- package/lib/runtime/constant.js +12 -0
- package/lib/runtime/constant.js.map +1 -0
- package/lib/runtime/coordinate.d.ts +1 -0
- package/lib/runtime/coordinate.js +8 -9
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/index.d.ts +2 -1
- package/lib/runtime/index.js +4 -1
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/layout.js +107 -17
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/mark.js +1 -0
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.d.ts +2 -0
- package/lib/runtime/plot.js +258 -118
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +11 -0
- package/lib/runtime/render.js +68 -3
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +1 -0
- package/lib/runtime/scale.js +174 -25
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.d.ts +1 -0
- package/lib/runtime/transform.js +32 -1
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +16 -39
- package/lib/runtime/types/component.d.ts +5 -4
- package/lib/runtime/types/options.d.ts +22 -4
- package/lib/runtime/types/theme.d.ts +64 -0
- package/lib/runtime/types/theme.js +3 -0
- package/lib/runtime/types/theme.js.map +1 -0
- package/lib/scale/index.d.ts +4 -0
- package/lib/scale/index.js +5 -1
- package/lib/scale/index.js.map +1 -1
- 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/shape/area/area.js +3 -3
- package/lib/shape/area/area.js.map +1 -1
- package/lib/shape/area/curve.d.ts +8 -0
- package/lib/shape/area/curve.js +169 -0
- package/lib/shape/area/curve.js.map +1 -0
- package/lib/shape/area/smooth.d.ts +5 -0
- package/lib/shape/area/smooth.js +27 -0
- package/lib/shape/area/smooth.js.map +1 -0
- package/lib/shape/area/step.d.ts +3 -0
- package/lib/shape/area/step.js +13 -0
- package/lib/shape/area/step.js.map +1 -0
- package/lib/shape/box/box.js +7 -6
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.d.ts +17 -0
- package/lib/shape/connector/connector.js +110 -0
- package/lib/shape/connector/connector.js.map +1 -0
- package/lib/shape/createElement.d.ts +5 -0
- package/lib/shape/createElement.js +20 -0
- package/lib/shape/createElement.js.map +1 -0
- package/lib/shape/image/image.js +4 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/index.d.ts +16 -16
- package/lib/shape/index.js +18 -19
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +12 -0
- package/lib/shape/interval/color.js +92 -0
- package/lib/shape/interval/color.js.map +1 -0
- package/lib/shape/interval/funnel.js +2 -2
- package/lib/shape/interval/funnel.js.map +1 -1
- 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/rect.js +3 -3
- package/lib/shape/interval/rect.js.map +1 -1
- package/lib/shape/label/label.js +35 -86
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position.d.ts +25 -0
- package/lib/shape/label/position.js +132 -0
- package/lib/shape/label/position.js.map +1 -0
- package/lib/shape/line/curve.d.ts +8 -0
- package/lib/shape/line/curve.js +121 -0
- package/lib/shape/line/curve.js.map +1 -0
- package/lib/shape/line/hv.js +3 -3
- package/lib/shape/line/hv.js.map +1 -1
- package/lib/shape/line/hvh.js +3 -3
- package/lib/shape/line/hvh.js.map +1 -1
- package/lib/shape/line/line.js +3 -3
- package/lib/shape/line/line.js.map +1 -1
- package/lib/shape/line/smooth.js +3 -3
- package/lib/shape/line/smooth.js.map +1 -1
- package/lib/shape/line/vh.js +3 -3
- package/lib/shape/line/vh.js.map +1 -1
- package/lib/shape/lineXY/line.d.ts +3 -0
- package/lib/shape/lineXY/line.js +62 -0
- package/lib/shape/lineXY/line.js.map +1 -0
- package/lib/shape/link/arc.js +4 -2
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.js +4 -2
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.d.ts +6 -0
- package/lib/shape/link/smooth.js +45 -0
- package/lib/shape/link/smooth.js.map +1 -0
- package/lib/shape/link/vhv.d.ts +2 -2
- package/lib/shape/link/vhv.js +8 -6
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/point/bowtie.js +3 -3
- package/lib/shape/point/bowtie.js.map +1 -1
- package/lib/shape/point/color.d.ts +11 -0
- package/lib/shape/point/color.js +93 -0
- package/lib/shape/point/color.js.map +1 -0
- package/lib/shape/point/cross.js +3 -3
- package/lib/shape/point/cross.js.map +1 -1
- package/lib/shape/point/diamond.js +3 -3
- package/lib/shape/point/diamond.js.map +1 -1
- package/lib/shape/point/hexagon.js +3 -3
- package/lib/shape/point/hexagon.js.map +1 -1
- package/lib/shape/point/{hollowPoint.d.ts → hollow.d.ts} +0 -0
- package/lib/shape/point/hollow.js +13 -0
- package/lib/shape/point/hollow.js.map +1 -0
- package/lib/shape/point/hollowBowtie.js +3 -3
- package/lib/shape/point/hollowBowtie.js.map +1 -1
- package/lib/shape/point/hollowDiamond.js +3 -3
- package/lib/shape/point/hollowDiamond.js.map +1 -1
- package/lib/shape/point/hollowHexagon.js +3 -3
- package/lib/shape/point/hollowHexagon.js.map +1 -1
- package/lib/shape/point/hollowSquare.js +3 -3
- package/lib/shape/point/hollowSquare.js.map +1 -1
- package/lib/shape/point/hollowTriangle.js +3 -3
- package/lib/shape/point/hollowTriangle.js.map +1 -1
- package/lib/shape/point/hollowTriangleDown.js +3 -3
- package/lib/shape/point/hollowTriangleDown.js.map +1 -1
- package/lib/shape/point/hyphen.js +3 -3
- package/lib/shape/point/hyphen.js.map +1 -1
- package/lib/shape/point/line.js +3 -3
- package/lib/shape/point/line.js.map +1 -1
- package/lib/shape/point/plus.js +3 -3
- package/lib/shape/point/plus.js.map +1 -1
- package/lib/shape/point/point.js +3 -3
- package/lib/shape/point/point.js.map +1 -1
- package/lib/shape/point/square.js +3 -3
- package/lib/shape/point/square.js.map +1 -1
- package/lib/shape/point/symbol.js +3 -2
- package/lib/shape/point/symbol.js.map +1 -1
- package/lib/shape/point/tick.js +3 -3
- package/lib/shape/point/tick.js.map +1 -1
- package/lib/shape/point/triangle.js +3 -3
- package/lib/shape/point/triangle.js.map +1 -1
- package/lib/shape/point/triangleDown.js +3 -3
- package/lib/shape/point/triangleDown.js.map +1 -1
- package/lib/shape/polygon/polygon.js +5 -4
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.js +5 -4
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/text/badge.d.ts +11 -0
- package/lib/shape/text/badge.js +102 -0
- package/lib/shape/text/badge.js.map +1 -0
- package/lib/shape/text/text.d.ts +15 -1
- package/lib/shape/text/text.js +143 -8
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +9 -2
- package/lib/shape/utils.js +43 -10
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.js +5 -4
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/animate.d.ts +1 -1
- package/lib/spec/composition.d.ts +41 -15
- package/lib/spec/coordinate.d.ts +9 -2
- package/lib/spec/geometry.d.ts +39 -11
- package/lib/spec/index.d.ts +1 -1
- package/lib/spec/index.js +1 -1
- package/lib/spec/index.js.map +1 -1
- package/lib/spec/interaction.d.ts +33 -21
- package/lib/spec/labelTransform.d.ts +10 -0
- package/lib/spec/labelTransform.js +3 -0
- package/lib/spec/labelTransform.js.map +1 -0
- package/lib/spec/palette.d.ts +54 -0
- package/lib/spec/scale.d.ts +12 -5
- package/lib/spec/transform.d.ts +46 -6
- package/lib/stdlib/index.js +140 -92
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/dark.d.ts +6 -0
- package/lib/theme/dark.js +250 -0
- package/lib/theme/dark.js.map +1 -0
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.d.ts +0 -1
- package/lib/theme/light.js +220 -6
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/diffY.d.ts +8 -0
- package/lib/transform/diffY.js +47 -0
- package/lib/transform/diffY.js.map +1 -0
- package/lib/transform/group.d.ts +10 -0
- package/lib/transform/group.js +105 -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/groupX.d.ts +0 -2
- package/lib/transform/groupX.js +2 -80
- package/lib/transform/groupX.js.map +1 -1
- 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 +26 -2
- package/lib/transform/index.js +27 -3
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/jitter.d.ts +1 -0
- package/lib/transform/jitter.js +19 -9
- package/lib/transform/jitter.js.map +1 -1
- 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/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/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/maybeZeroPadding.d.ts +6 -0
- package/lib/transform/maybeZeroPadding.js +18 -0
- package/lib/transform/maybeZeroPadding.js.map +1 -0
- package/lib/transform/maybeZeroX.js +1 -0
- package/lib/transform/maybeZeroX.js.map +1 -1
- package/lib/transform/maybeZeroY.js +1 -0
- package/lib/transform/maybeZeroY.js.map +1 -1
- package/lib/transform/normalizeY.js +13 -10
- package/lib/transform/normalizeY.js.map +1 -1
- package/lib/transform/pack.d.ts +8 -0
- package/lib/transform/pack.js +60 -0
- package/lib/transform/pack.js.map +1 -0
- package/lib/transform/sort.d.ts +14 -0
- package/lib/transform/sort.js +68 -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 +1 -2
- package/lib/transform/sortX.js +3 -54
- package/lib/transform/sortX.js.map +1 -1
- 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/utils/coordinate.d.ts +2 -0
- package/lib/utils/coordinate.js +12 -2
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/event.d.ts +16 -0
- package/lib/utils/event.js +40 -0
- package/lib/utils/event.js.map +1 -0
- package/lib/utils/helper.d.ts +2 -0
- package/lib/utils/helper.js +14 -1
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/selection.d.ts +2 -0
- package/lib/utils/selection.js +21 -10
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.d.ts +21 -0
- package/lib/utils/size.js +47 -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/vector.d.ts +7 -1
- package/lib/utils/vector.js +12 -4
- package/lib/utils/vector.js.map +1 -1
- package/package.json +8 -3
- package/src/.DS_Store +0 -0
- package/src/animation/index.ts +4 -0
- package/src/animation/morphing.ts +3 -25
- package/src/animation/utils.ts +23 -0
- package/src/animation/waveIn.ts +91 -0
- package/src/animation/zoomIn.ts +55 -0
- package/src/animation/zoomOut.ts +50 -0
- package/src/api/chart.ts +87 -12
- package/src/api/composition/facetCircle.ts +43 -0
- package/src/api/composition/facetRect.ts +47 -0
- package/src/api/composition/index.ts +27 -19
- package/src/api/composition/repeatMatrix.ts +46 -0
- package/src/api/composition/spaceFlex.ts +30 -0
- package/src/api/composition/spaceLayer.ts +24 -0
- package/src/api/composition/timingKeyframe.ts +33 -0
- package/src/api/mark/index.ts +24 -24
- package/src/api/mark/mark.ts +43 -49
- package/src/api/mark/types.ts +2 -0
- package/src/api/node.ts +63 -2
- package/src/api/props.ts +34 -15
- package/src/api/types.ts +1 -1
- package/src/component/axis.ts +292 -129
- package/src/component/legendCategory.ts +23 -11
- package/src/component/legendContinuous.ts +5 -3
- package/src/composition/facetCircle.ts +102 -0
- package/src/composition/facetRect.ts +369 -0
- package/src/composition/index.ts +12 -12
- package/src/composition/mark.ts +24 -2
- package/src/composition/repeatMatrix.ts +173 -0
- package/src/composition/spaceFlex.ts +49 -0
- package/src/composition/spaceLayer.ts +26 -0
- package/src/composition/timingKeyframe.ts +90 -0
- package/src/composition/view.ts +16 -7
- package/src/coordinate/index.ts +2 -0
- package/src/coordinate/radial.ts +22 -0
- package/src/data/.DS_Store +0 -0
- package/src/data/index.ts +2 -0
- package/src/data/wordCloud.ts +112 -117
- package/src/interaction/action/service/triggerInfoSelection.ts +1 -1
- package/src/interaction/builtin/activeRegion.ts +1 -0
- package/src/interaction/builtin/brush.ts +1 -0
- package/src/interaction/builtin/brushHighlight.ts +1 -0
- package/src/interaction/builtin/brushVisible.ts +1 -0
- package/src/interaction/builtin/elementActive.ts +1 -0
- package/src/interaction/builtin/elementHighlight.ts +1 -0
- package/src/interaction/builtin/elementHighlightByColor.ts +1 -0
- package/src/interaction/builtin/elementHighlightByX.ts +1 -0
- package/src/interaction/builtin/elementListHighlight.ts +1 -0
- package/src/interaction/builtin/elementSelected.ts +1 -0
- package/src/interaction/builtin/ellipsisText.ts +1 -0
- package/src/interaction/builtin/fisheye.ts +1 -0
- package/src/interaction/builtin/legendActive.ts +1 -0
- package/src/interaction/builtin/legendHighlight.ts +1 -0
- package/src/interaction/builtin/tooltip.ts +1 -0
- package/src/interaction/index.ts +40 -33
- package/src/interaction/native/chartIndex.ts +211 -0
- package/src/interaction/native/elementActive.ts +75 -0
- package/src/interaction/native/elementActiveByColor.ts +23 -0
- package/src/interaction/native/elementActiveByX.ts +25 -0
- package/src/interaction/native/elementSelect.ts +113 -0
- package/src/interaction/native/elementSelectByColor.ts +19 -0
- package/src/interaction/native/elementSelectByX.ts +19 -0
- package/src/interaction/native/fisheye.ts +54 -0
- package/src/interaction/native/utils.ts +201 -0
- package/src/label-transform/dodgeY.ts +75 -0
- package/src/label-transform/hideOverlap.ts +50 -0
- package/src/label-transform/index.ts +5 -0
- package/src/mark/area.ts +86 -0
- package/src/mark/box.ts +105 -0
- package/src/mark/cell.ts +57 -0
- package/src/mark/connector.ts +27 -0
- package/src/mark/image.ts +41 -0
- package/src/mark/index.ts +37 -0
- package/src/mark/interval.ts +83 -0
- package/src/mark/line.ts +99 -0
- package/src/mark/lineX.ts +31 -0
- package/src/mark/lineY.ts +31 -0
- package/src/mark/link.ts +46 -0
- package/src/mark/point.ts +92 -0
- package/src/mark/polygon.ts +54 -0
- package/src/mark/range.ts +56 -0
- package/src/mark/rangeX.ts +23 -0
- package/src/mark/rangeY.ts +23 -0
- package/src/mark/rect.ts +43 -0
- package/src/mark/text.ts +42 -0
- package/src/mark/utils.ts +32 -0
- package/src/mark/vector.ts +56 -0
- package/src/palette/divergingGreenRed.ts +33 -0
- package/src/palette/divergingGreenYellow.ts +36 -0
- package/src/palette/divergingRedBlue.ts +33 -0
- package/src/palette/divergingRedPurple.ts +33 -0
- package/src/palette/index.ts +36 -0
- package/src/palette/sequentialBlue.ts +23 -0
- package/src/palette/sequentialDarkBlue.ts +25 -0
- package/src/palette/sequentialDarkGreen.ts +28 -0
- package/src/palette/sequentialGreen.ts +23 -0
- package/src/palette/sequentialGreenBlue.ts +28 -0
- package/src/palette/sequentialGrey.ts +23 -0
- package/src/palette/sequentialOrange.ts +25 -0
- package/src/palette/sequentialPink.ts +23 -0
- package/src/palette/sequentialPinkPurple.ts +28 -0
- package/src/palette/sequentialPurple.ts +25 -0
- package/src/palette/sequentialRed.ts +23 -0
- package/src/palette/sequentialYellow.ts +25 -0
- package/src/palette/sequentialYellowGreen.ts +28 -0
- package/src/palette/sequentialYellowOrange.ts +28 -0
- package/src/runtime/component.ts +37 -18
- package/src/runtime/constant.ts +8 -0
- package/src/runtime/coordinate.ts +22 -6
- package/src/runtime/index.ts +2 -1
- package/src/runtime/layout.ts +158 -21
- package/src/runtime/mark.ts +2 -0
- package/src/runtime/plot.ts +342 -157
- package/src/runtime/render.ts +105 -5
- package/src/runtime/scale.ts +193 -34
- package/src/runtime/transform.ts +37 -0
- package/src/runtime/types/common.ts +22 -41
- package/src/runtime/types/component.ts +7 -8
- package/src/runtime/types/options.ts +23 -4
- package/src/runtime/types/theme.ts +97 -0
- package/src/scale/index.ts +4 -0
- package/src/scale/sequential.ts +11 -0
- package/src/scale/sqrt.ts +11 -0
- package/src/shape/area/area.ts +3 -3
- package/src/shape/area/curve.ts +202 -0
- package/src/shape/area/smooth.ts +25 -0
- package/src/shape/area/step.ts +15 -0
- package/src/shape/box/box.ts +13 -7
- package/src/shape/connector/connector.ts +155 -0
- package/src/shape/createElement.ts +25 -0
- package/src/shape/image/image.ts +10 -3
- package/src/shape/index.ts +16 -22
- package/src/shape/interval/color.ts +108 -0
- package/src/shape/interval/funnel.ts +2 -2
- package/src/shape/interval/hollow.ts +15 -0
- package/src/shape/interval/pyramid.ts +1 -1
- package/src/shape/interval/rect.ts +3 -3
- package/src/shape/label/label.ts +19 -117
- package/src/shape/label/position.ts +181 -0
- package/src/shape/line/curve.ts +147 -0
- package/src/shape/line/hv.ts +3 -3
- package/src/shape/line/hvh.ts +3 -3
- package/src/shape/line/line.ts +3 -3
- package/src/shape/line/smooth.ts +3 -3
- package/src/shape/line/vh.ts +3 -3
- package/src/shape/lineXY/line.ts +62 -0
- package/src/shape/link/arc.ts +10 -3
- package/src/shape/link/link.ts +10 -3
- package/src/shape/link/smooth.ts +48 -0
- package/src/shape/link/vhv.ts +13 -6
- package/src/shape/point/bowtie.ts +3 -3
- package/src/shape/point/color.ts +73 -0
- package/src/shape/point/cross.ts +3 -3
- package/src/shape/point/diamond.ts +3 -3
- package/src/shape/point/hexagon.ts +3 -3
- package/src/shape/point/hollow.ts +15 -0
- package/src/shape/point/hollowBowtie.ts +3 -3
- package/src/shape/point/hollowDiamond.ts +3 -3
- package/src/shape/point/hollowHexagon.ts +3 -3
- package/src/shape/point/hollowSquare.ts +3 -3
- package/src/shape/point/hollowTriangle.ts +3 -3
- package/src/shape/point/hollowTriangleDown.ts +3 -3
- package/src/shape/point/hyphen.ts +3 -3
- package/src/shape/point/line.ts +3 -3
- package/src/shape/point/plus.ts +3 -3
- package/src/shape/point/point.ts +3 -3
- package/src/shape/point/square.ts +3 -3
- package/src/shape/point/symbol.ts +3 -2
- package/src/shape/point/tick.ts +3 -3
- package/src/shape/point/triangle.ts +3 -3
- package/src/shape/point/triangleDown.ts +3 -3
- package/src/shape/polygon/polygon.ts +11 -5
- package/src/shape/polygon/ribbon.ts +11 -5
- package/src/shape/text/badge.ts +126 -0
- package/src/shape/text/text.ts +221 -21
- package/src/shape/utils.ts +62 -12
- package/src/shape/vector/vector.ts +11 -5
- package/src/spec/action.ts +1 -0
- package/src/spec/animate.ts +1 -0
- package/src/spec/composition.ts +46 -20
- package/src/spec/coordinate.ts +16 -2
- package/src/spec/geometry.ts +66 -33
- package/src/spec/index.ts +1 -1
- package/src/spec/interaction.ts +50 -29
- package/src/spec/labelTransform.ts +12 -0
- package/src/spec/palette.ts +80 -0
- package/src/spec/scale.ts +17 -4
- package/src/spec/transform.ts +78 -5
- package/src/stdlib/index.ts +212 -118
- package/src/theme/dark.ts +250 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +220 -6
- package/src/transform/diffY.ts +52 -0
- package/src/transform/group.ts +124 -0
- package/src/transform/groupColor.ts +14 -0
- package/src/transform/groupX.ts +4 -99
- package/src/transform/groupY.ts +14 -0
- package/src/transform/index.ts +26 -2
- package/src/transform/jitter.ts +24 -5
- package/src/transform/jitterX.ts +30 -0
- package/src/transform/maybeIdentityX.ts +21 -0
- package/src/transform/maybeIdentityY.ts +21 -0
- package/src/transform/maybeTupleX.ts +19 -0
- package/src/transform/maybeTupleY.ts +19 -0
- package/src/transform/maybeZeroPadding.ts +19 -0
- package/src/transform/maybeZeroX.ts +1 -0
- package/src/transform/maybeZeroY.ts +1 -0
- package/src/transform/normalizeY.ts +13 -11
- package/src/transform/pack.ts +69 -0
- package/src/transform/sort.ts +63 -0
- package/src/transform/sortColor.ts +14 -0
- package/src/transform/sortX.ts +3 -37
- package/src/transform/sortY.ts +14 -0
- package/src/utils/coordinate.ts +13 -1
- package/src/utils/event.ts +46 -0
- package/src/utils/helper.ts +19 -0
- package/src/utils/selection.ts +22 -9
- package/src/utils/size.ts +61 -0
- package/src/utils/string.ts +19 -0
- package/src/utils/vector.ts +11 -3
- package/esm/adjust/index.d.ts +0 -2
- package/esm/adjust/index.js +0 -2
- package/esm/adjust/index.js.map +0 -1
- package/esm/adjust/pack.d.ts +0 -8
- package/esm/adjust/pack.js +0 -55
- package/esm/adjust/pack.js.map +0 -1
- package/esm/api/composition/circle.d.ts +0 -21
- package/esm/api/composition/circle.js +0 -30
- package/esm/api/composition/circle.js.map +0 -1
- package/esm/api/composition/flex.d.ts +0 -17
- package/esm/api/composition/flex.js +0 -26
- package/esm/api/composition/flex.js.map +0 -1
- package/esm/api/composition/keyframe.d.ts +0 -17
- package/esm/api/composition/keyframe.js +0 -26
- package/esm/api/composition/keyframe.js.map +0 -1
- package/esm/api/composition/layer.d.ts +0 -14
- package/esm/api/composition/layer.js +0 -23
- package/esm/api/composition/layer.js.map +0 -1
- package/esm/api/composition/matrix.d.ts +0 -21
- package/esm/api/composition/matrix.js +0 -30
- package/esm/api/composition/matrix.js.map +0 -1
- package/esm/api/composition/rect.d.ts +0 -23
- package/esm/api/composition/rect.js +0 -32
- package/esm/api/composition/rect.js.map +0 -1
- package/esm/composition/circle.d.ts +0 -7
- package/esm/composition/circle.js +0 -85
- package/esm/composition/circle.js.map +0 -1
- package/esm/composition/flex.d.ts +0 -7
- package/esm/composition/flex.js +0 -40
- package/esm/composition/flex.js.map +0 -1
- package/esm/composition/keyframe.d.ts +0 -7
- package/esm/composition/keyframe.js +0 -75
- package/esm/composition/keyframe.js.map +0 -1
- package/esm/composition/layer.d.ts +0 -7
- package/esm/composition/layer.js +0 -32
- package/esm/composition/layer.js.map +0 -1
- package/esm/composition/matrix.d.ts +0 -8
- package/esm/composition/matrix.js +0 -151
- package/esm/composition/matrix.js.map +0 -1
- package/esm/composition/rect.d.ts +0 -30
- package/esm/composition/rect.js +0 -286
- package/esm/composition/rect.js.map +0 -1
- package/esm/labelLayout/hideOverlap.d.ts +0 -2
- package/esm/labelLayout/hideOverlap.js.map +0 -1
- package/esm/labelLayout/index.d.ts +0 -1
- package/esm/labelLayout/index.js +0 -2
- package/esm/labelLayout/index.js.map +0 -1
- package/esm/mark/annotation/connector.d.ts +0 -4
- package/esm/mark/annotation/connector.js +0 -18
- package/esm/mark/annotation/connector.js.map +0 -1
- package/esm/mark/annotation/index.d.ts +0 -14
- package/esm/mark/annotation/index.js +0 -8
- package/esm/mark/annotation/index.js.map +0 -1
- package/esm/mark/annotation/lineX.d.ts +0 -4
- package/esm/mark/annotation/lineX.js +0 -21
- package/esm/mark/annotation/lineX.js.map +0 -1
- package/esm/mark/annotation/lineY.d.ts +0 -4
- package/esm/mark/annotation/lineY.js +0 -21
- package/esm/mark/annotation/lineY.js.map +0 -1
- package/esm/mark/annotation/range.d.ts +0 -8
- package/esm/mark/annotation/range.js +0 -44
- package/esm/mark/annotation/range.js.map +0 -1
- package/esm/mark/annotation/rangeX.d.ts +0 -4
- package/esm/mark/annotation/rangeX.js +0 -14
- package/esm/mark/annotation/rangeX.js.map +0 -1
- package/esm/mark/annotation/rangeY.d.ts +0 -4
- package/esm/mark/annotation/rangeY.js +0 -14
- package/esm/mark/annotation/rangeY.js.map +0 -1
- package/esm/mark/annotation/text.d.ts +0 -4
- package/esm/mark/annotation/text.js +0 -21
- package/esm/mark/annotation/text.js.map +0 -1
- package/esm/mark/geometry/area.d.ts +0 -4
- package/esm/mark/geometry/area.js +0 -70
- package/esm/mark/geometry/area.js.map +0 -1
- package/esm/mark/geometry/box.d.ts +0 -34
- package/esm/mark/geometry/box.js +0 -90
- package/esm/mark/geometry/box.js.map +0 -1
- package/esm/mark/geometry/grid.d.ts +0 -9
- package/esm/mark/geometry/grid.js +0 -46
- package/esm/mark/geometry/grid.js.map +0 -1
- package/esm/mark/geometry/image.d.ts +0 -4
- package/esm/mark/geometry/image.js +0 -35
- package/esm/mark/geometry/image.js.map +0 -1
- package/esm/mark/geometry/index.d.ts +0 -22
- package/esm/mark/geometry/index.js +0 -12
- package/esm/mark/geometry/index.js.map +0 -1
- package/esm/mark/geometry/interval.d.ts +0 -12
- package/esm/mark/geometry/interval.js +0 -58
- package/esm/mark/geometry/interval.js.map +0 -1
- package/esm/mark/geometry/line.d.ts +0 -7
- package/esm/mark/geometry/line.js +0 -80
- package/esm/mark/geometry/line.js.map +0 -1
- package/esm/mark/geometry/link.d.ts +0 -7
- package/esm/mark/geometry/link.js +0 -33
- package/esm/mark/geometry/link.js.map +0 -1
- package/esm/mark/geometry/point.d.ts +0 -10
- package/esm/mark/geometry/point.js +0 -75
- package/esm/mark/geometry/point.js.map +0 -1
- package/esm/mark/geometry/polygon.d.ts +0 -7
- package/esm/mark/geometry/polygon.js +0 -43
- package/esm/mark/geometry/polygon.js.map +0 -1
- package/esm/mark/geometry/text.d.ts +0 -4
- package/esm/mark/geometry/text.js +0 -35
- package/esm/mark/geometry/text.js.map +0 -1
- package/esm/mark/geometry/vector.d.ts +0 -8
- package/esm/mark/geometry/vector.js +0 -43
- package/esm/mark/geometry/vector.js.map +0 -1
- package/esm/shape/annotation/badge.d.ts +0 -14
- package/esm/shape/annotation/badge.js +0 -93
- package/esm/shape/annotation/badge.js.map +0 -1
- package/esm/shape/annotation/connector.d.ts +0 -15
- package/esm/shape/annotation/connector.js +0 -101
- package/esm/shape/annotation/connector.js.map +0 -1
- package/esm/shape/annotation/line.d.ts +0 -3
- package/esm/shape/annotation/line.js +0 -56
- package/esm/shape/annotation/line.js.map +0 -1
- package/esm/shape/annotation/text.d.ts +0 -20
- package/esm/shape/annotation/text.js +0 -174
- package/esm/shape/annotation/text.js.map +0 -1
- package/esm/shape/area/curveArea.d.ts +0 -8
- package/esm/shape/area/curveArea.js +0 -60
- package/esm/shape/area/curveArea.js.map +0 -1
- package/esm/shape/area/smoothArea.d.ts +0 -5
- package/esm/shape/area/smoothArea.js +0 -23
- package/esm/shape/area/smoothArea.js.map +0 -1
- package/esm/shape/interval/colorRect.d.ts +0 -14
- package/esm/shape/interval/colorRect.js +0 -62
- package/esm/shape/interval/colorRect.js.map +0 -1
- package/esm/shape/interval/hollowRect.d.ts +0 -6
- package/esm/shape/interval/hollowRect.js +0 -9
- package/esm/shape/interval/hollowRect.js.map +0 -1
- package/esm/shape/line/curveLine.d.ts +0 -8
- package/esm/shape/line/curveLine.js +0 -41
- package/esm/shape/line/curveLine.js.map +0 -1
- package/esm/shape/link/smoothEdge.d.ts +0 -6
- package/esm/shape/link/smoothEdge.js +0 -39
- package/esm/shape/link/smoothEdge.js.map +0 -1
- package/esm/shape/point/colorPoint.d.ts +0 -11
- package/esm/shape/point/colorPoint.js +0 -59
- package/esm/shape/point/colorPoint.js.map +0 -1
- package/esm/shape/point/hollowPoint.js +0 -9
- package/esm/shape/point/hollowPoint.js.map +0 -1
- package/esm/spec/labelLayout.d.ts +0 -4
- package/esm/spec/labelLayout.js +0 -2
- package/esm/spec/labelLayout.js.map +0 -1
- package/esm/transform/jitterY.d.ts +0 -8
- package/esm/transform/jitterY.js +0 -21
- package/esm/transform/jitterY.js.map +0 -1
- package/lib/adjust/index.d.ts +0 -2
- package/lib/adjust/index.js +0 -6
- package/lib/adjust/index.js.map +0 -1
- package/lib/adjust/pack.d.ts +0 -8
- package/lib/adjust/pack.js +0 -59
- package/lib/adjust/pack.js.map +0 -1
- package/lib/api/composition/circle.d.ts +0 -21
- package/lib/api/composition/circle.js +0 -33
- package/lib/api/composition/circle.js.map +0 -1
- package/lib/api/composition/flex.d.ts +0 -17
- package/lib/api/composition/flex.js +0 -29
- package/lib/api/composition/flex.js.map +0 -1
- package/lib/api/composition/keyframe.d.ts +0 -17
- package/lib/api/composition/keyframe.js +0 -29
- package/lib/api/composition/keyframe.js.map +0 -1
- package/lib/api/composition/layer.d.ts +0 -14
- package/lib/api/composition/layer.js +0 -26
- package/lib/api/composition/layer.js.map +0 -1
- package/lib/api/composition/matrix.d.ts +0 -21
- package/lib/api/composition/matrix.js +0 -33
- package/lib/api/composition/matrix.js.map +0 -1
- package/lib/api/composition/rect.d.ts +0 -23
- package/lib/api/composition/rect.js +0 -35
- package/lib/api/composition/rect.js.map +0 -1
- package/lib/composition/circle.d.ts +0 -7
- package/lib/composition/circle.js +0 -89
- package/lib/composition/circle.js.map +0 -1
- package/lib/composition/flex.d.ts +0 -7
- package/lib/composition/flex.js +0 -44
- package/lib/composition/flex.js.map +0 -1
- package/lib/composition/keyframe.d.ts +0 -7
- package/lib/composition/keyframe.js +0 -79
- package/lib/composition/keyframe.js.map +0 -1
- package/lib/composition/layer.d.ts +0 -7
- package/lib/composition/layer.js +0 -36
- package/lib/composition/layer.js.map +0 -1
- package/lib/composition/matrix.d.ts +0 -8
- package/lib/composition/matrix.js +0 -155
- package/lib/composition/matrix.js.map +0 -1
- package/lib/composition/rect.d.ts +0 -30
- package/lib/composition/rect.js +0 -291
- package/lib/composition/rect.js.map +0 -1
- package/lib/labelLayout/hideOverlap.d.ts +0 -2
- package/lib/labelLayout/hideOverlap.js.map +0 -1
- package/lib/labelLayout/index.d.ts +0 -1
- package/lib/labelLayout/index.js +0 -6
- package/lib/labelLayout/index.js.map +0 -1
- package/lib/mark/annotation/connector.d.ts +0 -4
- package/lib/mark/annotation/connector.js +0 -22
- package/lib/mark/annotation/connector.js.map +0 -1
- package/lib/mark/annotation/index.d.ts +0 -14
- package/lib/mark/annotation/index.js +0 -18
- package/lib/mark/annotation/index.js.map +0 -1
- package/lib/mark/annotation/lineX.d.ts +0 -4
- package/lib/mark/annotation/lineX.js +0 -25
- package/lib/mark/annotation/lineX.js.map +0 -1
- package/lib/mark/annotation/lineY.d.ts +0 -4
- package/lib/mark/annotation/lineY.js +0 -25
- package/lib/mark/annotation/lineY.js.map +0 -1
- package/lib/mark/annotation/range.d.ts +0 -8
- package/lib/mark/annotation/range.js +0 -49
- package/lib/mark/annotation/range.js.map +0 -1
- package/lib/mark/annotation/rangeX.d.ts +0 -4
- package/lib/mark/annotation/rangeX.js +0 -18
- package/lib/mark/annotation/rangeX.js.map +0 -1
- package/lib/mark/annotation/rangeY.d.ts +0 -4
- package/lib/mark/annotation/rangeY.js +0 -18
- package/lib/mark/annotation/rangeY.js.map +0 -1
- package/lib/mark/annotation/text.d.ts +0 -4
- package/lib/mark/annotation/text.js +0 -25
- package/lib/mark/annotation/text.js.map +0 -1
- package/lib/mark/geometry/area.d.ts +0 -4
- package/lib/mark/geometry/area.js +0 -74
- package/lib/mark/geometry/area.js.map +0 -1
- package/lib/mark/geometry/box.d.ts +0 -34
- package/lib/mark/geometry/box.js +0 -94
- package/lib/mark/geometry/box.js.map +0 -1
- package/lib/mark/geometry/grid.d.ts +0 -9
- package/lib/mark/geometry/grid.js +0 -50
- package/lib/mark/geometry/grid.js.map +0 -1
- package/lib/mark/geometry/image.d.ts +0 -4
- package/lib/mark/geometry/image.js +0 -39
- package/lib/mark/geometry/image.js.map +0 -1
- package/lib/mark/geometry/index.d.ts +0 -22
- package/lib/mark/geometry/index.js +0 -26
- package/lib/mark/geometry/index.js.map +0 -1
- package/lib/mark/geometry/interval.d.ts +0 -12
- package/lib/mark/geometry/interval.js +0 -62
- package/lib/mark/geometry/interval.js.map +0 -1
- package/lib/mark/geometry/line.d.ts +0 -7
- package/lib/mark/geometry/line.js +0 -84
- package/lib/mark/geometry/line.js.map +0 -1
- package/lib/mark/geometry/link.d.ts +0 -7
- package/lib/mark/geometry/link.js +0 -37
- package/lib/mark/geometry/link.js.map +0 -1
- package/lib/mark/geometry/point.d.ts +0 -10
- package/lib/mark/geometry/point.js +0 -79
- package/lib/mark/geometry/point.js.map +0 -1
- package/lib/mark/geometry/polygon.d.ts +0 -7
- package/lib/mark/geometry/polygon.js +0 -47
- package/lib/mark/geometry/polygon.js.map +0 -1
- package/lib/mark/geometry/text.d.ts +0 -4
- package/lib/mark/geometry/text.js +0 -39
- package/lib/mark/geometry/text.js.map +0 -1
- package/lib/mark/geometry/vector.d.ts +0 -8
- package/lib/mark/geometry/vector.js +0 -47
- package/lib/mark/geometry/vector.js.map +0 -1
- package/lib/shape/annotation/badge.d.ts +0 -14
- package/lib/shape/annotation/badge.js +0 -97
- package/lib/shape/annotation/badge.js.map +0 -1
- package/lib/shape/annotation/connector.d.ts +0 -15
- package/lib/shape/annotation/connector.js +0 -105
- package/lib/shape/annotation/connector.js.map +0 -1
- package/lib/shape/annotation/line.d.ts +0 -3
- package/lib/shape/annotation/line.js +0 -60
- package/lib/shape/annotation/line.js.map +0 -1
- package/lib/shape/annotation/text.d.ts +0 -20
- package/lib/shape/annotation/text.js +0 -178
- package/lib/shape/annotation/text.js.map +0 -1
- package/lib/shape/area/curveArea.d.ts +0 -8
- package/lib/shape/area/curveArea.js +0 -64
- package/lib/shape/area/curveArea.js.map +0 -1
- package/lib/shape/area/smoothArea.d.ts +0 -5
- package/lib/shape/area/smoothArea.js +0 -27
- package/lib/shape/area/smoothArea.js.map +0 -1
- package/lib/shape/interval/colorRect.d.ts +0 -14
- package/lib/shape/interval/colorRect.js +0 -66
- package/lib/shape/interval/colorRect.js.map +0 -1
- package/lib/shape/interval/hollowRect.d.ts +0 -6
- package/lib/shape/interval/hollowRect.js +0 -13
- package/lib/shape/interval/hollowRect.js.map +0 -1
- package/lib/shape/line/curveLine.d.ts +0 -8
- package/lib/shape/line/curveLine.js +0 -45
- package/lib/shape/line/curveLine.js.map +0 -1
- package/lib/shape/link/smoothEdge.d.ts +0 -6
- package/lib/shape/link/smoothEdge.js +0 -43
- package/lib/shape/link/smoothEdge.js.map +0 -1
- package/lib/shape/point/colorPoint.d.ts +0 -11
- package/lib/shape/point/colorPoint.js +0 -86
- package/lib/shape/point/colorPoint.js.map +0 -1
- package/lib/shape/point/hollowPoint.js +0 -13
- package/lib/shape/point/hollowPoint.js.map +0 -1
- package/lib/spec/labelLayout.d.ts +0 -4
- package/lib/spec/labelLayout.js +0 -3
- package/lib/spec/labelLayout.js.map +0 -1
- package/lib/transform/jitterY.d.ts +0 -8
- package/lib/transform/jitterY.js +0 -25
- package/lib/transform/jitterY.js.map +0 -1
- package/src/adjust/index.ts +0 -2
- package/src/adjust/pack.ts +0 -67
- package/src/api/composition/circle.ts +0 -43
- package/src/api/composition/flex.ts +0 -30
- package/src/api/composition/keyframe.ts +0 -30
- package/src/api/composition/layer.ts +0 -24
- package/src/api/composition/matrix.ts +0 -43
- package/src/api/composition/rect.ts +0 -47
- package/src/composition/circle.ts +0 -102
- package/src/composition/flex.ts +0 -49
- package/src/composition/keyframe.ts +0 -90
- package/src/composition/layer.ts +0 -26
- package/src/composition/matrix.ts +0 -170
- package/src/composition/rect.ts +0 -339
- package/src/labelLayout/hideOverlap.ts +0 -47
- package/src/labelLayout/index.ts +0 -1
- package/src/mark/annotation/connector.ts +0 -27
- package/src/mark/annotation/index.ts +0 -15
- package/src/mark/annotation/lineX.ts +0 -31
- package/src/mark/annotation/lineY.ts +0 -31
- package/src/mark/annotation/range.ts +0 -55
- package/src/mark/annotation/rangeX.ts +0 -23
- package/src/mark/annotation/rangeY.ts +0 -23
- package/src/mark/annotation/text.ts +0 -30
- package/src/mark/geometry/area.ts +0 -85
- package/src/mark/geometry/box.ts +0 -105
- package/src/mark/geometry/grid.ts +0 -56
- package/src/mark/geometry/image.ts +0 -42
- package/src/mark/geometry/index.ts +0 -23
- package/src/mark/geometry/interval.ts +0 -70
- package/src/mark/geometry/line.ts +0 -99
- package/src/mark/geometry/link.ts +0 -44
- package/src/mark/geometry/point.ts +0 -83
- package/src/mark/geometry/polygon.ts +0 -54
- package/src/mark/geometry/text.ts +0 -43
- package/src/mark/geometry/vector.ts +0 -56
- package/src/shape/annotation/badge.ts +0 -114
- package/src/shape/annotation/connector.ts +0 -138
- package/src/shape/annotation/line.ts +0 -55
- package/src/shape/annotation/text.ts +0 -236
- package/src/shape/area/curveArea.ts +0 -61
- package/src/shape/area/smoothArea.ts +0 -25
- package/src/shape/interval/colorRect.ts +0 -62
- package/src/shape/interval/hollowRect.ts +0 -15
- package/src/shape/line/curveLine.ts +0 -44
- package/src/shape/link/smoothEdge.ts +0 -41
- package/src/shape/point/colorPoint.ts +0 -65
- package/src/shape/point/hollowPoint.ts +0 -15
- package/src/spec/labelLayout.ts +0 -5
- package/src/transform/jitterY.ts +0 -26
package/esm/mark/area.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { group } from 'd3-array';
|
|
2
|
+
import { baseGeometryChannels, basePostInference, basePreInference, } from './utils';
|
|
3
|
+
/*
|
|
4
|
+
* Convert value for each channel to area shapes.
|
|
5
|
+
*
|
|
6
|
+
* ▲
|
|
7
|
+
* │
|
|
8
|
+
* │ y2
|
|
9
|
+
* │
|
|
10
|
+
* │ y1 xxxxxxxxxxxxx
|
|
11
|
+
* │ xxxx x
|
|
12
|
+
* │ xxx x
|
|
13
|
+
* │ xxx x
|
|
14
|
+
* │ y0 xxx x
|
|
15
|
+
* │ xxxxxxx x
|
|
16
|
+
* │ x x
|
|
17
|
+
* │ xx x
|
|
18
|
+
* │ x x
|
|
19
|
+
* │ x x
|
|
20
|
+
* │ x x
|
|
21
|
+
* │ x x
|
|
22
|
+
* │ x x
|
|
23
|
+
* │ x x
|
|
24
|
+
* │ x x
|
|
25
|
+
* ────┼─────────x───────────────────────────────x──────────────►
|
|
26
|
+
* │ y3 y4 y5
|
|
27
|
+
*/
|
|
28
|
+
export const Area = () => {
|
|
29
|
+
return (index, scale, value, coordinate) => {
|
|
30
|
+
const { x: X, y: Y, y1: Y1, series: S } = value;
|
|
31
|
+
// Group data by series field.
|
|
32
|
+
const series = S ? Array.from(group(index, (i) => S[i]).values()) : [index];
|
|
33
|
+
const I = series.map((group) => group[0]);
|
|
34
|
+
// A group of data corresponds to one area.
|
|
35
|
+
const P = Array.from(series, (SI) => {
|
|
36
|
+
const l = SI.length;
|
|
37
|
+
const points = new Array(l * 2);
|
|
38
|
+
for (let idx = 0; idx < SI.length; idx++) {
|
|
39
|
+
const i = SI[idx];
|
|
40
|
+
points[idx] = coordinate.map([+X[i], +Y[i]]); // y1
|
|
41
|
+
points[l + idx] = coordinate.map([+X[i], +Y1[i]]); // y0
|
|
42
|
+
}
|
|
43
|
+
return points;
|
|
44
|
+
});
|
|
45
|
+
return [I, P, series];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
Area.props = {
|
|
49
|
+
defaultShape: 'area',
|
|
50
|
+
defaultLabelShape: 'label',
|
|
51
|
+
channels: [
|
|
52
|
+
...baseGeometryChannels(),
|
|
53
|
+
{ name: 'x', required: true },
|
|
54
|
+
{ name: 'y', required: true },
|
|
55
|
+
{ name: 'size' },
|
|
56
|
+
{ name: 'series', scale: 'identity' },
|
|
57
|
+
],
|
|
58
|
+
preInference: [
|
|
59
|
+
...basePreInference(),
|
|
60
|
+
{ type: 'maybeSeries' },
|
|
61
|
+
{ type: 'maybeZeroY1' },
|
|
62
|
+
{ type: 'maybeZeroPadding' },
|
|
63
|
+
],
|
|
64
|
+
postInference: [
|
|
65
|
+
...basePostInference(),
|
|
66
|
+
{ type: 'maybeTitleX' },
|
|
67
|
+
{ type: 'maybeTooltipY' },
|
|
68
|
+
],
|
|
69
|
+
shapes: ['area', 'smooth'],
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area.js","sourceRoot":"src/","sources":["mark/area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAoB,GAAG,EAAE;IACxC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QAEhD,8BAA8B;QAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EA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,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,MAAM,EAAE;QAChB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE;KACtC;IACD,YAAY,EAAE;QACZ,GAAG,gBAAgB,EAAE;QACrB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,kBAAkB,EAAE;KAC7B;IACD,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;IACD,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { MarkComponent as MC } from '../runtime';
|
|
2
|
+
import { BoxGeometry } from '../spec';
|
|
3
|
+
export declare type BoxOptions = Omit<BoxGeometry, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Convert value for each channel to box shapes.
|
|
6
|
+
*
|
|
7
|
+
* p0 p2 p1
|
|
8
|
+
* ──────────┬──────────
|
|
9
|
+
* │
|
|
10
|
+
* │
|
|
11
|
+
* │
|
|
12
|
+
* │
|
|
13
|
+
* │
|
|
14
|
+
* │
|
|
15
|
+
* │ p3
|
|
16
|
+
* p4 ┌─────────┴──────────┐ p5
|
|
17
|
+
* │ │
|
|
18
|
+
* │ │
|
|
19
|
+
* p8 ├────────────────────┤ p9
|
|
20
|
+
* │ │
|
|
21
|
+
* │ p10 │
|
|
22
|
+
* p7 └─────────┬──────────┘ p6
|
|
23
|
+
* │
|
|
24
|
+
* │
|
|
25
|
+
* │
|
|
26
|
+
* │
|
|
27
|
+
* │
|
|
28
|
+
* │
|
|
29
|
+
* │
|
|
30
|
+
* │
|
|
31
|
+
* ───────────┴───────────
|
|
32
|
+
* p12 p11 p13
|
|
33
|
+
*/
|
|
34
|
+
export declare const Box: MC<BoxOptions>;
|
package/esm/mark/box.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { baseGeometryChannels, basePostInference, basePreInference, } from './utils';
|
|
2
|
+
/**
|
|
3
|
+
* Convert value for each channel to box shapes.
|
|
4
|
+
*
|
|
5
|
+
* p0 p2 p1
|
|
6
|
+
* ──────────┬──────────
|
|
7
|
+
* │
|
|
8
|
+
* │
|
|
9
|
+
* │
|
|
10
|
+
* │
|
|
11
|
+
* │
|
|
12
|
+
* │
|
|
13
|
+
* │ p3
|
|
14
|
+
* p4 ┌─────────┴──────────┐ p5
|
|
15
|
+
* │ │
|
|
16
|
+
* │ │
|
|
17
|
+
* p8 ├────────────────────┤ p9
|
|
18
|
+
* │ │
|
|
19
|
+
* │ p10 │
|
|
20
|
+
* p7 └─────────┬──────────┘ p6
|
|
21
|
+
* │
|
|
22
|
+
* │
|
|
23
|
+
* │
|
|
24
|
+
* │
|
|
25
|
+
* │
|
|
26
|
+
* │
|
|
27
|
+
* │
|
|
28
|
+
* │
|
|
29
|
+
* ───────────┴───────────
|
|
30
|
+
* p12 p11 p13
|
|
31
|
+
*/
|
|
32
|
+
export const Box = () => {
|
|
33
|
+
return (index, scale, value, coordinate) => {
|
|
34
|
+
const { x: X, y: Y, y1: Y1, y2: Y2, y3: Y3, y4: Y4, series: S } = value;
|
|
35
|
+
// Calc width for each box.
|
|
36
|
+
// The scales for x and series channels must be band scale.
|
|
37
|
+
const xScale = scale.x;
|
|
38
|
+
const series = scale.series;
|
|
39
|
+
const P = Array.from(index, (i) => {
|
|
40
|
+
const groupWidth = xScale.getBandWidth(xScale.invert(+X[i]));
|
|
41
|
+
const ratio = series ? series.getBandWidth(series.invert(+(S === null || S === void 0 ? void 0 : S[i]))) : 1;
|
|
42
|
+
const width = groupWidth * ratio;
|
|
43
|
+
const offset = (+(S === null || S === void 0 ? void 0 : S[i]) || 0) * groupWidth;
|
|
44
|
+
const x = +X[i] + offset + width / 2;
|
|
45
|
+
const [low, q1, median, q3, high] = [
|
|
46
|
+
+Y[i],
|
|
47
|
+
+Y1[i],
|
|
48
|
+
+Y2[i],
|
|
49
|
+
+Y3[i],
|
|
50
|
+
+Y4[i],
|
|
51
|
+
];
|
|
52
|
+
const P13 = [
|
|
53
|
+
[x - width / 2, high],
|
|
54
|
+
[x + width / 2, high],
|
|
55
|
+
[x, high],
|
|
56
|
+
[x, q3],
|
|
57
|
+
[x - width / 2, q3],
|
|
58
|
+
[x + width / 2, q3],
|
|
59
|
+
[x + width / 2, q1],
|
|
60
|
+
[x - width / 2, q1],
|
|
61
|
+
[x - width / 2, median],
|
|
62
|
+
[x + width / 2, median],
|
|
63
|
+
[x, q1],
|
|
64
|
+
[x, low],
|
|
65
|
+
[x - width / 2, low],
|
|
66
|
+
[x + width / 2, low],
|
|
67
|
+
];
|
|
68
|
+
return P13.map((d) => coordinate.map(d));
|
|
69
|
+
});
|
|
70
|
+
return [index, P];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
Box.props = {
|
|
74
|
+
defaultShape: 'box',
|
|
75
|
+
defaultLabelShape: 'label',
|
|
76
|
+
channels: [
|
|
77
|
+
...baseGeometryChannels(),
|
|
78
|
+
{ name: 'x', scale: 'band', required: true },
|
|
79
|
+
{ name: 'y', required: true },
|
|
80
|
+
{ name: 'series', scale: 'band' },
|
|
81
|
+
],
|
|
82
|
+
preInference: [...basePreInference()],
|
|
83
|
+
postInference: [
|
|
84
|
+
...basePostInference(),
|
|
85
|
+
{ type: 'maybeTitleX' },
|
|
86
|
+
{ type: 'maybeTooltipY' },
|
|
87
|
+
],
|
|
88
|
+
shapes: ['box'],
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.js","sourceRoot":"src/","sources":["mark/box.ts"],"names":[],"m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D,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,GAAG,CAAC,KAAK,GAAG;IACV,YAAY,EAAE,KAAK;IACnB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;KAClC;IACD,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC;IACrC,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;IACD,MAAM,EAAE,CAAC,KAAK,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MarkComponent as MC } from '../runtime';
|
|
2
|
+
import { CellGeometry } from '../spec';
|
|
3
|
+
export declare type CellOptions = Omit<CellGeometry, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Convert value for each channel to Cell shapes.
|
|
6
|
+
* Calc the bbox of each Cell based on x, y and r.
|
|
7
|
+
* This is for allowing their radius can be affected by coordinate(e.g. fisheye).
|
|
8
|
+
*/
|
|
9
|
+
export declare const Cell: MC<CellOptions>;
|
package/esm/mark/cell.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { baseGeometryChannels, basePostInference, basePreInference, } from './utils';
|
|
2
|
+
/**
|
|
3
|
+
* Convert value for each channel to Cell shapes.
|
|
4
|
+
* Calc the bbox of each Cell based on x, y and r.
|
|
5
|
+
* This is for allowing their radius can be affected by coordinate(e.g. fisheye).
|
|
6
|
+
*/
|
|
7
|
+
export const Cell = () => {
|
|
8
|
+
return (index, scale, value, coordinate) => {
|
|
9
|
+
const { x: X, y: Y } = value;
|
|
10
|
+
const x = scale.x;
|
|
11
|
+
const y = scale.y;
|
|
12
|
+
const P = Array.from(index, (i) => {
|
|
13
|
+
const width = x.getBandWidth(x.invert(+X[i]));
|
|
14
|
+
const height = y.getBandWidth(y.invert(+Y[i]));
|
|
15
|
+
const x1 = +X[i];
|
|
16
|
+
const y1 = +Y[i];
|
|
17
|
+
const p1 = [x1, y1];
|
|
18
|
+
const p2 = [x1 + width, y1];
|
|
19
|
+
const p3 = [x1 + width, y1 + height];
|
|
20
|
+
const p4 = [x1, y1 + height];
|
|
21
|
+
return [p1, p2, p3, p4].map((d) => coordinate.map(d));
|
|
22
|
+
});
|
|
23
|
+
return [index, P];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
Cell.props = {
|
|
27
|
+
defaultShape: 'cell',
|
|
28
|
+
defaultLabelShape: 'label',
|
|
29
|
+
channels: [
|
|
30
|
+
...baseGeometryChannels(),
|
|
31
|
+
{ name: 'x', required: true, scale: 'band' },
|
|
32
|
+
{ name: 'y', required: true, scale: 'band' },
|
|
33
|
+
],
|
|
34
|
+
preInference: [
|
|
35
|
+
...basePreInference(),
|
|
36
|
+
{ type: 'maybeZeroX' },
|
|
37
|
+
{ type: 'maybeZeroY' },
|
|
38
|
+
{ type: 'maybeZeroPadding' },
|
|
39
|
+
],
|
|
40
|
+
postInference: [
|
|
41
|
+
...basePostInference(),
|
|
42
|
+
{ type: 'maybeTitleX' },
|
|
43
|
+
{ type: 'maybeTooltipY' },
|
|
44
|
+
],
|
|
45
|
+
shapes: ['rect', 'hollow'],
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell.js","sourceRoot":"src/","sources":["mark/cell.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,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,CAAC,GAAG,CAAC,CAAC,CAAC,CAAc,CAAC;QACrE,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,KAAK,GAAG;IACX,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;QAC5C,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;KAC7C;IACD,YAAY,EAAE;QACZ,GAAG,gBAAgB,EAAE;QACrB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,YAAY,EAAE;QACtB,EAAE,IAAI,EAAE,kBAAkB,EAAE;KAC7B;IACD,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;IACD,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { baseAnnotationChannels, basePostInference, basePreInference, } from './utils';
|
|
2
|
+
import { Link } from './link';
|
|
3
|
+
export const Connector = (...args) => {
|
|
4
|
+
return Link(...args);
|
|
5
|
+
};
|
|
6
|
+
Connector.props = {
|
|
7
|
+
defaultShape: 'connector',
|
|
8
|
+
defaultLabelShape: 'label',
|
|
9
|
+
channels: [
|
|
10
|
+
...baseAnnotationChannels(),
|
|
11
|
+
{ name: 'x', required: true },
|
|
12
|
+
{ name: 'y', required: true },
|
|
13
|
+
],
|
|
14
|
+
preInference: [...basePreInference()],
|
|
15
|
+
postInference: [...basePostInference()],
|
|
16
|
+
shapes: ['connector'],
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=connector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.js","sourceRoot":"src/","sources":["mark/connector.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,MAAM,CAAC,MAAM,SAAS,GAAyB,CAAC,GAAG,IAAI,EAAE,EAAE;IACzD,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,SAAS,CAAC,KAAK,GAAG;IAChB,YAAY,EAAE,WAAW;IACzB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,sBAAsB,EAAE;QAC3B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC9B;IACD,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC;IACrC,aAAa,EAAE,CAAC,GAAG,iBAAiB,EAAE,CAAC;IACvC,MAAM,EAAE,CAAC,WAAW,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { baseGeometryChannels, basePostInference, basePreInference, createBandOffset, } from './utils';
|
|
2
|
+
export const Image = (options) => {
|
|
3
|
+
return (index, scale, value, coordinate) => {
|
|
4
|
+
const { x: X, y: Y } = value;
|
|
5
|
+
const offset = createBandOffset(scale, value, options);
|
|
6
|
+
const P = Array.from(index, (i) => {
|
|
7
|
+
const p = [+X[i], +Y[i]];
|
|
8
|
+
return [coordinate.map(offset(p, i))];
|
|
9
|
+
});
|
|
10
|
+
return [index, P];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
Image.props = {
|
|
14
|
+
defaultShape: 'image',
|
|
15
|
+
defaultLabelShape: 'label',
|
|
16
|
+
channels: [
|
|
17
|
+
...baseGeometryChannels(),
|
|
18
|
+
{ name: 'x', required: true },
|
|
19
|
+
{ name: 'y', required: true },
|
|
20
|
+
{ name: 'src', required: true, scale: 'identity' },
|
|
21
|
+
{ name: 'size' },
|
|
22
|
+
],
|
|
23
|
+
preInference: [...basePreInference()],
|
|
24
|
+
postInference: [
|
|
25
|
+
...basePostInference(),
|
|
26
|
+
{ type: 'maybeTitleX' },
|
|
27
|
+
{ type: 'maybeTooltipY' },
|
|
28
|
+
],
|
|
29
|
+
shapes: ['image'],
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"src/","sources":["mark/image.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAIjB,MAAM,CAAC,MAAM,KAAK,GAAqB,CAAC,OAAO,EAAE,EAAE;IACjD,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QAC7B,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,CAAC,GAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAClC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAc,CAAC;QACrD,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,CAAC,KAAK,GAAG;IACZ,YAAY,EAAE,OAAO;IACrB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE;QAClD,EAAE,IAAI,EAAE,MAAM,EAAE;KACjB;IACD,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,CAAC;IACrC,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;IACD,MAAM,EAAE,CAAC,OAAO,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { Interval } from './interval';
|
|
2
|
+
export { Rect } from './rect';
|
|
3
|
+
export { Line } from './line';
|
|
4
|
+
export { Point } from './point';
|
|
5
|
+
export { Text } from './text';
|
|
6
|
+
export { Cell } from './cell';
|
|
7
|
+
export { Area } from './area';
|
|
8
|
+
export { Link } from './link';
|
|
9
|
+
export { Image } from './image';
|
|
10
|
+
export { Polygon } from './polygon';
|
|
11
|
+
export { Box } from './box';
|
|
12
|
+
export { Vector } from './vector';
|
|
13
|
+
export { LineY } from './lineY';
|
|
14
|
+
export { LineX } from './lineX';
|
|
15
|
+
export { Connector } from './connector';
|
|
16
|
+
export { Range } from './range';
|
|
17
|
+
export { RangeX } from './rangeX';
|
|
18
|
+
export { RangeY } from './rangeY';
|
|
19
|
+
export type { IntervalOptions } from './interval';
|
|
20
|
+
export type { RectOptions } from './rect';
|
|
21
|
+
export type { LineOptions } from './line';
|
|
22
|
+
export type { PointOptions } from './point';
|
|
23
|
+
export type { TextOptions } from './text';
|
|
24
|
+
export type { CellOptions } from './cell';
|
|
25
|
+
export type { AreaOptions } from './area';
|
|
26
|
+
export type { LinkOptions } from './link';
|
|
27
|
+
export type { ImageOptions } from './image';
|
|
28
|
+
export type { PolygonOptions } from './polygon';
|
|
29
|
+
export type { BoxOptions } from './box';
|
|
30
|
+
export type { VectorOptions } from './vector';
|
|
31
|
+
export type { LineYOptions } from './lineY';
|
|
32
|
+
export type { LineXOptions } from './lineX';
|
|
33
|
+
export type { ConnectorOptions } from './connector';
|
|
34
|
+
export type { RangeOptions } from './range';
|
|
35
|
+
export type { RangeXOptions } from './rangeX';
|
|
36
|
+
export type { RangeYOptions } from './rangeY';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { Interval } from './interval';
|
|
2
|
+
export { Rect } from './rect';
|
|
3
|
+
export { Line } from './line';
|
|
4
|
+
export { Point } from './point';
|
|
5
|
+
export { Text } from './text';
|
|
6
|
+
export { Cell } from './cell';
|
|
7
|
+
export { Area } from './area';
|
|
8
|
+
export { Link } from './link';
|
|
9
|
+
export { Image } from './image';
|
|
10
|
+
export { Polygon } from './polygon';
|
|
11
|
+
export { Box } from './box';
|
|
12
|
+
export { Vector } from './vector';
|
|
13
|
+
export { LineY } from './lineY';
|
|
14
|
+
export { LineX } from './lineX';
|
|
15
|
+
export { Connector } from './connector';
|
|
16
|
+
export { Range } from './range';
|
|
17
|
+
export { RangeX } from './rangeX';
|
|
18
|
+
export { RangeY } from './rangeY';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["mark/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MarkComponent as MC } from '../runtime';
|
|
2
|
+
import { IntervalGeometry } from '../spec';
|
|
3
|
+
export declare type IntervalOptions = Omit<IntervalGeometry, 'type'>;
|
|
4
|
+
/**
|
|
5
|
+
* Convert value for each channel to rect shapes.
|
|
6
|
+
* p0 p1
|
|
7
|
+
* ┌────┐
|
|
8
|
+
* │ │
|
|
9
|
+
* │ │
|
|
10
|
+
* p3 └────┘ p2
|
|
11
|
+
*/
|
|
12
|
+
export declare const Interval: MC<IntervalOptions>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { baseGeometryChannels, basePostInference, basePreInference, } from './utils';
|
|
2
|
+
function bandWidth(scale, x) {
|
|
3
|
+
return scale.getBandWidth(scale.invert(x));
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Convert value for each channel to rect shapes.
|
|
7
|
+
* p0 p1
|
|
8
|
+
* ┌────┐
|
|
9
|
+
* │ │
|
|
10
|
+
* │ │
|
|
11
|
+
* p3 └────┘ p2
|
|
12
|
+
*/
|
|
13
|
+
export const Interval = () => {
|
|
14
|
+
return (index, scale, value, coordinate) => {
|
|
15
|
+
const { x: X, y: Y, y1: Y1, series: S, size: SZ } = value;
|
|
16
|
+
// Calc width for each interval.
|
|
17
|
+
// The scales for x and series channels must be band scale.
|
|
18
|
+
const x = scale.x;
|
|
19
|
+
const series = scale.series;
|
|
20
|
+
const [width] = coordinate.getSize();
|
|
21
|
+
const NSZ = SZ ? SZ.map((d) => +d / width) : null;
|
|
22
|
+
const x1x2 = !SZ
|
|
23
|
+
? (x, w, i) => [x, x + w]
|
|
24
|
+
: (x, w, i) => {
|
|
25
|
+
const mx = x + w / 2;
|
|
26
|
+
const s = NSZ[i];
|
|
27
|
+
return [mx - s / 2, mx + s / 2];
|
|
28
|
+
};
|
|
29
|
+
// Calc the points of bounding box for the interval.
|
|
30
|
+
// They are start from left-top corner in clock wise order.
|
|
31
|
+
const P = Array.from(index, (i) => {
|
|
32
|
+
const groupWidth = bandWidth(x, X[i]);
|
|
33
|
+
const ratio = series ? bandWidth(series, S === null || S === void 0 ? void 0 : S[i]) : 1;
|
|
34
|
+
const width = groupWidth * ratio;
|
|
35
|
+
const offset = (+(S === null || S === void 0 ? void 0 : S[i]) || 0) * groupWidth;
|
|
36
|
+
const x0 = +X[i] + offset;
|
|
37
|
+
const [x1, x2] = x1x2(x0, width, i);
|
|
38
|
+
const y1 = +Y[i];
|
|
39
|
+
const y2 = +Y1[i];
|
|
40
|
+
const p1 = [x1, y1];
|
|
41
|
+
const p2 = [x2, y1];
|
|
42
|
+
const p3 = [x2, y2];
|
|
43
|
+
const p4 = [x1, y2];
|
|
44
|
+
return [p1, p2, p3, p4].map((d) => coordinate.map(d));
|
|
45
|
+
});
|
|
46
|
+
return [index, P];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
Interval.props = {
|
|
50
|
+
defaultShape: 'rect',
|
|
51
|
+
defaultLabelShape: 'label',
|
|
52
|
+
channels: [
|
|
53
|
+
...baseGeometryChannels(),
|
|
54
|
+
{ name: 'x', scale: 'band', required: true },
|
|
55
|
+
{ name: 'y', required: true },
|
|
56
|
+
{ name: 'series', scale: 'band' },
|
|
57
|
+
{ name: 'size' },
|
|
58
|
+
],
|
|
59
|
+
preInference: [
|
|
60
|
+
...basePreInference(),
|
|
61
|
+
{ type: 'maybeZeroY1' },
|
|
62
|
+
{ type: 'maybeZeroX' },
|
|
63
|
+
],
|
|
64
|
+
postInference: [
|
|
65
|
+
...basePostInference(),
|
|
66
|
+
{ type: 'maybeTitleX' },
|
|
67
|
+
{ type: 'maybeTooltipY' },
|
|
68
|
+
],
|
|
69
|
+
shapes: ['rect', 'hollow', 'funnel', 'pyramid'],
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=interval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interval.js","sourceRoot":"src/","sources":["mark/interval.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAIjB,SAAS,SAAS,CAAC,KAAW,EAAE,CAAM;IACpC,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AACD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAwB,GAAG,EAAE;IAChD,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE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I,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC7B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;QACjC,EAAE,IAAI,EAAE,MAAM,EAAE;KACjB;IACD,YAAY,EAAE;QACZ,GAAG,gBAAgB,EAAE;QACrB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,YAAY,EAAE;KACvB;IACD,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;KAC1B;IACD,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;CAChD,CAAC"}
|
package/esm/mark/line.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { group } from 'd3-array';
|
|
2
|
+
import { isParallel } from '../utils/coordinate';
|
|
3
|
+
import { baseGeometryChannels, basePostInference, basePreInference, } from './utils';
|
|
4
|
+
const line = (index, scale, value, coordinate) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
const { series: S, x: X, y: Y } = value;
|
|
7
|
+
const { x, y } = scale;
|
|
8
|
+
// Because x and y channel is not strictly required in Line.props,
|
|
9
|
+
// it should throw error with empty x or y channels.
|
|
10
|
+
if (X === undefined || Y === undefined) {
|
|
11
|
+
throw new Error('Missing encode for x or y channel.');
|
|
12
|
+
}
|
|
13
|
+
// Group data into series.
|
|
14
|
+
// There is only one series without specified series encode.
|
|
15
|
+
const series = S ? Array.from(group(index, (i) => S[i]).values()) : [index];
|
|
16
|
+
const I = series.map((group) => group[0]);
|
|
17
|
+
// A group of data corresponds to one line.
|
|
18
|
+
const xoffset = (((_a = x === null || x === void 0 ? void 0 : x.getBandWidth) === null || _a === void 0 ? void 0 : _a.call(x)) || 0) / 2;
|
|
19
|
+
const yoffset = (((_b = y === null || y === void 0 ? void 0 : y.getBandWidth) === null || _b === void 0 ? void 0 : _b.call(y)) || 0) / 2;
|
|
20
|
+
const P = Array.from(series, (I) => {
|
|
21
|
+
return I.map((i) => coordinate.map([+X[i] + xoffset, +Y[i] + yoffset]));
|
|
22
|
+
});
|
|
23
|
+
return [I, P, series];
|
|
24
|
+
};
|
|
25
|
+
const parallel = (index, scale, value, coordinate) => {
|
|
26
|
+
// Extract all value for position[number] channels.
|
|
27
|
+
const PV = Object.entries(value)
|
|
28
|
+
.filter(([key]) => key.startsWith('position'))
|
|
29
|
+
.map(([, value]) => value);
|
|
30
|
+
// Because position channel is not strictly required in Line.props,
|
|
31
|
+
// it should throw error with empty position values.
|
|
32
|
+
if (PV.length === 0) {
|
|
33
|
+
throw new Error('Missing encode for position channel.');
|
|
34
|
+
}
|
|
35
|
+
// One data corresponds to one line.
|
|
36
|
+
const P = Array.from(index, (i) => {
|
|
37
|
+
// Transform high dimension vector to a list of two-dimension vectors.
|
|
38
|
+
// [a, b, c] -> [d, e, f, g, h, i]
|
|
39
|
+
const vector = PV.map((pv) => +pv[i]);
|
|
40
|
+
const vectors = coordinate.map(vector);
|
|
41
|
+
// Two-dimension vectors are stored in a flat array, so extract them.
|
|
42
|
+
// [d, e, f, g, h, i] -> [d, e], [f, g], [h, i]
|
|
43
|
+
const points = [];
|
|
44
|
+
for (let i = 0; i < vectors.length; i += 2) {
|
|
45
|
+
points.push([vectors[i], vectors[i + 1]]);
|
|
46
|
+
}
|
|
47
|
+
return points;
|
|
48
|
+
});
|
|
49
|
+
return [index, P];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Convert value for each channel to line shapes.
|
|
53
|
+
*/
|
|
54
|
+
export const Line = () => {
|
|
55
|
+
return (index, scale, value, coordinate) => {
|
|
56
|
+
const mark = isParallel(coordinate) ? parallel : line;
|
|
57
|
+
return mark(index, scale, value, coordinate);
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
Line.props = {
|
|
61
|
+
defaultShape: 'line',
|
|
62
|
+
defaultLabelShape: 'label',
|
|
63
|
+
channels: [
|
|
64
|
+
...baseGeometryChannels(),
|
|
65
|
+
{ name: 'x' },
|
|
66
|
+
{ name: 'y' },
|
|
67
|
+
{ name: 'position', independent: true },
|
|
68
|
+
{ name: 'size' },
|
|
69
|
+
{ name: 'series', scale: 'identity' },
|
|
70
|
+
],
|
|
71
|
+
preInference: [...basePreInference(), { type: 'maybeSeries' }],
|
|
72
|
+
postInference: [
|
|
73
|
+
...basePostInference(),
|
|
74
|
+
{ type: 'maybeTitleX' },
|
|
75
|
+
{ type: 'maybeTooltipY' },
|
|
76
|
+
{ type: 'maybeTooltipPosition' },
|
|
77
|
+
],
|
|
78
|
+
shapes: ['line', 'smooth'],
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line.js","sourceRoot":"src/","sources":["mark/line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAIjB,MAAM,IAAI,GAAS,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;;IACrD,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;IAEvB,kEAAkE;IAClE,oDAAoD;IACpD,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE;QACtC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACvD;IAED,0BAA0B;IAC1B,4DAA4D;IAC5D,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,C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,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,KAAK,GAAG;IACX,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE;QACR,GAAG,oBAAoB,EAAE;QACzB,EAAE,IAAI,EAAE,GAAG,EAAE;QACb,EAAE,IAAI,EAAE,GAAG,EAAE;QACb,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE;QACvC,EAAE,IAAI,EAAE,MAAM,EAAE;QAChB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE;KACtC;IACD,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC9D,aAAa,EAAE;QACb,GAAG,iBAAiB,EAAE;QACtB,EAAE,IAAI,EAAE,aAAa,EAAE;QACvB,EAAE,IAAI,EAAE,eAAe,EAAE;QACzB,EAAE,IAAI,EAAE,sBAAsB,EAAE;KACjC;IACD,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { basePostInference, baseAnnotationChannels, basePreInference, } from './utils';
|
|
2
|
+
export const LineX = () => {
|
|
3
|
+
return (index, scale, value, coordinate) => {
|
|
4
|
+
const { x: X } = value;
|
|
5
|
+
const P = Array.from(index, (i) => {
|
|
6
|
+
const p1 = [X[i], 1];
|
|
7
|
+
const p2 = [X[i], 0];
|
|
8
|
+
return [p1, p2].map((d) => coordinate.map(d));
|
|
9
|
+
});
|
|
10
|
+
return [index, P];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
LineX.props = {
|
|
14
|
+
defaultShape: 'line',
|
|
15
|
+
defaultLabelShape: 'label',
|
|
16
|
+
channels: [...baseAnnotationChannels(), { name: 'x', required: true }],
|
|
17
|
+
preInference: [...basePreInference(), { type: 'maybeTupleX' }],
|
|
18
|
+
postInference: [...basePostInference()],
|
|
19
|
+
shapes: ['line'],
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=lineX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineX.js","sourceRoot":"src/","sources":["mark/lineX.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAIjB,MAAM,CAAC,MAAM,KAAK,GAAqB,GAAG,EAAE;IAC1C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;QACzC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAW,CAAC;YAC/B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAW,CAAC;YAC/B,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAc,CAAC;QAC7D,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,CAAC,KAAK,GAAG;IACZ,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,OAAO;IAC1B,QAAQ,EAAE,CAAC,GAAG,sBAAsB,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtE,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,EAAE,EAAE,IAAI,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