@antv/g2 4.1.42 → 4.1.43
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/CHANGELOG.md +10 -0
- package/package.json +3 -4
- package/src/chart/controller/annotation.ts +4 -0
- package/src/core.ts +1 -1
- package/dist/g2.min.js +0 -44
- package/dist/g2.min.js.map +0 -1
- package/esm/animate/animation/fade.d.ts +0 -21
- package/esm/animate/animation/fade.js +0 -42
- package/esm/animate/animation/fade.js.map +0 -1
- package/esm/animate/animation/grow-in.d.ts +0 -30
- package/esm/animate/animation/grow-in.js +0 -38
- package/esm/animate/animation/grow-in.js.map +0 -1
- package/esm/animate/animation/index.d.ts +0 -16
- package/esm/animate/animation/index.js +0 -17
- package/esm/animate/animation/index.js.map +0 -1
- package/esm/animate/animation/path-in.d.ts +0 -12
- package/esm/animate/animation/path-in.js +0 -21
- package/esm/animate/animation/path-in.js.map +0 -1
- package/esm/animate/animation/position-update.d.ts +0 -11
- package/esm/animate/animation/position-update.js +0 -24
- package/esm/animate/animation/position-update.js.map +0 -1
- package/esm/animate/animation/scale-in.d.ts +0 -19
- package/esm/animate/animation/scale-in.js +0 -60
- package/esm/animate/animation/scale-in.js.map +0 -1
- package/esm/animate/animation/sector-path-update.d.ts +0 -11
- package/esm/animate/animation/sector-path-update.js +0 -131
- package/esm/animate/animation/sector-path-update.js.map +0 -1
- package/esm/animate/animation/util.d.ts +0 -19
- package/esm/animate/animation/util.js +0 -88
- package/esm/animate/animation/util.js.map +0 -1
- package/esm/animate/animation/wave-in.d.ts +0 -13
- package/esm/animate/animation/wave-in.js +0 -26
- package/esm/animate/animation/wave-in.js.map +0 -1
- package/esm/animate/animation/zoom.d.ts +0 -21
- package/esm/animate/animation/zoom.js +0 -66
- package/esm/animate/animation/zoom.js.map +0 -1
- package/esm/animate/index.d.ts +0 -48
- package/esm/animate/index.js +0 -249
- package/esm/animate/index.js.map +0 -1
- package/esm/animate/interface.d.ts +0 -12
- package/esm/animate/interface.js +0 -2
- package/esm/animate/interface.js.map +0 -1
- package/esm/api.d.ts +0 -2
- package/esm/api.js +0 -3
- package/esm/api.js.map +0 -1
- package/esm/base.d.ts +0 -33
- package/esm/base.js +0 -55
- package/esm/base.js.map +0 -1
- package/esm/chart/chart.d.ts +0 -61
- package/esm/chart/chart.js +0 -157
- package/esm/chart/chart.js.map +0 -1
- package/esm/chart/controller/annotation.d.ts +0 -162
- package/esm/chart/controller/annotation.js +0 -577
- package/esm/chart/controller/annotation.js.map +0 -1
- package/esm/chart/controller/axis.d.ts +0 -93
- package/esm/chart/controller/axis.js +0 -578
- package/esm/chart/controller/axis.js.map +0 -1
- package/esm/chart/controller/base.d.ts +0 -64
- package/esm/chart/controller/base.js +0 -62
- package/esm/chart/controller/base.js.map +0 -1
- package/esm/chart/controller/coordinate.d.ts +0 -74
- package/esm/chart/controller/coordinate.js +0 -145
- package/esm/chart/controller/coordinate.js.map +0 -1
- package/esm/chart/controller/gesture.d.ts +0 -37
- package/esm/chart/controller/gesture.js +0 -258
- package/esm/chart/controller/gesture.js.map +0 -1
- package/esm/chart/controller/index.d.ts +0 -25
- package/esm/chart/controller/index.js +0 -34
- package/esm/chart/controller/index.js.map +0 -1
- package/esm/chart/controller/legend.d.ts +0 -106
- package/esm/chart/controller/legend.js +0 -484
- package/esm/chart/controller/legend.js.map +0 -1
- package/esm/chart/controller/scrollbar.d.ts +0 -64
- package/esm/chart/controller/scrollbar.js +0 -316
- package/esm/chart/controller/scrollbar.js.map +0 -1
- package/esm/chart/controller/slider.d.ts +0 -88
- package/esm/chart/controller/slider.js +0 -296
- package/esm/chart/controller/slider.js.map +0 -1
- package/esm/chart/controller/tooltip.d.ts +0 -68
- package/esm/chart/controller/tooltip.js +0 -644
- package/esm/chart/controller/tooltip.js.map +0 -1
- package/esm/chart/event.d.ts +0 -47
- package/esm/chart/event.js +0 -91
- package/esm/chart/event.js.map +0 -1
- package/esm/chart/index.d.ts +0 -4
- package/esm/chart/index.js +0 -5
- package/esm/chart/index.js.map +0 -1
- package/esm/chart/layout/auto.d.ts +0 -8
- package/esm/chart/layout/auto.js +0 -64
- package/esm/chart/layout/auto.js.map +0 -1
- package/esm/chart/layout/constraint/bounds.d.ts +0 -32
- package/esm/chart/layout/constraint/bounds.js +0 -30
- package/esm/chart/layout/constraint/bounds.js.map +0 -1
- package/esm/chart/layout/constraint/constraint.d.ts +0 -31
- package/esm/chart/layout/constraint/constraint.js +0 -81
- package/esm/chart/layout/constraint/constraint.js.map +0 -1
- package/esm/chart/layout/constraint/gauss.d.ts +0 -11
- package/esm/chart/layout/constraint/gauss.js +0 -63
- package/esm/chart/layout/constraint/gauss.js.map +0 -1
- package/esm/chart/layout/constraint/index.d.ts +0 -5
- package/esm/chart/layout/constraint/index.js +0 -30
- package/esm/chart/layout/constraint/index.js.map +0 -1
- package/esm/chart/layout/constraint/solver.d.ts +0 -40
- package/esm/chart/layout/constraint/solver.js +0 -77
- package/esm/chart/layout/constraint/solver.js.map +0 -1
- package/esm/chart/layout/constraint/types.d.ts +0 -21
- package/esm/chart/layout/constraint/types.js +0 -13
- package/esm/chart/layout/constraint/types.js.map +0 -1
- package/esm/chart/layout/constraint/variable.d.ts +0 -24
- package/esm/chart/layout/constraint/variable.js +0 -28
- package/esm/chart/layout/constraint/variable.js.map +0 -1
- package/esm/chart/layout/index.d.ts +0 -15
- package/esm/chart/layout/index.js +0 -26
- package/esm/chart/layout/index.js.map +0 -1
- package/esm/chart/layout/padding-cal.d.ts +0 -53
- package/esm/chart/layout/padding-cal.js +0 -108
- package/esm/chart/layout/padding-cal.js.map +0 -1
- package/esm/chart/util/scale-pool.d.ts +0 -57
- package/esm/chart/util/scale-pool.js +0 -212
- package/esm/chart/util/scale-pool.js.map +0 -1
- package/esm/chart/util/sync-view-padding.d.ts +0 -9
- package/esm/chart/util/sync-view-padding.js +0 -14
- package/esm/chart/util/sync-view-padding.js.map +0 -1
- package/esm/chart/view.d.ts +0 -747
- package/esm/chart/view.js +0 -1633
- package/esm/chart/view.js.map +0 -1
- package/esm/component/labels.d.ts +0 -47
- package/esm/component/labels.js +0 -274
- package/esm/component/labels.js.map +0 -1
- package/esm/component/update-label.d.ts +0 -21
- package/esm/component/update-label.js +0 -57
- package/esm/component/update-label.js.map +0 -1
- package/esm/constant.d.ts +0 -122
- package/esm/constant.js +0 -134
- package/esm/constant.js.map +0 -1
- package/esm/core.d.ts +0 -46
- package/esm/core.js +0 -60
- package/esm/core.js.map +0 -1
- package/esm/dependents.d.ts +0 -21
- package/esm/dependents.js +0 -33
- package/esm/dependents.js.map +0 -1
- package/esm/engine/index.d.ts +0 -13
- package/esm/engine/index.js +0 -22
- package/esm/engine/index.js.map +0 -1
- package/esm/facet/circle.d.ts +0 -36
- package/esm/facet/circle.js +0 -119
- package/esm/facet/circle.js.map +0 -1
- package/esm/facet/facet.d.ts +0 -165
- package/esm/facet/facet.js +0 -291
- package/esm/facet/facet.js.map +0 -1
- package/esm/facet/index.d.ts +0 -13
- package/esm/facet/index.js +0 -22
- package/esm/facet/index.js.map +0 -1
- package/esm/facet/list.d.ts +0 -46
- package/esm/facet/list.js +0 -134
- package/esm/facet/list.js.map +0 -1
- package/esm/facet/matrix.d.ts +0 -34
- package/esm/facet/matrix.js +0 -119
- package/esm/facet/matrix.js.map +0 -1
- package/esm/facet/mirror.d.ts +0 -31
- package/esm/facet/mirror.js +0 -144
- package/esm/facet/mirror.js.map +0 -1
- package/esm/facet/rect.d.ts +0 -35
- package/esm/facet/rect.js +0 -141
- package/esm/facet/rect.js.map +0 -1
- package/esm/facet/tree.d.ts +0 -40
- package/esm/facet/tree.js +0 -288
- package/esm/facet/tree.js.map +0 -1
- package/esm/geometry/area.d.ts +0 -46
- package/esm/geometry/area.js +0 -62
- package/esm/geometry/area.js.map +0 -1
- package/esm/geometry/base.d.ts +0 -793
- package/esm/geometry/base.js +0 -1487
- package/esm/geometry/base.js.map +0 -1
- package/esm/geometry/edge.d.ts +0 -15
- package/esm/geometry/edge.js +0 -24
- package/esm/geometry/edge.js.map +0 -1
- package/esm/geometry/element/index.d.ts +0 -127
- package/esm/geometry/element/index.js +0 -436
- package/esm/geometry/element/index.js.map +0 -1
- package/esm/geometry/heatmap.d.ts +0 -31
- package/esm/geometry/heatmap.js +0 -190
- package/esm/geometry/heatmap.js.map +0 -1
- package/esm/geometry/interval.d.ts +0 -41
- package/esm/geometry/interval.js +0 -98
- package/esm/geometry/interval.js.map +0 -1
- package/esm/geometry/label/base.d.ts +0 -76
- package/esm/geometry/label/base.js +0 -404
- package/esm/geometry/label/base.js.map +0 -1
- package/esm/geometry/label/index.d.ts +0 -38
- package/esm/geometry/label/index.js +0 -35
- package/esm/geometry/label/index.js.map +0 -1
- package/esm/geometry/label/interface.d.ts +0 -50
- package/esm/geometry/label/interface.js +0 -2
- package/esm/geometry/label/interface.js.map +0 -1
- package/esm/geometry/label/interval.d.ts +0 -27
- package/esm/geometry/label/interval.js +0 -146
- package/esm/geometry/label/interval.js.map +0 -1
- package/esm/geometry/label/layout/adjust-color.d.ts +0 -3
- package/esm/geometry/label/layout/adjust-color.js +0 -36
- package/esm/geometry/label/layout/adjust-color.js.map +0 -1
- package/esm/geometry/label/layout/hide-overlap.d.ts +0 -8
- package/esm/geometry/label/layout/hide-overlap.js +0 -29
- package/esm/geometry/label/layout/hide-overlap.js.map +0 -1
- package/esm/geometry/label/layout/interval/adjust-position.d.ts +0 -9
- package/esm/geometry/label/layout/interval/adjust-position.js +0 -61
- package/esm/geometry/label/layout/interval/adjust-position.js.map +0 -1
- package/esm/geometry/label/layout/interval/hide-overlap.d.ts +0 -9
- package/esm/geometry/label/layout/interval/hide-overlap.js +0 -78
- package/esm/geometry/label/layout/interval/hide-overlap.js.map +0 -1
- package/esm/geometry/label/layout/limit-in-canvas.d.ts +0 -9
- package/esm/geometry/label/layout/limit-in-canvas.js +0 -44
- package/esm/geometry/label/layout/limit-in-canvas.js.map +0 -1
- package/esm/geometry/label/layout/limit-in-plot.d.ts +0 -18
- package/esm/geometry/label/layout/limit-in-plot.js +0 -75
- package/esm/geometry/label/layout/limit-in-plot.js.map +0 -1
- package/esm/geometry/label/layout/limit-in-shape.d.ts +0 -7
- package/esm/geometry/label/layout/limit-in-shape.js +0 -18
- package/esm/geometry/label/layout/limit-in-shape.js.map +0 -1
- package/esm/geometry/label/layout/overlap.d.ts +0 -15
- package/esm/geometry/label/layout/overlap.js +0 -223
- package/esm/geometry/label/layout/overlap.js.map +0 -1
- package/esm/geometry/label/layout/path/adjust-position.d.ts +0 -17
- package/esm/geometry/label/layout/path/adjust-position.js +0 -94
- package/esm/geometry/label/layout/path/adjust-position.js.map +0 -1
- package/esm/geometry/label/layout/pie/distribute.d.ts +0 -3
- package/esm/geometry/label/layout/pie/distribute.js +0 -185
- package/esm/geometry/label/layout/pie/distribute.js.map +0 -1
- package/esm/geometry/label/layout/pie/outer.d.ts +0 -6
- package/esm/geometry/label/layout/pie/outer.js +0 -207
- package/esm/geometry/label/layout/pie/outer.js.map +0 -1
- package/esm/geometry/label/layout/pie/spider.d.ts +0 -7
- package/esm/geometry/label/layout/pie/spider.js +0 -181
- package/esm/geometry/label/layout/pie/spider.js.map +0 -1
- package/esm/geometry/label/layout/pie/util.d.ts +0 -10
- package/esm/geometry/label/layout/pie/util.js +0 -73
- package/esm/geometry/label/layout/pie/util.js.map +0 -1
- package/esm/geometry/label/layout/point/adjust-position.d.ts +0 -17
- package/esm/geometry/label/layout/point/adjust-position.js +0 -94
- package/esm/geometry/label/layout/point/adjust-position.js.map +0 -1
- package/esm/geometry/label/pie.d.ts +0 -22
- package/esm/geometry/label/pie.js +0 -95
- package/esm/geometry/label/pie.js.map +0 -1
- package/esm/geometry/label/polar.d.ts +0 -64
- package/esm/geometry/label/polar.js +0 -221
- package/esm/geometry/label/polar.js.map +0 -1
- package/esm/geometry/label/util/index.d.ts +0 -26
- package/esm/geometry/label/util/index.js +0 -61
- package/esm/geometry/label/util/index.js.map +0 -1
- package/esm/geometry/line.d.ts +0 -11
- package/esm/geometry/line.js +0 -21
- package/esm/geometry/line.js.map +0 -1
- package/esm/geometry/path.d.ts +0 -40
- package/esm/geometry/path.js +0 -122
- package/esm/geometry/path.js.map +0 -1
- package/esm/geometry/point.d.ts +0 -19
- package/esm/geometry/point.js +0 -30
- package/esm/geometry/point.js.map +0 -1
- package/esm/geometry/polygon.d.ts +0 -19
- package/esm/geometry/polygon.js +0 -62
- package/esm/geometry/polygon.js.map +0 -1
- package/esm/geometry/schema.d.ts +0 -18
- package/esm/geometry/schema.js +0 -48
- package/esm/geometry/schema.js.map +0 -1
- package/esm/geometry/shape/area/index.d.ts +0 -2
- package/esm/geometry/shape/area/index.js +0 -44
- package/esm/geometry/shape/area/index.js.map +0 -1
- package/esm/geometry/shape/area/line.d.ts +0 -1
- package/esm/geometry/shape/area/line.js +0 -31
- package/esm/geometry/shape/area/line.js.map +0 -1
- package/esm/geometry/shape/area/smooth-line.d.ts +0 -1
- package/esm/geometry/shape/area/smooth-line.js +0 -30
- package/esm/geometry/shape/area/smooth-line.js.map +0 -1
- package/esm/geometry/shape/area/smooth.d.ts +0 -1
- package/esm/geometry/shape/area/smooth.js +0 -31
- package/esm/geometry/shape/area/smooth.js.map +0 -1
- package/esm/geometry/shape/area/util.d.ts +0 -22
- package/esm/geometry/shape/area/util.js +0 -88
- package/esm/geometry/shape/area/util.js.map +0 -1
- package/esm/geometry/shape/base.d.ts +0 -22
- package/esm/geometry/shape/base.js +0 -162
- package/esm/geometry/shape/base.js.map +0 -1
- package/esm/geometry/shape/constant.d.ts +0 -4
- package/esm/geometry/shape/constant.js +0 -5
- package/esm/geometry/shape/constant.js.map +0 -1
- package/esm/geometry/shape/edge/arc.d.ts +0 -1
- package/esm/geometry/shape/edge/arc.js +0 -84
- package/esm/geometry/shape/edge/arc.js.map +0 -1
- package/esm/geometry/shape/edge/index.d.ts +0 -2
- package/esm/geometry/shape/edge/index.js +0 -31
- package/esm/geometry/shape/edge/index.js.map +0 -1
- package/esm/geometry/shape/edge/smooth.d.ts +0 -1
- package/esm/geometry/shape/edge/smooth.js +0 -30
- package/esm/geometry/shape/edge/smooth.js.map +0 -1
- package/esm/geometry/shape/edge/util.d.ts +0 -17
- package/esm/geometry/shape/edge/util.js +0 -32
- package/esm/geometry/shape/edge/util.js.map +0 -1
- package/esm/geometry/shape/edge/vhv.d.ts +0 -1
- package/esm/geometry/shape/edge/vhv.js +0 -42
- package/esm/geometry/shape/edge/vhv.js.map +0 -1
- package/esm/geometry/shape/interval/funnel.d.ts +0 -1
- package/esm/geometry/shape/interval/funnel.js +0 -31
- package/esm/geometry/shape/interval/funnel.js.map +0 -1
- package/esm/geometry/shape/interval/hollow-rect.d.ts +0 -1
- package/esm/geometry/shape/interval/hollow-rect.js +0 -51
- package/esm/geometry/shape/interval/hollow-rect.js.map +0 -1
- package/esm/geometry/shape/interval/index.d.ts +0 -3
- package/esm/geometry/shape/interval/index.js +0 -63
- package/esm/geometry/shape/interval/index.js.map +0 -1
- package/esm/geometry/shape/interval/line.d.ts +0 -1
- package/esm/geometry/shape/interval/line.js +0 -54
- package/esm/geometry/shape/interval/line.js.map +0 -1
- package/esm/geometry/shape/interval/pyramid.d.ts +0 -1
- package/esm/geometry/shape/interval/pyramid.js +0 -31
- package/esm/geometry/shape/interval/pyramid.js.map +0 -1
- package/esm/geometry/shape/interval/tick.d.ts +0 -1
- package/esm/geometry/shape/interval/tick.js +0 -77
- package/esm/geometry/shape/interval/tick.js.map +0 -1
- package/esm/geometry/shape/interval/util.d.ts +0 -55
- package/esm/geometry/shape/interval/util.js +0 -311
- package/esm/geometry/shape/interval/util.js.map +0 -1
- package/esm/geometry/shape/line/index.d.ts +0 -8
- package/esm/geometry/shape/line/index.js +0 -105
- package/esm/geometry/shape/line/index.js.map +0 -1
- package/esm/geometry/shape/line/step.d.ts +0 -1
- package/esm/geometry/shape/line/step.js +0 -84
- package/esm/geometry/shape/line/step.js.map +0 -1
- package/esm/geometry/shape/line/util.d.ts +0 -16
- package/esm/geometry/shape/line/util.js +0 -83
- package/esm/geometry/shape/line/util.js.map +0 -1
- package/esm/geometry/shape/point/hollow.d.ts +0 -1
- package/esm/geometry/shape/point/hollow.js +0 -24
- package/esm/geometry/shape/point/hollow.js.map +0 -1
- package/esm/geometry/shape/point/image.d.ts +0 -1
- package/esm/geometry/shape/point/image.js +0 -48
- package/esm/geometry/shape/point/image.js.map +0 -1
- package/esm/geometry/shape/point/index.d.ts +0 -2
- package/esm/geometry/shape/point/index.js +0 -32
- package/esm/geometry/shape/point/index.js.map +0 -1
- package/esm/geometry/shape/point/solid.d.ts +0 -1
- package/esm/geometry/shape/point/solid.js +0 -23
- package/esm/geometry/shape/point/solid.js.map +0 -1
- package/esm/geometry/shape/point/util.d.ts +0 -15
- package/esm/geometry/shape/point/util.js +0 -39
- package/esm/geometry/shape/point/util.js.map +0 -1
- package/esm/geometry/shape/polygon/index.d.ts +0 -2
- package/esm/geometry/shape/polygon/index.js +0 -65
- package/esm/geometry/shape/polygon/index.js.map +0 -1
- package/esm/geometry/shape/polygon/square.d.ts +0 -1
- package/esm/geometry/shape/polygon/square.js +0 -44
- package/esm/geometry/shape/polygon/square.js.map +0 -1
- package/esm/geometry/shape/schema/box.d.ts +0 -1
- package/esm/geometry/shape/schema/box.js +0 -142
- package/esm/geometry/shape/schema/box.js.map +0 -1
- package/esm/geometry/shape/schema/candle.d.ts +0 -1
- package/esm/geometry/shape/schema/candle.js +0 -80
- package/esm/geometry/shape/schema/candle.js.map +0 -1
- package/esm/geometry/shape/schema/index.d.ts +0 -2
- package/esm/geometry/shape/schema/index.js +0 -6
- package/esm/geometry/shape/schema/index.js.map +0 -1
- package/esm/geometry/shape/util/get-path-points.d.ts +0 -38
- package/esm/geometry/shape/util/get-path-points.js +0 -131
- package/esm/geometry/shape/util/get-path-points.js.map +0 -1
- package/esm/geometry/shape/util/get-style.d.ts +0 -18
- package/esm/geometry/shape/util/get-style.js +0 -47
- package/esm/geometry/shape/util/get-style.js.map +0 -1
- package/esm/geometry/shape/util/path.d.ts +0 -32
- package/esm/geometry/shape/util/path.js +0 -311
- package/esm/geometry/shape/util/path.js.map +0 -1
- package/esm/geometry/shape/util/split-points.d.ts +0 -13
- package/esm/geometry/shape/util/split-points.js +0 -24
- package/esm/geometry/shape/util/split-points.js.map +0 -1
- package/esm/geometry/shape/violin/hollow.d.ts +0 -1
- package/esm/geometry/shape/violin/hollow.js +0 -51
- package/esm/geometry/shape/violin/hollow.js.map +0 -1
- package/esm/geometry/shape/violin/index.d.ts +0 -2
- package/esm/geometry/shape/violin/index.js +0 -60
- package/esm/geometry/shape/violin/index.js.map +0 -1
- package/esm/geometry/shape/violin/smooth.d.ts +0 -1
- package/esm/geometry/shape/violin/smooth.js +0 -28
- package/esm/geometry/shape/violin/smooth.js.map +0 -1
- package/esm/geometry/util/diff.d.ts +0 -11
- package/esm/geometry/util/diff.js +0 -30
- package/esm/geometry/util/diff.js.map +0 -1
- package/esm/geometry/util/get-shape-type.d.ts +0 -8
- package/esm/geometry/util/get-shape-type.js +0 -16
- package/esm/geometry/util/get-shape-type.js.map +0 -1
- package/esm/geometry/util/group-data.d.ts +0 -3
- package/esm/geometry/util/group-data.js +0 -31
- package/esm/geometry/util/group-data.js.map +0 -1
- package/esm/geometry/util/is-model-change.d.ts +0 -9
- package/esm/geometry/util/is-model-change.js +0 -14
- package/esm/geometry/util/is-model-change.js.map +0 -1
- package/esm/geometry/util/parse-fields.d.ts +0 -2
- package/esm/geometry/util/parse-fields.js +0 -9
- package/esm/geometry/util/parse-fields.js.map +0 -1
- package/esm/geometry/util/shape-size.d.ts +0 -2
- package/esm/geometry/util/shape-size.js +0 -124
- package/esm/geometry/util/shape-size.js.map +0 -1
- package/esm/geometry/violin.d.ts +0 -25
- package/esm/geometry/violin.js +0 -67
- package/esm/geometry/violin.js.map +0 -1
- package/esm/index.d.ts +0 -107
- package/esm/index.js +0 -581
- package/esm/index.js.map +0 -1
- package/esm/interaction/action/active-region.d.ts +0 -33
- package/esm/interaction/action/active-region.js +0 -198
- package/esm/interaction/action/active-region.js.map +0 -1
- package/esm/interaction/action/base.d.ts +0 -29
- package/esm/interaction/action/base.js +0 -36
- package/esm/interaction/action/base.js.map +0 -1
- package/esm/interaction/action/callback.d.ts +0 -17
- package/esm/interaction/action/callback.js +0 -27
- package/esm/interaction/action/callback.js.map +0 -1
- package/esm/interaction/action/component/list-active.d.ts +0 -14
- package/esm/interaction/action/component/list-active.js +0 -24
- package/esm/interaction/action/component/list-active.js.map +0 -1
- package/esm/interaction/action/component/list-checked.d.ts +0 -30
- package/esm/interaction/action/component/list-checked.js +0 -82
- package/esm/interaction/action/component/list-checked.js.map +0 -1
- package/esm/interaction/action/component/list-focus.d.ts +0 -5
- package/esm/interaction/action/component/list-focus.js +0 -55
- package/esm/interaction/action/component/list-focus.js.map +0 -1
- package/esm/interaction/action/component/list-highlight-util.d.ts +0 -7
- package/esm/interaction/action/component/list-highlight-util.js +0 -20
- package/esm/interaction/action/component/list-highlight-util.js.map +0 -1
- package/esm/interaction/action/component/list-highlight.d.ts +0 -20
- package/esm/interaction/action/component/list-highlight.js +0 -97
- package/esm/interaction/action/component/list-highlight.js.map +0 -1
- package/esm/interaction/action/component/list-radio.d.ts +0 -24
- package/esm/interaction/action/component/list-radio.js +0 -116
- package/esm/interaction/action/component/list-radio.js.map +0 -1
- package/esm/interaction/action/component/list-selected.d.ts +0 -10
- package/esm/interaction/action/component/list-selected.js +0 -20
- package/esm/interaction/action/component/list-selected.js.map +0 -1
- package/esm/interaction/action/component/list-state.d.ts +0 -46
- package/esm/interaction/action/component/list-state.js +0 -167
- package/esm/interaction/action/component/list-state.js.map +0 -1
- package/esm/interaction/action/component/list-unchecked.d.ts +0 -13
- package/esm/interaction/action/component/list-unchecked.js +0 -23
- package/esm/interaction/action/component/list-unchecked.js.map +0 -1
- package/esm/interaction/action/component/tooltip/ellipsis-text.d.ts +0 -25
- package/esm/interaction/action/component/tooltip/ellipsis-text.js +0 -93
- package/esm/interaction/action/component/tooltip/ellipsis-text.js.map +0 -1
- package/esm/interaction/action/component/tooltip/geometry.d.ts +0 -24
- package/esm/interaction/action/component/tooltip/geometry.js +0 -71
- package/esm/interaction/action/component/tooltip/geometry.js.map +0 -1
- package/esm/interaction/action/component/tooltip/sibling.d.ts +0 -21
- package/esm/interaction/action/component/tooltip/sibling.js +0 -39
- package/esm/interaction/action/component/tooltip/sibling.js.map +0 -1
- package/esm/interaction/action/cursor.d.ts +0 -69
- package/esm/interaction/action/cursor.js +0 -113
- package/esm/interaction/action/cursor.js.map +0 -1
- package/esm/interaction/action/data/filter.d.ts +0 -13
- package/esm/interaction/action/data/filter.js +0 -66
- package/esm/interaction/action/data/filter.js.map +0 -1
- package/esm/interaction/action/data/range-filter.d.ts +0 -56
- package/esm/interaction/action/data/range-filter.js +0 -163
- package/esm/interaction/action/data/range-filter.js.map +0 -1
- package/esm/interaction/action/data/sibling-filter.d.ts +0 -22
- package/esm/interaction/action/data/sibling-filter.js +0 -39
- package/esm/interaction/action/data/sibling-filter.js.map +0 -1
- package/esm/interaction/action/element/active.d.ts +0 -14
- package/esm/interaction/action/element/active.js +0 -24
- package/esm/interaction/action/element/active.js.map +0 -1
- package/esm/interaction/action/element/filter.d.ts +0 -20
- package/esm/interaction/action/element/filter.js +0 -89
- package/esm/interaction/action/element/filter.js.map +0 -1
- package/esm/interaction/action/element/highlight-by-color.d.ts +0 -10
- package/esm/interaction/action/element/highlight-by-color.js +0 -30
- package/esm/interaction/action/element/highlight-by-color.js.map +0 -1
- package/esm/interaction/action/element/highlight-by-x.d.ts +0 -15
- package/esm/interaction/action/element/highlight-by-x.js +0 -51
- package/esm/interaction/action/element/highlight-by-x.js.map +0 -1
- package/esm/interaction/action/element/highlight-util.d.ts +0 -18
- package/esm/interaction/action/element/highlight-util.js +0 -45
- package/esm/interaction/action/element/highlight-util.js.map +0 -1
- package/esm/interaction/action/element/highlight.d.ts +0 -21
- package/esm/interaction/action/element/highlight.js +0 -93
- package/esm/interaction/action/element/highlight.js.map +0 -1
- package/esm/interaction/action/element/link-by-color.d.ts +0 -51
- package/esm/interaction/action/element/link-by-color.js +0 -156
- package/esm/interaction/action/element/link-by-color.js.map +0 -1
- package/esm/interaction/action/element/range-active.d.ts +0 -13
- package/esm/interaction/action/element/range-active.js +0 -23
- package/esm/interaction/action/element/range-active.js.map +0 -1
- package/esm/interaction/action/element/range-highlight.d.ts +0 -27
- package/esm/interaction/action/element/range-highlight.js +0 -54
- package/esm/interaction/action/element/range-highlight.js.map +0 -1
- package/esm/interaction/action/element/range-selected.d.ts +0 -13
- package/esm/interaction/action/element/range-selected.js +0 -23
- package/esm/interaction/action/element/range-selected.js.map +0 -1
- package/esm/interaction/action/element/range-state.d.ts +0 -38
- package/esm/interaction/action/element/range-state.js +0 -164
- package/esm/interaction/action/element/range-state.js.map +0 -1
- package/esm/interaction/action/element/selected.d.ts +0 -14
- package/esm/interaction/action/element/selected.js +0 -24
- package/esm/interaction/action/element/selected.js.map +0 -1
- package/esm/interaction/action/element/sibling-filter.d.ts +0 -19
- package/esm/interaction/action/element/sibling-filter.js +0 -93
- package/esm/interaction/action/element/sibling-filter.js.map +0 -1
- package/esm/interaction/action/element/single-active.d.ts +0 -13
- package/esm/interaction/action/element/single-active.js +0 -23
- package/esm/interaction/action/element/single-active.js.map +0 -1
- package/esm/interaction/action/element/single-highlight.d.ts +0 -16
- package/esm/interaction/action/element/single-highlight.js +0 -35
- package/esm/interaction/action/element/single-highlight.js.map +0 -1
- package/esm/interaction/action/element/single-selected.d.ts +0 -13
- package/esm/interaction/action/element/single-selected.js +0 -23
- package/esm/interaction/action/element/single-selected.js.map +0 -1
- package/esm/interaction/action/element/single-state.d.ts +0 -18
- package/esm/interaction/action/element/single-state.js +0 -53
- package/esm/interaction/action/element/single-state.js.map +0 -1
- package/esm/interaction/action/element/state-base.d.ts +0 -39
- package/esm/interaction/action/element/state-base.js +0 -59
- package/esm/interaction/action/element/state-base.js.map +0 -1
- package/esm/interaction/action/element/state.d.ts +0 -28
- package/esm/interaction/action/element/state.js +0 -99
- package/esm/interaction/action/element/state.js.map +0 -1
- package/esm/interaction/action/index.d.ts +0 -2
- package/esm/interaction/action/index.js +0 -3
- package/esm/interaction/action/index.js.map +0 -1
- package/esm/interaction/action/mask/base.d.ts +0 -62
- package/esm/interaction/action/mask/base.js +0 -169
- package/esm/interaction/action/mask/base.js.map +0 -1
- package/esm/interaction/action/mask/circle.d.ts +0 -14
- package/esm/interaction/action/mask/circle.js +0 -37
- package/esm/interaction/action/mask/circle.js.map +0 -1
- package/esm/interaction/action/mask/dim-rect.d.ts +0 -11
- package/esm/interaction/action/mask/dim-rect.js +0 -62
- package/esm/interaction/action/mask/dim-rect.js.map +0 -1
- package/esm/interaction/action/mask/path.d.ts +0 -16
- package/esm/interaction/action/mask/path.js +0 -44
- package/esm/interaction/action/mask/path.js.map +0 -1
- package/esm/interaction/action/mask/rect.d.ts +0 -17
- package/esm/interaction/action/mask/rect.js +0 -39
- package/esm/interaction/action/mask/rect.js.map +0 -1
- package/esm/interaction/action/mask/smooth-path.d.ts +0 -9
- package/esm/interaction/action/mask/smooth-path.js +0 -21
- package/esm/interaction/action/mask/smooth-path.js.map +0 -1
- package/esm/interaction/action/register.d.ts +0 -36
- package/esm/interaction/action/register.js +0 -60
- package/esm/interaction/action/register.js.map +0 -1
- package/esm/interaction/action/util.d.ts +0 -140
- package/esm/interaction/action/util.js +0 -361
- package/esm/interaction/action/util.js.map +0 -1
- package/esm/interaction/action/view/button.d.ts +0 -25
- package/esm/interaction/action/view/button.js +0 -116
- package/esm/interaction/action/view/button.js.map +0 -1
- package/esm/interaction/action/view/drag.d.ts +0 -24
- package/esm/interaction/action/view/drag.js +0 -73
- package/esm/interaction/action/view/drag.js.map +0 -1
- package/esm/interaction/action/view/mousewheel-scroll.d.ts +0 -5
- package/esm/interaction/action/view/mousewheel-scroll.js +0 -35
- package/esm/interaction/action/view/mousewheel-scroll.js.map +0 -1
- package/esm/interaction/action/view/move.d.ts +0 -28
- package/esm/interaction/action/view/move.js +0 -80
- package/esm/interaction/action/view/move.js.map +0 -1
- package/esm/interaction/action/view/scale-transform.d.ts +0 -18
- package/esm/interaction/action/view/scale-transform.js +0 -51
- package/esm/interaction/action/view/scale-transform.js.map +0 -1
- package/esm/interaction/action/view/scale-translate.d.ts +0 -30
- package/esm/interaction/action/view/scale-translate.js +0 -112
- package/esm/interaction/action/view/scale-translate.js.map +0 -1
- package/esm/interaction/action/view/scale-zoom.d.ts +0 -20
- package/esm/interaction/action/view/scale-zoom.js +0 -83
- package/esm/interaction/action/view/scale-zoom.js.map +0 -1
- package/esm/interaction/context.d.ts +0 -65
- package/esm/interaction/context.js +0 -142
- package/esm/interaction/context.js.map +0 -1
- package/esm/interaction/grammar-interaction.d.ts +0 -158
- package/esm/interaction/grammar-interaction.js +0 -285
- package/esm/interaction/grammar-interaction.js.map +0 -1
- package/esm/interaction/index.d.ts +0 -25
- package/esm/interaction/index.js +0 -43
- package/esm/interaction/index.js.map +0 -1
- package/esm/interaction/interaction.d.ts +0 -29
- package/esm/interaction/interaction.js +0 -32
- package/esm/interaction/interaction.js.map +0 -1
- package/esm/interface.d.ts +0 -2264
- package/esm/interface.js +0 -2
- package/esm/interface.js.map +0 -1
- package/esm/theme/index.d.ts +0 -12
- package/esm/theme/index.js +0 -23
- package/esm/theme/index.js.map +0 -1
- package/esm/theme/style-sheet/dark.d.ts +0 -825
- package/esm/theme/style-sheet/dark.js +0 -496
- package/esm/theme/style-sheet/dark.js.map +0 -1
- package/esm/theme/style-sheet/light.d.ts +0 -817
- package/esm/theme/style-sheet/light.js +0 -492
- package/esm/theme/style-sheet/light.js.map +0 -1
- package/esm/theme/util/create-by-style-sheet.d.ts +0 -6
- package/esm/theme/util/create-by-style-sheet.js +0 -1422
- package/esm/theme/util/create-by-style-sheet.js.map +0 -1
- package/esm/theme/util/create-theme.d.ts +0 -6
- package/esm/theme/util/create-theme.js +0 -12
- package/esm/theme/util/create-theme.js.map +0 -1
- package/esm/theme/util/index.d.ts +0 -1
- package/esm/theme/util/index.js +0 -2
- package/esm/theme/util/index.js.map +0 -1
- package/esm/util/annotation.d.ts +0 -7
- package/esm/util/annotation.js +0 -39
- package/esm/util/annotation.js.map +0 -1
- package/esm/util/attr.d.ts +0 -10
- package/esm/util/attr.js +0 -25
- package/esm/util/attr.js.map +0 -1
- package/esm/util/axis.d.ts +0 -100
- package/esm/util/axis.js +0 -236
- package/esm/util/axis.js.map +0 -1
- package/esm/util/bbox.d.ts +0 -105
- package/esm/util/bbox.js +0 -282
- package/esm/util/bbox.js.map +0 -1
- package/esm/util/collision-detect.d.ts +0 -16
- package/esm/util/collision-detect.js +0 -127
- package/esm/util/collision-detect.js.map +0 -1
- package/esm/util/color.d.ts +0 -1
- package/esm/util/color.js +0 -18
- package/esm/util/color.js.map +0 -1
- package/esm/util/context.d.ts +0 -4
- package/esm/util/context.js +0 -11
- package/esm/util/context.js.map +0 -1
- package/esm/util/coordinate.d.ts +0 -86
- package/esm/util/coordinate.js +0 -147
- package/esm/util/coordinate.js.map +0 -1
- package/esm/util/direction.d.ts +0 -19
- package/esm/util/direction.js +0 -120
- package/esm/util/direction.js.map +0 -1
- package/esm/util/dom.d.ts +0 -19
- package/esm/util/dom.js +0 -61
- package/esm/util/dom.js.map +0 -1
- package/esm/util/event.d.ts +0 -8
- package/esm/util/event.js +0 -14
- package/esm/util/event.js.map +0 -1
- package/esm/util/facet.d.ts +0 -16
- package/esm/util/facet.js +0 -43
- package/esm/util/facet.js.map +0 -1
- package/esm/util/graphics.d.ts +0 -58
- package/esm/util/graphics.js +0 -203
- package/esm/util/graphics.js.map +0 -1
- package/esm/util/grid.d.ts +0 -36
- package/esm/util/grid.js +0 -118
- package/esm/util/grid.js.map +0 -1
- package/esm/util/helper.d.ts +0 -34
- package/esm/util/helper.js +0 -72
- package/esm/util/helper.js.map +0 -1
- package/esm/util/legend.d.ts +0 -45
- package/esm/util/legend.js +0 -145
- package/esm/util/legend.js.map +0 -1
- package/esm/util/marker.d.ts +0 -10
- package/esm/util/marker.js +0 -58
- package/esm/util/marker.js.map +0 -1
- package/esm/util/padding.d.ts +0 -14
- package/esm/util/padding.js +0 -40
- package/esm/util/padding.js.map +0 -1
- package/esm/util/scale.d.ts +0 -42
- package/esm/util/scale.js +0 -128
- package/esm/util/scale.js.map +0 -1
- package/esm/util/stat.d.ts +0 -10
- package/esm/util/stat.js +0 -36
- package/esm/util/stat.js.map +0 -1
- package/esm/util/text.d.ts +0 -23
- package/esm/util/text.js +0 -84
- package/esm/util/text.js.map +0 -1
- package/esm/util/tooltip.d.ts +0 -26
- package/esm/util/tooltip.js +0 -419
- package/esm/util/tooltip.js.map +0 -1
- package/esm/util/transform.d.ts +0 -33
- package/esm/util/transform.js +0 -61
- package/esm/util/transform.js.map +0 -1
- package/esm/util/types.d.ts +0 -6
- package/esm/util/types.js +0 -2
- package/esm/util/types.js.map +0 -1
- package/lib/animate/animation/fade.d.ts +0 -21
- package/lib/animate/animation/fade.js +0 -47
- package/lib/animate/animation/fade.js.map +0 -1
- package/lib/animate/animation/grow-in.d.ts +0 -30
- package/lib/animate/animation/grow-in.js +0 -44
- package/lib/animate/animation/grow-in.js.map +0 -1
- package/lib/animate/animation/index.d.ts +0 -16
- package/lib/animate/animation/index.js +0 -22
- package/lib/animate/animation/index.js.map +0 -1
- package/lib/animate/animation/path-in.d.ts +0 -12
- package/lib/animate/animation/path-in.js +0 -25
- package/lib/animate/animation/path-in.js.map +0 -1
- package/lib/animate/animation/position-update.d.ts +0 -11
- package/lib/animate/animation/position-update.js +0 -28
- package/lib/animate/animation/position-update.js.map +0 -1
- package/lib/animate/animation/scale-in.d.ts +0 -19
- package/lib/animate/animation/scale-in.js +0 -65
- package/lib/animate/animation/scale-in.js.map +0 -1
- package/lib/animate/animation/sector-path-update.d.ts +0 -11
- package/lib/animate/animation/sector-path-update.js +0 -135
- package/lib/animate/animation/sector-path-update.js.map +0 -1
- package/lib/animate/animation/util.d.ts +0 -19
- package/lib/animate/animation/util.js +0 -93
- package/lib/animate/animation/util.js.map +0 -1
- package/lib/animate/animation/wave-in.d.ts +0 -13
- package/lib/animate/animation/wave-in.js +0 -30
- package/lib/animate/animation/wave-in.js.map +0 -1
- package/lib/animate/animation/zoom.d.ts +0 -21
- package/lib/animate/animation/zoom.js +0 -71
- package/lib/animate/animation/zoom.js.map +0 -1
- package/lib/animate/index.d.ts +0 -48
- package/lib/animate/index.js +0 -255
- package/lib/animate/index.js.map +0 -1
- package/lib/animate/interface.d.ts +0 -12
- package/lib/animate/interface.js +0 -3
- package/lib/animate/interface.js.map +0 -1
- package/lib/api.d.ts +0 -2
- package/lib/api.js +0 -7
- package/lib/api.js.map +0 -1
- package/lib/base.d.ts +0 -33
- package/lib/base.js +0 -57
- package/lib/base.js.map +0 -1
- package/lib/chart/chart.d.ts +0 -61
- package/lib/chart/chart.js +0 -159
- package/lib/chart/chart.js.map +0 -1
- package/lib/chart/controller/annotation.d.ts +0 -162
- package/lib/chart/controller/annotation.js +0 -579
- package/lib/chart/controller/annotation.js.map +0 -1
- package/lib/chart/controller/axis.d.ts +0 -93
- package/lib/chart/controller/axis.js +0 -580
- package/lib/chart/controller/axis.js.map +0 -1
- package/lib/chart/controller/base.d.ts +0 -64
- package/lib/chart/controller/base.js +0 -65
- package/lib/chart/controller/base.js.map +0 -1
- package/lib/chart/controller/coordinate.d.ts +0 -74
- package/lib/chart/controller/coordinate.js +0 -147
- package/lib/chart/controller/coordinate.js.map +0 -1
- package/lib/chart/controller/gesture.d.ts +0 -37
- package/lib/chart/controller/gesture.js +0 -260
- package/lib/chart/controller/gesture.js.map +0 -1
- package/lib/chart/controller/index.d.ts +0 -25
- package/lib/chart/controller/index.js +0 -41
- package/lib/chart/controller/index.js.map +0 -1
- package/lib/chart/controller/legend.d.ts +0 -106
- package/lib/chart/controller/legend.js +0 -486
- package/lib/chart/controller/legend.js.map +0 -1
- package/lib/chart/controller/scrollbar.d.ts +0 -64
- package/lib/chart/controller/scrollbar.js +0 -318
- package/lib/chart/controller/scrollbar.js.map +0 -1
- package/lib/chart/controller/slider.d.ts +0 -88
- package/lib/chart/controller/slider.js +0 -298
- package/lib/chart/controller/slider.js.map +0 -1
- package/lib/chart/controller/tooltip.d.ts +0 -68
- package/lib/chart/controller/tooltip.js +0 -646
- package/lib/chart/controller/tooltip.js.map +0 -1
- package/lib/chart/event.d.ts +0 -47
- package/lib/chart/event.js +0 -93
- package/lib/chart/event.js.map +0 -1
- package/lib/chart/index.d.ts +0 -4
- package/lib/chart/index.js +0 -16
- package/lib/chart/index.js.map +0 -1
- package/lib/chart/layout/auto.d.ts +0 -8
- package/lib/chart/layout/auto.js +0 -68
- package/lib/chart/layout/auto.js.map +0 -1
- package/lib/chart/layout/constraint/bounds.d.ts +0 -32
- package/lib/chart/layout/constraint/bounds.js +0 -33
- package/lib/chart/layout/constraint/bounds.js.map +0 -1
- package/lib/chart/layout/constraint/constraint.d.ts +0 -31
- package/lib/chart/layout/constraint/constraint.js +0 -84
- package/lib/chart/layout/constraint/constraint.js.map +0 -1
- package/lib/chart/layout/constraint/gauss.d.ts +0 -11
- package/lib/chart/layout/constraint/gauss.js +0 -68
- package/lib/chart/layout/constraint/gauss.js.map +0 -1
- package/lib/chart/layout/constraint/index.d.ts +0 -5
- package/lib/chart/layout/constraint/index.js +0 -38
- package/lib/chart/layout/constraint/index.js.map +0 -1
- package/lib/chart/layout/constraint/solver.d.ts +0 -40
- package/lib/chart/layout/constraint/solver.js +0 -80
- package/lib/chart/layout/constraint/solver.js.map +0 -1
- package/lib/chart/layout/constraint/types.d.ts +0 -21
- package/lib/chart/layout/constraint/types.js +0 -16
- package/lib/chart/layout/constraint/types.js.map +0 -1
- package/lib/chart/layout/constraint/variable.d.ts +0 -24
- package/lib/chart/layout/constraint/variable.js +0 -31
- package/lib/chart/layout/constraint/variable.js.map +0 -1
- package/lib/chart/layout/index.d.ts +0 -15
- package/lib/chart/layout/index.js +0 -29
- package/lib/chart/layout/index.js.map +0 -1
- package/lib/chart/layout/padding-cal.d.ts +0 -53
- package/lib/chart/layout/padding-cal.js +0 -111
- package/lib/chart/layout/padding-cal.js.map +0 -1
- package/lib/chart/util/scale-pool.d.ts +0 -57
- package/lib/chart/util/scale-pool.js +0 -215
- package/lib/chart/util/scale-pool.js.map +0 -1
- package/lib/chart/util/sync-view-padding.d.ts +0 -9
- package/lib/chart/util/sync-view-padding.js +0 -18
- package/lib/chart/util/sync-view-padding.js.map +0 -1
- package/lib/chart/view.d.ts +0 -747
- package/lib/chart/view.js +0 -1637
- package/lib/chart/view.js.map +0 -1
- package/lib/component/labels.d.ts +0 -47
- package/lib/component/labels.js +0 -276
- package/lib/component/labels.js.map +0 -1
- package/lib/component/update-label.d.ts +0 -21
- package/lib/component/update-label.js +0 -61
- package/lib/component/update-label.js.map +0 -1
- package/lib/constant.d.ts +0 -122
- package/lib/constant.js +0 -137
- package/lib/constant.js.map +0 -1
- package/lib/core.d.ts +0 -46
- package/lib/core.js +0 -101
- package/lib/core.js.map +0 -1
- package/lib/dependents.d.ts +0 -21
- package/lib/dependents.js +0 -55
- package/lib/dependents.js.map +0 -1
- package/lib/engine/index.d.ts +0 -13
- package/lib/engine/index.js +0 -27
- package/lib/engine/index.js.map +0 -1
- package/lib/facet/circle.d.ts +0 -36
- package/lib/facet/circle.js +0 -121
- package/lib/facet/circle.js.map +0 -1
- package/lib/facet/facet.d.ts +0 -165
- package/lib/facet/facet.js +0 -294
- package/lib/facet/facet.js.map +0 -1
- package/lib/facet/index.d.ts +0 -13
- package/lib/facet/index.js +0 -28
- package/lib/facet/index.js.map +0 -1
- package/lib/facet/list.d.ts +0 -46
- package/lib/facet/list.js +0 -136
- package/lib/facet/list.js.map +0 -1
- package/lib/facet/matrix.d.ts +0 -34
- package/lib/facet/matrix.js +0 -121
- package/lib/facet/matrix.js.map +0 -1
- package/lib/facet/mirror.d.ts +0 -31
- package/lib/facet/mirror.js +0 -146
- package/lib/facet/mirror.js.map +0 -1
- package/lib/facet/rect.d.ts +0 -35
- package/lib/facet/rect.js +0 -143
- package/lib/facet/rect.js.map +0 -1
- package/lib/facet/tree.d.ts +0 -40
- package/lib/facet/tree.js +0 -290
- package/lib/facet/tree.js.map +0 -1
- package/lib/geometry/area.d.ts +0 -46
- package/lib/geometry/area.js +0 -64
- package/lib/geometry/area.js.map +0 -1
- package/lib/geometry/base.d.ts +0 -793
- package/lib/geometry/base.js +0 -1489
- package/lib/geometry/base.js.map +0 -1
- package/lib/geometry/edge.d.ts +0 -15
- package/lib/geometry/edge.js +0 -26
- package/lib/geometry/edge.js.map +0 -1
- package/lib/geometry/element/index.d.ts +0 -127
- package/lib/geometry/element/index.js +0 -438
- package/lib/geometry/element/index.js.map +0 -1
- package/lib/geometry/heatmap.d.ts +0 -31
- package/lib/geometry/heatmap.js +0 -192
- package/lib/geometry/heatmap.js.map +0 -1
- package/lib/geometry/interval.d.ts +0 -41
- package/lib/geometry/interval.js +0 -100
- package/lib/geometry/interval.js.map +0 -1
- package/lib/geometry/label/base.d.ts +0 -76
- package/lib/geometry/label/base.js +0 -406
- package/lib/geometry/label/base.js.map +0 -1
- package/lib/geometry/label/index.d.ts +0 -38
- package/lib/geometry/label/index.js +0 -42
- package/lib/geometry/label/index.js.map +0 -1
- package/lib/geometry/label/interface.d.ts +0 -50
- package/lib/geometry/label/interface.js +0 -3
- package/lib/geometry/label/interface.js.map +0 -1
- package/lib/geometry/label/interval.d.ts +0 -27
- package/lib/geometry/label/interval.js +0 -148
- package/lib/geometry/label/interval.js.map +0 -1
- package/lib/geometry/label/layout/adjust-color.d.ts +0 -3
- package/lib/geometry/label/layout/adjust-color.js +0 -40
- package/lib/geometry/label/layout/adjust-color.js.map +0 -1
- package/lib/geometry/label/layout/hide-overlap.d.ts +0 -8
- package/lib/geometry/label/layout/hide-overlap.js +0 -33
- package/lib/geometry/label/layout/hide-overlap.js.map +0 -1
- package/lib/geometry/label/layout/interval/adjust-position.d.ts +0 -9
- package/lib/geometry/label/layout/interval/adjust-position.js +0 -65
- package/lib/geometry/label/layout/interval/adjust-position.js.map +0 -1
- package/lib/geometry/label/layout/interval/hide-overlap.d.ts +0 -9
- package/lib/geometry/label/layout/interval/hide-overlap.js +0 -82
- package/lib/geometry/label/layout/interval/hide-overlap.js.map +0 -1
- package/lib/geometry/label/layout/limit-in-canvas.d.ts +0 -9
- package/lib/geometry/label/layout/limit-in-canvas.js +0 -48
- package/lib/geometry/label/layout/limit-in-canvas.js.map +0 -1
- package/lib/geometry/label/layout/limit-in-plot.d.ts +0 -18
- package/lib/geometry/label/layout/limit-in-plot.js +0 -79
- package/lib/geometry/label/layout/limit-in-plot.js.map +0 -1
- package/lib/geometry/label/layout/limit-in-shape.d.ts +0 -7
- package/lib/geometry/label/layout/limit-in-shape.js +0 -22
- package/lib/geometry/label/layout/limit-in-shape.js.map +0 -1
- package/lib/geometry/label/layout/overlap.d.ts +0 -15
- package/lib/geometry/label/layout/overlap.js +0 -228
- package/lib/geometry/label/layout/overlap.js.map +0 -1
- package/lib/geometry/label/layout/path/adjust-position.d.ts +0 -17
- package/lib/geometry/label/layout/path/adjust-position.js +0 -98
- package/lib/geometry/label/layout/path/adjust-position.js.map +0 -1
- package/lib/geometry/label/layout/pie/distribute.d.ts +0 -3
- package/lib/geometry/label/layout/pie/distribute.js +0 -189
- package/lib/geometry/label/layout/pie/distribute.js.map +0 -1
- package/lib/geometry/label/layout/pie/outer.d.ts +0 -6
- package/lib/geometry/label/layout/pie/outer.js +0 -211
- package/lib/geometry/label/layout/pie/outer.js.map +0 -1
- package/lib/geometry/label/layout/pie/spider.d.ts +0 -7
- package/lib/geometry/label/layout/pie/spider.js +0 -185
- package/lib/geometry/label/layout/pie/spider.js.map +0 -1
- package/lib/geometry/label/layout/pie/util.d.ts +0 -10
- package/lib/geometry/label/layout/pie/util.js +0 -77
- package/lib/geometry/label/layout/pie/util.js.map +0 -1
- package/lib/geometry/label/layout/point/adjust-position.d.ts +0 -17
- package/lib/geometry/label/layout/point/adjust-position.js +0 -98
- package/lib/geometry/label/layout/point/adjust-position.js.map +0 -1
- package/lib/geometry/label/pie.d.ts +0 -22
- package/lib/geometry/label/pie.js +0 -97
- package/lib/geometry/label/pie.js.map +0 -1
- package/lib/geometry/label/polar.d.ts +0 -64
- package/lib/geometry/label/polar.js +0 -223
- package/lib/geometry/label/polar.js.map +0 -1
- package/lib/geometry/label/util/index.d.ts +0 -26
- package/lib/geometry/label/util/index.js +0 -68
- package/lib/geometry/label/util/index.js.map +0 -1
- package/lib/geometry/line.d.ts +0 -11
- package/lib/geometry/line.js +0 -23
- package/lib/geometry/line.js.map +0 -1
- package/lib/geometry/path.d.ts +0 -40
- package/lib/geometry/path.js +0 -124
- package/lib/geometry/path.js.map +0 -1
- package/lib/geometry/point.d.ts +0 -19
- package/lib/geometry/point.js +0 -32
- package/lib/geometry/point.js.map +0 -1
- package/lib/geometry/polygon.d.ts +0 -19
- package/lib/geometry/polygon.js +0 -64
- package/lib/geometry/polygon.js.map +0 -1
- package/lib/geometry/schema.d.ts +0 -18
- package/lib/geometry/schema.js +0 -50
- package/lib/geometry/schema.js.map +0 -1
- package/lib/geometry/shape/area/index.d.ts +0 -2
- package/lib/geometry/shape/area/index.js +0 -46
- package/lib/geometry/shape/area/index.js.map +0 -1
- package/lib/geometry/shape/area/line.d.ts +0 -1
- package/lib/geometry/shape/area/line.js +0 -33
- package/lib/geometry/shape/area/line.js.map +0 -1
- package/lib/geometry/shape/area/smooth-line.d.ts +0 -1
- package/lib/geometry/shape/area/smooth-line.js +0 -32
- package/lib/geometry/shape/area/smooth-line.js.map +0 -1
- package/lib/geometry/shape/area/smooth.d.ts +0 -1
- package/lib/geometry/shape/area/smooth.js +0 -33
- package/lib/geometry/shape/area/smooth.js.map +0 -1
- package/lib/geometry/shape/area/util.d.ts +0 -22
- package/lib/geometry/shape/area/util.js +0 -93
- package/lib/geometry/shape/area/util.js.map +0 -1
- package/lib/geometry/shape/base.d.ts +0 -22
- package/lib/geometry/shape/base.js +0 -168
- package/lib/geometry/shape/base.js.map +0 -1
- package/lib/geometry/shape/constant.d.ts +0 -4
- package/lib/geometry/shape/constant.js +0 -8
- package/lib/geometry/shape/constant.js.map +0 -1
- package/lib/geometry/shape/edge/arc.d.ts +0 -1
- package/lib/geometry/shape/edge/arc.js +0 -86
- package/lib/geometry/shape/edge/arc.js.map +0 -1
- package/lib/geometry/shape/edge/index.d.ts +0 -2
- package/lib/geometry/shape/edge/index.js +0 -33
- package/lib/geometry/shape/edge/index.js.map +0 -1
- package/lib/geometry/shape/edge/smooth.d.ts +0 -1
- package/lib/geometry/shape/edge/smooth.js +0 -32
- package/lib/geometry/shape/edge/smooth.js.map +0 -1
- package/lib/geometry/shape/edge/util.d.ts +0 -17
- package/lib/geometry/shape/edge/util.js +0 -37
- package/lib/geometry/shape/edge/util.js.map +0 -1
- package/lib/geometry/shape/edge/vhv.d.ts +0 -1
- package/lib/geometry/shape/edge/vhv.js +0 -44
- package/lib/geometry/shape/edge/vhv.js.map +0 -1
- package/lib/geometry/shape/interval/funnel.d.ts +0 -1
- package/lib/geometry/shape/interval/funnel.js +0 -33
- package/lib/geometry/shape/interval/funnel.js.map +0 -1
- package/lib/geometry/shape/interval/hollow-rect.d.ts +0 -1
- package/lib/geometry/shape/interval/hollow-rect.js +0 -53
- package/lib/geometry/shape/interval/hollow-rect.js.map +0 -1
- package/lib/geometry/shape/interval/index.d.ts +0 -3
- package/lib/geometry/shape/interval/index.js +0 -65
- package/lib/geometry/shape/interval/index.js.map +0 -1
- package/lib/geometry/shape/interval/line.d.ts +0 -1
- package/lib/geometry/shape/interval/line.js +0 -56
- package/lib/geometry/shape/interval/line.js.map +0 -1
- package/lib/geometry/shape/interval/pyramid.d.ts +0 -1
- package/lib/geometry/shape/interval/pyramid.js +0 -33
- package/lib/geometry/shape/interval/pyramid.js.map +0 -1
- package/lib/geometry/shape/interval/tick.d.ts +0 -1
- package/lib/geometry/shape/interval/tick.js +0 -79
- package/lib/geometry/shape/interval/tick.js.map +0 -1
- package/lib/geometry/shape/interval/util.d.ts +0 -55
- package/lib/geometry/shape/interval/util.js +0 -321
- package/lib/geometry/shape/interval/util.js.map +0 -1
- package/lib/geometry/shape/line/index.d.ts +0 -8
- package/lib/geometry/shape/line/index.js +0 -109
- package/lib/geometry/shape/line/index.js.map +0 -1
- package/lib/geometry/shape/line/step.d.ts +0 -1
- package/lib/geometry/shape/line/step.js +0 -86
- package/lib/geometry/shape/line/step.js.map +0 -1
- package/lib/geometry/shape/line/util.d.ts +0 -16
- package/lib/geometry/shape/line/util.js +0 -87
- package/lib/geometry/shape/line/util.js.map +0 -1
- package/lib/geometry/shape/point/hollow.d.ts +0 -1
- package/lib/geometry/shape/point/hollow.js +0 -26
- package/lib/geometry/shape/point/hollow.js.map +0 -1
- package/lib/geometry/shape/point/image.d.ts +0 -1
- package/lib/geometry/shape/point/image.js +0 -50
- package/lib/geometry/shape/point/image.js.map +0 -1
- package/lib/geometry/shape/point/index.d.ts +0 -2
- package/lib/geometry/shape/point/index.js +0 -34
- package/lib/geometry/shape/point/index.js.map +0 -1
- package/lib/geometry/shape/point/solid.d.ts +0 -1
- package/lib/geometry/shape/point/solid.js +0 -25
- package/lib/geometry/shape/point/solid.js.map +0 -1
- package/lib/geometry/shape/point/util.d.ts +0 -15
- package/lib/geometry/shape/point/util.js +0 -43
- package/lib/geometry/shape/point/util.js.map +0 -1
- package/lib/geometry/shape/polygon/index.d.ts +0 -2
- package/lib/geometry/shape/polygon/index.js +0 -67
- package/lib/geometry/shape/polygon/index.js.map +0 -1
- package/lib/geometry/shape/polygon/square.d.ts +0 -1
- package/lib/geometry/shape/polygon/square.js +0 -46
- package/lib/geometry/shape/polygon/square.js.map +0 -1
- package/lib/geometry/shape/schema/box.d.ts +0 -1
- package/lib/geometry/shape/schema/box.js +0 -144
- package/lib/geometry/shape/schema/box.js.map +0 -1
- package/lib/geometry/shape/schema/candle.d.ts +0 -1
- package/lib/geometry/shape/schema/candle.js +0 -82
- package/lib/geometry/shape/schema/candle.js.map +0 -1
- package/lib/geometry/shape/schema/index.d.ts +0 -2
- package/lib/geometry/shape/schema/index.js +0 -8
- package/lib/geometry/shape/schema/index.js.map +0 -1
- package/lib/geometry/shape/util/get-path-points.d.ts +0 -38
- package/lib/geometry/shape/util/get-path-points.js +0 -137
- package/lib/geometry/shape/util/get-path-points.js.map +0 -1
- package/lib/geometry/shape/util/get-style.d.ts +0 -18
- package/lib/geometry/shape/util/get-style.js +0 -52
- package/lib/geometry/shape/util/get-style.js.map +0 -1
- package/lib/geometry/shape/util/path.d.ts +0 -32
- package/lib/geometry/shape/util/path.js +0 -320
- package/lib/geometry/shape/util/path.js.map +0 -1
- package/lib/geometry/shape/util/split-points.d.ts +0 -13
- package/lib/geometry/shape/util/split-points.js +0 -28
- package/lib/geometry/shape/util/split-points.js.map +0 -1
- package/lib/geometry/shape/violin/hollow.d.ts +0 -1
- package/lib/geometry/shape/violin/hollow.js +0 -53
- package/lib/geometry/shape/violin/hollow.js.map +0 -1
- package/lib/geometry/shape/violin/index.d.ts +0 -2
- package/lib/geometry/shape/violin/index.js +0 -62
- package/lib/geometry/shape/violin/index.js.map +0 -1
- package/lib/geometry/shape/violin/smooth.d.ts +0 -1
- package/lib/geometry/shape/violin/smooth.js +0 -30
- package/lib/geometry/shape/violin/smooth.js.map +0 -1
- package/lib/geometry/util/diff.d.ts +0 -11
- package/lib/geometry/util/diff.js +0 -34
- package/lib/geometry/util/diff.js.map +0 -1
- package/lib/geometry/util/get-shape-type.d.ts +0 -8
- package/lib/geometry/util/get-shape-type.js +0 -20
- package/lib/geometry/util/get-shape-type.js.map +0 -1
- package/lib/geometry/util/group-data.d.ts +0 -3
- package/lib/geometry/util/group-data.js +0 -35
- package/lib/geometry/util/group-data.js.map +0 -1
- package/lib/geometry/util/is-model-change.d.ts +0 -9
- package/lib/geometry/util/is-model-change.js +0 -18
- package/lib/geometry/util/is-model-change.js.map +0 -1
- package/lib/geometry/util/parse-fields.d.ts +0 -2
- package/lib/geometry/util/parse-fields.js +0 -13
- package/lib/geometry/util/parse-fields.js.map +0 -1
- package/lib/geometry/util/shape-size.d.ts +0 -2
- package/lib/geometry/util/shape-size.js +0 -128
- package/lib/geometry/util/shape-size.js.map +0 -1
- package/lib/geometry/violin.d.ts +0 -25
- package/lib/geometry/violin.js +0 -69
- package/lib/geometry/violin.js.map +0 -1
- package/lib/index.d.ts +0 -107
- package/lib/index.js +0 -586
- package/lib/index.js.map +0 -1
- package/lib/interaction/action/active-region.d.ts +0 -33
- package/lib/interaction/action/active-region.js +0 -202
- package/lib/interaction/action/active-region.js.map +0 -1
- package/lib/interaction/action/base.d.ts +0 -29
- package/lib/interaction/action/base.js +0 -38
- package/lib/interaction/action/base.js.map +0 -1
- package/lib/interaction/action/callback.d.ts +0 -17
- package/lib/interaction/action/callback.js +0 -29
- package/lib/interaction/action/callback.js.map +0 -1
- package/lib/interaction/action/component/list-active.d.ts +0 -14
- package/lib/interaction/action/component/list-active.js +0 -26
- package/lib/interaction/action/component/list-active.js.map +0 -1
- package/lib/interaction/action/component/list-checked.d.ts +0 -30
- package/lib/interaction/action/component/list-checked.js +0 -84
- package/lib/interaction/action/component/list-checked.js.map +0 -1
- package/lib/interaction/action/component/list-focus.d.ts +0 -5
- package/lib/interaction/action/component/list-focus.js +0 -57
- package/lib/interaction/action/component/list-focus.js.map +0 -1
- package/lib/interaction/action/component/list-highlight-util.d.ts +0 -7
- package/lib/interaction/action/component/list-highlight-util.js +0 -24
- package/lib/interaction/action/component/list-highlight-util.js.map +0 -1
- package/lib/interaction/action/component/list-highlight.d.ts +0 -20
- package/lib/interaction/action/component/list-highlight.js +0 -99
- package/lib/interaction/action/component/list-highlight.js.map +0 -1
- package/lib/interaction/action/component/list-radio.d.ts +0 -24
- package/lib/interaction/action/component/list-radio.js +0 -118
- package/lib/interaction/action/component/list-radio.js.map +0 -1
- package/lib/interaction/action/component/list-selected.d.ts +0 -10
- package/lib/interaction/action/component/list-selected.js +0 -22
- package/lib/interaction/action/component/list-selected.js.map +0 -1
- package/lib/interaction/action/component/list-state.d.ts +0 -46
- package/lib/interaction/action/component/list-state.js +0 -169
- package/lib/interaction/action/component/list-state.js.map +0 -1
- package/lib/interaction/action/component/list-unchecked.d.ts +0 -13
- package/lib/interaction/action/component/list-unchecked.js +0 -25
- package/lib/interaction/action/component/list-unchecked.js.map +0 -1
- package/lib/interaction/action/component/tooltip/ellipsis-text.d.ts +0 -25
- package/lib/interaction/action/component/tooltip/ellipsis-text.js +0 -95
- package/lib/interaction/action/component/tooltip/ellipsis-text.js.map +0 -1
- package/lib/interaction/action/component/tooltip/geometry.d.ts +0 -24
- package/lib/interaction/action/component/tooltip/geometry.js +0 -73
- package/lib/interaction/action/component/tooltip/geometry.js.map +0 -1
- package/lib/interaction/action/component/tooltip/sibling.d.ts +0 -21
- package/lib/interaction/action/component/tooltip/sibling.js +0 -41
- package/lib/interaction/action/component/tooltip/sibling.js.map +0 -1
- package/lib/interaction/action/cursor.d.ts +0 -69
- package/lib/interaction/action/cursor.js +0 -115
- package/lib/interaction/action/cursor.js.map +0 -1
- package/lib/interaction/action/data/filter.d.ts +0 -13
- package/lib/interaction/action/data/filter.js +0 -68
- package/lib/interaction/action/data/filter.js.map +0 -1
- package/lib/interaction/action/data/range-filter.d.ts +0 -56
- package/lib/interaction/action/data/range-filter.js +0 -166
- package/lib/interaction/action/data/range-filter.js.map +0 -1
- package/lib/interaction/action/data/sibling-filter.d.ts +0 -22
- package/lib/interaction/action/data/sibling-filter.js +0 -41
- package/lib/interaction/action/data/sibling-filter.js.map +0 -1
- package/lib/interaction/action/element/active.d.ts +0 -14
- package/lib/interaction/action/element/active.js +0 -26
- package/lib/interaction/action/element/active.js.map +0 -1
- package/lib/interaction/action/element/filter.d.ts +0 -20
- package/lib/interaction/action/element/filter.js +0 -91
- package/lib/interaction/action/element/filter.js.map +0 -1
- package/lib/interaction/action/element/highlight-by-color.d.ts +0 -10
- package/lib/interaction/action/element/highlight-by-color.js +0 -32
- package/lib/interaction/action/element/highlight-by-color.js.map +0 -1
- package/lib/interaction/action/element/highlight-by-x.d.ts +0 -15
- package/lib/interaction/action/element/highlight-by-x.js +0 -53
- package/lib/interaction/action/element/highlight-by-x.js.map +0 -1
- package/lib/interaction/action/element/highlight-util.d.ts +0 -18
- package/lib/interaction/action/element/highlight-util.js +0 -50
- package/lib/interaction/action/element/highlight-util.js.map +0 -1
- package/lib/interaction/action/element/highlight.d.ts +0 -21
- package/lib/interaction/action/element/highlight.js +0 -96
- package/lib/interaction/action/element/highlight.js.map +0 -1
- package/lib/interaction/action/element/link-by-color.d.ts +0 -51
- package/lib/interaction/action/element/link-by-color.js +0 -158
- package/lib/interaction/action/element/link-by-color.js.map +0 -1
- package/lib/interaction/action/element/range-active.d.ts +0 -13
- package/lib/interaction/action/element/range-active.js +0 -25
- package/lib/interaction/action/element/range-active.js.map +0 -1
- package/lib/interaction/action/element/range-highlight.d.ts +0 -27
- package/lib/interaction/action/element/range-highlight.js +0 -57
- package/lib/interaction/action/element/range-highlight.js.map +0 -1
- package/lib/interaction/action/element/range-selected.d.ts +0 -13
- package/lib/interaction/action/element/range-selected.js +0 -25
- package/lib/interaction/action/element/range-selected.js.map +0 -1
- package/lib/interaction/action/element/range-state.d.ts +0 -38
- package/lib/interaction/action/element/range-state.js +0 -166
- package/lib/interaction/action/element/range-state.js.map +0 -1
- package/lib/interaction/action/element/selected.d.ts +0 -14
- package/lib/interaction/action/element/selected.js +0 -26
- package/lib/interaction/action/element/selected.js.map +0 -1
- package/lib/interaction/action/element/sibling-filter.d.ts +0 -19
- package/lib/interaction/action/element/sibling-filter.js +0 -95
- package/lib/interaction/action/element/sibling-filter.js.map +0 -1
- package/lib/interaction/action/element/single-active.d.ts +0 -13
- package/lib/interaction/action/element/single-active.js +0 -25
- package/lib/interaction/action/element/single-active.js.map +0 -1
- package/lib/interaction/action/element/single-highlight.d.ts +0 -16
- package/lib/interaction/action/element/single-highlight.js +0 -37
- package/lib/interaction/action/element/single-highlight.js.map +0 -1
- package/lib/interaction/action/element/single-selected.d.ts +0 -13
- package/lib/interaction/action/element/single-selected.js +0 -25
- package/lib/interaction/action/element/single-selected.js.map +0 -1
- package/lib/interaction/action/element/single-state.d.ts +0 -18
- package/lib/interaction/action/element/single-state.js +0 -55
- package/lib/interaction/action/element/single-state.js.map +0 -1
- package/lib/interaction/action/element/state-base.d.ts +0 -39
- package/lib/interaction/action/element/state-base.js +0 -61
- package/lib/interaction/action/element/state-base.js.map +0 -1
- package/lib/interaction/action/element/state.d.ts +0 -28
- package/lib/interaction/action/element/state.js +0 -101
- package/lib/interaction/action/element/state.js.map +0 -1
- package/lib/interaction/action/index.d.ts +0 -2
- package/lib/interaction/action/index.js +0 -13
- package/lib/interaction/action/index.js.map +0 -1
- package/lib/interaction/action/mask/base.d.ts +0 -62
- package/lib/interaction/action/mask/base.js +0 -171
- package/lib/interaction/action/mask/base.js.map +0 -1
- package/lib/interaction/action/mask/circle.d.ts +0 -14
- package/lib/interaction/action/mask/circle.js +0 -39
- package/lib/interaction/action/mask/circle.js.map +0 -1
- package/lib/interaction/action/mask/dim-rect.d.ts +0 -11
- package/lib/interaction/action/mask/dim-rect.js +0 -64
- package/lib/interaction/action/mask/dim-rect.js.map +0 -1
- package/lib/interaction/action/mask/path.d.ts +0 -16
- package/lib/interaction/action/mask/path.js +0 -46
- package/lib/interaction/action/mask/path.js.map +0 -1
- package/lib/interaction/action/mask/rect.d.ts +0 -17
- package/lib/interaction/action/mask/rect.js +0 -41
- package/lib/interaction/action/mask/rect.js.map +0 -1
- package/lib/interaction/action/mask/smooth-path.d.ts +0 -9
- package/lib/interaction/action/mask/smooth-path.js +0 -23
- package/lib/interaction/action/mask/smooth-path.js.map +0 -1
- package/lib/interaction/action/register.d.ts +0 -36
- package/lib/interaction/action/register.js +0 -69
- package/lib/interaction/action/register.js.map +0 -1
- package/lib/interaction/action/util.d.ts +0 -140
- package/lib/interaction/action/util.js +0 -387
- package/lib/interaction/action/util.js.map +0 -1
- package/lib/interaction/action/view/button.d.ts +0 -25
- package/lib/interaction/action/view/button.js +0 -118
- package/lib/interaction/action/view/button.js.map +0 -1
- package/lib/interaction/action/view/drag.d.ts +0 -24
- package/lib/interaction/action/view/drag.js +0 -75
- package/lib/interaction/action/view/drag.js.map +0 -1
- package/lib/interaction/action/view/mousewheel-scroll.d.ts +0 -5
- package/lib/interaction/action/view/mousewheel-scroll.js +0 -37
- package/lib/interaction/action/view/mousewheel-scroll.js.map +0 -1
- package/lib/interaction/action/view/move.d.ts +0 -28
- package/lib/interaction/action/view/move.js +0 -82
- package/lib/interaction/action/view/move.js.map +0 -1
- package/lib/interaction/action/view/scale-transform.d.ts +0 -18
- package/lib/interaction/action/view/scale-transform.js +0 -53
- package/lib/interaction/action/view/scale-transform.js.map +0 -1
- package/lib/interaction/action/view/scale-translate.d.ts +0 -30
- package/lib/interaction/action/view/scale-translate.js +0 -114
- package/lib/interaction/action/view/scale-translate.js.map +0 -1
- package/lib/interaction/action/view/scale-zoom.d.ts +0 -20
- package/lib/interaction/action/view/scale-zoom.js +0 -85
- package/lib/interaction/action/view/scale-zoom.js.map +0 -1
- package/lib/interaction/context.d.ts +0 -65
- package/lib/interaction/context.js +0 -144
- package/lib/interaction/context.js.map +0 -1
- package/lib/interaction/grammar-interaction.d.ts +0 -158
- package/lib/interaction/grammar-interaction.js +0 -289
- package/lib/interaction/grammar-interaction.js.map +0 -1
- package/lib/interaction/index.d.ts +0 -25
- package/lib/interaction/index.js +0 -54
- package/lib/interaction/index.js.map +0 -1
- package/lib/interaction/interaction.d.ts +0 -29
- package/lib/interaction/interaction.js +0 -34
- package/lib/interaction/interaction.js.map +0 -1
- package/lib/interface.d.ts +0 -2264
- package/lib/interface.js +0 -3
- package/lib/interface.js.map +0 -1
- package/lib/theme/index.d.ts +0 -12
- package/lib/theme/index.js +0 -28
- package/lib/theme/index.js.map +0 -1
- package/lib/theme/style-sheet/dark.d.ts +0 -825
- package/lib/theme/style-sheet/dark.js +0 -500
- package/lib/theme/style-sheet/dark.js.map +0 -1
- package/lib/theme/style-sheet/light.d.ts +0 -817
- package/lib/theme/style-sheet/light.js +0 -496
- package/lib/theme/style-sheet/light.js.map +0 -1
- package/lib/theme/util/create-by-style-sheet.d.ts +0 -6
- package/lib/theme/util/create-by-style-sheet.js +0 -1426
- package/lib/theme/util/create-by-style-sheet.js.map +0 -1
- package/lib/theme/util/create-theme.d.ts +0 -6
- package/lib/theme/util/create-theme.js +0 -16
- package/lib/theme/util/create-theme.js.map +0 -1
- package/lib/theme/util/index.d.ts +0 -1
- package/lib/theme/util/index.js +0 -6
- package/lib/theme/util/index.js.map +0 -1
- package/lib/util/annotation.d.ts +0 -7
- package/lib/util/annotation.js +0 -43
- package/lib/util/annotation.js.map +0 -1
- package/lib/util/attr.d.ts +0 -10
- package/lib/util/attr.js +0 -29
- package/lib/util/attr.js.map +0 -1
- package/lib/util/axis.d.ts +0 -100
- package/lib/util/axis.js +0 -251
- package/lib/util/axis.js.map +0 -1
- package/lib/util/bbox.d.ts +0 -105
- package/lib/util/bbox.js +0 -287
- package/lib/util/bbox.js.map +0 -1
- package/lib/util/collision-detect.d.ts +0 -16
- package/lib/util/collision-detect.js +0 -132
- package/lib/util/collision-detect.js.map +0 -1
- package/lib/util/color.d.ts +0 -1
- package/lib/util/color.js +0 -23
- package/lib/util/color.js.map +0 -1
- package/lib/util/context.d.ts +0 -4
- package/lib/util/context.js +0 -15
- package/lib/util/context.js.map +0 -1
- package/lib/util/coordinate.d.ts +0 -86
- package/lib/util/coordinate.js +0 -157
- package/lib/util/coordinate.js.map +0 -1
- package/lib/util/direction.d.ts +0 -19
- package/lib/util/direction.js +0 -125
- package/lib/util/direction.js.map +0 -1
- package/lib/util/dom.d.ts +0 -19
- package/lib/util/dom.js +0 -68
- package/lib/util/dom.js.map +0 -1
- package/lib/util/event.d.ts +0 -8
- package/lib/util/event.js +0 -18
- package/lib/util/event.js.map +0 -1
- package/lib/util/facet.d.ts +0 -16
- package/lib/util/facet.js +0 -48
- package/lib/util/facet.js.map +0 -1
- package/lib/util/graphics.d.ts +0 -58
- package/lib/util/graphics.js +0 -212
- package/lib/util/graphics.js.map +0 -1
- package/lib/util/grid.d.ts +0 -36
- package/lib/util/grid.js +0 -125
- package/lib/util/grid.js.map +0 -1
- package/lib/util/helper.d.ts +0 -34
- package/lib/util/helper.js +0 -79
- package/lib/util/helper.js.map +0 -1
- package/lib/util/legend.d.ts +0 -45
- package/lib/util/legend.js +0 -152
- package/lib/util/legend.js.map +0 -1
- package/lib/util/marker.d.ts +0 -10
- package/lib/util/marker.js +0 -61
- package/lib/util/marker.js.map +0 -1
- package/lib/util/padding.d.ts +0 -14
- package/lib/util/padding.js +0 -45
- package/lib/util/padding.js.map +0 -1
- package/lib/util/scale.d.ts +0 -42
- package/lib/util/scale.js +0 -137
- package/lib/util/scale.js.map +0 -1
- package/lib/util/stat.d.ts +0 -10
- package/lib/util/stat.js +0 -41
- package/lib/util/stat.js.map +0 -1
- package/lib/util/text.d.ts +0 -23
- package/lib/util/text.js +0 -88
- package/lib/util/text.js.map +0 -1
- package/lib/util/tooltip.d.ts +0 -26
- package/lib/util/tooltip.js +0 -426
- package/lib/util/tooltip.js.map +0 -1
- package/lib/util/transform.d.ts +0 -33
- package/lib/util/transform.js +0 -69
- package/lib/util/transform.js.map +0 -1
- package/lib/util/types.d.ts +0 -6
- package/lib/util/types.js +0 -3
- package/lib/util/types.js.map +0 -1
|
@@ -1,484 +0,0 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
|
-
import { deepMix, each, find, get, head, isBoolean, last } from '@antv/util';
|
|
3
|
-
import { COMPONENT_MAX_VIEW_PERCENTAGE, COMPONENT_TYPE, DIRECTION, LAYER } from '../../constant';
|
|
4
|
-
import { CategoryLegend, ContinuousLegend } from '../../dependents';
|
|
5
|
-
import { DEFAULT_ANIMATE_CFG } from '../../animate';
|
|
6
|
-
import { BBox } from '../../util/bbox';
|
|
7
|
-
import { directionToPosition } from '../../util/direction';
|
|
8
|
-
import { omit } from '../../util/helper';
|
|
9
|
-
import { getCustomLegendItems, getLegendItems, getLegendLayout, getLegendThemeCfg } from '../../util/legend';
|
|
10
|
-
import { getName } from '../../util/scale';
|
|
11
|
-
import { Controller } from './base';
|
|
12
|
-
/**
|
|
13
|
-
* 从配置中获取单个字段的 legend 配置
|
|
14
|
-
* @param legends
|
|
15
|
-
* @param field
|
|
16
|
-
* @returns the option of one legend field
|
|
17
|
-
*/
|
|
18
|
-
function getLegendOption(legends, field) {
|
|
19
|
-
if (isBoolean(legends)) {
|
|
20
|
-
return legends === false ? false : {};
|
|
21
|
-
}
|
|
22
|
-
return get(legends, [field], legends);
|
|
23
|
-
}
|
|
24
|
-
function getDirection(legendOption) {
|
|
25
|
-
return get(legendOption, 'position', DIRECTION.BOTTOM);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @ignore
|
|
29
|
-
* legend Controller
|
|
30
|
-
*/
|
|
31
|
-
var Legend = /** @class */ (function (_super) {
|
|
32
|
-
__extends(Legend, _super);
|
|
33
|
-
function Legend(view) {
|
|
34
|
-
var _this = _super.call(this, view) || this;
|
|
35
|
-
_this.container = _this.view.getLayer(LAYER.FORE).addGroup();
|
|
36
|
-
return _this;
|
|
37
|
-
}
|
|
38
|
-
Object.defineProperty(Legend.prototype, "name", {
|
|
39
|
-
get: function () {
|
|
40
|
-
return 'legend';
|
|
41
|
-
},
|
|
42
|
-
enumerable: false,
|
|
43
|
-
configurable: true
|
|
44
|
-
});
|
|
45
|
-
Legend.prototype.init = function () { };
|
|
46
|
-
/**
|
|
47
|
-
* render the legend component by legend options
|
|
48
|
-
*/
|
|
49
|
-
Legend.prototype.render = function () {
|
|
50
|
-
// 和 update 逻辑保持一致
|
|
51
|
-
this.update();
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* layout legend
|
|
55
|
-
* 计算出 legend 的 direction 位置 x, y
|
|
56
|
-
*/
|
|
57
|
-
Legend.prototype.layout = function () {
|
|
58
|
-
var _this = this;
|
|
59
|
-
this.layoutBBox = this.view.viewBBox;
|
|
60
|
-
each(this.components, function (co) {
|
|
61
|
-
var component = co.component, direction = co.direction;
|
|
62
|
-
var layout = getLegendLayout(direction);
|
|
63
|
-
var maxWidthRatio = component.get('maxWidthRatio');
|
|
64
|
-
var maxHeightRatio = component.get('maxHeightRatio');
|
|
65
|
-
var maxSize = _this.getCategoryLegendSizeCfg(layout, maxWidthRatio, maxHeightRatio);
|
|
66
|
-
var maxWidth = component.get('maxWidth');
|
|
67
|
-
var maxHeight = component.get('maxHeight');
|
|
68
|
-
// 先更新 maxSize,更新 layoutBBox,以便计算正确的 x y
|
|
69
|
-
component.update({
|
|
70
|
-
maxWidth: Math.min(maxSize.maxWidth, maxWidth || 0),
|
|
71
|
-
maxHeight: Math.min(maxSize.maxHeight, maxHeight || 0),
|
|
72
|
-
});
|
|
73
|
-
var padding = component.get('padding');
|
|
74
|
-
var bboxObject = component.getLayoutBBox(); // 这里只需要他的 width、height 信息做位置调整
|
|
75
|
-
var bbox = new BBox(bboxObject.x, bboxObject.y, bboxObject.width, bboxObject.height).expand(padding);
|
|
76
|
-
var _a = directionToPosition(_this.view.viewBBox, bbox, direction), x1 = _a[0], y1 = _a[1];
|
|
77
|
-
var _b = directionToPosition(_this.layoutBBox, bbox, direction), x2 = _b[0], y2 = _b[1];
|
|
78
|
-
var x = 0;
|
|
79
|
-
var y = 0;
|
|
80
|
-
// 因为 legend x y 要和 coordinateBBox 对齐,所以要做一个简单的判断
|
|
81
|
-
if (direction.startsWith('top') || direction.startsWith('bottom')) {
|
|
82
|
-
x = x1;
|
|
83
|
-
y = y2;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
x = x2;
|
|
87
|
-
y = y1;
|
|
88
|
-
}
|
|
89
|
-
// 更新位置
|
|
90
|
-
component.setLocation({ x: x + padding[3], y: y + padding[0] });
|
|
91
|
-
_this.layoutBBox = _this.layoutBBox.cut(bbox, direction);
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* legend 的更新逻辑
|
|
96
|
-
*/
|
|
97
|
-
Legend.prototype.update = function () {
|
|
98
|
-
var _this = this;
|
|
99
|
-
this.option = this.view.getOptions().legends;
|
|
100
|
-
// 已经处理过的 legend
|
|
101
|
-
var updated = {};
|
|
102
|
-
var eachLegend = function (geometry, attr, scale) {
|
|
103
|
-
var id = _this.getId(scale.field);
|
|
104
|
-
var existCo = _this.getComponentById(id);
|
|
105
|
-
// 存在则 update
|
|
106
|
-
if (existCo) {
|
|
107
|
-
var cfg = void 0;
|
|
108
|
-
var legendOption = getLegendOption(_this.option, scale.field);
|
|
109
|
-
// if the legend option is not false, means legend should be created.
|
|
110
|
-
if (legendOption !== false) {
|
|
111
|
-
if (get(legendOption, 'custom')) {
|
|
112
|
-
cfg = _this.getCategoryCfg(geometry, attr, scale, legendOption, true);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
if (scale.isLinear) {
|
|
116
|
-
// linear field, create continuous legend
|
|
117
|
-
cfg = _this.getContinuousCfg(geometry, attr, scale, legendOption);
|
|
118
|
-
}
|
|
119
|
-
else if (scale.isCategory) {
|
|
120
|
-
// category field, create category legend
|
|
121
|
-
cfg = _this.getCategoryCfg(geometry, attr, scale, legendOption);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// 如果 cfg 为空,则不在 updated 标记,那么会在后面逻辑中删除
|
|
126
|
-
if (cfg) {
|
|
127
|
-
// omit 掉一些属性,比如 container 等
|
|
128
|
-
omit(cfg, ['container']);
|
|
129
|
-
existCo.direction = getDirection(legendOption);
|
|
130
|
-
existCo.component.update(cfg);
|
|
131
|
-
// 标记为新的
|
|
132
|
-
updated[id] = true;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
// 不存在则 create
|
|
137
|
-
var legend = _this.createFieldLegend(geometry, attr, scale);
|
|
138
|
-
if (legend) {
|
|
139
|
-
legend.component.init();
|
|
140
|
-
_this.components.push(legend);
|
|
141
|
-
// 标记为新的
|
|
142
|
-
updated[id] = true;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
// 全局自定义图例
|
|
147
|
-
if (get(this.option, 'custom')) {
|
|
148
|
-
var id = 'global-custom';
|
|
149
|
-
var existCo = this.getComponentById(id);
|
|
150
|
-
if (existCo) {
|
|
151
|
-
var customCfg = this.getCategoryCfg(undefined, undefined, undefined, this.option, true);
|
|
152
|
-
omit(customCfg, ['container']);
|
|
153
|
-
existCo.component.update(customCfg);
|
|
154
|
-
updated[id] = true;
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
var component = this.createCustomLegend(undefined, undefined, undefined, this.option);
|
|
158
|
-
if (component) {
|
|
159
|
-
component.init();
|
|
160
|
-
var layer = LAYER.FORE;
|
|
161
|
-
var direction = getDirection(this.option);
|
|
162
|
-
this.components.push({
|
|
163
|
-
id: id,
|
|
164
|
-
component: component,
|
|
165
|
-
layer: layer,
|
|
166
|
-
direction: direction,
|
|
167
|
-
type: COMPONENT_TYPE.LEGEND,
|
|
168
|
-
extra: undefined,
|
|
169
|
-
});
|
|
170
|
-
// 标记为更新
|
|
171
|
-
updated[id] = true;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
// 遍历处理每一个创建逻辑
|
|
177
|
-
this.loopLegends(eachLegend);
|
|
178
|
-
}
|
|
179
|
-
// 处理完成之后,销毁删除的
|
|
180
|
-
// 不在处理中的
|
|
181
|
-
var components = [];
|
|
182
|
-
each(this.getComponents(), function (co) {
|
|
183
|
-
if (updated[co.id]) {
|
|
184
|
-
components.push(co);
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
co.component.destroy();
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
// 更新当前已有的 components
|
|
191
|
-
this.components = components;
|
|
192
|
-
};
|
|
193
|
-
Legend.prototype.clear = function () {
|
|
194
|
-
_super.prototype.clear.call(this);
|
|
195
|
-
this.container.clear();
|
|
196
|
-
};
|
|
197
|
-
Legend.prototype.destroy = function () {
|
|
198
|
-
_super.prototype.destroy.call(this);
|
|
199
|
-
this.container.remove(true);
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* 递归获取所有的 Geometry
|
|
203
|
-
*/
|
|
204
|
-
Legend.prototype.getGeometries = function (view) {
|
|
205
|
-
var _this = this;
|
|
206
|
-
var geometries = view.geometries;
|
|
207
|
-
each(view.views, function (v) {
|
|
208
|
-
geometries = geometries.concat(_this.getGeometries(v));
|
|
209
|
-
});
|
|
210
|
-
return geometries;
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* 遍历 Geometry,处理 legend 逻辑
|
|
214
|
-
* @param doEach 每个 loop 中的处理方法
|
|
215
|
-
*/
|
|
216
|
-
Legend.prototype.loopLegends = function (doEach) {
|
|
217
|
-
var isRootView = this.view.getRootView() === this.view;
|
|
218
|
-
// 非根 view,不处理 legend
|
|
219
|
-
if (!isRootView) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
// 递归 view 中所有的 Geometry,进行创建 legend
|
|
223
|
-
var geometries = this.getGeometries(this.view);
|
|
224
|
-
var looped = {}; // 防止一个字段创建两个 legend
|
|
225
|
-
each(geometries, function (geometry) {
|
|
226
|
-
var attributes = geometry.getGroupAttributes();
|
|
227
|
-
each(attributes, function (attr) {
|
|
228
|
-
var scale = attr.getScale(attr.type);
|
|
229
|
-
// 如果在视觉通道上映射常量值,如 size(2) shape('circle') 不创建 legend
|
|
230
|
-
if (!scale || scale.type === 'identity' || looped[scale.field]) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
doEach(geometry, attr, scale);
|
|
234
|
-
looped[scale.field] = true;
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
};
|
|
238
|
-
/**
|
|
239
|
-
* 创建一个 legend
|
|
240
|
-
* @param geometry
|
|
241
|
-
* @param attr
|
|
242
|
-
* @param scale
|
|
243
|
-
*/
|
|
244
|
-
Legend.prototype.createFieldLegend = function (geometry, attr, scale) {
|
|
245
|
-
var component;
|
|
246
|
-
var legendOption = getLegendOption(this.option, scale.field);
|
|
247
|
-
var layer = LAYER.FORE;
|
|
248
|
-
var direction = getDirection(legendOption);
|
|
249
|
-
// if the legend option is not false, means legend should be created.
|
|
250
|
-
if (legendOption !== false) {
|
|
251
|
-
if (get(legendOption, 'custom')) {
|
|
252
|
-
component = this.createCustomLegend(geometry, attr, scale, legendOption);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
if (scale.isLinear) {
|
|
256
|
-
// linear field, create continuous legend
|
|
257
|
-
component = this.createContinuousLegend(geometry, attr, scale, legendOption);
|
|
258
|
-
}
|
|
259
|
-
else if (scale.isCategory) {
|
|
260
|
-
// category field, create category legend
|
|
261
|
-
component = this.createCategoryLegend(geometry, attr, scale, legendOption);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (component) {
|
|
266
|
-
component.set('field', scale.field);
|
|
267
|
-
return {
|
|
268
|
-
id: this.getId(scale.field),
|
|
269
|
-
component: component,
|
|
270
|
-
layer: layer,
|
|
271
|
-
direction: direction,
|
|
272
|
-
type: COMPONENT_TYPE.LEGEND,
|
|
273
|
-
extra: { scale: scale },
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
/**
|
|
278
|
-
* 自定义图例使用 category 图例去渲染
|
|
279
|
-
* @param geometry
|
|
280
|
-
* @param attr
|
|
281
|
-
* @param scale
|
|
282
|
-
* @param legendOption
|
|
283
|
-
*/
|
|
284
|
-
Legend.prototype.createCustomLegend = function (geometry, attr, scale, legendOption) {
|
|
285
|
-
// 直接使用 分类图例渲染
|
|
286
|
-
var cfg = this.getCategoryCfg(geometry, attr, scale, legendOption, true);
|
|
287
|
-
return new CategoryLegend(cfg);
|
|
288
|
-
};
|
|
289
|
-
/**
|
|
290
|
-
* 创建连续图例
|
|
291
|
-
* @param geometry
|
|
292
|
-
* @param attr
|
|
293
|
-
* @param scale
|
|
294
|
-
* @param legendOption
|
|
295
|
-
*/
|
|
296
|
-
Legend.prototype.createContinuousLegend = function (geometry, attr, scale, legendOption) {
|
|
297
|
-
var cfg = this.getContinuousCfg(geometry, attr, scale, omit(legendOption, ['value']));
|
|
298
|
-
return new ContinuousLegend(cfg);
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* 创建分类图例
|
|
302
|
-
* @param geometry
|
|
303
|
-
* @param attr
|
|
304
|
-
* @param scale
|
|
305
|
-
* @param legendOption
|
|
306
|
-
*/
|
|
307
|
-
Legend.prototype.createCategoryLegend = function (geometry, attr, scale, legendOption) {
|
|
308
|
-
var cfg = this.getCategoryCfg(geometry, attr, scale, legendOption);
|
|
309
|
-
return new CategoryLegend(cfg);
|
|
310
|
-
};
|
|
311
|
-
/**
|
|
312
|
-
* 获得连续图例的配置
|
|
313
|
-
* @param geometry
|
|
314
|
-
* @param attr
|
|
315
|
-
* @param scale
|
|
316
|
-
* @param legendOption
|
|
317
|
-
*/
|
|
318
|
-
Legend.prototype.getContinuousCfg = function (geometry, attr, scale, legendOption) {
|
|
319
|
-
var ticks = scale.getTicks();
|
|
320
|
-
var containMin = find(ticks, function (tick) { return tick.value === 0; });
|
|
321
|
-
var containMax = find(ticks, function (tick) { return tick.value === 1; });
|
|
322
|
-
var items = ticks.map(function (tick) {
|
|
323
|
-
var value = tick.value, tickValue = tick.tickValue;
|
|
324
|
-
var attrValue = attr.mapping(scale.invert(value)).join('');
|
|
325
|
-
return {
|
|
326
|
-
value: tickValue,
|
|
327
|
-
attrValue: attrValue,
|
|
328
|
-
color: attrValue,
|
|
329
|
-
scaleValue: value,
|
|
330
|
-
};
|
|
331
|
-
});
|
|
332
|
-
if (!containMin) {
|
|
333
|
-
items.push({
|
|
334
|
-
value: scale.min,
|
|
335
|
-
attrValue: attr.mapping(scale.invert(0)).join(''),
|
|
336
|
-
color: attr.mapping(scale.invert(0)).join(''),
|
|
337
|
-
scaleValue: 0,
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
if (!containMax) {
|
|
341
|
-
items.push({
|
|
342
|
-
value: scale.max,
|
|
343
|
-
attrValue: attr.mapping(scale.invert(1)).join(''),
|
|
344
|
-
color: attr.mapping(scale.invert(1)).join(''),
|
|
345
|
-
scaleValue: 1,
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
// 排序
|
|
349
|
-
items.sort(function (a, b) { return a.value - b.value; });
|
|
350
|
-
// 跟 attr 相关的配置
|
|
351
|
-
// size color 区别的配置
|
|
352
|
-
var attrLegendCfg = {
|
|
353
|
-
min: head(items).value,
|
|
354
|
-
max: last(items).value,
|
|
355
|
-
colors: [],
|
|
356
|
-
rail: {
|
|
357
|
-
type: attr.type,
|
|
358
|
-
},
|
|
359
|
-
track: {},
|
|
360
|
-
};
|
|
361
|
-
if (attr.type === 'size') {
|
|
362
|
-
attrLegendCfg.track = {
|
|
363
|
-
style: {
|
|
364
|
-
// size 的选中前景色,对于 color,则直接使用 color 标识
|
|
365
|
-
// @ts-ignore
|
|
366
|
-
fill: attr.type === 'size' ? this.view.getTheme().defaultColor : undefined,
|
|
367
|
-
},
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
if (attr.type === 'color') {
|
|
371
|
-
attrLegendCfg.colors = items.map(function (item) { return item.attrValue; });
|
|
372
|
-
}
|
|
373
|
-
var container = this.container;
|
|
374
|
-
// if position is not set, use top as default
|
|
375
|
-
var direction = getDirection(legendOption);
|
|
376
|
-
var layout = getLegendLayout(direction);
|
|
377
|
-
var title = get(legendOption, 'title');
|
|
378
|
-
if (title) {
|
|
379
|
-
title = deepMix({
|
|
380
|
-
text: getName(scale),
|
|
381
|
-
}, title);
|
|
382
|
-
}
|
|
383
|
-
// 基础配置,从当前数据中读到的配置
|
|
384
|
-
attrLegendCfg.container = container;
|
|
385
|
-
attrLegendCfg.layout = layout;
|
|
386
|
-
attrLegendCfg.title = title;
|
|
387
|
-
attrLegendCfg.animateOption = DEFAULT_ANIMATE_CFG;
|
|
388
|
-
// @ts-ignore
|
|
389
|
-
return this.mergeLegendCfg(attrLegendCfg, legendOption, 'continuous');
|
|
390
|
-
};
|
|
391
|
-
/**
|
|
392
|
-
* 获取分类图例的配置项
|
|
393
|
-
* @param geometry
|
|
394
|
-
* @param attr
|
|
395
|
-
* @param scale
|
|
396
|
-
* @param custom
|
|
397
|
-
* @param legendOption
|
|
398
|
-
*/
|
|
399
|
-
Legend.prototype.getCategoryCfg = function (geometry, attr, scale, legendOption, custom) {
|
|
400
|
-
var container = this.container;
|
|
401
|
-
// if position is not set, use top as default
|
|
402
|
-
var direction = get(legendOption, 'position', DIRECTION.BOTTOM);
|
|
403
|
-
var legendTheme = getLegendThemeCfg(this.view.getTheme(), direction);
|
|
404
|
-
// the default marker style
|
|
405
|
-
var themeMarker = get(legendTheme, ['marker']);
|
|
406
|
-
var userMarker = get(legendOption, 'marker');
|
|
407
|
-
var layout = getLegendLayout(direction);
|
|
408
|
-
var themePageNavigator = get(legendTheme, ['pageNavigator']);
|
|
409
|
-
var userPageNavigator = get(legendOption, 'pageNavigator');
|
|
410
|
-
var items = custom
|
|
411
|
-
? getCustomLegendItems(themeMarker, userMarker, legendOption.items)
|
|
412
|
-
: getLegendItems(this.view, geometry, attr, themeMarker, userMarker);
|
|
413
|
-
var title = get(legendOption, 'title');
|
|
414
|
-
if (title) {
|
|
415
|
-
title = deepMix({
|
|
416
|
-
text: scale ? getName(scale) : '',
|
|
417
|
-
}, title);
|
|
418
|
-
}
|
|
419
|
-
var maxWidthRatio = get(legendOption, 'maxWidthRatio');
|
|
420
|
-
var maxHeightRatio = get(legendOption, 'maxHeightRatio');
|
|
421
|
-
var baseCfg = this.getCategoryLegendSizeCfg(layout, maxWidthRatio, maxHeightRatio);
|
|
422
|
-
baseCfg.container = container;
|
|
423
|
-
baseCfg.layout = layout;
|
|
424
|
-
baseCfg.items = items;
|
|
425
|
-
baseCfg.title = title;
|
|
426
|
-
baseCfg.animateOption = DEFAULT_ANIMATE_CFG;
|
|
427
|
-
baseCfg.pageNavigator = deepMix({}, themePageNavigator, userPageNavigator);
|
|
428
|
-
var categoryCfg = this.mergeLegendCfg(baseCfg, legendOption, direction);
|
|
429
|
-
if (categoryCfg.reversed) {
|
|
430
|
-
// 图例项需要逆序
|
|
431
|
-
categoryCfg.items.reverse();
|
|
432
|
-
}
|
|
433
|
-
var maxItemWidth = get(categoryCfg, 'maxItemWidth');
|
|
434
|
-
if (maxItemWidth && maxItemWidth <= 1) {
|
|
435
|
-
// 转换成像素值
|
|
436
|
-
categoryCfg.maxItemWidth = this.view.viewBBox.width * maxItemWidth;
|
|
437
|
-
}
|
|
438
|
-
return categoryCfg;
|
|
439
|
-
};
|
|
440
|
-
/**
|
|
441
|
-
* get legend config, use option > suggestion > theme
|
|
442
|
-
* @param baseCfg
|
|
443
|
-
* @param legendOption
|
|
444
|
-
* @param direction
|
|
445
|
-
*/
|
|
446
|
-
Legend.prototype.mergeLegendCfg = function (baseCfg, legendOption, direction) {
|
|
447
|
-
var position = direction.split('-')[0];
|
|
448
|
-
var themeObject = getLegendThemeCfg(this.view.getTheme(), position);
|
|
449
|
-
return deepMix({}, themeObject, baseCfg, legendOption);
|
|
450
|
-
};
|
|
451
|
-
/**
|
|
452
|
-
* 生成 id
|
|
453
|
-
* @param key
|
|
454
|
-
*/
|
|
455
|
-
Legend.prototype.getId = function (key) {
|
|
456
|
-
return "".concat(this.name, "-").concat(key);
|
|
457
|
-
};
|
|
458
|
-
/**
|
|
459
|
-
* 根据 id 来获取组件
|
|
460
|
-
* @param id
|
|
461
|
-
*/
|
|
462
|
-
Legend.prototype.getComponentById = function (id) {
|
|
463
|
-
return find(this.components, function (co) { return co.id === id; });
|
|
464
|
-
};
|
|
465
|
-
Legend.prototype.getCategoryLegendSizeCfg = function (layout, maxWidthRatio, maxHeightRatio) {
|
|
466
|
-
if (maxWidthRatio === void 0) { maxWidthRatio = COMPONENT_MAX_VIEW_PERCENTAGE; }
|
|
467
|
-
if (maxHeightRatio === void 0) { maxHeightRatio = COMPONENT_MAX_VIEW_PERCENTAGE; }
|
|
468
|
-
var _a = this.view.viewBBox, vw = _a.width, vh = _a.height;
|
|
469
|
-
// 目前 legend 的布局是以 viewBBox 为参照
|
|
470
|
-
// const { width: cw, height: ch } = this.view.coordinateBBox;
|
|
471
|
-
return layout === 'vertical'
|
|
472
|
-
? {
|
|
473
|
-
maxWidth: vw * maxWidthRatio,
|
|
474
|
-
maxHeight: vh,
|
|
475
|
-
}
|
|
476
|
-
: {
|
|
477
|
-
maxWidth: vw,
|
|
478
|
-
maxHeight: vh * maxHeightRatio,
|
|
479
|
-
};
|
|
480
|
-
};
|
|
481
|
-
return Legend;
|
|
482
|
-
}(Controller));
|
|
483
|
-
export default Legend;
|
|
484
|
-
//# sourceMappingURL=legend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legend.js","sourceRoot":"","sources":["../../../src/chart/controller/legend.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAa,cAAc,EAAE,gBAAgB,EAAuC,MAAM,kBAAkB,CAAC;AAEpH,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAE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AC1B,CAAC,CAAC;gBACE,QAAQ,EAAE,EAAE,GAAG,aAAa;gBAC5B,SAAS,EAAE,EAAE;aACd;YACH,CAAC,CAAC;gBACE,QAAQ,EAAE,EAAE;gBACZ,SAAS,EAAE,EAAE,GAAG,cAAc;aAC/B,CAAC;IACR,CAAC;IACH,aAAC;AAAD,CAAC,AA/gBD,CAAoC,UAAU,GA+gB7C","sourcesContent":["import { deepMix, each, find, get, head, isBoolean, last } from '@antv/util';\nimport { COMPONENT_MAX_VIEW_PERCENTAGE, COMPONENT_TYPE, DIRECTION, LAYER } from '../../constant';\nimport { Attribute, CategoryLegend, ContinuousLegend, GroupComponent, IGroup, Scale, Tick } from '../../dependents';\nimport { ComponentOption, LegendCfg, LegendOption, LooseObject, AllLegendsOptions, Padding } from '../../interface';\nimport { DEFAULT_ANIMATE_CFG } from '../../animate';\nimport Geometry from '../../geometry/base';\nimport { BBox } from '../../util/bbox';\nimport { directionToPosition } from '../../util/direction';\nimport { omit } from '../../util/helper';\nimport { getCustomLegendItems, getLegendItems, getLegendLayout, getLegendThemeCfg } from '../../util/legend';\nimport { getName } from '../../util/scale';\nimport View from '../view';\nimport { Controller } from './base';\n\ntype DoEach = (geometry: Geometry, attr: Attribute, scale: Scale) => void;\n\n/**\n * 从配置中获取单个字段的 legend 配置\n * @param legends\n * @param field\n * @returns the option of one legend field\n */\nfunction getLegendOption(legends: AllLegendsOptions, field: string) {\n if (isBoolean(legends)) {\n return legends === false ? false : {};\n }\n\n return get(legends, [field], legends);\n}\n\nfunction getDirection(legendOption: any): DIRECTION {\n return get(legendOption, 'position', DIRECTION.BOTTOM);\n}\n\n/**\n * @ignore\n * legend Controller\n */\nexport default class Legend extends Controller<AllLegendsOptions> {\n /** the draw group of axis */\n private container: IGroup;\n /** 用于多个 legend 布局的 bbox */\n private layoutBBox: BBox;\n\n constructor(view: View) {\n super(view);\n\n this.container = this.view.getLayer(LAYER.FORE).addGroup();\n }\n\n public get name(): string {\n return 'legend';\n }\n\n public init() {}\n\n /**\n * render the legend component by legend options\n */\n public render() {\n // 和 update 逻辑保持一致\n this.update();\n }\n\n /**\n * layout legend\n * 计算出 legend 的 direction 位置 x, y\n */\n public layout() {\n this.layoutBBox = this.view.viewBBox;\n\n each(this.components, (co: ComponentOption) => {\n const { component, direction } = co;\n const layout = getLegendLayout(direction);\n const maxWidthRatio = component.get('maxWidthRatio');\n const maxHeightRatio = component.get('maxHeightRatio');\n\n const maxSize = this.getCategoryLegendSizeCfg(layout, maxWidthRatio, maxHeightRatio);\n\n const maxWidth = component.get('maxWidth');\n const maxHeight = component.get('maxHeight');\n\n // 先更新 maxSize,更新 layoutBBox,以便计算正确的 x y\n component.update({\n maxWidth: Math.min(maxSize.maxWidth, maxWidth || 0),\n maxHeight: Math.min(maxSize.maxHeight, maxHeight || 0),\n });\n\n const padding = component.get('padding') as Padding;\n\n const bboxObject = component.getLayoutBBox(); // 这里只需要他的 width、height 信息做位置调整\n const bbox = new BBox(bboxObject.x, bboxObject.y, bboxObject.width, bboxObject.height).expand(padding);\n\n const [x1, y1] = directionToPosition(this.view.viewBBox, bbox, direction);\n const [x2, y2] = directionToPosition(this.layoutBBox, bbox, direction);\n\n let x = 0;\n let y = 0;\n\n // 因为 legend x y 要和 coordinateBBox 对齐,所以要做一个简单的判断\n if (direction.startsWith('top') || direction.startsWith('bottom')) {\n x = x1;\n y = y2;\n } else {\n x = x2;\n y = y1;\n }\n\n // 更新位置\n component.setLocation({ x: x + padding[3], y: y + padding[0] });\n\n this.layoutBBox = this.layoutBBox.cut(bbox, direction);\n });\n }\n\n /**\n * legend 的更新逻辑\n */\n public update() {\n this.option = this.view.getOptions().legends;\n\n // 已经处理过的 legend\n const updated: Record<string, true> = {};\n\n const eachLegend = (geometry: Geometry, attr: Attribute, scale: Scale) => {\n const id = this.getId(scale.field);\n\n const existCo = this.getComponentById(id);\n\n // 存在则 update\n if (existCo) {\n let cfg;\n const legendOption = getLegendOption(this.option, scale.field);\n\n // if the legend option is not false, means legend should be created.\n if (legendOption !== false) {\n if (get(legendOption, 'custom')) {\n cfg = this.getCategoryCfg(geometry, attr, scale, legendOption, true);\n } else {\n if (scale.isLinear) {\n // linear field, create continuous legend\n cfg = this.getContinuousCfg(geometry, attr, scale, legendOption);\n } else if (scale.isCategory) {\n // category field, create category legend\n cfg = this.getCategoryCfg(geometry, attr, scale, legendOption);\n }\n }\n }\n\n // 如果 cfg 为空,则不在 updated 标记,那么会在后面逻辑中删除\n if (cfg) {\n // omit 掉一些属性,比如 container 等\n omit(cfg, ['container']);\n\n existCo.direction = getDirection(legendOption);\n\n existCo.component.update(cfg);\n\n // 标记为新的\n updated[id] = true;\n }\n } else {\n // 不存在则 create\n const legend = this.createFieldLegend(geometry, attr, scale);\n\n if (legend) {\n (legend.component as GroupComponent).init();\n this.components.push(legend);\n\n // 标记为新的\n updated[id] = true;\n }\n }\n };\n\n // 全局自定义图例\n if (get(this.option, 'custom')) {\n const id = 'global-custom';\n const existCo = this.getComponentById(id);\n if (existCo) {\n const customCfg = this.getCategoryCfg(undefined, undefined, undefined, this.option, true);\n omit(customCfg, ['container']);\n existCo.component.update(customCfg);\n\n updated[id] = true;\n } else {\n const component = this.createCustomLegend(undefined, undefined, undefined, this.option as LegendCfg);\n if (component) {\n component.init();\n\n const layer = LAYER.FORE;\n const direction = getDirection(this.option);\n\n this.components.push({\n id,\n component,\n layer,\n direction,\n type: COMPONENT_TYPE.LEGEND,\n extra: undefined,\n });\n\n // 标记为更新\n updated[id] = true;\n }\n }\n } else {\n // 遍历处理每一个创建逻辑\n this.loopLegends(eachLegend);\n }\n\n // 处理完成之后,销毁删除的\n // 不在处理中的\n const components = [];\n each(this.getComponents(), (co: ComponentOption) => {\n if (updated[co.id]) {\n components.push(co);\n } else {\n co.component.destroy();\n }\n });\n\n // 更新当前已有的 components\n this.components = components;\n }\n\n public clear() {\n super.clear();\n this.container.clear();\n }\n\n public destroy() {\n super.destroy();\n\n this.container.remove(true);\n }\n\n /**\n * 递归获取所有的 Geometry\n */\n private getGeometries(view: View): Geometry[] {\n let geometries = view.geometries;\n\n each(view.views, (v: View) => {\n geometries = geometries.concat(this.getGeometries(v));\n });\n\n return geometries;\n }\n\n /**\n * 遍历 Geometry,处理 legend 逻辑\n * @param doEach 每个 loop 中的处理方法\n */\n private loopLegends(doEach: DoEach) {\n const isRootView = this.view.getRootView() === this.view;\n // 非根 view,不处理 legend\n if (!isRootView) {\n return;\n }\n\n // 递归 view 中所有的 Geometry,进行创建 legend\n const geometries = this.getGeometries(this.view);\n\n const looped: Record<string, true> = {}; // 防止一个字段创建两个 legend\n\n each(geometries, (geometry: Geometry) => {\n const attributes = geometry.getGroupAttributes();\n\n each(attributes, (attr: Attribute) => {\n const scale = attr.getScale(attr.type);\n // 如果在视觉通道上映射常量值,如 size(2) shape('circle') 不创建 legend\n if (!scale || scale.type === 'identity' || looped[scale.field]) {\n return;\n }\n\n doEach(geometry, attr, scale);\n\n looped[scale.field] = true;\n });\n });\n }\n\n /**\n * 创建一个 legend\n * @param geometry\n * @param attr\n * @param scale\n */\n private createFieldLegend(geometry: Geometry, attr: Attribute, scale: Scale): ComponentOption {\n let component;\n\n const legendOption = getLegendOption(this.option, scale.field);\n const layer = LAYER.FORE;\n const direction = getDirection(legendOption);\n\n // if the legend option is not false, means legend should be created.\n if (legendOption !== false) {\n if (get(legendOption, 'custom')) {\n component = this.createCustomLegend(geometry, attr, scale, legendOption);\n } else {\n if (scale.isLinear) {\n // linear field, create continuous legend\n component = this.createContinuousLegend(geometry, attr, scale, legendOption);\n } else if (scale.isCategory) {\n // category field, create category legend\n component = this.createCategoryLegend(geometry, attr, scale, legendOption);\n }\n }\n }\n\n if (component) {\n component.set('field', scale.field);\n\n return {\n id: this.getId(scale.field),\n component,\n layer,\n direction,\n type: COMPONENT_TYPE.LEGEND,\n extra: { scale },\n };\n }\n }\n\n /**\n * 自定义图例使用 category 图例去渲染\n * @param geometry\n * @param attr\n * @param scale\n * @param legendOption\n */\n private createCustomLegend(geometry: Geometry, attr: Attribute, scale: Scale, legendOption: LegendCfg) {\n // 直接使用 分类图例渲染\n const cfg = this.getCategoryCfg(geometry, attr, scale, legendOption, true);\n return new CategoryLegend(cfg);\n }\n\n /**\n * 创建连续图例\n * @param geometry\n * @param attr\n * @param scale\n * @param legendOption\n */\n private createContinuousLegend(geometry: Geometry, attr: Attribute, scale: Scale, legendOption: any) {\n const cfg = this.getContinuousCfg(geometry, attr, scale, omit(legendOption, ['value']));\n return new ContinuousLegend(cfg);\n }\n\n /**\n * 创建分类图例\n * @param geometry\n * @param attr\n * @param scale\n * @param legendOption\n */\n private createCategoryLegend(geometry: Geometry, attr: Attribute, scale: Scale, legendOption: any) {\n const cfg = this.getCategoryCfg(geometry, attr, scale, legendOption);\n return new CategoryLegend(cfg);\n }\n\n /**\n * 获得连续图例的配置\n * @param geometry\n * @param attr\n * @param scale\n * @param legendOption\n */\n private getContinuousCfg(geometry: Geometry, attr: Attribute, scale: Scale, legendOption: any) {\n const ticks = scale.getTicks();\n\n const containMin = find(ticks, (tick: Tick) => tick.value === 0);\n const containMax = find(ticks, (tick: Tick) => tick.value === 1);\n const items = ticks.map((tick: Tick) => {\n const { value, tickValue } = tick;\n const attrValue = attr.mapping(scale.invert(value)).join('');\n\n return {\n value: tickValue,\n attrValue,\n color: attrValue,\n scaleValue: value,\n };\n });\n\n if (!containMin) {\n items.push({\n value: scale.min,\n attrValue: attr.mapping(scale.invert(0)).join(''),\n color: attr.mapping(scale.invert(0)).join(''),\n scaleValue: 0,\n });\n }\n if (!containMax) {\n items.push({\n value: scale.max,\n attrValue: attr.mapping(scale.invert(1)).join(''),\n color: attr.mapping(scale.invert(1)).join(''),\n scaleValue: 1,\n });\n }\n\n // 排序\n items.sort((a: any, b: any) => a.value - b.value);\n\n // 跟 attr 相关的配置\n // size color 区别的配置\n const attrLegendCfg: LooseObject = {\n min: head(items).value,\n max: last(items).value,\n colors: [],\n rail: {\n type: attr.type,\n },\n track: {},\n };\n\n if (attr.type === 'size') {\n attrLegendCfg.track = {\n style: {\n // size 的选中前景色,对于 color,则直接使用 color 标识\n // @ts-ignore\n fill: attr.type === 'size' ? this.view.getTheme().defaultColor : undefined,\n },\n };\n }\n\n if (attr.type === 'color') {\n attrLegendCfg.colors = items.map((item) => item.attrValue);\n }\n\n const container = this.container;\n // if position is not set, use top as default\n const direction = getDirection(legendOption);\n\n const layout = getLegendLayout(direction);\n\n let title = get(legendOption, 'title');\n if (title) {\n title = deepMix(\n {\n text: getName(scale),\n },\n title\n );\n }\n\n // 基础配置,从当前数据中读到的配置\n attrLegendCfg.container = container;\n attrLegendCfg.layout = layout;\n attrLegendCfg.title = title;\n attrLegendCfg.animateOption = DEFAULT_ANIMATE_CFG;\n // @ts-ignore\n return this.mergeLegendCfg(attrLegendCfg, legendOption, 'continuous');\n }\n\n /**\n * 获取分类图例的配置项\n * @param geometry\n * @param attr\n * @param scale\n * @param custom\n * @param legendOption\n */\n private getCategoryCfg(geometry: Geometry, attr: Attribute, scale: Scale, legendOption: any, custom?: boolean) {\n const container = this.container;\n // if position is not set, use top as default\n const direction = get(legendOption, 'position', DIRECTION.BOTTOM);\n\n const legendTheme = getLegendThemeCfg(this.view.getTheme(), direction);\n\n // the default marker style\n const themeMarker = get(legendTheme, ['marker']);\n const userMarker = get(legendOption, 'marker');\n const layout = getLegendLayout(direction);\n const themePageNavigator = get(legendTheme, ['pageNavigator']);\n const userPageNavigator = get(legendOption, 'pageNavigator');\n\n const items = custom\n ? getCustomLegendItems(themeMarker, userMarker, legendOption.items)\n : getLegendItems(this.view, geometry, attr, themeMarker, userMarker);\n\n let title = get(legendOption, 'title');\n if (title) {\n title = deepMix(\n {\n text: scale ? getName(scale) : '',\n },\n title\n );\n }\n const maxWidthRatio = get(legendOption, 'maxWidthRatio');\n const maxHeightRatio = get(legendOption, 'maxHeightRatio');\n\n const baseCfg: LooseObject = this.getCategoryLegendSizeCfg(layout, maxWidthRatio, maxHeightRatio);\n baseCfg.container = container;\n baseCfg.layout = layout;\n baseCfg.items = items;\n baseCfg.title = title;\n baseCfg.animateOption = DEFAULT_ANIMATE_CFG;\n baseCfg.pageNavigator = deepMix({}, themePageNavigator, userPageNavigator);\n\n const categoryCfg = this.mergeLegendCfg(baseCfg, legendOption, direction);\n if (categoryCfg.reversed) {\n // 图例项需要逆序\n categoryCfg.items.reverse();\n }\n\n const maxItemWidth = get(categoryCfg, 'maxItemWidth');\n if (maxItemWidth && maxItemWidth <= 1) {\n // 转换成像素值\n categoryCfg.maxItemWidth = this.view.viewBBox.width * maxItemWidth;\n }\n\n return categoryCfg;\n }\n\n /**\n * get legend config, use option > suggestion > theme\n * @param baseCfg\n * @param legendOption\n * @param direction\n */\n private mergeLegendCfg(baseCfg: object, legendOption: LegendOption, direction: DIRECTION) {\n const position = direction.split('-')[0];\n const themeObject = getLegendThemeCfg(this.view.getTheme(), position);\n\n return deepMix({}, themeObject, baseCfg, legendOption);\n }\n\n /**\n * 生成 id\n * @param key\n */\n private getId(key: string): string {\n return `${this.name}-${key}`;\n }\n\n /**\n * 根据 id 来获取组件\n * @param id\n */\n private getComponentById(id: string): ComponentOption {\n return find(this.components, (co) => co.id === id);\n }\n\n private getCategoryLegendSizeCfg(\n layout: 'horizontal' | 'vertical',\n maxWidthRatio = COMPONENT_MAX_VIEW_PERCENTAGE,\n maxHeightRatio = COMPONENT_MAX_VIEW_PERCENTAGE\n ) {\n const { width: vw, height: vh } = this.view.viewBBox;\n // 目前 legend 的布局是以 viewBBox 为参照\n // const { width: cw, height: ch } = this.view.coordinateBBox;\n return layout === 'vertical'\n ? {\n maxWidth: vw * maxWidthRatio,\n maxHeight: vh,\n }\n : {\n maxWidth: vw,\n maxHeight: vh * maxHeightRatio,\n };\n }\n}\n"]}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Controller } from './base';
|
|
2
|
-
import { ScrollbarOption, ComponentOption } from '../../interface';
|
|
3
|
-
import View from '../view';
|
|
4
|
-
export default class Scrollbar extends Controller<ScrollbarOption> {
|
|
5
|
-
private scrollbar;
|
|
6
|
-
private container;
|
|
7
|
-
private trackLen;
|
|
8
|
-
private thumbLen;
|
|
9
|
-
private cnt;
|
|
10
|
-
private step;
|
|
11
|
-
private ratio;
|
|
12
|
-
private data;
|
|
13
|
-
private xScaleCfg;
|
|
14
|
-
private yScalesCfg;
|
|
15
|
-
private onChangeFn;
|
|
16
|
-
constructor(view: View);
|
|
17
|
-
get name(): string;
|
|
18
|
-
destroy(): void;
|
|
19
|
-
init(): void;
|
|
20
|
-
/**
|
|
21
|
-
* 渲染
|
|
22
|
-
*/
|
|
23
|
-
render(): void;
|
|
24
|
-
/**
|
|
25
|
-
* 布局
|
|
26
|
-
*/
|
|
27
|
-
layout(): void;
|
|
28
|
-
/**
|
|
29
|
-
* 更新
|
|
30
|
-
*/
|
|
31
|
-
update(): void;
|
|
32
|
-
getComponents(): ComponentOption[];
|
|
33
|
-
clear(): void;
|
|
34
|
-
/** 设置滚动条位置 */
|
|
35
|
-
setValue(ratio: number): void;
|
|
36
|
-
/** 获得滚动条位置 */
|
|
37
|
-
getValue(): number;
|
|
38
|
-
/**
|
|
39
|
-
* 获取 scrollbar 的主题配置
|
|
40
|
-
*/
|
|
41
|
-
private getThemeOptions;
|
|
42
|
-
/**
|
|
43
|
-
* 获取 scrollbar 组件的主题样式
|
|
44
|
-
*/
|
|
45
|
-
private getScrollbarTheme;
|
|
46
|
-
private resetMeasure;
|
|
47
|
-
private onValueChange;
|
|
48
|
-
private measureScrollbar;
|
|
49
|
-
private getScrollRange;
|
|
50
|
-
private changeViewData;
|
|
51
|
-
private createScrollbar;
|
|
52
|
-
private updateScrollbar;
|
|
53
|
-
private getStep;
|
|
54
|
-
private getCnt;
|
|
55
|
-
private getScrollbarComponentCfg;
|
|
56
|
-
/**
|
|
57
|
-
* 填充一些默认的配置项目
|
|
58
|
-
*/
|
|
59
|
-
private getValidScrollbarCfg;
|
|
60
|
-
/**
|
|
61
|
-
* 获取数据
|
|
62
|
-
*/
|
|
63
|
-
private getScrollbarData;
|
|
64
|
-
}
|