@antv/g2 4.1.43 → 4.1.44
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.min.js +44 -0
- package/dist/g2.min.js.map +1 -0
- package/esm/animate/animation/fade.d.ts +21 -0
- package/esm/animate/animation/fade.js +42 -0
- package/esm/animate/animation/fade.js.map +1 -0
- package/esm/animate/animation/grow-in.d.ts +30 -0
- package/esm/animate/animation/grow-in.js +38 -0
- package/esm/animate/animation/grow-in.js.map +1 -0
- package/esm/animate/animation/index.d.ts +16 -0
- package/esm/animate/animation/index.js +17 -0
- package/esm/animate/animation/index.js.map +1 -0
- package/esm/animate/animation/path-in.d.ts +12 -0
- package/esm/animate/animation/path-in.js +21 -0
- package/esm/animate/animation/path-in.js.map +1 -0
- package/esm/animate/animation/position-update.d.ts +11 -0
- package/esm/animate/animation/position-update.js +24 -0
- package/esm/animate/animation/position-update.js.map +1 -0
- package/esm/animate/animation/scale-in.d.ts +19 -0
- package/esm/animate/animation/scale-in.js +60 -0
- package/esm/animate/animation/scale-in.js.map +1 -0
- package/esm/animate/animation/sector-path-update.d.ts +11 -0
- package/esm/animate/animation/sector-path-update.js +131 -0
- package/esm/animate/animation/sector-path-update.js.map +1 -0
- package/esm/animate/animation/util.d.ts +19 -0
- package/esm/animate/animation/util.js +88 -0
- package/esm/animate/animation/util.js.map +1 -0
- package/esm/animate/animation/wave-in.d.ts +13 -0
- package/esm/animate/animation/wave-in.js +26 -0
- package/esm/animate/animation/wave-in.js.map +1 -0
- package/esm/animate/animation/zoom.d.ts +21 -0
- package/esm/animate/animation/zoom.js +66 -0
- package/esm/animate/animation/zoom.js.map +1 -0
- package/esm/animate/index.d.ts +48 -0
- package/esm/animate/index.js +249 -0
- package/esm/animate/index.js.map +1 -0
- package/esm/animate/interface.d.ts +12 -0
- package/esm/animate/interface.js +2 -0
- package/esm/animate/interface.js.map +1 -0
- package/esm/api.d.ts +2 -0
- package/esm/api.js +3 -0
- package/esm/api.js.map +1 -0
- package/esm/base.d.ts +33 -0
- package/esm/base.js +55 -0
- package/esm/base.js.map +1 -0
- package/esm/chart/chart.d.ts +61 -0
- package/esm/chart/chart.js +157 -0
- package/esm/chart/chart.js.map +1 -0
- package/esm/chart/controller/annotation.d.ts +162 -0
- package/esm/chart/controller/annotation.js +581 -0
- package/esm/chart/controller/annotation.js.map +1 -0
- package/esm/chart/controller/axis.d.ts +93 -0
- package/esm/chart/controller/axis.js +578 -0
- package/esm/chart/controller/axis.js.map +1 -0
- package/esm/chart/controller/base.d.ts +64 -0
- package/esm/chart/controller/base.js +62 -0
- package/esm/chart/controller/base.js.map +1 -0
- package/esm/chart/controller/coordinate.d.ts +74 -0
- package/esm/chart/controller/coordinate.js +145 -0
- package/esm/chart/controller/coordinate.js.map +1 -0
- package/esm/chart/controller/gesture.d.ts +37 -0
- package/esm/chart/controller/gesture.js +258 -0
- package/esm/chart/controller/gesture.js.map +1 -0
- package/esm/chart/controller/index.d.ts +25 -0
- package/esm/chart/controller/index.js +34 -0
- package/esm/chart/controller/index.js.map +1 -0
- package/esm/chart/controller/legend.d.ts +106 -0
- package/esm/chart/controller/legend.js +484 -0
- package/esm/chart/controller/legend.js.map +1 -0
- package/esm/chart/controller/scrollbar.d.ts +64 -0
- package/esm/chart/controller/scrollbar.js +316 -0
- package/esm/chart/controller/scrollbar.js.map +1 -0
- package/esm/chart/controller/slider.d.ts +88 -0
- package/esm/chart/controller/slider.js +296 -0
- package/esm/chart/controller/slider.js.map +1 -0
- package/esm/chart/controller/tooltip.d.ts +68 -0
- package/esm/chart/controller/tooltip.js +644 -0
- package/esm/chart/controller/tooltip.js.map +1 -0
- package/esm/chart/event.d.ts +47 -0
- package/esm/chart/event.js +91 -0
- package/esm/chart/event.js.map +1 -0
- package/esm/chart/index.d.ts +4 -0
- package/esm/chart/index.js +5 -0
- package/esm/chart/index.js.map +1 -0
- package/esm/chart/layout/auto.d.ts +8 -0
- package/esm/chart/layout/auto.js +64 -0
- package/esm/chart/layout/auto.js.map +1 -0
- package/esm/chart/layout/constraint/bounds.d.ts +32 -0
- package/esm/chart/layout/constraint/bounds.js +30 -0
- package/esm/chart/layout/constraint/bounds.js.map +1 -0
- package/esm/chart/layout/constraint/constraint.d.ts +31 -0
- package/esm/chart/layout/constraint/constraint.js +81 -0
- package/esm/chart/layout/constraint/constraint.js.map +1 -0
- package/esm/chart/layout/constraint/gauss.d.ts +11 -0
- package/esm/chart/layout/constraint/gauss.js +63 -0
- package/esm/chart/layout/constraint/gauss.js.map +1 -0
- package/esm/chart/layout/constraint/index.d.ts +5 -0
- package/esm/chart/layout/constraint/index.js +30 -0
- package/esm/chart/layout/constraint/index.js.map +1 -0
- package/esm/chart/layout/constraint/solver.d.ts +40 -0
- package/esm/chart/layout/constraint/solver.js +77 -0
- package/esm/chart/layout/constraint/solver.js.map +1 -0
- package/esm/chart/layout/constraint/types.d.ts +21 -0
- package/esm/chart/layout/constraint/types.js +13 -0
- package/esm/chart/layout/constraint/types.js.map +1 -0
- package/esm/chart/layout/constraint/variable.d.ts +24 -0
- package/esm/chart/layout/constraint/variable.js +28 -0
- package/esm/chart/layout/constraint/variable.js.map +1 -0
- package/esm/chart/layout/index.d.ts +15 -0
- package/esm/chart/layout/index.js +26 -0
- package/esm/chart/layout/index.js.map +1 -0
- package/esm/chart/layout/padding-cal.d.ts +53 -0
- package/esm/chart/layout/padding-cal.js +108 -0
- package/esm/chart/layout/padding-cal.js.map +1 -0
- package/esm/chart/util/scale-pool.d.ts +57 -0
- package/esm/chart/util/scale-pool.js +212 -0
- package/esm/chart/util/scale-pool.js.map +1 -0
- package/esm/chart/util/sync-view-padding.d.ts +9 -0
- package/esm/chart/util/sync-view-padding.js +14 -0
- package/esm/chart/util/sync-view-padding.js.map +1 -0
- package/esm/chart/view.d.ts +747 -0
- package/esm/chart/view.js +1633 -0
- package/esm/chart/view.js.map +1 -0
- package/esm/component/labels.d.ts +47 -0
- package/esm/component/labels.js +274 -0
- package/esm/component/labels.js.map +1 -0
- package/esm/component/update-label.d.ts +21 -0
- package/esm/component/update-label.js +57 -0
- package/esm/component/update-label.js.map +1 -0
- package/esm/constant.d.ts +122 -0
- package/esm/constant.js +134 -0
- package/esm/constant.js.map +1 -0
- package/esm/core.d.ts +46 -0
- package/esm/core.js +60 -0
- package/esm/core.js.map +1 -0
- package/esm/dependents.d.ts +21 -0
- package/esm/dependents.js +33 -0
- package/esm/dependents.js.map +1 -0
- package/esm/engine/index.d.ts +13 -0
- package/esm/engine/index.js +22 -0
- package/esm/engine/index.js.map +1 -0
- package/esm/facet/circle.d.ts +36 -0
- package/esm/facet/circle.js +119 -0
- package/esm/facet/circle.js.map +1 -0
- package/esm/facet/facet.d.ts +165 -0
- package/esm/facet/facet.js +291 -0
- package/esm/facet/facet.js.map +1 -0
- package/esm/facet/index.d.ts +13 -0
- package/esm/facet/index.js +22 -0
- package/esm/facet/index.js.map +1 -0
- package/esm/facet/list.d.ts +46 -0
- package/esm/facet/list.js +134 -0
- package/esm/facet/list.js.map +1 -0
- package/esm/facet/matrix.d.ts +34 -0
- package/esm/facet/matrix.js +119 -0
- package/esm/facet/matrix.js.map +1 -0
- package/esm/facet/mirror.d.ts +31 -0
- package/esm/facet/mirror.js +144 -0
- package/esm/facet/mirror.js.map +1 -0
- package/esm/facet/rect.d.ts +35 -0
- package/esm/facet/rect.js +141 -0
- package/esm/facet/rect.js.map +1 -0
- package/esm/facet/tree.d.ts +40 -0
- package/esm/facet/tree.js +288 -0
- package/esm/facet/tree.js.map +1 -0
- package/esm/geometry/area.d.ts +46 -0
- package/esm/geometry/area.js +62 -0
- package/esm/geometry/area.js.map +1 -0
- package/esm/geometry/base.d.ts +793 -0
- package/esm/geometry/base.js +1487 -0
- package/esm/geometry/base.js.map +1 -0
- package/esm/geometry/edge.d.ts +15 -0
- package/esm/geometry/edge.js +24 -0
- package/esm/geometry/edge.js.map +1 -0
- package/esm/geometry/element/index.d.ts +127 -0
- package/esm/geometry/element/index.js +436 -0
- package/esm/geometry/element/index.js.map +1 -0
- package/esm/geometry/heatmap.d.ts +31 -0
- package/esm/geometry/heatmap.js +190 -0
- package/esm/geometry/heatmap.js.map +1 -0
- package/esm/geometry/interval.d.ts +41 -0
- package/esm/geometry/interval.js +98 -0
- package/esm/geometry/interval.js.map +1 -0
- package/esm/geometry/label/base.d.ts +76 -0
- package/esm/geometry/label/base.js +404 -0
- package/esm/geometry/label/base.js.map +1 -0
- package/esm/geometry/label/index.d.ts +38 -0
- package/esm/geometry/label/index.js +35 -0
- package/esm/geometry/label/index.js.map +1 -0
- package/esm/geometry/label/interface.d.ts +50 -0
- package/esm/geometry/label/interface.js +2 -0
- package/esm/geometry/label/interface.js.map +1 -0
- package/esm/geometry/label/interval.d.ts +27 -0
- package/esm/geometry/label/interval.js +146 -0
- package/esm/geometry/label/interval.js.map +1 -0
- package/esm/geometry/label/layout/adjust-color.d.ts +3 -0
- package/esm/geometry/label/layout/adjust-color.js +36 -0
- package/esm/geometry/label/layout/adjust-color.js.map +1 -0
- package/esm/geometry/label/layout/hide-overlap.d.ts +8 -0
- package/esm/geometry/label/layout/hide-overlap.js +29 -0
- package/esm/geometry/label/layout/hide-overlap.js.map +1 -0
- package/esm/geometry/label/layout/interval/adjust-position.d.ts +9 -0
- package/esm/geometry/label/layout/interval/adjust-position.js +61 -0
- package/esm/geometry/label/layout/interval/adjust-position.js.map +1 -0
- package/esm/geometry/label/layout/interval/hide-overlap.d.ts +9 -0
- package/esm/geometry/label/layout/interval/hide-overlap.js +78 -0
- package/esm/geometry/label/layout/interval/hide-overlap.js.map +1 -0
- package/esm/geometry/label/layout/limit-in-canvas.d.ts +9 -0
- package/esm/geometry/label/layout/limit-in-canvas.js +44 -0
- package/esm/geometry/label/layout/limit-in-canvas.js.map +1 -0
- package/esm/geometry/label/layout/limit-in-plot.d.ts +18 -0
- package/esm/geometry/label/layout/limit-in-plot.js +75 -0
- package/esm/geometry/label/layout/limit-in-plot.js.map +1 -0
- package/esm/geometry/label/layout/limit-in-shape.d.ts +7 -0
- package/esm/geometry/label/layout/limit-in-shape.js +18 -0
- package/esm/geometry/label/layout/limit-in-shape.js.map +1 -0
- package/esm/geometry/label/layout/overlap.d.ts +15 -0
- package/esm/geometry/label/layout/overlap.js +223 -0
- package/esm/geometry/label/layout/overlap.js.map +1 -0
- package/esm/geometry/label/layout/path/adjust-position.d.ts +17 -0
- package/esm/geometry/label/layout/path/adjust-position.js +94 -0
- package/esm/geometry/label/layout/path/adjust-position.js.map +1 -0
- package/esm/geometry/label/layout/pie/distribute.d.ts +3 -0
- package/esm/geometry/label/layout/pie/distribute.js +185 -0
- package/esm/geometry/label/layout/pie/distribute.js.map +1 -0
- package/esm/geometry/label/layout/pie/outer.d.ts +6 -0
- package/esm/geometry/label/layout/pie/outer.js +207 -0
- package/esm/geometry/label/layout/pie/outer.js.map +1 -0
- package/esm/geometry/label/layout/pie/spider.d.ts +7 -0
- package/esm/geometry/label/layout/pie/spider.js +181 -0
- package/esm/geometry/label/layout/pie/spider.js.map +1 -0
- package/esm/geometry/label/layout/pie/util.d.ts +10 -0
- package/esm/geometry/label/layout/pie/util.js +73 -0
- package/esm/geometry/label/layout/pie/util.js.map +1 -0
- package/esm/geometry/label/layout/point/adjust-position.d.ts +17 -0
- package/esm/geometry/label/layout/point/adjust-position.js +94 -0
- package/esm/geometry/label/layout/point/adjust-position.js.map +1 -0
- package/esm/geometry/label/pie.d.ts +22 -0
- package/esm/geometry/label/pie.js +95 -0
- package/esm/geometry/label/pie.js.map +1 -0
- package/esm/geometry/label/polar.d.ts +64 -0
- package/esm/geometry/label/polar.js +221 -0
- package/esm/geometry/label/polar.js.map +1 -0
- package/esm/geometry/label/util/index.d.ts +26 -0
- package/esm/geometry/label/util/index.js +61 -0
- package/esm/geometry/label/util/index.js.map +1 -0
- package/esm/geometry/line.d.ts +11 -0
- package/esm/geometry/line.js +21 -0
- package/esm/geometry/line.js.map +1 -0
- package/esm/geometry/path.d.ts +40 -0
- package/esm/geometry/path.js +122 -0
- package/esm/geometry/path.js.map +1 -0
- package/esm/geometry/point.d.ts +19 -0
- package/esm/geometry/point.js +30 -0
- package/esm/geometry/point.js.map +1 -0
- package/esm/geometry/polygon.d.ts +19 -0
- package/esm/geometry/polygon.js +62 -0
- package/esm/geometry/polygon.js.map +1 -0
- package/esm/geometry/schema.d.ts +18 -0
- package/esm/geometry/schema.js +48 -0
- package/esm/geometry/schema.js.map +1 -0
- package/esm/geometry/shape/area/index.d.ts +2 -0
- package/esm/geometry/shape/area/index.js +44 -0
- package/esm/geometry/shape/area/index.js.map +1 -0
- package/esm/geometry/shape/area/line.d.ts +1 -0
- package/esm/geometry/shape/area/line.js +31 -0
- package/esm/geometry/shape/area/line.js.map +1 -0
- package/esm/geometry/shape/area/smooth-line.d.ts +1 -0
- package/esm/geometry/shape/area/smooth-line.js +30 -0
- package/esm/geometry/shape/area/smooth-line.js.map +1 -0
- package/esm/geometry/shape/area/smooth.d.ts +1 -0
- package/esm/geometry/shape/area/smooth.js +31 -0
- package/esm/geometry/shape/area/smooth.js.map +1 -0
- package/esm/geometry/shape/area/util.d.ts +22 -0
- package/esm/geometry/shape/area/util.js +88 -0
- package/esm/geometry/shape/area/util.js.map +1 -0
- package/esm/geometry/shape/base.d.ts +22 -0
- package/esm/geometry/shape/base.js +162 -0
- package/esm/geometry/shape/base.js.map +1 -0
- package/esm/geometry/shape/constant.d.ts +4 -0
- package/esm/geometry/shape/constant.js +5 -0
- package/esm/geometry/shape/constant.js.map +1 -0
- package/esm/geometry/shape/edge/arc.d.ts +1 -0
- package/esm/geometry/shape/edge/arc.js +84 -0
- package/esm/geometry/shape/edge/arc.js.map +1 -0
- package/esm/geometry/shape/edge/index.d.ts +2 -0
- package/esm/geometry/shape/edge/index.js +31 -0
- package/esm/geometry/shape/edge/index.js.map +1 -0
- package/esm/geometry/shape/edge/smooth.d.ts +1 -0
- package/esm/geometry/shape/edge/smooth.js +30 -0
- package/esm/geometry/shape/edge/smooth.js.map +1 -0
- package/esm/geometry/shape/edge/util.d.ts +17 -0
- package/esm/geometry/shape/edge/util.js +32 -0
- package/esm/geometry/shape/edge/util.js.map +1 -0
- package/esm/geometry/shape/edge/vhv.d.ts +1 -0
- package/esm/geometry/shape/edge/vhv.js +42 -0
- package/esm/geometry/shape/edge/vhv.js.map +1 -0
- package/esm/geometry/shape/interval/funnel.d.ts +1 -0
- package/esm/geometry/shape/interval/funnel.js +31 -0
- package/esm/geometry/shape/interval/funnel.js.map +1 -0
- package/esm/geometry/shape/interval/hollow-rect.d.ts +1 -0
- package/esm/geometry/shape/interval/hollow-rect.js +51 -0
- package/esm/geometry/shape/interval/hollow-rect.js.map +1 -0
- package/esm/geometry/shape/interval/index.d.ts +3 -0
- package/esm/geometry/shape/interval/index.js +63 -0
- package/esm/geometry/shape/interval/index.js.map +1 -0
- package/esm/geometry/shape/interval/line.d.ts +1 -0
- package/esm/geometry/shape/interval/line.js +54 -0
- package/esm/geometry/shape/interval/line.js.map +1 -0
- package/esm/geometry/shape/interval/pyramid.d.ts +1 -0
- package/esm/geometry/shape/interval/pyramid.js +31 -0
- package/esm/geometry/shape/interval/pyramid.js.map +1 -0
- package/esm/geometry/shape/interval/tick.d.ts +1 -0
- package/esm/geometry/shape/interval/tick.js +77 -0
- package/esm/geometry/shape/interval/tick.js.map +1 -0
- package/esm/geometry/shape/interval/util.d.ts +55 -0
- package/esm/geometry/shape/interval/util.js +311 -0
- package/esm/geometry/shape/interval/util.js.map +1 -0
- package/esm/geometry/shape/line/index.d.ts +8 -0
- package/esm/geometry/shape/line/index.js +105 -0
- package/esm/geometry/shape/line/index.js.map +1 -0
- package/esm/geometry/shape/line/step.d.ts +1 -0
- package/esm/geometry/shape/line/step.js +84 -0
- package/esm/geometry/shape/line/step.js.map +1 -0
- package/esm/geometry/shape/line/util.d.ts +16 -0
- package/esm/geometry/shape/line/util.js +83 -0
- package/esm/geometry/shape/line/util.js.map +1 -0
- package/esm/geometry/shape/point/hollow.d.ts +1 -0
- package/esm/geometry/shape/point/hollow.js +24 -0
- package/esm/geometry/shape/point/hollow.js.map +1 -0
- package/esm/geometry/shape/point/image.d.ts +1 -0
- package/esm/geometry/shape/point/image.js +48 -0
- package/esm/geometry/shape/point/image.js.map +1 -0
- package/esm/geometry/shape/point/index.d.ts +2 -0
- package/esm/geometry/shape/point/index.js +32 -0
- package/esm/geometry/shape/point/index.js.map +1 -0
- package/esm/geometry/shape/point/solid.d.ts +1 -0
- package/esm/geometry/shape/point/solid.js +23 -0
- package/esm/geometry/shape/point/solid.js.map +1 -0
- package/esm/geometry/shape/point/util.d.ts +15 -0
- package/esm/geometry/shape/point/util.js +39 -0
- package/esm/geometry/shape/point/util.js.map +1 -0
- package/esm/geometry/shape/polygon/index.d.ts +2 -0
- package/esm/geometry/shape/polygon/index.js +65 -0
- package/esm/geometry/shape/polygon/index.js.map +1 -0
- package/esm/geometry/shape/polygon/square.d.ts +1 -0
- package/esm/geometry/shape/polygon/square.js +44 -0
- package/esm/geometry/shape/polygon/square.js.map +1 -0
- package/esm/geometry/shape/schema/box.d.ts +1 -0
- package/esm/geometry/shape/schema/box.js +142 -0
- package/esm/geometry/shape/schema/box.js.map +1 -0
- package/esm/geometry/shape/schema/candle.d.ts +1 -0
- package/esm/geometry/shape/schema/candle.js +80 -0
- package/esm/geometry/shape/schema/candle.js.map +1 -0
- package/esm/geometry/shape/schema/index.d.ts +2 -0
- package/esm/geometry/shape/schema/index.js +6 -0
- package/esm/geometry/shape/schema/index.js.map +1 -0
- package/esm/geometry/shape/util/get-path-points.d.ts +38 -0
- package/esm/geometry/shape/util/get-path-points.js +131 -0
- package/esm/geometry/shape/util/get-path-points.js.map +1 -0
- package/esm/geometry/shape/util/get-style.d.ts +18 -0
- package/esm/geometry/shape/util/get-style.js +47 -0
- package/esm/geometry/shape/util/get-style.js.map +1 -0
- package/esm/geometry/shape/util/path.d.ts +32 -0
- package/esm/geometry/shape/util/path.js +311 -0
- package/esm/geometry/shape/util/path.js.map +1 -0
- package/esm/geometry/shape/util/split-points.d.ts +13 -0
- package/esm/geometry/shape/util/split-points.js +24 -0
- package/esm/geometry/shape/util/split-points.js.map +1 -0
- package/esm/geometry/shape/violin/hollow.d.ts +1 -0
- package/esm/geometry/shape/violin/hollow.js +51 -0
- package/esm/geometry/shape/violin/hollow.js.map +1 -0
- package/esm/geometry/shape/violin/index.d.ts +2 -0
- package/esm/geometry/shape/violin/index.js +60 -0
- package/esm/geometry/shape/violin/index.js.map +1 -0
- package/esm/geometry/shape/violin/smooth.d.ts +1 -0
- package/esm/geometry/shape/violin/smooth.js +28 -0
- package/esm/geometry/shape/violin/smooth.js.map +1 -0
- package/esm/geometry/util/diff.d.ts +11 -0
- package/esm/geometry/util/diff.js +30 -0
- package/esm/geometry/util/diff.js.map +1 -0
- package/esm/geometry/util/get-shape-type.d.ts +8 -0
- package/esm/geometry/util/get-shape-type.js +16 -0
- package/esm/geometry/util/get-shape-type.js.map +1 -0
- package/esm/geometry/util/group-data.d.ts +3 -0
- package/esm/geometry/util/group-data.js +31 -0
- package/esm/geometry/util/group-data.js.map +1 -0
- package/esm/geometry/util/is-model-change.d.ts +9 -0
- package/esm/geometry/util/is-model-change.js +14 -0
- package/esm/geometry/util/is-model-change.js.map +1 -0
- package/esm/geometry/util/parse-fields.d.ts +2 -0
- package/esm/geometry/util/parse-fields.js +9 -0
- package/esm/geometry/util/parse-fields.js.map +1 -0
- package/esm/geometry/util/shape-size.d.ts +2 -0
- package/esm/geometry/util/shape-size.js +124 -0
- package/esm/geometry/util/shape-size.js.map +1 -0
- package/esm/geometry/violin.d.ts +25 -0
- package/esm/geometry/violin.js +67 -0
- package/esm/geometry/violin.js.map +1 -0
- package/esm/index.d.ts +107 -0
- package/esm/index.js +581 -0
- package/esm/index.js.map +1 -0
- package/esm/interaction/action/active-region.d.ts +33 -0
- package/esm/interaction/action/active-region.js +198 -0
- package/esm/interaction/action/active-region.js.map +1 -0
- package/esm/interaction/action/base.d.ts +29 -0
- package/esm/interaction/action/base.js +36 -0
- package/esm/interaction/action/base.js.map +1 -0
- package/esm/interaction/action/callback.d.ts +17 -0
- package/esm/interaction/action/callback.js +27 -0
- package/esm/interaction/action/callback.js.map +1 -0
- package/esm/interaction/action/component/list-active.d.ts +14 -0
- package/esm/interaction/action/component/list-active.js +24 -0
- package/esm/interaction/action/component/list-active.js.map +1 -0
- package/esm/interaction/action/component/list-checked.d.ts +30 -0
- package/esm/interaction/action/component/list-checked.js +82 -0
- package/esm/interaction/action/component/list-checked.js.map +1 -0
- package/esm/interaction/action/component/list-focus.d.ts +5 -0
- package/esm/interaction/action/component/list-focus.js +55 -0
- package/esm/interaction/action/component/list-focus.js.map +1 -0
- package/esm/interaction/action/component/list-highlight-util.d.ts +7 -0
- package/esm/interaction/action/component/list-highlight-util.js +20 -0
- package/esm/interaction/action/component/list-highlight-util.js.map +1 -0
- package/esm/interaction/action/component/list-highlight.d.ts +20 -0
- package/esm/interaction/action/component/list-highlight.js +97 -0
- package/esm/interaction/action/component/list-highlight.js.map +1 -0
- package/esm/interaction/action/component/list-radio.d.ts +24 -0
- package/esm/interaction/action/component/list-radio.js +116 -0
- package/esm/interaction/action/component/list-radio.js.map +1 -0
- package/esm/interaction/action/component/list-selected.d.ts +10 -0
- package/esm/interaction/action/component/list-selected.js +20 -0
- package/esm/interaction/action/component/list-selected.js.map +1 -0
- package/esm/interaction/action/component/list-state.d.ts +46 -0
- package/esm/interaction/action/component/list-state.js +167 -0
- package/esm/interaction/action/component/list-state.js.map +1 -0
- package/esm/interaction/action/component/list-unchecked.d.ts +13 -0
- package/esm/interaction/action/component/list-unchecked.js +23 -0
- package/esm/interaction/action/component/list-unchecked.js.map +1 -0
- package/esm/interaction/action/component/tooltip/ellipsis-text.d.ts +25 -0
- package/esm/interaction/action/component/tooltip/ellipsis-text.js +93 -0
- package/esm/interaction/action/component/tooltip/ellipsis-text.js.map +1 -0
- package/esm/interaction/action/component/tooltip/geometry.d.ts +24 -0
- package/esm/interaction/action/component/tooltip/geometry.js +71 -0
- package/esm/interaction/action/component/tooltip/geometry.js.map +1 -0
- package/esm/interaction/action/component/tooltip/sibling.d.ts +21 -0
- package/esm/interaction/action/component/tooltip/sibling.js +39 -0
- package/esm/interaction/action/component/tooltip/sibling.js.map +1 -0
- package/esm/interaction/action/cursor.d.ts +69 -0
- package/esm/interaction/action/cursor.js +113 -0
- package/esm/interaction/action/cursor.js.map +1 -0
- package/esm/interaction/action/data/filter.d.ts +13 -0
- package/esm/interaction/action/data/filter.js +66 -0
- package/esm/interaction/action/data/filter.js.map +1 -0
- package/esm/interaction/action/data/range-filter.d.ts +56 -0
- package/esm/interaction/action/data/range-filter.js +163 -0
- package/esm/interaction/action/data/range-filter.js.map +1 -0
- package/esm/interaction/action/data/sibling-filter.d.ts +22 -0
- package/esm/interaction/action/data/sibling-filter.js +39 -0
- package/esm/interaction/action/data/sibling-filter.js.map +1 -0
- package/esm/interaction/action/element/active.d.ts +14 -0
- package/esm/interaction/action/element/active.js +24 -0
- package/esm/interaction/action/element/active.js.map +1 -0
- package/esm/interaction/action/element/filter.d.ts +20 -0
- package/esm/interaction/action/element/filter.js +89 -0
- package/esm/interaction/action/element/filter.js.map +1 -0
- package/esm/interaction/action/element/highlight-by-color.d.ts +10 -0
- package/esm/interaction/action/element/highlight-by-color.js +30 -0
- package/esm/interaction/action/element/highlight-by-color.js.map +1 -0
- package/esm/interaction/action/element/highlight-by-x.d.ts +15 -0
- package/esm/interaction/action/element/highlight-by-x.js +51 -0
- package/esm/interaction/action/element/highlight-by-x.js.map +1 -0
- package/esm/interaction/action/element/highlight-util.d.ts +18 -0
- package/esm/interaction/action/element/highlight-util.js +45 -0
- package/esm/interaction/action/element/highlight-util.js.map +1 -0
- package/esm/interaction/action/element/highlight.d.ts +21 -0
- package/esm/interaction/action/element/highlight.js +93 -0
- package/esm/interaction/action/element/highlight.js.map +1 -0
- package/esm/interaction/action/element/link-by-color.d.ts +51 -0
- package/esm/interaction/action/element/link-by-color.js +156 -0
- package/esm/interaction/action/element/link-by-color.js.map +1 -0
- package/esm/interaction/action/element/range-active.d.ts +13 -0
- package/esm/interaction/action/element/range-active.js +23 -0
- package/esm/interaction/action/element/range-active.js.map +1 -0
- package/esm/interaction/action/element/range-highlight.d.ts +27 -0
- package/esm/interaction/action/element/range-highlight.js +54 -0
- package/esm/interaction/action/element/range-highlight.js.map +1 -0
- package/esm/interaction/action/element/range-selected.d.ts +13 -0
- package/esm/interaction/action/element/range-selected.js +23 -0
- package/esm/interaction/action/element/range-selected.js.map +1 -0
- package/esm/interaction/action/element/range-state.d.ts +38 -0
- package/esm/interaction/action/element/range-state.js +164 -0
- package/esm/interaction/action/element/range-state.js.map +1 -0
- package/esm/interaction/action/element/selected.d.ts +14 -0
- package/esm/interaction/action/element/selected.js +24 -0
- package/esm/interaction/action/element/selected.js.map +1 -0
- package/esm/interaction/action/element/sibling-filter.d.ts +19 -0
- package/esm/interaction/action/element/sibling-filter.js +93 -0
- package/esm/interaction/action/element/sibling-filter.js.map +1 -0
- package/esm/interaction/action/element/single-active.d.ts +13 -0
- package/esm/interaction/action/element/single-active.js +23 -0
- package/esm/interaction/action/element/single-active.js.map +1 -0
- package/esm/interaction/action/element/single-highlight.d.ts +16 -0
- package/esm/interaction/action/element/single-highlight.js +35 -0
- package/esm/interaction/action/element/single-highlight.js.map +1 -0
- package/esm/interaction/action/element/single-selected.d.ts +13 -0
- package/esm/interaction/action/element/single-selected.js +23 -0
- package/esm/interaction/action/element/single-selected.js.map +1 -0
- package/esm/interaction/action/element/single-state.d.ts +18 -0
- package/esm/interaction/action/element/single-state.js +53 -0
- package/esm/interaction/action/element/single-state.js.map +1 -0
- package/esm/interaction/action/element/state-base.d.ts +39 -0
- package/esm/interaction/action/element/state-base.js +59 -0
- package/esm/interaction/action/element/state-base.js.map +1 -0
- package/esm/interaction/action/element/state.d.ts +28 -0
- package/esm/interaction/action/element/state.js +99 -0
- package/esm/interaction/action/element/state.js.map +1 -0
- package/esm/interaction/action/index.d.ts +2 -0
- package/esm/interaction/action/index.js +3 -0
- package/esm/interaction/action/index.js.map +1 -0
- package/esm/interaction/action/mask/base.d.ts +62 -0
- package/esm/interaction/action/mask/base.js +169 -0
- package/esm/interaction/action/mask/base.js.map +1 -0
- package/esm/interaction/action/mask/circle.d.ts +14 -0
- package/esm/interaction/action/mask/circle.js +37 -0
- package/esm/interaction/action/mask/circle.js.map +1 -0
- package/esm/interaction/action/mask/dim-rect.d.ts +11 -0
- package/esm/interaction/action/mask/dim-rect.js +62 -0
- package/esm/interaction/action/mask/dim-rect.js.map +1 -0
- package/esm/interaction/action/mask/path.d.ts +16 -0
- package/esm/interaction/action/mask/path.js +44 -0
- package/esm/interaction/action/mask/path.js.map +1 -0
- package/esm/interaction/action/mask/rect.d.ts +17 -0
- package/esm/interaction/action/mask/rect.js +39 -0
- package/esm/interaction/action/mask/rect.js.map +1 -0
- package/esm/interaction/action/mask/smooth-path.d.ts +9 -0
- package/esm/interaction/action/mask/smooth-path.js +21 -0
- package/esm/interaction/action/mask/smooth-path.js.map +1 -0
- package/esm/interaction/action/register.d.ts +36 -0
- package/esm/interaction/action/register.js +60 -0
- package/esm/interaction/action/register.js.map +1 -0
- package/esm/interaction/action/util.d.ts +140 -0
- package/esm/interaction/action/util.js +361 -0
- package/esm/interaction/action/util.js.map +1 -0
- package/esm/interaction/action/view/button.d.ts +25 -0
- package/esm/interaction/action/view/button.js +116 -0
- package/esm/interaction/action/view/button.js.map +1 -0
- package/esm/interaction/action/view/drag.d.ts +24 -0
- package/esm/interaction/action/view/drag.js +73 -0
- package/esm/interaction/action/view/drag.js.map +1 -0
- package/esm/interaction/action/view/mousewheel-scroll.d.ts +5 -0
- package/esm/interaction/action/view/mousewheel-scroll.js +35 -0
- package/esm/interaction/action/view/mousewheel-scroll.js.map +1 -0
- package/esm/interaction/action/view/move.d.ts +28 -0
- package/esm/interaction/action/view/move.js +80 -0
- package/esm/interaction/action/view/move.js.map +1 -0
- package/esm/interaction/action/view/scale-transform.d.ts +18 -0
- package/esm/interaction/action/view/scale-transform.js +51 -0
- package/esm/interaction/action/view/scale-transform.js.map +1 -0
- package/esm/interaction/action/view/scale-translate.d.ts +30 -0
- package/esm/interaction/action/view/scale-translate.js +112 -0
- package/esm/interaction/action/view/scale-translate.js.map +1 -0
- package/esm/interaction/action/view/scale-zoom.d.ts +20 -0
- package/esm/interaction/action/view/scale-zoom.js +83 -0
- package/esm/interaction/action/view/scale-zoom.js.map +1 -0
- package/esm/interaction/context.d.ts +65 -0
- package/esm/interaction/context.js +142 -0
- package/esm/interaction/context.js.map +1 -0
- package/esm/interaction/grammar-interaction.d.ts +158 -0
- package/esm/interaction/grammar-interaction.js +285 -0
- package/esm/interaction/grammar-interaction.js.map +1 -0
- package/esm/interaction/index.d.ts +25 -0
- package/esm/interaction/index.js +43 -0
- package/esm/interaction/index.js.map +1 -0
- package/esm/interaction/interaction.d.ts +29 -0
- package/esm/interaction/interaction.js +32 -0
- package/esm/interaction/interaction.js.map +1 -0
- package/esm/interface.d.ts +2264 -0
- package/esm/interface.js +2 -0
- package/esm/interface.js.map +1 -0
- package/esm/theme/index.d.ts +12 -0
- package/esm/theme/index.js +23 -0
- package/esm/theme/index.js.map +1 -0
- package/esm/theme/style-sheet/dark.d.ts +825 -0
- package/esm/theme/style-sheet/dark.js +496 -0
- package/esm/theme/style-sheet/dark.js.map +1 -0
- package/esm/theme/style-sheet/light.d.ts +817 -0
- package/esm/theme/style-sheet/light.js +492 -0
- package/esm/theme/style-sheet/light.js.map +1 -0
- package/esm/theme/util/create-by-style-sheet.d.ts +6 -0
- package/esm/theme/util/create-by-style-sheet.js +1422 -0
- package/esm/theme/util/create-by-style-sheet.js.map +1 -0
- package/esm/theme/util/create-theme.d.ts +6 -0
- package/esm/theme/util/create-theme.js +12 -0
- package/esm/theme/util/create-theme.js.map +1 -0
- package/esm/theme/util/index.d.ts +1 -0
- package/esm/theme/util/index.js +2 -0
- package/esm/theme/util/index.js.map +1 -0
- package/esm/util/annotation.d.ts +7 -0
- package/esm/util/annotation.js +39 -0
- package/esm/util/annotation.js.map +1 -0
- package/esm/util/attr.d.ts +10 -0
- package/esm/util/attr.js +25 -0
- package/esm/util/attr.js.map +1 -0
- package/esm/util/axis.d.ts +100 -0
- package/esm/util/axis.js +236 -0
- package/esm/util/axis.js.map +1 -0
- package/esm/util/bbox.d.ts +105 -0
- package/esm/util/bbox.js +282 -0
- package/esm/util/bbox.js.map +1 -0
- package/esm/util/collision-detect.d.ts +16 -0
- package/esm/util/collision-detect.js +127 -0
- package/esm/util/collision-detect.js.map +1 -0
- package/esm/util/color.d.ts +1 -0
- package/esm/util/color.js +18 -0
- package/esm/util/color.js.map +1 -0
- package/esm/util/context.d.ts +4 -0
- package/esm/util/context.js +11 -0
- package/esm/util/context.js.map +1 -0
- package/esm/util/coordinate.d.ts +86 -0
- package/esm/util/coordinate.js +147 -0
- package/esm/util/coordinate.js.map +1 -0
- package/esm/util/direction.d.ts +19 -0
- package/esm/util/direction.js +120 -0
- package/esm/util/direction.js.map +1 -0
- package/esm/util/dom.d.ts +19 -0
- package/esm/util/dom.js +61 -0
- package/esm/util/dom.js.map +1 -0
- package/esm/util/event.d.ts +8 -0
- package/esm/util/event.js +14 -0
- package/esm/util/event.js.map +1 -0
- package/esm/util/facet.d.ts +16 -0
- package/esm/util/facet.js +43 -0
- package/esm/util/facet.js.map +1 -0
- package/esm/util/graphics.d.ts +58 -0
- package/esm/util/graphics.js +203 -0
- package/esm/util/graphics.js.map +1 -0
- package/esm/util/grid.d.ts +36 -0
- package/esm/util/grid.js +118 -0
- package/esm/util/grid.js.map +1 -0
- package/esm/util/helper.d.ts +34 -0
- package/esm/util/helper.js +72 -0
- package/esm/util/helper.js.map +1 -0
- package/esm/util/legend.d.ts +45 -0
- package/esm/util/legend.js +145 -0
- package/esm/util/legend.js.map +1 -0
- package/esm/util/marker.d.ts +10 -0
- package/esm/util/marker.js +58 -0
- package/esm/util/marker.js.map +1 -0
- package/esm/util/padding.d.ts +14 -0
- package/esm/util/padding.js +40 -0
- package/esm/util/padding.js.map +1 -0
- package/esm/util/scale.d.ts +42 -0
- package/esm/util/scale.js +128 -0
- package/esm/util/scale.js.map +1 -0
- package/esm/util/stat.d.ts +10 -0
- package/esm/util/stat.js +36 -0
- package/esm/util/stat.js.map +1 -0
- package/esm/util/text.d.ts +23 -0
- package/esm/util/text.js +84 -0
- package/esm/util/text.js.map +1 -0
- package/esm/util/tooltip.d.ts +26 -0
- package/esm/util/tooltip.js +419 -0
- package/esm/util/tooltip.js.map +1 -0
- package/esm/util/transform.d.ts +33 -0
- package/esm/util/transform.js +61 -0
- package/esm/util/transform.js.map +1 -0
- package/esm/util/types.d.ts +6 -0
- package/esm/util/types.js +2 -0
- package/esm/util/types.js.map +1 -0
- package/lib/animate/animation/fade.d.ts +21 -0
- package/lib/animate/animation/fade.js +47 -0
- package/lib/animate/animation/fade.js.map +1 -0
- package/lib/animate/animation/grow-in.d.ts +30 -0
- package/lib/animate/animation/grow-in.js +44 -0
- package/lib/animate/animation/grow-in.js.map +1 -0
- package/lib/animate/animation/index.d.ts +16 -0
- package/lib/animate/animation/index.js +22 -0
- package/lib/animate/animation/index.js.map +1 -0
- package/lib/animate/animation/path-in.d.ts +12 -0
- package/lib/animate/animation/path-in.js +25 -0
- package/lib/animate/animation/path-in.js.map +1 -0
- package/lib/animate/animation/position-update.d.ts +11 -0
- package/lib/animate/animation/position-update.js +28 -0
- package/lib/animate/animation/position-update.js.map +1 -0
- package/lib/animate/animation/scale-in.d.ts +19 -0
- package/lib/animate/animation/scale-in.js +65 -0
- package/lib/animate/animation/scale-in.js.map +1 -0
- package/lib/animate/animation/sector-path-update.d.ts +11 -0
- package/lib/animate/animation/sector-path-update.js +135 -0
- package/lib/animate/animation/sector-path-update.js.map +1 -0
- package/lib/animate/animation/util.d.ts +19 -0
- package/lib/animate/animation/util.js +93 -0
- package/lib/animate/animation/util.js.map +1 -0
- package/lib/animate/animation/wave-in.d.ts +13 -0
- package/lib/animate/animation/wave-in.js +30 -0
- package/lib/animate/animation/wave-in.js.map +1 -0
- package/lib/animate/animation/zoom.d.ts +21 -0
- package/lib/animate/animation/zoom.js +71 -0
- package/lib/animate/animation/zoom.js.map +1 -0
- package/lib/animate/index.d.ts +48 -0
- package/lib/animate/index.js +255 -0
- package/lib/animate/index.js.map +1 -0
- package/lib/animate/interface.d.ts +12 -0
- package/lib/animate/interface.js +3 -0
- package/lib/animate/interface.js.map +1 -0
- package/lib/api.d.ts +2 -0
- package/lib/api.js +7 -0
- package/lib/api.js.map +1 -0
- package/lib/base.d.ts +33 -0
- package/lib/base.js +57 -0
- package/lib/base.js.map +1 -0
- package/lib/chart/chart.d.ts +61 -0
- package/lib/chart/chart.js +159 -0
- package/lib/chart/chart.js.map +1 -0
- package/lib/chart/controller/annotation.d.ts +162 -0
- package/lib/chart/controller/annotation.js +583 -0
- package/lib/chart/controller/annotation.js.map +1 -0
- package/lib/chart/controller/axis.d.ts +93 -0
- package/lib/chart/controller/axis.js +580 -0
- package/lib/chart/controller/axis.js.map +1 -0
- package/lib/chart/controller/base.d.ts +64 -0
- package/lib/chart/controller/base.js +65 -0
- package/lib/chart/controller/base.js.map +1 -0
- package/lib/chart/controller/coordinate.d.ts +74 -0
- package/lib/chart/controller/coordinate.js +147 -0
- package/lib/chart/controller/coordinate.js.map +1 -0
- package/lib/chart/controller/gesture.d.ts +37 -0
- package/lib/chart/controller/gesture.js +260 -0
- package/lib/chart/controller/gesture.js.map +1 -0
- package/lib/chart/controller/index.d.ts +25 -0
- package/lib/chart/controller/index.js +41 -0
- package/lib/chart/controller/index.js.map +1 -0
- package/lib/chart/controller/legend.d.ts +106 -0
- package/lib/chart/controller/legend.js +486 -0
- package/lib/chart/controller/legend.js.map +1 -0
- package/lib/chart/controller/scrollbar.d.ts +64 -0
- package/lib/chart/controller/scrollbar.js +318 -0
- package/lib/chart/controller/scrollbar.js.map +1 -0
- package/lib/chart/controller/slider.d.ts +88 -0
- package/lib/chart/controller/slider.js +298 -0
- package/lib/chart/controller/slider.js.map +1 -0
- package/lib/chart/controller/tooltip.d.ts +68 -0
- package/lib/chart/controller/tooltip.js +646 -0
- package/lib/chart/controller/tooltip.js.map +1 -0
- package/lib/chart/event.d.ts +47 -0
- package/lib/chart/event.js +93 -0
- package/lib/chart/event.js.map +1 -0
- package/lib/chart/index.d.ts +4 -0
- package/lib/chart/index.js +16 -0
- package/lib/chart/index.js.map +1 -0
- package/lib/chart/layout/auto.d.ts +8 -0
- package/lib/chart/layout/auto.js +68 -0
- package/lib/chart/layout/auto.js.map +1 -0
- package/lib/chart/layout/constraint/bounds.d.ts +32 -0
- package/lib/chart/layout/constraint/bounds.js +33 -0
- package/lib/chart/layout/constraint/bounds.js.map +1 -0
- package/lib/chart/layout/constraint/constraint.d.ts +31 -0
- package/lib/chart/layout/constraint/constraint.js +84 -0
- package/lib/chart/layout/constraint/constraint.js.map +1 -0
- package/lib/chart/layout/constraint/gauss.d.ts +11 -0
- package/lib/chart/layout/constraint/gauss.js +68 -0
- package/lib/chart/layout/constraint/gauss.js.map +1 -0
- package/lib/chart/layout/constraint/index.d.ts +5 -0
- package/lib/chart/layout/constraint/index.js +38 -0
- package/lib/chart/layout/constraint/index.js.map +1 -0
- package/lib/chart/layout/constraint/solver.d.ts +40 -0
- package/lib/chart/layout/constraint/solver.js +80 -0
- package/lib/chart/layout/constraint/solver.js.map +1 -0
- package/lib/chart/layout/constraint/types.d.ts +21 -0
- package/lib/chart/layout/constraint/types.js +16 -0
- package/lib/chart/layout/constraint/types.js.map +1 -0
- package/lib/chart/layout/constraint/variable.d.ts +24 -0
- package/lib/chart/layout/constraint/variable.js +31 -0
- package/lib/chart/layout/constraint/variable.js.map +1 -0
- package/lib/chart/layout/index.d.ts +15 -0
- package/lib/chart/layout/index.js +29 -0
- package/lib/chart/layout/index.js.map +1 -0
- package/lib/chart/layout/padding-cal.d.ts +53 -0
- package/lib/chart/layout/padding-cal.js +111 -0
- package/lib/chart/layout/padding-cal.js.map +1 -0
- package/lib/chart/util/scale-pool.d.ts +57 -0
- package/lib/chart/util/scale-pool.js +215 -0
- package/lib/chart/util/scale-pool.js.map +1 -0
- package/lib/chart/util/sync-view-padding.d.ts +9 -0
- package/lib/chart/util/sync-view-padding.js +18 -0
- package/lib/chart/util/sync-view-padding.js.map +1 -0
- package/lib/chart/view.d.ts +747 -0
- package/lib/chart/view.js +1637 -0
- package/lib/chart/view.js.map +1 -0
- package/lib/component/labels.d.ts +47 -0
- package/lib/component/labels.js +276 -0
- package/lib/component/labels.js.map +1 -0
- package/lib/component/update-label.d.ts +21 -0
- package/lib/component/update-label.js +61 -0
- package/lib/component/update-label.js.map +1 -0
- package/lib/constant.d.ts +122 -0
- package/lib/constant.js +137 -0
- package/lib/constant.js.map +1 -0
- package/lib/core.d.ts +46 -0
- package/lib/core.js +101 -0
- package/lib/core.js.map +1 -0
- package/lib/dependents.d.ts +21 -0
- package/lib/dependents.js +55 -0
- package/lib/dependents.js.map +1 -0
- package/lib/engine/index.d.ts +13 -0
- package/lib/engine/index.js +27 -0
- package/lib/engine/index.js.map +1 -0
- package/lib/facet/circle.d.ts +36 -0
- package/lib/facet/circle.js +121 -0
- package/lib/facet/circle.js.map +1 -0
- package/lib/facet/facet.d.ts +165 -0
- package/lib/facet/facet.js +294 -0
- package/lib/facet/facet.js.map +1 -0
- package/lib/facet/index.d.ts +13 -0
- package/lib/facet/index.js +28 -0
- package/lib/facet/index.js.map +1 -0
- package/lib/facet/list.d.ts +46 -0
- package/lib/facet/list.js +136 -0
- package/lib/facet/list.js.map +1 -0
- package/lib/facet/matrix.d.ts +34 -0
- package/lib/facet/matrix.js +121 -0
- package/lib/facet/matrix.js.map +1 -0
- package/lib/facet/mirror.d.ts +31 -0
- package/lib/facet/mirror.js +146 -0
- package/lib/facet/mirror.js.map +1 -0
- package/lib/facet/rect.d.ts +35 -0
- package/lib/facet/rect.js +143 -0
- package/lib/facet/rect.js.map +1 -0
- package/lib/facet/tree.d.ts +40 -0
- package/lib/facet/tree.js +290 -0
- package/lib/facet/tree.js.map +1 -0
- package/lib/geometry/area.d.ts +46 -0
- package/lib/geometry/area.js +64 -0
- package/lib/geometry/area.js.map +1 -0
- package/lib/geometry/base.d.ts +793 -0
- package/lib/geometry/base.js +1489 -0
- package/lib/geometry/base.js.map +1 -0
- package/lib/geometry/edge.d.ts +15 -0
- package/lib/geometry/edge.js +26 -0
- package/lib/geometry/edge.js.map +1 -0
- package/lib/geometry/element/index.d.ts +127 -0
- package/lib/geometry/element/index.js +438 -0
- package/lib/geometry/element/index.js.map +1 -0
- package/lib/geometry/heatmap.d.ts +31 -0
- package/lib/geometry/heatmap.js +192 -0
- package/lib/geometry/heatmap.js.map +1 -0
- package/lib/geometry/interval.d.ts +41 -0
- package/lib/geometry/interval.js +100 -0
- package/lib/geometry/interval.js.map +1 -0
- package/lib/geometry/label/base.d.ts +76 -0
- package/lib/geometry/label/base.js +406 -0
- package/lib/geometry/label/base.js.map +1 -0
- package/lib/geometry/label/index.d.ts +38 -0
- package/lib/geometry/label/index.js +42 -0
- package/lib/geometry/label/index.js.map +1 -0
- package/lib/geometry/label/interface.d.ts +50 -0
- package/lib/geometry/label/interface.js +3 -0
- package/lib/geometry/label/interface.js.map +1 -0
- package/lib/geometry/label/interval.d.ts +27 -0
- package/lib/geometry/label/interval.js +148 -0
- package/lib/geometry/label/interval.js.map +1 -0
- package/lib/geometry/label/layout/adjust-color.d.ts +3 -0
- package/lib/geometry/label/layout/adjust-color.js +40 -0
- package/lib/geometry/label/layout/adjust-color.js.map +1 -0
- package/lib/geometry/label/layout/hide-overlap.d.ts +8 -0
- package/lib/geometry/label/layout/hide-overlap.js +33 -0
- package/lib/geometry/label/layout/hide-overlap.js.map +1 -0
- package/lib/geometry/label/layout/interval/adjust-position.d.ts +9 -0
- package/lib/geometry/label/layout/interval/adjust-position.js +65 -0
- package/lib/geometry/label/layout/interval/adjust-position.js.map +1 -0
- package/lib/geometry/label/layout/interval/hide-overlap.d.ts +9 -0
- package/lib/geometry/label/layout/interval/hide-overlap.js +82 -0
- package/lib/geometry/label/layout/interval/hide-overlap.js.map +1 -0
- package/lib/geometry/label/layout/limit-in-canvas.d.ts +9 -0
- package/lib/geometry/label/layout/limit-in-canvas.js +48 -0
- package/lib/geometry/label/layout/limit-in-canvas.js.map +1 -0
- package/lib/geometry/label/layout/limit-in-plot.d.ts +18 -0
- package/lib/geometry/label/layout/limit-in-plot.js +79 -0
- package/lib/geometry/label/layout/limit-in-plot.js.map +1 -0
- package/lib/geometry/label/layout/limit-in-shape.d.ts +7 -0
- package/lib/geometry/label/layout/limit-in-shape.js +22 -0
- package/lib/geometry/label/layout/limit-in-shape.js.map +1 -0
- package/lib/geometry/label/layout/overlap.d.ts +15 -0
- package/lib/geometry/label/layout/overlap.js +228 -0
- package/lib/geometry/label/layout/overlap.js.map +1 -0
- package/lib/geometry/label/layout/path/adjust-position.d.ts +17 -0
- package/lib/geometry/label/layout/path/adjust-position.js +98 -0
- package/lib/geometry/label/layout/path/adjust-position.js.map +1 -0
- package/lib/geometry/label/layout/pie/distribute.d.ts +3 -0
- package/lib/geometry/label/layout/pie/distribute.js +189 -0
- package/lib/geometry/label/layout/pie/distribute.js.map +1 -0
- package/lib/geometry/label/layout/pie/outer.d.ts +6 -0
- package/lib/geometry/label/layout/pie/outer.js +211 -0
- package/lib/geometry/label/layout/pie/outer.js.map +1 -0
- package/lib/geometry/label/layout/pie/spider.d.ts +7 -0
- package/lib/geometry/label/layout/pie/spider.js +185 -0
- package/lib/geometry/label/layout/pie/spider.js.map +1 -0
- package/lib/geometry/label/layout/pie/util.d.ts +10 -0
- package/lib/geometry/label/layout/pie/util.js +77 -0
- package/lib/geometry/label/layout/pie/util.js.map +1 -0
- package/lib/geometry/label/layout/point/adjust-position.d.ts +17 -0
- package/lib/geometry/label/layout/point/adjust-position.js +98 -0
- package/lib/geometry/label/layout/point/adjust-position.js.map +1 -0
- package/lib/geometry/label/pie.d.ts +22 -0
- package/lib/geometry/label/pie.js +97 -0
- package/lib/geometry/label/pie.js.map +1 -0
- package/lib/geometry/label/polar.d.ts +64 -0
- package/lib/geometry/label/polar.js +223 -0
- package/lib/geometry/label/polar.js.map +1 -0
- package/lib/geometry/label/util/index.d.ts +26 -0
- package/lib/geometry/label/util/index.js +68 -0
- package/lib/geometry/label/util/index.js.map +1 -0
- package/lib/geometry/line.d.ts +11 -0
- package/lib/geometry/line.js +23 -0
- package/lib/geometry/line.js.map +1 -0
- package/lib/geometry/path.d.ts +40 -0
- package/lib/geometry/path.js +124 -0
- package/lib/geometry/path.js.map +1 -0
- package/lib/geometry/point.d.ts +19 -0
- package/lib/geometry/point.js +32 -0
- package/lib/geometry/point.js.map +1 -0
- package/lib/geometry/polygon.d.ts +19 -0
- package/lib/geometry/polygon.js +64 -0
- package/lib/geometry/polygon.js.map +1 -0
- package/lib/geometry/schema.d.ts +18 -0
- package/lib/geometry/schema.js +50 -0
- package/lib/geometry/schema.js.map +1 -0
- package/lib/geometry/shape/area/index.d.ts +2 -0
- package/lib/geometry/shape/area/index.js +46 -0
- package/lib/geometry/shape/area/index.js.map +1 -0
- package/lib/geometry/shape/area/line.d.ts +1 -0
- package/lib/geometry/shape/area/line.js +33 -0
- package/lib/geometry/shape/area/line.js.map +1 -0
- package/lib/geometry/shape/area/smooth-line.d.ts +1 -0
- package/lib/geometry/shape/area/smooth-line.js +32 -0
- package/lib/geometry/shape/area/smooth-line.js.map +1 -0
- package/lib/geometry/shape/area/smooth.d.ts +1 -0
- package/lib/geometry/shape/area/smooth.js +33 -0
- package/lib/geometry/shape/area/smooth.js.map +1 -0
- package/lib/geometry/shape/area/util.d.ts +22 -0
- package/lib/geometry/shape/area/util.js +93 -0
- package/lib/geometry/shape/area/util.js.map +1 -0
- package/lib/geometry/shape/base.d.ts +22 -0
- package/lib/geometry/shape/base.js +168 -0
- package/lib/geometry/shape/base.js.map +1 -0
- package/lib/geometry/shape/constant.d.ts +4 -0
- package/lib/geometry/shape/constant.js +8 -0
- package/lib/geometry/shape/constant.js.map +1 -0
- package/lib/geometry/shape/edge/arc.d.ts +1 -0
- package/lib/geometry/shape/edge/arc.js +86 -0
- package/lib/geometry/shape/edge/arc.js.map +1 -0
- package/lib/geometry/shape/edge/index.d.ts +2 -0
- package/lib/geometry/shape/edge/index.js +33 -0
- package/lib/geometry/shape/edge/index.js.map +1 -0
- package/lib/geometry/shape/edge/smooth.d.ts +1 -0
- package/lib/geometry/shape/edge/smooth.js +32 -0
- package/lib/geometry/shape/edge/smooth.js.map +1 -0
- package/lib/geometry/shape/edge/util.d.ts +17 -0
- package/lib/geometry/shape/edge/util.js +37 -0
- package/lib/geometry/shape/edge/util.js.map +1 -0
- package/lib/geometry/shape/edge/vhv.d.ts +1 -0
- package/lib/geometry/shape/edge/vhv.js +44 -0
- package/lib/geometry/shape/edge/vhv.js.map +1 -0
- package/lib/geometry/shape/interval/funnel.d.ts +1 -0
- package/lib/geometry/shape/interval/funnel.js +33 -0
- package/lib/geometry/shape/interval/funnel.js.map +1 -0
- package/lib/geometry/shape/interval/hollow-rect.d.ts +1 -0
- package/lib/geometry/shape/interval/hollow-rect.js +53 -0
- package/lib/geometry/shape/interval/hollow-rect.js.map +1 -0
- package/lib/geometry/shape/interval/index.d.ts +3 -0
- package/lib/geometry/shape/interval/index.js +65 -0
- package/lib/geometry/shape/interval/index.js.map +1 -0
- package/lib/geometry/shape/interval/line.d.ts +1 -0
- package/lib/geometry/shape/interval/line.js +56 -0
- package/lib/geometry/shape/interval/line.js.map +1 -0
- package/lib/geometry/shape/interval/pyramid.d.ts +1 -0
- package/lib/geometry/shape/interval/pyramid.js +33 -0
- package/lib/geometry/shape/interval/pyramid.js.map +1 -0
- package/lib/geometry/shape/interval/tick.d.ts +1 -0
- package/lib/geometry/shape/interval/tick.js +79 -0
- package/lib/geometry/shape/interval/tick.js.map +1 -0
- package/lib/geometry/shape/interval/util.d.ts +55 -0
- package/lib/geometry/shape/interval/util.js +321 -0
- package/lib/geometry/shape/interval/util.js.map +1 -0
- package/lib/geometry/shape/line/index.d.ts +8 -0
- package/lib/geometry/shape/line/index.js +109 -0
- package/lib/geometry/shape/line/index.js.map +1 -0
- package/lib/geometry/shape/line/step.d.ts +1 -0
- package/lib/geometry/shape/line/step.js +86 -0
- package/lib/geometry/shape/line/step.js.map +1 -0
- package/lib/geometry/shape/line/util.d.ts +16 -0
- package/lib/geometry/shape/line/util.js +87 -0
- package/lib/geometry/shape/line/util.js.map +1 -0
- package/lib/geometry/shape/point/hollow.d.ts +1 -0
- package/lib/geometry/shape/point/hollow.js +26 -0
- package/lib/geometry/shape/point/hollow.js.map +1 -0
- package/lib/geometry/shape/point/image.d.ts +1 -0
- package/lib/geometry/shape/point/image.js +50 -0
- package/lib/geometry/shape/point/image.js.map +1 -0
- package/lib/geometry/shape/point/index.d.ts +2 -0
- package/lib/geometry/shape/point/index.js +34 -0
- package/lib/geometry/shape/point/index.js.map +1 -0
- package/lib/geometry/shape/point/solid.d.ts +1 -0
- package/lib/geometry/shape/point/solid.js +25 -0
- package/lib/geometry/shape/point/solid.js.map +1 -0
- package/lib/geometry/shape/point/util.d.ts +15 -0
- package/lib/geometry/shape/point/util.js +43 -0
- package/lib/geometry/shape/point/util.js.map +1 -0
- package/lib/geometry/shape/polygon/index.d.ts +2 -0
- package/lib/geometry/shape/polygon/index.js +67 -0
- package/lib/geometry/shape/polygon/index.js.map +1 -0
- package/lib/geometry/shape/polygon/square.d.ts +1 -0
- package/lib/geometry/shape/polygon/square.js +46 -0
- package/lib/geometry/shape/polygon/square.js.map +1 -0
- package/lib/geometry/shape/schema/box.d.ts +1 -0
- package/lib/geometry/shape/schema/box.js +144 -0
- package/lib/geometry/shape/schema/box.js.map +1 -0
- package/lib/geometry/shape/schema/candle.d.ts +1 -0
- package/lib/geometry/shape/schema/candle.js +82 -0
- package/lib/geometry/shape/schema/candle.js.map +1 -0
- package/lib/geometry/shape/schema/index.d.ts +2 -0
- package/lib/geometry/shape/schema/index.js +8 -0
- package/lib/geometry/shape/schema/index.js.map +1 -0
- package/lib/geometry/shape/util/get-path-points.d.ts +38 -0
- package/lib/geometry/shape/util/get-path-points.js +137 -0
- package/lib/geometry/shape/util/get-path-points.js.map +1 -0
- package/lib/geometry/shape/util/get-style.d.ts +18 -0
- package/lib/geometry/shape/util/get-style.js +52 -0
- package/lib/geometry/shape/util/get-style.js.map +1 -0
- package/lib/geometry/shape/util/path.d.ts +32 -0
- package/lib/geometry/shape/util/path.js +320 -0
- package/lib/geometry/shape/util/path.js.map +1 -0
- package/lib/geometry/shape/util/split-points.d.ts +13 -0
- package/lib/geometry/shape/util/split-points.js +28 -0
- package/lib/geometry/shape/util/split-points.js.map +1 -0
- package/lib/geometry/shape/violin/hollow.d.ts +1 -0
- package/lib/geometry/shape/violin/hollow.js +53 -0
- package/lib/geometry/shape/violin/hollow.js.map +1 -0
- package/lib/geometry/shape/violin/index.d.ts +2 -0
- package/lib/geometry/shape/violin/index.js +62 -0
- package/lib/geometry/shape/violin/index.js.map +1 -0
- package/lib/geometry/shape/violin/smooth.d.ts +1 -0
- package/lib/geometry/shape/violin/smooth.js +30 -0
- package/lib/geometry/shape/violin/smooth.js.map +1 -0
- package/lib/geometry/util/diff.d.ts +11 -0
- package/lib/geometry/util/diff.js +34 -0
- package/lib/geometry/util/diff.js.map +1 -0
- package/lib/geometry/util/get-shape-type.d.ts +8 -0
- package/lib/geometry/util/get-shape-type.js +20 -0
- package/lib/geometry/util/get-shape-type.js.map +1 -0
- package/lib/geometry/util/group-data.d.ts +3 -0
- package/lib/geometry/util/group-data.js +35 -0
- package/lib/geometry/util/group-data.js.map +1 -0
- package/lib/geometry/util/is-model-change.d.ts +9 -0
- package/lib/geometry/util/is-model-change.js +18 -0
- package/lib/geometry/util/is-model-change.js.map +1 -0
- package/lib/geometry/util/parse-fields.d.ts +2 -0
- package/lib/geometry/util/parse-fields.js +13 -0
- package/lib/geometry/util/parse-fields.js.map +1 -0
- package/lib/geometry/util/shape-size.d.ts +2 -0
- package/lib/geometry/util/shape-size.js +128 -0
- package/lib/geometry/util/shape-size.js.map +1 -0
- package/lib/geometry/violin.d.ts +25 -0
- package/lib/geometry/violin.js +69 -0
- package/lib/geometry/violin.js.map +1 -0
- package/lib/index.d.ts +107 -0
- package/lib/index.js +586 -0
- package/lib/index.js.map +1 -0
- package/lib/interaction/action/active-region.d.ts +33 -0
- package/lib/interaction/action/active-region.js +202 -0
- package/lib/interaction/action/active-region.js.map +1 -0
- package/lib/interaction/action/base.d.ts +29 -0
- package/lib/interaction/action/base.js +38 -0
- package/lib/interaction/action/base.js.map +1 -0
- package/lib/interaction/action/callback.d.ts +17 -0
- package/lib/interaction/action/callback.js +29 -0
- package/lib/interaction/action/callback.js.map +1 -0
- package/lib/interaction/action/component/list-active.d.ts +14 -0
- package/lib/interaction/action/component/list-active.js +26 -0
- package/lib/interaction/action/component/list-active.js.map +1 -0
- package/lib/interaction/action/component/list-checked.d.ts +30 -0
- package/lib/interaction/action/component/list-checked.js +84 -0
- package/lib/interaction/action/component/list-checked.js.map +1 -0
- package/lib/interaction/action/component/list-focus.d.ts +5 -0
- package/lib/interaction/action/component/list-focus.js +57 -0
- package/lib/interaction/action/component/list-focus.js.map +1 -0
- package/lib/interaction/action/component/list-highlight-util.d.ts +7 -0
- package/lib/interaction/action/component/list-highlight-util.js +24 -0
- package/lib/interaction/action/component/list-highlight-util.js.map +1 -0
- package/lib/interaction/action/component/list-highlight.d.ts +20 -0
- package/lib/interaction/action/component/list-highlight.js +99 -0
- package/lib/interaction/action/component/list-highlight.js.map +1 -0
- package/lib/interaction/action/component/list-radio.d.ts +24 -0
- package/lib/interaction/action/component/list-radio.js +118 -0
- package/lib/interaction/action/component/list-radio.js.map +1 -0
- package/lib/interaction/action/component/list-selected.d.ts +10 -0
- package/lib/interaction/action/component/list-selected.js +22 -0
- package/lib/interaction/action/component/list-selected.js.map +1 -0
- package/lib/interaction/action/component/list-state.d.ts +46 -0
- package/lib/interaction/action/component/list-state.js +169 -0
- package/lib/interaction/action/component/list-state.js.map +1 -0
- package/lib/interaction/action/component/list-unchecked.d.ts +13 -0
- package/lib/interaction/action/component/list-unchecked.js +25 -0
- package/lib/interaction/action/component/list-unchecked.js.map +1 -0
- package/lib/interaction/action/component/tooltip/ellipsis-text.d.ts +25 -0
- package/lib/interaction/action/component/tooltip/ellipsis-text.js +95 -0
- package/lib/interaction/action/component/tooltip/ellipsis-text.js.map +1 -0
- package/lib/interaction/action/component/tooltip/geometry.d.ts +24 -0
- package/lib/interaction/action/component/tooltip/geometry.js +73 -0
- package/lib/interaction/action/component/tooltip/geometry.js.map +1 -0
- package/lib/interaction/action/component/tooltip/sibling.d.ts +21 -0
- package/lib/interaction/action/component/tooltip/sibling.js +41 -0
- package/lib/interaction/action/component/tooltip/sibling.js.map +1 -0
- package/lib/interaction/action/cursor.d.ts +69 -0
- package/lib/interaction/action/cursor.js +115 -0
- package/lib/interaction/action/cursor.js.map +1 -0
- package/lib/interaction/action/data/filter.d.ts +13 -0
- package/lib/interaction/action/data/filter.js +68 -0
- package/lib/interaction/action/data/filter.js.map +1 -0
- package/lib/interaction/action/data/range-filter.d.ts +56 -0
- package/lib/interaction/action/data/range-filter.js +166 -0
- package/lib/interaction/action/data/range-filter.js.map +1 -0
- package/lib/interaction/action/data/sibling-filter.d.ts +22 -0
- package/lib/interaction/action/data/sibling-filter.js +41 -0
- package/lib/interaction/action/data/sibling-filter.js.map +1 -0
- package/lib/interaction/action/element/active.d.ts +14 -0
- package/lib/interaction/action/element/active.js +26 -0
- package/lib/interaction/action/element/active.js.map +1 -0
- package/lib/interaction/action/element/filter.d.ts +20 -0
- package/lib/interaction/action/element/filter.js +91 -0
- package/lib/interaction/action/element/filter.js.map +1 -0
- package/lib/interaction/action/element/highlight-by-color.d.ts +10 -0
- package/lib/interaction/action/element/highlight-by-color.js +32 -0
- package/lib/interaction/action/element/highlight-by-color.js.map +1 -0
- package/lib/interaction/action/element/highlight-by-x.d.ts +15 -0
- package/lib/interaction/action/element/highlight-by-x.js +53 -0
- package/lib/interaction/action/element/highlight-by-x.js.map +1 -0
- package/lib/interaction/action/element/highlight-util.d.ts +18 -0
- package/lib/interaction/action/element/highlight-util.js +50 -0
- package/lib/interaction/action/element/highlight-util.js.map +1 -0
- package/lib/interaction/action/element/highlight.d.ts +21 -0
- package/lib/interaction/action/element/highlight.js +96 -0
- package/lib/interaction/action/element/highlight.js.map +1 -0
- package/lib/interaction/action/element/link-by-color.d.ts +51 -0
- package/lib/interaction/action/element/link-by-color.js +158 -0
- package/lib/interaction/action/element/link-by-color.js.map +1 -0
- package/lib/interaction/action/element/range-active.d.ts +13 -0
- package/lib/interaction/action/element/range-active.js +25 -0
- package/lib/interaction/action/element/range-active.js.map +1 -0
- package/lib/interaction/action/element/range-highlight.d.ts +27 -0
- package/lib/interaction/action/element/range-highlight.js +57 -0
- package/lib/interaction/action/element/range-highlight.js.map +1 -0
- package/lib/interaction/action/element/range-selected.d.ts +13 -0
- package/lib/interaction/action/element/range-selected.js +25 -0
- package/lib/interaction/action/element/range-selected.js.map +1 -0
- package/lib/interaction/action/element/range-state.d.ts +38 -0
- package/lib/interaction/action/element/range-state.js +166 -0
- package/lib/interaction/action/element/range-state.js.map +1 -0
- package/lib/interaction/action/element/selected.d.ts +14 -0
- package/lib/interaction/action/element/selected.js +26 -0
- package/lib/interaction/action/element/selected.js.map +1 -0
- package/lib/interaction/action/element/sibling-filter.d.ts +19 -0
- package/lib/interaction/action/element/sibling-filter.js +95 -0
- package/lib/interaction/action/element/sibling-filter.js.map +1 -0
- package/lib/interaction/action/element/single-active.d.ts +13 -0
- package/lib/interaction/action/element/single-active.js +25 -0
- package/lib/interaction/action/element/single-active.js.map +1 -0
- package/lib/interaction/action/element/single-highlight.d.ts +16 -0
- package/lib/interaction/action/element/single-highlight.js +37 -0
- package/lib/interaction/action/element/single-highlight.js.map +1 -0
- package/lib/interaction/action/element/single-selected.d.ts +13 -0
- package/lib/interaction/action/element/single-selected.js +25 -0
- package/lib/interaction/action/element/single-selected.js.map +1 -0
- package/lib/interaction/action/element/single-state.d.ts +18 -0
- package/lib/interaction/action/element/single-state.js +55 -0
- package/lib/interaction/action/element/single-state.js.map +1 -0
- package/lib/interaction/action/element/state-base.d.ts +39 -0
- package/lib/interaction/action/element/state-base.js +61 -0
- package/lib/interaction/action/element/state-base.js.map +1 -0
- package/lib/interaction/action/element/state.d.ts +28 -0
- package/lib/interaction/action/element/state.js +101 -0
- package/lib/interaction/action/element/state.js.map +1 -0
- package/lib/interaction/action/index.d.ts +2 -0
- package/lib/interaction/action/index.js +13 -0
- package/lib/interaction/action/index.js.map +1 -0
- package/lib/interaction/action/mask/base.d.ts +62 -0
- package/lib/interaction/action/mask/base.js +171 -0
- package/lib/interaction/action/mask/base.js.map +1 -0
- package/lib/interaction/action/mask/circle.d.ts +14 -0
- package/lib/interaction/action/mask/circle.js +39 -0
- package/lib/interaction/action/mask/circle.js.map +1 -0
- package/lib/interaction/action/mask/dim-rect.d.ts +11 -0
- package/lib/interaction/action/mask/dim-rect.js +64 -0
- package/lib/interaction/action/mask/dim-rect.js.map +1 -0
- package/lib/interaction/action/mask/path.d.ts +16 -0
- package/lib/interaction/action/mask/path.js +46 -0
- package/lib/interaction/action/mask/path.js.map +1 -0
- package/lib/interaction/action/mask/rect.d.ts +17 -0
- package/lib/interaction/action/mask/rect.js +41 -0
- package/lib/interaction/action/mask/rect.js.map +1 -0
- package/lib/interaction/action/mask/smooth-path.d.ts +9 -0
- package/lib/interaction/action/mask/smooth-path.js +23 -0
- package/lib/interaction/action/mask/smooth-path.js.map +1 -0
- package/lib/interaction/action/register.d.ts +36 -0
- package/lib/interaction/action/register.js +69 -0
- package/lib/interaction/action/register.js.map +1 -0
- package/lib/interaction/action/util.d.ts +140 -0
- package/lib/interaction/action/util.js +387 -0
- package/lib/interaction/action/util.js.map +1 -0
- package/lib/interaction/action/view/button.d.ts +25 -0
- package/lib/interaction/action/view/button.js +118 -0
- package/lib/interaction/action/view/button.js.map +1 -0
- package/lib/interaction/action/view/drag.d.ts +24 -0
- package/lib/interaction/action/view/drag.js +75 -0
- package/lib/interaction/action/view/drag.js.map +1 -0
- package/lib/interaction/action/view/mousewheel-scroll.d.ts +5 -0
- package/lib/interaction/action/view/mousewheel-scroll.js +37 -0
- package/lib/interaction/action/view/mousewheel-scroll.js.map +1 -0
- package/lib/interaction/action/view/move.d.ts +28 -0
- package/lib/interaction/action/view/move.js +82 -0
- package/lib/interaction/action/view/move.js.map +1 -0
- package/lib/interaction/action/view/scale-transform.d.ts +18 -0
- package/lib/interaction/action/view/scale-transform.js +53 -0
- package/lib/interaction/action/view/scale-transform.js.map +1 -0
- package/lib/interaction/action/view/scale-translate.d.ts +30 -0
- package/lib/interaction/action/view/scale-translate.js +114 -0
- package/lib/interaction/action/view/scale-translate.js.map +1 -0
- package/lib/interaction/action/view/scale-zoom.d.ts +20 -0
- package/lib/interaction/action/view/scale-zoom.js +85 -0
- package/lib/interaction/action/view/scale-zoom.js.map +1 -0
- package/lib/interaction/context.d.ts +65 -0
- package/lib/interaction/context.js +144 -0
- package/lib/interaction/context.js.map +1 -0
- package/lib/interaction/grammar-interaction.d.ts +158 -0
- package/lib/interaction/grammar-interaction.js +289 -0
- package/lib/interaction/grammar-interaction.js.map +1 -0
- package/lib/interaction/index.d.ts +25 -0
- package/lib/interaction/index.js +54 -0
- package/lib/interaction/index.js.map +1 -0
- package/lib/interaction/interaction.d.ts +29 -0
- package/lib/interaction/interaction.js +34 -0
- package/lib/interaction/interaction.js.map +1 -0
- package/lib/interface.d.ts +2264 -0
- package/lib/interface.js +3 -0
- package/lib/interface.js.map +1 -0
- package/lib/theme/index.d.ts +12 -0
- package/lib/theme/index.js +28 -0
- package/lib/theme/index.js.map +1 -0
- package/lib/theme/style-sheet/dark.d.ts +825 -0
- package/lib/theme/style-sheet/dark.js +500 -0
- package/lib/theme/style-sheet/dark.js.map +1 -0
- package/lib/theme/style-sheet/light.d.ts +817 -0
- package/lib/theme/style-sheet/light.js +496 -0
- package/lib/theme/style-sheet/light.js.map +1 -0
- package/lib/theme/util/create-by-style-sheet.d.ts +6 -0
- package/lib/theme/util/create-by-style-sheet.js +1426 -0
- package/lib/theme/util/create-by-style-sheet.js.map +1 -0
- package/lib/theme/util/create-theme.d.ts +6 -0
- package/lib/theme/util/create-theme.js +16 -0
- package/lib/theme/util/create-theme.js.map +1 -0
- package/lib/theme/util/index.d.ts +1 -0
- package/lib/theme/util/index.js +6 -0
- package/lib/theme/util/index.js.map +1 -0
- package/lib/util/annotation.d.ts +7 -0
- package/lib/util/annotation.js +43 -0
- package/lib/util/annotation.js.map +1 -0
- package/lib/util/attr.d.ts +10 -0
- package/lib/util/attr.js +29 -0
- package/lib/util/attr.js.map +1 -0
- package/lib/util/axis.d.ts +100 -0
- package/lib/util/axis.js +251 -0
- package/lib/util/axis.js.map +1 -0
- package/lib/util/bbox.d.ts +105 -0
- package/lib/util/bbox.js +287 -0
- package/lib/util/bbox.js.map +1 -0
- package/lib/util/collision-detect.d.ts +16 -0
- package/lib/util/collision-detect.js +132 -0
- package/lib/util/collision-detect.js.map +1 -0
- package/lib/util/color.d.ts +1 -0
- package/lib/util/color.js +23 -0
- package/lib/util/color.js.map +1 -0
- package/lib/util/context.d.ts +4 -0
- package/lib/util/context.js +15 -0
- package/lib/util/context.js.map +1 -0
- package/lib/util/coordinate.d.ts +86 -0
- package/lib/util/coordinate.js +157 -0
- package/lib/util/coordinate.js.map +1 -0
- package/lib/util/direction.d.ts +19 -0
- package/lib/util/direction.js +125 -0
- package/lib/util/direction.js.map +1 -0
- package/lib/util/dom.d.ts +19 -0
- package/lib/util/dom.js +68 -0
- package/lib/util/dom.js.map +1 -0
- package/lib/util/event.d.ts +8 -0
- package/lib/util/event.js +18 -0
- package/lib/util/event.js.map +1 -0
- package/lib/util/facet.d.ts +16 -0
- package/lib/util/facet.js +48 -0
- package/lib/util/facet.js.map +1 -0
- package/lib/util/graphics.d.ts +58 -0
- package/lib/util/graphics.js +212 -0
- package/lib/util/graphics.js.map +1 -0
- package/lib/util/grid.d.ts +36 -0
- package/lib/util/grid.js +125 -0
- package/lib/util/grid.js.map +1 -0
- package/lib/util/helper.d.ts +34 -0
- package/lib/util/helper.js +79 -0
- package/lib/util/helper.js.map +1 -0
- package/lib/util/legend.d.ts +45 -0
- package/lib/util/legend.js +152 -0
- package/lib/util/legend.js.map +1 -0
- package/lib/util/marker.d.ts +10 -0
- package/lib/util/marker.js +61 -0
- package/lib/util/marker.js.map +1 -0
- package/lib/util/padding.d.ts +14 -0
- package/lib/util/padding.js +45 -0
- package/lib/util/padding.js.map +1 -0
- package/lib/util/scale.d.ts +42 -0
- package/lib/util/scale.js +137 -0
- package/lib/util/scale.js.map +1 -0
- package/lib/util/stat.d.ts +10 -0
- package/lib/util/stat.js +41 -0
- package/lib/util/stat.js.map +1 -0
- package/lib/util/text.d.ts +23 -0
- package/lib/util/text.js +88 -0
- package/lib/util/text.js.map +1 -0
- package/lib/util/tooltip.d.ts +26 -0
- package/lib/util/tooltip.js +426 -0
- package/lib/util/tooltip.js.map +1 -0
- package/lib/util/transform.d.ts +33 -0
- package/lib/util/transform.js +69 -0
- package/lib/util/transform.js.map +1 -0
- package/lib/util/types.d.ts +6 -0
- package/lib/util/types.js +3 -0
- package/lib/util/types.js.map +1 -0
- package/package.json +4 -3
- package/src/core.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.js","sourceRoot":"","sources":["../../src/facet/facet.ts"],"names":[],"mappings":";;;AAAA,mCAAwE;AACxE,wCAAoC;AAKpC,qCAA6C;AAE7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;IAaE,eAAY,IAAU,EAAE,GAAM;QAR9B,WAAW;QACJ,cAAS,GAAY,KAAK,CAAC;QAIlC,oBAAoB;QACV,WAAM,GAAQ,EAAE,CAAC;QAGzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,IAAA,cAAO,EAAC,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,GAAG,CAAC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IAAI,CAAC,IAAA,YAAK,EAAC,KAAK,CAAC,IAAI,KAAK,EAAE;oBAC1B,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;iBAC/B;gBACD,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;IAuCH,YAAC;AAAD,CAAC,AApVD,IAoVC;AApVqB,sBAAK","sourcesContent":["import { deepMix, each, every, get, isNil, isNumber } from '@antv/util';\nimport { LAYER } from '../constant';\nimport { IGroup } from '../dependents';\nimport { AxisCfg, Condition, Datum, FacetCfg, FacetData, FacetDataFilter, Region } from '../interface';\n\nimport View from '../chart/view';\nimport { getAxisOption } from '../util/axis';\n\n/**\n * facet 基类\n * - 定义生命周期,方便自定义 facet\n * - 提供基础的生命流程方法\n *\n * 生命周期:\n *\n * 初始化 init\n * 1. 初始化容器\n * 2. 数据分面,生成分面布局信息\n *\n * 渲染阶段 render\n * 1. view 创建\n * 2. title\n * 3. axis\n *\n * 清除阶段 clear\n * 1. 清除 view\n *\n * 销毁阶段 destroy\n * 1. clear\n * 2. 清除事件\n * 3. 清除 group\n */\nexport abstract class Facet<C extends FacetCfg<FacetData> = FacetCfg<FacetData>, F extends FacetData = FacetData> {\n /** 分面所在的 view */\n public view: View;\n /** 分面容器 */\n public container: IGroup;\n /** 是否销毁 */\n public destroyed: boolean = false;\n\n /** 分面的配置项 */\n protected cfg: C;\n /** 分面之后的所有分面数据结构 */\n protected facets: F[] = [];\n\n constructor(view: View, cfg: C) {\n this.view = view;\n this.cfg = deepMix({}, this.getDefaultCfg(), cfg);\n }\n\n /**\n * 初始化过程\n */\n public init() {\n // 初始化容器\n if (!this.container) {\n this.container = this.createContainer();\n }\n\n // 生成分面布局信息\n const data = this.view.getData();\n this.facets = this.generateFacets(data);\n }\n\n /**\n * 渲染分面,由上层 view 调用。包括:\n * - 分面 view\n * - 轴\n * - title\n *\n * 子类可以复写,添加一些其他组件,比如滚动条等\n */\n public render() {\n this.renderViews();\n }\n\n /**\n * 更新 facet\n */\n public update() {\n // 其实不用做任何事情,因为 facet 最终生成的 View 和 Geometry 都在父 view 的更新中处理了\n }\n\n /**\n * 清空,clear 之后如果还需要使用,需要重新调用 init 初始化过程\n * 一般在数据有变更的时候调用,重新进行数据的分面逻辑\n */\n public clear() {\n this.clearFacetViews();\n }\n\n /**\n * 销毁\n */\n public destroy() {\n this.clear();\n\n if (this.container) {\n this.container.remove(true);\n this.container = undefined;\n }\n\n this.destroyed = true;\n this.view = undefined;\n this.facets = [];\n }\n\n /**\n * 根据 facet 生成 view,可以给上层自定义使用\n * @param facet\n */\n protected facetToView(facet: F): View {\n const { region, data, padding = this.cfg.padding } = facet;\n\n const view = this.view.createView({\n region,\n padding,\n });\n\n // 设置分面的数据\n view.data(data || []);\n facet.view = view;\n\n // 前置钩子\n this.beforeEachView(view, facet);\n\n const { eachView } = this.cfg;\n if (eachView) {\n eachView(view, facet);\n }\n\n // 后置钩子\n this.afterEachView(view, facet);\n\n return view;\n }\n\n // 创建容器\n private createContainer(): IGroup {\n const foregroundGroup = this.view.getLayer(LAYER.FORE);\n return foregroundGroup.addGroup();\n }\n\n /**\n * 初始化 view\n */\n private renderViews() {\n this.createFacetViews();\n }\n\n /**\n * 创建 分面 view\n */\n private createFacetViews(): View[] {\n // 使用分面数据 创建分面 view\n return this.facets.map((facet): View => {\n return this.facetToView(facet);\n });\n }\n\n /**\n * 从 view 中清除 facetView\n */\n private clearFacetViews() {\n // 从 view 中移除分面 view\n each(this.facets, (facet) => {\n if (facet.view) {\n this.view.removeView(facet.view);\n facet.view = undefined;\n }\n });\n }\n\n /**\n * 解析 spacing\n */\n private parseSpacing() {\n /**\n * @example\n *\n * // 仅使用百分比或像素值\n * // 横向间隔为 10%,纵向间隔为 10%\n * ['10%', '10%']\n * // 横向间隔为 10px,纵向间隔为 10px\n * [10, 10]\n *\n * // 同时使用百分比和像素值\n * ['10%', 10]\n * // 横向间隔为 10%,纵向间隔为 10px\n */\n const { width, height } = this.view.viewBBox;\n const { spacing } = this.cfg;\n return spacing.map((s: number, idx: number) => {\n if (isNumber(s)) return s / (idx === 0 ? width : height);\n else return parseFloat(s) / 100;\n });\n }\n\n // 其他一些提供给子类使用的方法\n\n /**\n * 获取这个字段对应的所有值,数组\n * @protected\n * @param data 数据\n * @param field 字段名\n * @return 字段对应的值\n */\n protected getFieldValues(data: Datum[], field: string): string[] {\n const rst = [];\n const cache: Record<string, boolean> = {};\n\n // 去重、去除 Nil 值\n each(data, (d: Datum) => {\n const value = d[field];\n if (!isNil(value) && !cache[value]) {\n rst.push(value);\n cache[value] = true;\n }\n });\n\n return rst;\n }\n\n /**\n * 获得每个分面的 region,平分区域\n * @param rows row 总数\n * @param cols col 总数\n * @param xIndex x 方向 index\n * @param yIndex y 方向 index\n */\n protected getRegion(rows: number, cols: number, xIndex: number, yIndex: number): Region {\n const [xSpacing, ySpacing] = this.parseSpacing();\n // 每两个分面区域横向间隔xSPacing, 纵向间隔ySpacing\n // 每个分面区域的横纵占比\n /**\n * ratio * num + spacing * (num - 1) = 1\n * => ratio = (1 - (spacing * (num - 1))) / num\n * = (1 + spacing) / num - spacing\n *\n * num 对应 cols/rows\n * spacing 对应 xSpacing/ySpacing\n */\n const xRatio = (1 + xSpacing) / (cols === 0 ? 1 : cols) - xSpacing;\n const yRatio = (1 + ySpacing) / (rows === 0 ? 1 : rows) - ySpacing;\n\n // 得到第 index 个分面区域百分比位置\n const start = {\n x: (xRatio + xSpacing) * xIndex,\n y: (yRatio + ySpacing) * yIndex,\n };\n const end = {\n x: start.x + xRatio,\n y: start.y + yRatio,\n };\n return { start, end };\n }\n\n protected getDefaultCfg() {\n return {\n eachView: undefined,\n showTitle: true,\n spacing: [0, 0],\n padding: 10,\n fields: [],\n };\n }\n\n /**\n * 默认的 title 样式,因为有的分面是 title,有的分面配置是 columnTitle、rowTitle\n */\n protected getDefaultTitleCfg() {\n // @ts-ignore\n const fontFamily = this.view.getTheme().fontFamily;\n return {\n style: {\n fontSize: 14,\n fill: '#666',\n fontFamily,\n },\n };\n }\n\n /**\n * 处理 axis 的默认配置\n * @param view\n * @param facet\n */\n protected processAxis(view: View, facet: F) {\n const options = view.getOptions();\n\n const coordinateOption = options.coordinate;\n const geometries = view.geometries;\n\n const coordinateType = get(coordinateOption, 'type', 'rect');\n\n if (coordinateType === 'rect' && geometries.length) {\n if (isNil(options.axes)) {\n // @ts-ignore\n options.axes = {};\n }\n const axes = options.axes;\n\n const [x, y] = geometries[0].getXYFields();\n\n const xOption = getAxisOption(axes, x);\n const yOption = getAxisOption(axes, y);\n\n if (xOption !== false) {\n options.axes[x] = this.getXAxisOption(x, axes, xOption, facet);\n }\n\n if (yOption !== false) {\n options.axes[y] = this.getYAxisOption(y, axes, yOption, facet);\n }\n }\n }\n\n /**\n * 获取分面数据\n * @param conditions\n */\n protected getFacetDataFilter(conditions: Condition[]): FacetDataFilter {\n return (datum: Datum) => {\n // 过滤出全部满足条件的数据\n return every(conditions, (condition) => {\n const { field, value } = condition;\n\n if (!isNil(value) && field) {\n return datum[field] === value;\n }\n return true;\n });\n };\n }\n\n /**\n * @override 开始处理 eachView\n * @param view\n * @param facet\n */\n protected abstract beforeEachView(view: View, facet: F);\n\n /**\n * @override 处理 eachView 之后\n * @param view\n * @param facet\n */\n protected abstract afterEachView(view: View, facet: F);\n\n /**\n * @override 生成分面数据,包含布局\n * @param data\n */\n protected abstract generateFacets(data: Datum[]): F[];\n\n /**\n * 获取 x 轴的配置\n * @param x\n * @param axes\n * @param option\n * @param facet\n */\n protected abstract getXAxisOption(x: string, axes: any, option: AxisCfg, facet: F): object;\n\n /**\n * 获取 y 轴的配置\n * @param y\n * @param axes\n * @param option\n * @param facet\n */\n protected abstract getYAxisOption(y: string, axes: any, option: AxisCfg, facet: F): object;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FacetCtor } from '../interface';
|
|
2
|
+
export { Facet } from './facet';
|
|
3
|
+
/**
|
|
4
|
+
* 根据 type 获取 facet 类
|
|
5
|
+
* @param type 分面类型
|
|
6
|
+
*/
|
|
7
|
+
export declare const getFacet: (type: string) => FacetCtor;
|
|
8
|
+
/**
|
|
9
|
+
* 注册一个 Facet 类
|
|
10
|
+
* @param type 分面类型
|
|
11
|
+
* @param ctor 分面类
|
|
12
|
+
*/
|
|
13
|
+
export declare const registerFacet: (type: string, ctor: FacetCtor) => void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerFacet = exports.getFacet = exports.Facet = void 0;
|
|
4
|
+
var util_1 = require("@antv/util");
|
|
5
|
+
var facet_1 = require("./facet");
|
|
6
|
+
Object.defineProperty(exports, "Facet", { enumerable: true, get: function () { return facet_1.Facet; } });
|
|
7
|
+
/**
|
|
8
|
+
* 所有的 Facet 类
|
|
9
|
+
*/
|
|
10
|
+
var Facets = {};
|
|
11
|
+
/**
|
|
12
|
+
* 根据 type 获取 facet 类
|
|
13
|
+
* @param type 分面类型
|
|
14
|
+
*/
|
|
15
|
+
var getFacet = function (type) {
|
|
16
|
+
return Facets[(0, util_1.lowerCase)(type)];
|
|
17
|
+
};
|
|
18
|
+
exports.getFacet = getFacet;
|
|
19
|
+
/**
|
|
20
|
+
* 注册一个 Facet 类
|
|
21
|
+
* @param type 分面类型
|
|
22
|
+
* @param ctor 分面类
|
|
23
|
+
*/
|
|
24
|
+
var registerFacet = function (type, ctor) {
|
|
25
|
+
Facets[(0, util_1.lowerCase)(type)] = ctor;
|
|
26
|
+
};
|
|
27
|
+
exports.registerFacet = registerFacet;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/facet/index.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AAEvC,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AAEd;;GAEG;AACH,IAAM,MAAM,GAA8B,EAAE,CAAC;AAE7C;;;GAGG;AACI,IAAM,QAAQ,GAAG,UAAC,IAAY;IACnC,OAAO,MAAM,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB;AAEF;;;;GAIG;AACI,IAAM,aAAa,GAAG,UAAC,IAAY,EAAE,IAAe;IACzD,MAAM,CAAC,IAAA,gBAAS,EAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB","sourcesContent":["import { lowerCase } from '@antv/util';\nimport { FacetCtor } from '../interface';\nexport { Facet } from './facet';\n\n/**\n * 所有的 Facet 类\n */\nconst Facets: Record<string, FacetCtor> = {};\n\n/**\n * 根据 type 获取 facet 类\n * @param type 分面类型\n */\nexport const getFacet = (type: string): FacetCtor => {\n return Facets[lowerCase(type)];\n};\n\n/**\n * 注册一个 Facet 类\n * @param type 分面类型\n * @param ctor 分面类\n */\nexport const registerFacet = (type: string, ctor: FacetCtor) => {\n Facets[lowerCase(type)] = ctor;\n};\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AxisCfg, Datum, ListCfg, ListData } from '../interface';
|
|
2
|
+
import View from '../chart/view';
|
|
3
|
+
import { Facet } from './facet';
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
* 镜像分面
|
|
7
|
+
*/
|
|
8
|
+
export default class List extends Facet<ListCfg, ListData> {
|
|
9
|
+
protected getDefaultCfg(): any;
|
|
10
|
+
render(): void;
|
|
11
|
+
protected afterEachView(view: View, facet: ListData): void;
|
|
12
|
+
protected beforeEachView(view: View, facet: ListData): void;
|
|
13
|
+
protected generateFacets(data: Datum[]): ListData[];
|
|
14
|
+
/**
|
|
15
|
+
* 设置 x 坐标轴的文本、title 是否显示
|
|
16
|
+
* @param x
|
|
17
|
+
* @param axes
|
|
18
|
+
* @param option
|
|
19
|
+
* @param facet
|
|
20
|
+
*/
|
|
21
|
+
protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: ListData): object;
|
|
22
|
+
/**
|
|
23
|
+
* 设置 y 坐标轴的文本、title 是否显示
|
|
24
|
+
* @param y
|
|
25
|
+
* @param axes
|
|
26
|
+
* @param option
|
|
27
|
+
* @param facet
|
|
28
|
+
*/
|
|
29
|
+
protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: ListData): object;
|
|
30
|
+
/**
|
|
31
|
+
* facet title
|
|
32
|
+
*/
|
|
33
|
+
private renderTitle;
|
|
34
|
+
/**
|
|
35
|
+
* 计算分页数
|
|
36
|
+
* @param total
|
|
37
|
+
* @param pageSize
|
|
38
|
+
*/
|
|
39
|
+
private getPageCount;
|
|
40
|
+
/**
|
|
41
|
+
* 索引值在哪一页
|
|
42
|
+
* @param index
|
|
43
|
+
* @param pageSize
|
|
44
|
+
*/
|
|
45
|
+
private getRowCol;
|
|
46
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var util_1 = require("@antv/util");
|
|
5
|
+
var constant_1 = require("../constant");
|
|
6
|
+
var facet_1 = require("../util/facet");
|
|
7
|
+
var facet_2 = require("./facet");
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
* 镜像分面
|
|
11
|
+
*/
|
|
12
|
+
var List = /** @class */ (function (_super) {
|
|
13
|
+
(0, tslib_1.__extends)(List, _super);
|
|
14
|
+
function List() {
|
|
15
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
+
}
|
|
17
|
+
List.prototype.getDefaultCfg = function () {
|
|
18
|
+
return (0, util_1.deepMix)({}, _super.prototype.getDefaultCfg.call(this), {
|
|
19
|
+
type: 'list',
|
|
20
|
+
cols: null,
|
|
21
|
+
showTitle: true,
|
|
22
|
+
title: _super.prototype.getDefaultTitleCfg.call(this),
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
List.prototype.render = function () {
|
|
26
|
+
_super.prototype.render.call(this);
|
|
27
|
+
if (this.cfg.showTitle) {
|
|
28
|
+
this.renderTitle();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
List.prototype.afterEachView = function (view, facet) {
|
|
32
|
+
this.processAxis(view, facet);
|
|
33
|
+
};
|
|
34
|
+
List.prototype.beforeEachView = function (view, facet) { };
|
|
35
|
+
List.prototype.generateFacets = function (data) {
|
|
36
|
+
var _this = this;
|
|
37
|
+
var fields = this.cfg.fields;
|
|
38
|
+
var cols = this.cfg.cols;
|
|
39
|
+
var columnField = fields[0];
|
|
40
|
+
if (!columnField) {
|
|
41
|
+
throw new Error('No `fields` specified!');
|
|
42
|
+
}
|
|
43
|
+
var colValues = this.getFieldValues(data, columnField);
|
|
44
|
+
var count = colValues.length;
|
|
45
|
+
cols = cols || count; // 每行有几列数据
|
|
46
|
+
// 总共有几行
|
|
47
|
+
var rows = this.getPageCount(count, cols);
|
|
48
|
+
var rst = [];
|
|
49
|
+
colValues.forEach(function (val, index) {
|
|
50
|
+
// 当前 index 在那个行列
|
|
51
|
+
var _a = _this.getRowCol(index, cols), row = _a.row, col = _a.col;
|
|
52
|
+
var conditions = [{ field: columnField, value: val, values: colValues }];
|
|
53
|
+
var facetData = (0, util_1.filter)(data, _this.getFacetDataFilter(conditions));
|
|
54
|
+
var facet = {
|
|
55
|
+
type: _this.cfg.type,
|
|
56
|
+
data: facetData,
|
|
57
|
+
region: _this.getRegion(rows, cols, col, row),
|
|
58
|
+
columnValue: val,
|
|
59
|
+
rowValue: val,
|
|
60
|
+
columnField: columnField,
|
|
61
|
+
rowField: null,
|
|
62
|
+
columnIndex: col,
|
|
63
|
+
rowIndex: row,
|
|
64
|
+
columnValuesLength: cols,
|
|
65
|
+
rowValuesLength: rows,
|
|
66
|
+
total: count,
|
|
67
|
+
};
|
|
68
|
+
rst.push(facet);
|
|
69
|
+
});
|
|
70
|
+
return rst;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* 设置 x 坐标轴的文本、title 是否显示
|
|
74
|
+
* @param x
|
|
75
|
+
* @param axes
|
|
76
|
+
* @param option
|
|
77
|
+
* @param facet
|
|
78
|
+
*/
|
|
79
|
+
List.prototype.getXAxisOption = function (x, axes, option, facet) {
|
|
80
|
+
// 当是最后一行或者下面没有 view 时文本不显示
|
|
81
|
+
if (facet.rowIndex !== facet.rowValuesLength - 1 &&
|
|
82
|
+
facet.columnValuesLength * facet.rowIndex + facet.columnIndex + 1 + facet.columnValuesLength <= facet.total) {
|
|
83
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, option), { label: null, title: null });
|
|
84
|
+
}
|
|
85
|
+
return option;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* 设置 y 坐标轴的文本、title 是否显示
|
|
89
|
+
* @param y
|
|
90
|
+
* @param axes
|
|
91
|
+
* @param option
|
|
92
|
+
* @param facet
|
|
93
|
+
*/
|
|
94
|
+
List.prototype.getYAxisOption = function (y, axes, option, facet) {
|
|
95
|
+
if (facet.columnIndex !== 0) {
|
|
96
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, option), { title: null, label: null });
|
|
97
|
+
}
|
|
98
|
+
return option;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* facet title
|
|
102
|
+
*/
|
|
103
|
+
List.prototype.renderTitle = function () {
|
|
104
|
+
var _this = this;
|
|
105
|
+
(0, util_1.each)(this.facets, function (facet) {
|
|
106
|
+
var columnValue = facet.columnValue, view = facet.view;
|
|
107
|
+
var formatter = (0, util_1.get)(_this.cfg.title, 'formatter');
|
|
108
|
+
var config = (0, util_1.deepMix)({
|
|
109
|
+
position: ['50%', '0%'],
|
|
110
|
+
content: formatter ? formatter(columnValue) : columnValue,
|
|
111
|
+
}, (0, facet_1.getFactTitleConfig)(constant_1.DIRECTION.TOP), _this.cfg.title);
|
|
112
|
+
view.annotation().text(config);
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* 计算分页数
|
|
117
|
+
* @param total
|
|
118
|
+
* @param pageSize
|
|
119
|
+
*/
|
|
120
|
+
List.prototype.getPageCount = function (total, pageSize) {
|
|
121
|
+
return Math.floor((total + pageSize - 1) / pageSize);
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* 索引值在哪一页
|
|
125
|
+
* @param index
|
|
126
|
+
* @param pageSize
|
|
127
|
+
*/
|
|
128
|
+
List.prototype.getRowCol = function (index, pageSize) {
|
|
129
|
+
var row = Math.floor(index / pageSize);
|
|
130
|
+
var col = index % pageSize;
|
|
131
|
+
return { row: row, col: col };
|
|
132
|
+
};
|
|
133
|
+
return List;
|
|
134
|
+
}(facet_2.Facet));
|
|
135
|
+
exports.default = List;
|
|
136
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/facet/list.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AACxD,wCAAwC;AAIxC,uCAAmD;AACnD,iCAAgC;AAEhC;;;GAGG;AACH;IAAkC,qCAAwB;IAA1D;;IA0JA,CAAC;IAzJW,4BAAa,GAAvB;QACE,OAAO,IAAA,cAAO,EAAC,EAAE,EAAE,iBAAM,aAAa,WAAE,EAAE;YACxC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,iBAAM,kBAAkB,WAAE;SAClC,CAAC,CAAC;IACL,CAAC;IAEM,qBAAM,GAAb;QACE,iBAAM,MAAM,WAAE,CAAC;QAEf,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE;YACtB,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAES,4BAAa,GAAvB,UAAwB,IAAU,EAAE,KAAe;QACjD,IAAI,CAAC,WA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,IAAI,GAAK,KAAK,KAAV,CAAW;YACpC,IAAM,SAAS,GAAG,IAAA,UAAG,EAAC,KAAI,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YAEnD,IAAM,MAAM,GAAG,IAAA,cAAO,EACpB;gBACE,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAqB;gBAC3C,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW;aAC1D,EACD,IAAA,0BAAkB,EAAC,oBAAS,CAAC,GAAG,CAAC,EACjC,KAAI,CAAC,GAAG,CAAC,KAAK,CACf,CAAC;YAEF,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACK,2BAAY,GAApB,UAAqB,KAAa,EAAE,QAAgB;QAClD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,QAAQ,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACK,wBAAS,GAAjB,UAAkB,KAAa,EAAE,QAAgB;QAC/C,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;QACzC,IAAM,GAAG,GAAG,KAAK,GAAG,QAAQ,CAAC;QAE7B,OAAO,EAAE,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,CAAC;IACtB,CAAC;IACH,WAAC;AAAD,CAAC,AA1JD,CAAkC,aAAK,GA0JtC","sourcesContent":["import { deepMix, each, filter, get } from '@antv/util';\nimport { DIRECTION } from '../constant';\nimport { AxisCfg, Datum, ListCfg, ListData } from '../interface';\n\nimport View from '../chart/view';\nimport { getFactTitleConfig } from '../util/facet';\nimport { Facet } from './facet';\n\n/**\n * @ignore\n * 镜像分面\n */\nexport default class List extends Facet<ListCfg, ListData> {\n protected getDefaultCfg() {\n return deepMix({}, super.getDefaultCfg(), {\n type: 'list',\n cols: null, // 默认显示一列\n showTitle: true,\n title: super.getDefaultTitleCfg(),\n });\n }\n\n public render() {\n super.render();\n\n if (this.cfg.showTitle) {\n this.renderTitle();\n }\n }\n\n protected afterEachView(view: View, facet: ListData) {\n this.processAxis(view, facet);\n }\n\n protected beforeEachView(view: View, facet: ListData) {}\n\n protected generateFacets(data: Datum[]): ListData[] {\n const { fields } = this.cfg;\n let { cols } = this.cfg;\n\n const [columnField] = fields;\n if (!columnField) {\n throw new Error('No `fields` specified!');\n }\n\n const colValues = this.getFieldValues(data, columnField);\n\n const count = colValues.length;\n cols = cols || count; // 每行有几列数据\n\n // 总共有几行\n const rows = this.getPageCount(count, cols);\n const rst = [];\n\n colValues.forEach((val, index) => {\n // 当前 index 在那个行列\n const { row, col } = this.getRowCol(index, cols);\n\n const conditions = [{ field: columnField, value: val, values: colValues }];\n\n const facetData = filter(data, this.getFacetDataFilter(conditions));\n\n const facet: ListData = {\n type: this.cfg.type,\n data: facetData,\n region: this.getRegion(rows, cols, col, row),\n\n columnValue: val,\n rowValue: val,\n columnField,\n rowField: null,\n columnIndex: col,\n rowIndex: row,\n columnValuesLength: cols,\n rowValuesLength: rows,\n\n total: count,\n };\n\n rst.push(facet);\n });\n\n return rst;\n }\n\n /**\n * 设置 x 坐标轴的文本、title 是否显示\n * @param x\n * @param axes\n * @param option\n * @param facet\n */\n protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: ListData): object {\n // 当是最后一行或者下面没有 view 时文本不显示\n if (\n facet.rowIndex !== facet.rowValuesLength - 1 &&\n facet.columnValuesLength * facet.rowIndex + facet.columnIndex + 1 + facet.columnValuesLength <= facet.total\n ) {\n return {\n ...option,\n label: null,\n title: null,\n };\n }\n return option;\n }\n\n /**\n * 设置 y 坐标轴的文本、title 是否显示\n * @param y\n * @param axes\n * @param option\n * @param facet\n */\n protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: ListData): object {\n if (facet.columnIndex !== 0) {\n return {\n ...option,\n title: null,\n label: null,\n };\n }\n return option;\n }\n\n /**\n * facet title\n */\n private renderTitle() {\n each(this.facets, (facet: ListData) => {\n const { columnValue, view } = facet;\n const formatter = get(this.cfg.title, 'formatter');\n\n const config = deepMix(\n {\n position: ['50%', '0%'] as [string, string],\n content: formatter ? formatter(columnValue) : columnValue,\n },\n getFactTitleConfig(DIRECTION.TOP),\n this.cfg.title\n );\n\n view.annotation().text(config);\n });\n }\n\n /**\n * 计算分页数\n * @param total\n * @param pageSize\n */\n private getPageCount(total: number, pageSize: number): number {\n return Math.floor((total + pageSize - 1) / pageSize);\n }\n\n /**\n * 索引值在哪一页\n * @param index\n * @param pageSize\n */\n private getRowCol(index: number, pageSize: number) {\n const row = Math.floor(index / pageSize);\n const col = index % pageSize;\n\n return { row, col };\n }\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AxisCfg, Datum, MatrixCfg, MatrixData } from '../interface';
|
|
2
|
+
import View from '../chart/view';
|
|
3
|
+
import { Facet } from './facet';
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
* 镜像分面
|
|
7
|
+
*/
|
|
8
|
+
export default class Matrix extends Facet<MatrixCfg, MatrixData> {
|
|
9
|
+
protected getDefaultCfg(): any;
|
|
10
|
+
render(): void;
|
|
11
|
+
protected afterEachView(view: View, facet: MatrixData): void;
|
|
12
|
+
protected beforeEachView(view: View, facet: MatrixData): void;
|
|
13
|
+
protected generateFacets(data: Datum[]): MatrixData[];
|
|
14
|
+
/**
|
|
15
|
+
* 设置 x 坐标轴的文本、title 是否显示
|
|
16
|
+
* @param x
|
|
17
|
+
* @param axes
|
|
18
|
+
* @param option
|
|
19
|
+
* @param facet
|
|
20
|
+
*/
|
|
21
|
+
protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: MatrixData): object;
|
|
22
|
+
/**
|
|
23
|
+
* 设置 y 坐标轴的文本、title 是否显示
|
|
24
|
+
* @param y
|
|
25
|
+
* @param axes
|
|
26
|
+
* @param option
|
|
27
|
+
* @param facet
|
|
28
|
+
*/
|
|
29
|
+
protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: MatrixData): object;
|
|
30
|
+
/**
|
|
31
|
+
* facet title
|
|
32
|
+
*/
|
|
33
|
+
private renderTitle;
|
|
34
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var util_1 = require("@antv/util");
|
|
5
|
+
var constant_1 = require("../constant");
|
|
6
|
+
var facet_1 = require("../util/facet");
|
|
7
|
+
var facet_2 = require("./facet");
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
* 镜像分面
|
|
11
|
+
*/
|
|
12
|
+
var Matrix = /** @class */ (function (_super) {
|
|
13
|
+
(0, tslib_1.__extends)(Matrix, _super);
|
|
14
|
+
function Matrix() {
|
|
15
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
+
}
|
|
17
|
+
Matrix.prototype.getDefaultCfg = function () {
|
|
18
|
+
return (0, util_1.deepMix)({}, _super.prototype.getDefaultCfg.call(this), {
|
|
19
|
+
type: 'matrix',
|
|
20
|
+
showTitle: false,
|
|
21
|
+
columnTitle: (0, tslib_1.__assign)({}, _super.prototype.getDefaultTitleCfg.call(this)),
|
|
22
|
+
rowTitle: (0, tslib_1.__assign)({}, _super.prototype.getDefaultTitleCfg.call(this)),
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Matrix.prototype.render = function () {
|
|
26
|
+
_super.prototype.render.call(this);
|
|
27
|
+
if (this.cfg.showTitle) {
|
|
28
|
+
this.renderTitle();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
Matrix.prototype.afterEachView = function (view, facet) {
|
|
32
|
+
this.processAxis(view, facet);
|
|
33
|
+
};
|
|
34
|
+
Matrix.prototype.beforeEachView = function (view, facet) { };
|
|
35
|
+
Matrix.prototype.generateFacets = function (data) {
|
|
36
|
+
var _a = this.cfg, fields = _a.fields, type = _a.type;
|
|
37
|
+
// 矩阵中行列相等,等于指定的字段个数
|
|
38
|
+
var rowValuesLength = fields.length;
|
|
39
|
+
var columnValuesLength = rowValuesLength;
|
|
40
|
+
var rst = [];
|
|
41
|
+
for (var i = 0; i < columnValuesLength; i++) {
|
|
42
|
+
var columnField = fields[i];
|
|
43
|
+
for (var j = 0; j < rowValuesLength; j++) {
|
|
44
|
+
var rowField = fields[j];
|
|
45
|
+
var facet = {
|
|
46
|
+
type: type,
|
|
47
|
+
data: data,
|
|
48
|
+
region: this.getRegion(rowValuesLength, columnValuesLength, i, j),
|
|
49
|
+
columnValue: columnField,
|
|
50
|
+
rowValue: rowField,
|
|
51
|
+
columnField: columnField,
|
|
52
|
+
rowField: rowField,
|
|
53
|
+
columnIndex: i,
|
|
54
|
+
rowIndex: j,
|
|
55
|
+
columnValuesLength: columnValuesLength,
|
|
56
|
+
rowValuesLength: rowValuesLength,
|
|
57
|
+
};
|
|
58
|
+
rst.push(facet);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return rst;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 设置 x 坐标轴的文本、title 是否显示
|
|
65
|
+
* @param x
|
|
66
|
+
* @param axes
|
|
67
|
+
* @param option
|
|
68
|
+
* @param facet
|
|
69
|
+
*/
|
|
70
|
+
Matrix.prototype.getXAxisOption = function (x, axes, option, facet) {
|
|
71
|
+
// 最后一行显示
|
|
72
|
+
if (facet.rowIndex !== facet.rowValuesLength - 1) {
|
|
73
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, option), { label: null, title: null });
|
|
74
|
+
}
|
|
75
|
+
return option;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* 设置 y 坐标轴的文本、title 是否显示
|
|
79
|
+
* @param y
|
|
80
|
+
* @param axes
|
|
81
|
+
* @param option
|
|
82
|
+
* @param facet
|
|
83
|
+
*/
|
|
84
|
+
Matrix.prototype.getYAxisOption = function (y, axes, option, facet) {
|
|
85
|
+
// 第一列显示
|
|
86
|
+
if (facet.columnIndex !== 0) {
|
|
87
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, option), { title: null, label: null });
|
|
88
|
+
}
|
|
89
|
+
return option;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* facet title
|
|
93
|
+
*/
|
|
94
|
+
Matrix.prototype.renderTitle = function () {
|
|
95
|
+
var _this = this;
|
|
96
|
+
(0, util_1.each)(this.facets, function (facet, facetIndex) {
|
|
97
|
+
var columnIndex = facet.columnIndex, rowIndex = facet.rowIndex, columnValuesLength = facet.columnValuesLength, rowValuesLength = facet.rowValuesLength, columnValue = facet.columnValue, rowValue = facet.rowValue, view = facet.view;
|
|
98
|
+
// top
|
|
99
|
+
if (rowIndex === 0) {
|
|
100
|
+
var formatter = (0, util_1.get)(_this.cfg.columnTitle, 'formatter');
|
|
101
|
+
var config = (0, util_1.deepMix)({
|
|
102
|
+
position: ['50%', '0%'],
|
|
103
|
+
content: formatter ? formatter(columnValue) : columnValue,
|
|
104
|
+
}, (0, facet_1.getFactTitleConfig)(constant_1.DIRECTION.TOP), _this.cfg.columnTitle);
|
|
105
|
+
view.annotation().text(config);
|
|
106
|
+
}
|
|
107
|
+
// right
|
|
108
|
+
if (columnIndex === columnValuesLength - 1) {
|
|
109
|
+
var formatter = (0, util_1.get)(_this.cfg.rowTitle, 'formatter');
|
|
110
|
+
var config = (0, util_1.deepMix)({
|
|
111
|
+
position: ['100%', '50%'],
|
|
112
|
+
content: formatter ? formatter(rowValue) : rowValue,
|
|
113
|
+
}, (0, facet_1.getFactTitleConfig)(constant_1.DIRECTION.RIGHT), _this.cfg.rowTitle);
|
|
114
|
+
view.annotation().text(config);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return Matrix;
|
|
119
|
+
}(facet_2.Facet));
|
|
120
|
+
exports.default = Matrix;
|
|
121
|
+
//# sourceMappingURL=matrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.js","sourceRoot":"","sources":["../../src/facet/matrix.ts"],"names":[],"mappings":";;;AAAA,mCAAgD;AAChD,wCAAwC;AAIxC,uCAAmD;AACnD,iCAAgC;AAEhC;;;GAGG;AACH;IAAoC,uCAA4B;IAAhE;;IAwIA,CAAC;IAvIW,8BAAa,GAAvB;QACE,OAAO,IAAA,cAAO,EAAC,EAAE,EAAE,iBAAM,aAAa,WAAE,EAAE;YACxC,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,KAAK;YAChB,WAAW,4BACN,iBAAM,kBAAkB,WAAE,CAC9B;YACD,QAAQ,4BACH,iBAAM,kBAAkB,WAAE,CAC9B;SACF,CAAC,CAAC;IACL,CAAC;IAEM,uBAAM,GAAb;QACE,iBAAM,MAAM,WAAE,CAAC;QAEf,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE;YACtB,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAES,8BAAa,GAAvB,UAAwB,IAAU,EAAE,KAAiB;QACnD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAES,+BAAc,GAAxB,UAAyB,IAAU,EAAE,KAAiB,IAAG,CAAC;IAEhD,+BAAc,GAAxB,UAAyB,IAAa;QAC9B,IAAA,KAAmB,IAAI,CAAC,GAAG,EAAzB,MAAM,YAAA,EAAE,IAAI,UAAa,CAAC;QAElC,oBAAoB;QACpB,IAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;QACtC,IAAM,kBAAkB,GAAG,eAAe,CAAC;QAE3C,IAAM,GAAG,GAAG,EAAE,CAAC;QACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,EAAE,CAAC,EAAE,EA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AAK,CAAC,EACnC,KAAI,CAAC,GAAG,CAAC,QAAQ,CAClB,CAAC;gBAEF,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAChC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACH,aAAC;AAAD,CAAC,AAxID,CAAoC,aAAK,GAwIxC","sourcesContent":["import { deepMix, each, get } from '@antv/util';\nimport { DIRECTION } from '../constant';\nimport { AxisCfg, Datum, MatrixCfg, MatrixData } from '../interface';\n\nimport View from '../chart/view';\nimport { getFactTitleConfig } from '../util/facet';\nimport { Facet } from './facet';\n\n/**\n * @ignore\n * 镜像分面\n */\nexport default class Matrix extends Facet<MatrixCfg, MatrixData> {\n protected getDefaultCfg() {\n return deepMix({}, super.getDefaultCfg(), {\n type: 'matrix',\n showTitle: false,\n columnTitle: {\n ...super.getDefaultTitleCfg(),\n },\n rowTitle: {\n ...super.getDefaultTitleCfg(),\n },\n });\n }\n\n public render() {\n super.render();\n\n if (this.cfg.showTitle) {\n this.renderTitle();\n }\n }\n\n protected afterEachView(view: View, facet: MatrixData) {\n this.processAxis(view, facet);\n }\n\n protected beforeEachView(view: View, facet: MatrixData) {}\n\n protected generateFacets(data: Datum[]): MatrixData[] {\n const { fields, type } = this.cfg;\n\n // 矩阵中行列相等,等于指定的字段个数\n const rowValuesLength = fields.length;\n const columnValuesLength = rowValuesLength;\n\n const rst = [];\n for (let i = 0; i < columnValuesLength; i++) {\n const columnField = fields[i];\n for (let j = 0; j < rowValuesLength; j++) {\n const rowField = fields[j];\n\n const facet: MatrixData = {\n type,\n data,\n region: this.getRegion(rowValuesLength, columnValuesLength, i, j),\n\n columnValue: columnField,\n rowValue: rowField,\n columnField,\n rowField,\n columnIndex: i,\n rowIndex: j,\n columnValuesLength,\n rowValuesLength,\n };\n rst.push(facet);\n }\n }\n return rst;\n }\n\n /**\n * 设置 x 坐标轴的文本、title 是否显示\n * @param x\n * @param axes\n * @param option\n * @param facet\n */\n protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: MatrixData): object {\n // 最后一行显示\n if (facet.rowIndex !== facet.rowValuesLength - 1) {\n return {\n ...option,\n label: null,\n title: null,\n };\n }\n return option;\n }\n\n /**\n * 设置 y 坐标轴的文本、title 是否显示\n * @param y\n * @param axes\n * @param option\n * @param facet\n */\n protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: MatrixData): object {\n // 第一列显示\n if (facet.columnIndex !== 0) {\n return {\n ...option,\n title: null,\n label: null,\n };\n }\n return option;\n }\n\n /**\n * facet title\n */\n private renderTitle() {\n each(this.facets, (facet: MatrixData, facetIndex: number) => {\n const { columnIndex, rowIndex, columnValuesLength, rowValuesLength, columnValue, rowValue, view } = facet;\n\n // top\n if (rowIndex === 0) {\n const formatter = get(this.cfg.columnTitle, 'formatter');\n const config = deepMix(\n {\n position: ['50%', '0%'] as [string, string],\n content: formatter ? formatter(columnValue) : columnValue,\n },\n getFactTitleConfig(DIRECTION.TOP),\n this.cfg.columnTitle\n );\n\n view.annotation().text(config);\n }\n // right\n if (columnIndex === columnValuesLength - 1) {\n const formatter = get(this.cfg.rowTitle, 'formatter');\n const config = deepMix(\n {\n position: ['100%', '50%'] as [string, string],\n content: formatter ? formatter(rowValue) : rowValue,\n },\n getFactTitleConfig(DIRECTION.RIGHT),\n this.cfg.rowTitle\n );\n\n view.annotation().text(config);\n }\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AxisCfg, Datum, MirrorCfg, MirrorData } from '../interface';
|
|
2
|
+
import View from '../chart/view';
|
|
3
|
+
import { Facet } from './facet';
|
|
4
|
+
/**
|
|
5
|
+
* @ignore
|
|
6
|
+
* 镜像分面
|
|
7
|
+
*/
|
|
8
|
+
export default class Mirror extends Facet<MirrorCfg, MirrorData> {
|
|
9
|
+
protected getDefaultCfg(): any;
|
|
10
|
+
render(): void;
|
|
11
|
+
protected beforeEachView(view: View, facet: MirrorData): void;
|
|
12
|
+
protected afterEachView(view: View, facet: MirrorData): void;
|
|
13
|
+
protected generateFacets(data: Datum[]): MirrorData[];
|
|
14
|
+
/**
|
|
15
|
+
* 设置 x 坐标轴的文本、title 是否显示
|
|
16
|
+
* @param x
|
|
17
|
+
* @param axes
|
|
18
|
+
* @param option
|
|
19
|
+
* @param facet
|
|
20
|
+
*/
|
|
21
|
+
protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: MirrorData): object;
|
|
22
|
+
/**
|
|
23
|
+
* 设置 y 坐标轴的文本、title 是否显示
|
|
24
|
+
* @param y
|
|
25
|
+
* @param axes
|
|
26
|
+
* @param option
|
|
27
|
+
* @param facet
|
|
28
|
+
*/
|
|
29
|
+
protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: MirrorData): object;
|
|
30
|
+
private renderTitle;
|
|
31
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var util_1 = require("@antv/util");
|
|
5
|
+
var constant_1 = require("../constant");
|
|
6
|
+
var facet_1 = require("../util/facet");
|
|
7
|
+
var facet_2 = require("./facet");
|
|
8
|
+
/**
|
|
9
|
+
* @ignore
|
|
10
|
+
* 镜像分面
|
|
11
|
+
*/
|
|
12
|
+
var Mirror = /** @class */ (function (_super) {
|
|
13
|
+
(0, tslib_1.__extends)(Mirror, _super);
|
|
14
|
+
function Mirror() {
|
|
15
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
+
}
|
|
17
|
+
Mirror.prototype.getDefaultCfg = function () {
|
|
18
|
+
return (0, util_1.deepMix)({}, _super.prototype.getDefaultCfg.call(this), {
|
|
19
|
+
type: 'mirror',
|
|
20
|
+
showTitle: true,
|
|
21
|
+
title: _super.prototype.getDefaultTitleCfg.call(this),
|
|
22
|
+
transpose: false,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Mirror.prototype.render = function () {
|
|
26
|
+
_super.prototype.render.call(this);
|
|
27
|
+
if (this.cfg.showTitle) {
|
|
28
|
+
this.renderTitle();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
Mirror.prototype.beforeEachView = function (view, facet) {
|
|
32
|
+
// 做一下坐标系转化
|
|
33
|
+
if (this.cfg.transpose) {
|
|
34
|
+
if (facet.columnIndex % 2 === 0) {
|
|
35
|
+
view.coordinate().transpose().reflect('x');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
view.coordinate().transpose();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
if (facet.rowIndex % 2 !== 0) {
|
|
43
|
+
view.coordinate().reflect('y');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
Mirror.prototype.afterEachView = function (view, facet) {
|
|
48
|
+
this.processAxis(view, facet);
|
|
49
|
+
};
|
|
50
|
+
Mirror.prototype.generateFacets = function (data) {
|
|
51
|
+
var _this = this;
|
|
52
|
+
var f = this.cfg.fields[0];
|
|
53
|
+
var rst = [];
|
|
54
|
+
var columnValuesLength = 1;
|
|
55
|
+
var rowValuesLength = 1;
|
|
56
|
+
var columnValues = [''];
|
|
57
|
+
var rowValues = [''];
|
|
58
|
+
var columnField;
|
|
59
|
+
var rowField;
|
|
60
|
+
if (this.cfg.transpose) {
|
|
61
|
+
columnField = f;
|
|
62
|
+
columnValues = this.getFieldValues(data, columnField).slice(0, 2); // 镜像最多两个
|
|
63
|
+
columnValuesLength = columnValues.length;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
rowField = f;
|
|
67
|
+
rowValues = this.getFieldValues(data, rowField).slice(0, 2); // 镜像最多两个
|
|
68
|
+
rowValuesLength = rowValues.length;
|
|
69
|
+
}
|
|
70
|
+
// 获取每个维度对应的数据配置片段
|
|
71
|
+
columnValues.forEach(function (xVal, xIndex) {
|
|
72
|
+
rowValues.forEach(function (yVal, yIndex) {
|
|
73
|
+
var conditions = [
|
|
74
|
+
{ field: columnField, value: xVal, values: columnValues },
|
|
75
|
+
{ field: rowField, value: yVal, values: rowValues },
|
|
76
|
+
];
|
|
77
|
+
var facetData = (0, util_1.filter)(data, _this.getFacetDataFilter(conditions));
|
|
78
|
+
var facet = {
|
|
79
|
+
type: _this.cfg.type,
|
|
80
|
+
data: facetData,
|
|
81
|
+
region: _this.getRegion(rowValuesLength, columnValuesLength, xIndex, yIndex),
|
|
82
|
+
columnValue: xVal,
|
|
83
|
+
rowValue: yVal,
|
|
84
|
+
columnField: columnField,
|
|
85
|
+
rowField: rowField,
|
|
86
|
+
columnIndex: xIndex,
|
|
87
|
+
rowIndex: yIndex,
|
|
88
|
+
columnValuesLength: columnValuesLength,
|
|
89
|
+
rowValuesLength: rowValuesLength,
|
|
90
|
+
};
|
|
91
|
+
rst.push(facet);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
return rst;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 设置 x 坐标轴的文本、title 是否显示
|
|
98
|
+
* @param x
|
|
99
|
+
* @param axes
|
|
100
|
+
* @param option
|
|
101
|
+
* @param facet
|
|
102
|
+
*/
|
|
103
|
+
Mirror.prototype.getXAxisOption = function (x, axes, option, facet) {
|
|
104
|
+
// 非最后一行
|
|
105
|
+
// 当是最后一行或者下面没有 view 时文本不显示
|
|
106
|
+
if (facet.columnIndex === 1 || facet.rowIndex === 1) {
|
|
107
|
+
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, option), { label: null, title: null });
|
|
108
|
+
}
|
|
109
|
+
return option;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* 设置 y 坐标轴的文本、title 是否显示
|
|
113
|
+
* @param y
|
|
114
|
+
* @param axes
|
|
115
|
+
* @param option
|
|
116
|
+
* @param facet
|
|
117
|
+
*/
|
|
118
|
+
Mirror.prototype.getYAxisOption = function (y, axes, option, facet) {
|
|
119
|
+
// do nothing
|
|
120
|
+
return option;
|
|
121
|
+
};
|
|
122
|
+
Mirror.prototype.renderTitle = function () {
|
|
123
|
+
var _this = this;
|
|
124
|
+
(0, util_1.each)(this.facets, function (facet, facetIndex) {
|
|
125
|
+
var columnValue = facet.columnValue, rowValue = facet.rowValue, view = facet.view;
|
|
126
|
+
var formatter = (0, util_1.get)(_this.cfg.title, 'formatter');
|
|
127
|
+
if (_this.cfg.transpose) {
|
|
128
|
+
var config = (0, util_1.deepMix)({
|
|
129
|
+
position: ['50%', '0%'],
|
|
130
|
+
content: formatter ? formatter(columnValue) : columnValue,
|
|
131
|
+
}, (0, facet_1.getFactTitleConfig)(constant_1.DIRECTION.TOP), _this.cfg.title);
|
|
132
|
+
view.annotation().text(config);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
var config = (0, util_1.deepMix)({
|
|
136
|
+
position: ['100%', '50%'],
|
|
137
|
+
content: formatter ? formatter(rowValue) : rowValue,
|
|
138
|
+
}, (0, facet_1.getFactTitleConfig)(constant_1.DIRECTION.RIGHT), _this.cfg.title);
|
|
139
|
+
view.annotation().text(config);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
return Mirror;
|
|
144
|
+
}(facet_2.Facet));
|
|
145
|
+
exports.default = Mirror;
|
|
146
|
+
//# sourceMappingURL=mirror.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mirror.js","sourceRoot":"","sources":["../../src/facet/mirror.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AACxD,wCAAwC;AAIxC,uCAAmD;AACnD,iCAAgC;AAEhC;;;GAGG;AACH;IAAoC,uCAA4B;IAAhE;;IA0JA,CAAC;IAzJW,8BAAa,GAAvB;QACE,OAAO,IAAA,cAAO,EAAC,EAAE,EAAE,iBAAM,aAAa,WAAE,EAAE;YACxC,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,iBAAM,kBAAkB,WAAE;YACjC,SAAS,E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f,CAAC;gBAEF,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAChC;iBAAM;gBACL,IAAM,MAAM,GAAG,IAAA,cAAO,EACpB;oBACE,QAAQ,EAAE,CAAC,MAAM,EAAE,KAAK,CAAqB;oBAC7C,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;iBACpD,EACD,IAAA,0BAAkB,EAAC,oBAAS,CAAC,KAAK,CAAC,EACnC,KAAI,CAAC,GAAG,CAAC,KAAK,CACf,CAAC;gBAEF,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAChC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IACH,aAAC;AAAD,CAAC,AA1JD,CAAoC,aAAK,GA0JxC","sourcesContent":["import { deepMix, each, filter, get } from '@antv/util';\nimport { DIRECTION } from '../constant';\nimport { AxisCfg, Datum, MirrorCfg, MirrorData } from '../interface';\n\nimport View from '../chart/view';\nimport { getFactTitleConfig } from '../util/facet';\nimport { Facet } from './facet';\n\n/**\n * @ignore\n * 镜像分面\n */\nexport default class Mirror extends Facet<MirrorCfg, MirrorData> {\n protected getDefaultCfg() {\n return deepMix({}, super.getDefaultCfg(), {\n type: 'mirror',\n showTitle: true,\n title: super.getDefaultTitleCfg(),\n transpose: false,\n });\n }\n\n public render() {\n super.render();\n\n if (this.cfg.showTitle) {\n this.renderTitle();\n }\n }\n\n protected beforeEachView(view: View, facet: MirrorData) {\n // 做一下坐标系转化\n if (this.cfg.transpose) {\n if (facet.columnIndex % 2 === 0) {\n view.coordinate().transpose().reflect('x');\n } else {\n view.coordinate().transpose();\n }\n } else {\n if (facet.rowIndex % 2 !== 0) {\n view.coordinate().reflect('y');\n }\n }\n }\n\n protected afterEachView(view: View, facet: MirrorData) {\n this.processAxis(view, facet);\n }\n\n protected generateFacets(data: Datum[]): MirrorData[] {\n const [f] = this.cfg.fields;\n\n const rst = [];\n let columnValuesLength = 1;\n let rowValuesLength = 1;\n\n let columnValues: string[] = [''];\n let rowValues: string[] = [''];\n\n let columnField;\n let rowField;\n\n if (this.cfg.transpose) {\n columnField = f;\n columnValues = this.getFieldValues(data, columnField).slice(0, 2); // 镜像最多两个\n columnValuesLength = columnValues.length;\n } else {\n rowField = f;\n rowValues = this.getFieldValues(data, rowField).slice(0, 2); // 镜像最多两个\n rowValuesLength = rowValues.length;\n }\n\n // 获取每个维度对应的数据配置片段\n columnValues.forEach((xVal, xIndex) => {\n rowValues.forEach((yVal, yIndex) => {\n const conditions = [\n { field: columnField, value: xVal, values: columnValues },\n { field: rowField, value: yVal, values: rowValues },\n ];\n\n const facetData = filter(data, this.getFacetDataFilter(conditions));\n\n const facet: MirrorData = {\n type: this.cfg.type,\n data: facetData,\n region: this.getRegion(rowValuesLength, columnValuesLength, xIndex, yIndex),\n\n columnValue: xVal,\n rowValue: yVal,\n columnField,\n rowField,\n columnIndex: xIndex,\n rowIndex: yIndex,\n columnValuesLength,\n rowValuesLength,\n };\n rst.push(facet);\n });\n });\n\n return rst;\n }\n\n /**\n * 设置 x 坐标轴的文本、title 是否显示\n * @param x\n * @param axes\n * @param option\n * @param facet\n */\n protected getXAxisOption(x: string, axes: any, option: AxisCfg, facet: MirrorData): object {\n // 非最后一行\n // 当是最后一行或者下面没有 view 时文本不显示\n if (facet.columnIndex === 1 || facet.rowIndex === 1) {\n return {\n ...option,\n label: null,\n title: null,\n };\n }\n\n return option;\n }\n\n /**\n * 设置 y 坐标轴的文本、title 是否显示\n * @param y\n * @param axes\n * @param option\n * @param facet\n */\n protected getYAxisOption(y: string, axes: any, option: AxisCfg, facet: MirrorData): object {\n // do nothing\n return option;\n }\n\n private renderTitle() {\n each(this.facets, (facet: MirrorData, facetIndex: number) => {\n const { columnValue, rowValue, view } = facet;\n const formatter = get(this.cfg.title, 'formatter');\n\n if (this.cfg.transpose) {\n const config = deepMix(\n {\n position: ['50%', '0%'] as [string, string],\n content: formatter ? formatter(columnValue) : columnValue,\n },\n getFactTitleConfig(DIRECTION.TOP),\n this.cfg.title\n );\n\n view.annotation().text(config);\n } else {\n const config = deepMix(\n {\n position: ['100%', '50%'] as [string, string],\n content: formatter ? formatter(rowValue) : rowValue,\n },\n getFactTitleConfig(DIRECTION.RIGHT),\n this.cfg.title\n );\n\n view.annotation().text(config);\n }\n });\n }\n}\n"]}
|