@antv/g6 5.0.0-beta.33 → 5.0.0-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g6.min.js +2 -2
- package/dist/lib/animations/types.d.ts +3 -4
- package/dist/lib/behaviors/base-behavior.d.ts +2 -1
- package/dist/lib/behaviors/brush-select.d.ts +33 -16
- package/dist/lib/behaviors/click-element.d.ts +28 -5
- package/dist/lib/behaviors/collapse-expand.d.ts +3 -2
- package/dist/lib/behaviors/create-edge.d.ts +1 -2
- package/dist/lib/behaviors/drag-canvas.d.ts +7 -0
- package/dist/lib/behaviors/drag-element-force.d.ts +1 -2
- package/dist/lib/behaviors/drag-element.d.ts +4 -5
- package/dist/lib/behaviors/index.d.ts +2 -0
- package/dist/lib/behaviors/lasso-select.d.ts +4 -4
- package/dist/lib/behaviors/scroll-canvas.d.ts +64 -0
- package/dist/lib/behaviors/types.d.ts +2 -1
- package/dist/lib/behaviors/zoom-canvas.d.ts +1 -1
- package/dist/lib/constants/events/animation.d.ts +1 -4
- package/dist/lib/constants/events/graph.d.ts +5 -1
- package/dist/lib/elements/combos/base-combo.d.ts +1 -1
- package/dist/lib/elements/edges/base-edge.d.ts +0 -5
- package/dist/lib/elements/nodes/base-node.d.ts +3 -10
- package/dist/lib/elements/nodes/donut.d.ts +45 -0
- package/dist/lib/elements/nodes/html.d.ts +27 -0
- package/dist/lib/elements/nodes/index.d.ts +4 -0
- package/dist/lib/elements/shapes/badge.d.ts +1 -1
- package/dist/lib/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
- package/dist/lib/elements/shapes/index.d.ts +2 -0
- package/dist/lib/exports.d.ts +15 -22
- package/dist/lib/plugins/bubble-sets.d.ts +45 -0
- package/dist/lib/plugins/camera-setting.d.ts +4 -2
- package/dist/lib/plugins/contextmenu.d.ts +1 -0
- package/dist/lib/plugins/grid-line.d.ts +51 -8
- package/dist/lib/plugins/hull/index.d.ts +44 -13
- package/dist/lib/plugins/index.d.ts +4 -0
- package/dist/lib/plugins/timebar.d.ts +225 -0
- package/dist/lib/plugins/tooltip.d.ts +2 -2
- package/dist/lib/registry/index.d.ts +1 -1
- package/dist/lib/runtime/data.d.ts +13 -7
- package/dist/lib/runtime/element.d.ts +6 -10
- package/dist/lib/runtime/graph.d.ts +532 -45
- package/dist/lib/runtime/types.d.ts +3 -3
- package/dist/lib/runtime/viewport.d.ts +3 -4
- package/dist/lib/spec/canvas.d.ts +6 -2
- package/dist/lib/spec/data.d.ts +74 -1
- package/dist/lib/spec/element/combo.d.ts +17 -6
- package/dist/lib/spec/element/edge.d.ts +14 -2
- package/dist/lib/spec/element/node.d.ts +19 -3
- package/{lib/spec/spec.d.ts → dist/lib/spec/graph.d.ts} +12 -4
- package/dist/lib/spec/index.d.ts +1 -1
- package/dist/lib/spec/theme.d.ts +1 -4
- package/dist/lib/spec/viewport.d.ts +1 -1
- package/dist/lib/themes/base.d.ts +1 -0
- package/dist/lib/themes/types.d.ts +0 -1
- package/dist/lib/transforms/process-parallel-edges.d.ts +2 -3
- package/dist/lib/transforms/types.d.ts +1 -1
- package/dist/lib/types/callable.d.ts +2 -2
- package/dist/lib/types/data.d.ts +3 -3
- package/dist/lib/types/id.d.ts +1 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/style.d.ts +1 -3
- package/dist/lib/types/viewport.d.ts +4 -4
- package/dist/lib/utils/animation.d.ts +6 -6
- package/dist/lib/utils/behaviors/brush.d.ts +1 -2
- package/dist/lib/utils/behaviors/lasso.d.ts +1 -2
- package/dist/lib/utils/behaviors/utils.d.ts +1 -1
- package/dist/lib/utils/data.d.ts +2 -2
- package/dist/lib/utils/edge.d.ts +1 -2
- package/dist/lib/utils/element.d.ts +1 -1
- package/dist/lib/utils/event/events.d.ts +1 -1
- package/dist/lib/utils/event/index.d.ts +1 -1
- package/dist/lib/utils/id.d.ts +2 -3
- package/dist/lib/utils/palette.d.ts +2 -3
- package/dist/lib/utils/relation.d.ts +3 -4
- package/dist/lib/utils/visibility.d.ts +1 -1
- package/esm/animations/types.d.ts +3 -4
- package/esm/behaviors/base-behavior.d.ts +2 -1
- package/esm/behaviors/brush-select.d.ts +33 -16
- package/esm/behaviors/brush-select.js +7 -2
- package/esm/behaviors/brush-select.js.map +1 -1
- package/esm/behaviors/click-element.d.ts +28 -5
- package/esm/behaviors/click-element.js +11 -0
- package/esm/behaviors/click-element.js.map +1 -1
- package/esm/behaviors/collapse-expand.d.ts +3 -2
- package/esm/behaviors/collapse-expand.js +2 -2
- package/esm/behaviors/collapse-expand.js.map +1 -1
- package/esm/behaviors/create-edge.d.ts +1 -2
- package/esm/behaviors/create-edge.js.map +1 -1
- package/esm/behaviors/drag-canvas.d.ts +7 -0
- package/esm/behaviors/drag-canvas.js.map +1 -1
- package/esm/behaviors/drag-element-force.d.ts +1 -2
- package/esm/behaviors/drag-element-force.js.map +1 -1
- package/esm/behaviors/drag-element.d.ts +4 -5
- package/esm/behaviors/drag-element.js.map +1 -1
- package/esm/behaviors/focus-element.js.map +1 -1
- package/esm/behaviors/hover-element.js.map +1 -1
- package/esm/behaviors/index.d.ts +2 -0
- package/esm/behaviors/index.js +1 -0
- package/esm/behaviors/index.js.map +1 -1
- package/esm/behaviors/lasso-select.d.ts +4 -4
- package/esm/behaviors/lasso-select.js +1 -1
- package/esm/behaviors/lasso-select.js.map +1 -1
- package/esm/behaviors/scroll-canvas.d.ts +64 -0
- package/esm/behaviors/scroll-canvas.js +80 -0
- package/esm/behaviors/scroll-canvas.js.map +1 -0
- package/esm/behaviors/types.d.ts +2 -1
- package/esm/behaviors/zoom-canvas.d.ts +1 -1
- package/esm/constants/events/animation.d.ts +1 -4
- package/esm/constants/events/animation.js +0 -4
- package/esm/constants/events/animation.js.map +1 -1
- package/esm/constants/events/graph.d.ts +5 -1
- package/esm/constants/events/graph.js +4 -0
- package/esm/constants/events/graph.js.map +1 -1
- package/esm/elements/combos/base-combo.d.ts +1 -1
- package/esm/elements/edges/base-edge.d.ts +0 -5
- package/esm/elements/edges/base-edge.js +1 -2
- package/esm/elements/edges/base-edge.js.map +1 -1
- package/esm/elements/nodes/base-node.d.ts +3 -10
- package/esm/elements/nodes/base-node.js +2 -2
- package/esm/elements/nodes/base-node.js.map +1 -1
- package/esm/elements/nodes/donut.d.ts +45 -0
- package/esm/elements/nodes/donut.js +81 -0
- package/esm/elements/nodes/donut.js.map +1 -0
- package/esm/elements/nodes/html.d.ts +27 -0
- package/esm/elements/nodes/html.js +209 -0
- package/esm/elements/nodes/html.js.map +1 -0
- package/esm/elements/nodes/index.d.ts +4 -0
- package/esm/elements/nodes/index.js +2 -0
- package/esm/elements/nodes/index.js.map +1 -1
- package/esm/elements/shapes/badge.d.ts +1 -1
- package/esm/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
- package/esm/{plugins/hull/shape.js → elements/shapes/contour.js} +12 -11
- package/esm/elements/shapes/contour.js.map +1 -0
- package/esm/elements/shapes/index.d.ts +2 -0
- package/esm/elements/shapes/index.js +1 -0
- package/esm/elements/shapes/index.js.map +1 -1
- package/esm/exports.d.ts +15 -22
- package/esm/exports.js +8 -18
- package/esm/exports.js.map +1 -1
- package/esm/plugins/bubble-sets.d.ts +45 -0
- package/esm/plugins/bubble-sets.js +212 -0
- package/esm/plugins/bubble-sets.js.map +1 -0
- package/esm/plugins/camera-setting.d.ts +4 -2
- package/esm/plugins/camera-setting.js.map +1 -1
- package/esm/plugins/contextmenu.d.ts +1 -0
- package/esm/plugins/contextmenu.js +1 -0
- package/esm/plugins/contextmenu.js.map +1 -1
- package/esm/plugins/grid-line.d.ts +51 -8
- package/esm/plugins/grid-line.js.map +1 -1
- package/esm/plugins/history/utils.js +6 -2
- package/esm/plugins/history/utils.js.map +1 -1
- package/esm/plugins/hull/index.d.ts +44 -13
- package/esm/plugins/hull/index.js +46 -16
- package/esm/plugins/hull/index.js.map +1 -1
- package/esm/plugins/index.d.ts +4 -0
- package/esm/plugins/index.js +2 -0
- package/esm/plugins/index.js.map +1 -1
- package/esm/plugins/legend.js +4 -2
- package/esm/plugins/legend.js.map +1 -1
- package/esm/plugins/timebar.d.ts +225 -0
- package/esm/plugins/timebar.js +253 -0
- package/esm/plugins/timebar.js.map +1 -0
- package/esm/plugins/tooltip.d.ts +2 -2
- package/esm/registry/build-in.js +15 -10
- package/esm/registry/build-in.js.map +1 -1
- package/esm/registry/index.d.ts +1 -1
- package/esm/registry/index.js +1 -1
- package/esm/runtime/canvas.js +7 -4
- package/esm/runtime/canvas.js.map +1 -1
- package/esm/runtime/data.d.ts +13 -7
- package/esm/runtime/data.js +20 -3
- package/esm/runtime/data.js.map +1 -1
- package/esm/runtime/element.d.ts +6 -10
- package/esm/runtime/element.js +65 -46
- package/esm/runtime/element.js.map +1 -1
- package/esm/runtime/graph.d.ts +532 -45
- package/esm/runtime/graph.js +418 -40
- package/esm/runtime/graph.js.map +1 -1
- package/esm/runtime/layout.js +2 -2
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/types.d.ts +3 -3
- package/esm/runtime/viewport.d.ts +3 -4
- package/esm/runtime/viewport.js +2 -2
- package/esm/runtime/viewport.js.map +1 -1
- package/esm/spec/canvas.d.ts +6 -2
- package/esm/spec/data.d.ts +74 -1
- package/esm/spec/element/combo.d.ts +17 -6
- package/esm/spec/element/edge.d.ts +14 -2
- package/esm/spec/element/node.d.ts +19 -3
- package/esm/spec/{spec.d.ts → graph.d.ts} +12 -4
- package/esm/spec/graph.js +2 -0
- package/esm/spec/graph.js.map +1 -0
- package/esm/spec/index.d.ts +1 -1
- package/esm/spec/theme.d.ts +1 -4
- package/esm/spec/viewport.d.ts +1 -1
- package/esm/themes/base.d.ts +1 -0
- package/esm/themes/base.js +11 -9
- package/esm/themes/base.js.map +1 -1
- package/esm/themes/types.d.ts +0 -1
- package/esm/transforms/process-parallel-edges.d.ts +2 -3
- package/esm/transforms/process-parallel-edges.js +2 -4
- package/esm/transforms/process-parallel-edges.js.map +1 -1
- package/esm/transforms/types.d.ts +1 -1
- package/esm/transforms/update-related-edge.js.map +1 -1
- package/esm/types/callable.d.ts +2 -2
- package/esm/types/data.d.ts +3 -3
- package/esm/types/id.d.ts +1 -0
- package/esm/types/id.js +2 -0
- package/esm/types/id.js.map +1 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/style.d.ts +1 -3
- package/esm/types/viewport.d.ts +4 -4
- package/esm/utils/animation.d.ts +6 -6
- package/esm/utils/animation.js +3 -3
- package/esm/utils/animation.js.map +1 -1
- package/esm/utils/behaviors/brush.d.ts +1 -2
- package/esm/utils/behaviors/brush.js.map +1 -1
- package/esm/utils/behaviors/lasso.d.ts +1 -2
- package/esm/utils/behaviors/lasso.js.map +1 -1
- package/esm/utils/behaviors/utils.d.ts +1 -1
- package/esm/utils/change.js +8 -1
- package/esm/utils/change.js.map +1 -1
- package/esm/utils/data.d.ts +2 -2
- package/esm/utils/data.js +2 -2
- package/esm/utils/edge.d.ts +1 -2
- package/esm/utils/edge.js.map +1 -1
- package/esm/utils/element.d.ts +1 -1
- package/esm/utils/element.js +2 -2
- package/esm/utils/event/events.d.ts +1 -1
- package/esm/utils/event/events.js.map +1 -1
- package/esm/utils/event/index.d.ts +1 -1
- package/esm/utils/event/index.js +1 -1
- package/esm/utils/id.d.ts +2 -3
- package/esm/utils/id.js.map +1 -1
- package/esm/utils/palette.d.ts +2 -3
- package/esm/utils/palette.js +1 -1
- package/esm/utils/palette.js.map +1 -1
- package/esm/utils/relation.d.ts +3 -4
- package/esm/utils/relation.js +2 -2
- package/esm/utils/relation.js.map +1 -1
- package/esm/utils/style.js +3 -3
- package/esm/utils/style.js.map +1 -1
- package/esm/utils/visibility.d.ts +1 -1
- package/esm/utils/visibility.js +1 -1
- package/lib/animations/types.d.ts +3 -4
- package/lib/behaviors/base-behavior.d.ts +2 -1
- package/lib/behaviors/brush-select.d.ts +33 -16
- package/lib/behaviors/brush-select.js +7 -2
- package/lib/behaviors/brush-select.js.map +1 -1
- package/lib/behaviors/click-element.d.ts +28 -5
- package/lib/behaviors/click-element.js +11 -0
- package/lib/behaviors/click-element.js.map +1 -1
- package/lib/behaviors/collapse-expand.d.ts +3 -2
- package/lib/behaviors/collapse-expand.js +2 -2
- package/lib/behaviors/collapse-expand.js.map +1 -1
- package/lib/behaviors/create-edge.d.ts +1 -2
- package/lib/behaviors/create-edge.js.map +1 -1
- package/lib/behaviors/drag-canvas.d.ts +7 -0
- package/lib/behaviors/drag-canvas.js.map +1 -1
- package/lib/behaviors/drag-element-force.d.ts +1 -2
- package/lib/behaviors/drag-element-force.js.map +1 -1
- package/lib/behaviors/drag-element.d.ts +4 -5
- package/lib/behaviors/drag-element.js.map +1 -1
- package/lib/behaviors/focus-element.js.map +1 -1
- package/lib/behaviors/hover-element.js.map +1 -1
- package/lib/behaviors/index.d.ts +2 -0
- package/lib/behaviors/index.js +3 -1
- package/lib/behaviors/index.js.map +1 -1
- package/lib/behaviors/lasso-select.d.ts +4 -4
- package/lib/behaviors/lasso-select.js +1 -1
- package/lib/behaviors/lasso-select.js.map +1 -1
- package/lib/behaviors/scroll-canvas.d.ts +64 -0
- package/lib/behaviors/scroll-canvas.js +84 -0
- package/lib/behaviors/scroll-canvas.js.map +1 -0
- package/lib/behaviors/types.d.ts +2 -1
- package/lib/behaviors/zoom-canvas.d.ts +1 -1
- package/lib/constants/events/animation.d.ts +1 -4
- package/lib/constants/events/animation.js +0 -4
- package/lib/constants/events/animation.js.map +1 -1
- package/lib/constants/events/graph.d.ts +5 -1
- package/lib/constants/events/graph.js +4 -0
- package/lib/constants/events/graph.js.map +1 -1
- package/lib/elements/combos/base-combo.d.ts +1 -1
- package/lib/elements/edges/base-edge.d.ts +0 -5
- package/lib/elements/edges/base-edge.js +1 -2
- package/lib/elements/edges/base-edge.js.map +1 -1
- package/lib/elements/nodes/base-node.d.ts +3 -10
- package/lib/elements/nodes/base-node.js +2 -2
- package/lib/elements/nodes/base-node.js.map +1 -1
- package/lib/elements/nodes/donut.d.ts +45 -0
- package/lib/elements/nodes/donut.js +85 -0
- package/lib/elements/nodes/donut.js.map +1 -0
- package/lib/elements/nodes/html.d.ts +27 -0
- package/lib/elements/nodes/html.js +213 -0
- package/lib/elements/nodes/html.js.map +1 -0
- package/lib/elements/nodes/index.d.ts +4 -0
- package/lib/elements/nodes/index.js +5 -1
- package/lib/elements/nodes/index.js.map +1 -1
- package/lib/elements/shapes/badge.d.ts +1 -1
- package/lib/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
- package/lib/{plugins/hull/shape.js → elements/shapes/contour.js} +15 -14
- package/lib/elements/shapes/contour.js.map +1 -0
- package/lib/elements/shapes/index.d.ts +2 -0
- package/lib/elements/shapes/index.js +3 -1
- package/lib/elements/shapes/index.js.map +1 -1
- package/lib/exports.d.ts +15 -22
- package/lib/exports.js +50 -17
- package/lib/exports.js.map +1 -1
- package/lib/plugins/bubble-sets.d.ts +45 -0
- package/lib/plugins/bubble-sets.js +216 -0
- package/lib/plugins/bubble-sets.js.map +1 -0
- package/lib/plugins/camera-setting.d.ts +4 -2
- package/lib/plugins/camera-setting.js.map +1 -1
- package/lib/plugins/contextmenu.d.ts +1 -0
- package/lib/plugins/contextmenu.js +1 -0
- package/lib/plugins/contextmenu.js.map +1 -1
- package/lib/plugins/grid-line.d.ts +51 -8
- package/lib/plugins/grid-line.js.map +1 -1
- package/lib/plugins/history/utils.js +6 -2
- package/lib/plugins/history/utils.js.map +1 -1
- package/lib/plugins/hull/index.d.ts +44 -13
- package/lib/plugins/hull/index.js +46 -16
- package/lib/plugins/hull/index.js.map +1 -1
- package/lib/plugins/index.d.ts +4 -0
- package/lib/plugins/index.js +5 -1
- package/lib/plugins/index.js.map +1 -1
- package/lib/plugins/legend.js +4 -2
- package/lib/plugins/legend.js.map +1 -1
- package/lib/plugins/timebar.d.ts +225 -0
- package/lib/plugins/timebar.js +257 -0
- package/lib/plugins/timebar.js.map +1 -0
- package/lib/plugins/tooltip.d.ts +2 -2
- package/lib/registry/build-in.js +12 -7
- package/lib/registry/build-in.js.map +1 -1
- package/lib/registry/index.d.ts +1 -1
- package/lib/registry/index.js +1 -1
- package/lib/runtime/canvas.js +7 -4
- package/lib/runtime/canvas.js.map +1 -1
- package/lib/runtime/data.d.ts +13 -7
- package/lib/runtime/data.js +20 -3
- package/lib/runtime/data.js.map +1 -1
- package/lib/runtime/element.d.ts +6 -10
- package/lib/runtime/element.js +64 -45
- package/lib/runtime/element.js.map +1 -1
- package/lib/runtime/graph.d.ts +532 -45
- package/lib/runtime/graph.js +417 -39
- package/lib/runtime/graph.js.map +1 -1
- package/lib/runtime/layout.js +2 -2
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/types.d.ts +3 -3
- package/lib/runtime/viewport.d.ts +3 -4
- package/lib/runtime/viewport.js +2 -2
- package/lib/runtime/viewport.js.map +1 -1
- package/lib/spec/canvas.d.ts +6 -2
- package/lib/spec/data.d.ts +74 -1
- package/lib/spec/element/combo.d.ts +17 -6
- package/lib/spec/element/edge.d.ts +14 -2
- package/lib/spec/element/node.d.ts +19 -3
- package/{dist/lib/spec/spec.d.ts → lib/spec/graph.d.ts} +12 -4
- package/lib/spec/{spec.js → graph.js} +1 -1
- package/lib/spec/graph.js.map +1 -0
- package/lib/spec/index.d.ts +1 -1
- package/lib/spec/theme.d.ts +1 -4
- package/lib/spec/viewport.d.ts +1 -1
- package/lib/themes/base.d.ts +1 -0
- package/lib/themes/base.js +11 -9
- package/lib/themes/base.js.map +1 -1
- package/lib/themes/types.d.ts +0 -1
- package/lib/transforms/process-parallel-edges.d.ts +2 -3
- package/lib/transforms/process-parallel-edges.js +2 -4
- package/lib/transforms/process-parallel-edges.js.map +1 -1
- package/lib/transforms/types.d.ts +1 -1
- package/lib/transforms/update-related-edge.js.map +1 -1
- package/lib/types/callable.d.ts +2 -2
- package/lib/types/data.d.ts +3 -3
- package/lib/types/id.d.ts +1 -0
- package/lib/{spec/element/base.js → types/id.js} +1 -1
- package/lib/types/id.js.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/style.d.ts +1 -3
- package/lib/types/viewport.d.ts +4 -4
- package/lib/utils/animation.d.ts +6 -6
- package/lib/utils/animation.js +3 -3
- package/lib/utils/animation.js.map +1 -1
- package/lib/utils/behaviors/brush.d.ts +1 -2
- package/lib/utils/behaviors/brush.js.map +1 -1
- package/lib/utils/behaviors/lasso.d.ts +1 -2
- package/lib/utils/behaviors/lasso.js.map +1 -1
- package/lib/utils/behaviors/utils.d.ts +1 -1
- package/lib/utils/change.js +8 -1
- package/lib/utils/change.js.map +1 -1
- package/lib/utils/data.d.ts +2 -2
- package/lib/utils/data.js +2 -2
- package/lib/utils/edge.d.ts +1 -2
- package/lib/utils/edge.js.map +1 -1
- package/lib/utils/element.d.ts +1 -1
- package/lib/utils/element.js +2 -2
- package/lib/utils/event/events.d.ts +1 -1
- package/lib/utils/event/events.js.map +1 -1
- package/lib/utils/event/index.d.ts +1 -1
- package/lib/utils/event/index.js +1 -1
- package/lib/utils/id.d.ts +2 -3
- package/lib/utils/id.js.map +1 -1
- package/lib/utils/palette.d.ts +2 -3
- package/lib/utils/palette.js +1 -1
- package/lib/utils/palette.js.map +1 -1
- package/lib/utils/relation.d.ts +3 -4
- package/lib/utils/relation.js +2 -2
- package/lib/utils/relation.js.map +1 -1
- package/lib/utils/style.js +3 -3
- package/lib/utils/style.js.map +1 -1
- package/lib/utils/visibility.d.ts +1 -1
- package/lib/utils/visibility.js +1 -1
- package/package.json +2 -1
- package/src/animations/types.ts +3 -4
- package/src/behaviors/base-behavior.ts +1 -1
- package/src/behaviors/brush-select.ts +34 -16
- package/src/behaviors/click-element.ts +29 -7
- package/src/behaviors/collapse-expand.ts +5 -4
- package/src/behaviors/create-edge.ts +1 -2
- package/src/behaviors/drag-canvas.ts +7 -0
- package/src/behaviors/drag-element-force.ts +1 -2
- package/src/behaviors/drag-element.ts +3 -4
- package/src/behaviors/focus-element.ts +1 -2
- package/src/behaviors/hover-element.ts +1 -2
- package/src/behaviors/index.ts +2 -0
- package/src/behaviors/lasso-select.ts +3 -4
- package/src/behaviors/scroll-canvas.ts +143 -0
- package/src/behaviors/types.ts +2 -1
- package/src/behaviors/zoom-canvas.ts +1 -1
- package/src/constants/events/animation.ts +0 -4
- package/src/constants/events/graph.ts +4 -0
- package/src/elements/combos/base-combo.ts +1 -1
- package/src/elements/edges/base-edge.ts +1 -7
- package/src/elements/nodes/base-node.ts +6 -15
- package/src/elements/nodes/donut.ts +137 -0
- package/src/elements/nodes/html.ts +230 -0
- package/src/elements/nodes/index.ts +4 -0
- package/src/{plugins/hull/shape.ts → elements/shapes/contour.ts} +27 -34
- package/src/elements/shapes/index.ts +2 -0
- package/src/exports.ts +124 -25
- package/src/plugins/bubble-sets.ts +268 -0
- package/src/plugins/camera-setting.ts +4 -2
- package/src/plugins/contextmenu.ts +1 -0
- package/src/plugins/grid-line.ts +51 -8
- package/src/plugins/history/utils.ts +6 -2
- package/src/plugins/hull/index.ts +58 -22
- package/src/plugins/index.ts +4 -0
- package/src/plugins/legend.ts +6 -4
- package/src/plugins/timebar.ts +450 -0
- package/src/plugins/tooltip.ts +2 -2
- package/src/registry/build-in.ts +27 -8
- package/src/registry/index.ts +1 -1
- package/src/runtime/canvas.ts +7 -4
- package/src/runtime/data.ts +23 -4
- package/src/runtime/element.ts +67 -40
- package/src/runtime/graph.ts +554 -56
- package/src/runtime/layout.ts +4 -4
- package/src/runtime/types.ts +3 -3
- package/src/runtime/viewport.ts +3 -4
- package/src/spec/canvas.ts +6 -2
- package/src/spec/data.ts +74 -1
- package/src/spec/element/combo.ts +17 -6
- package/src/spec/element/edge.ts +14 -2
- package/src/spec/element/node.ts +19 -3
- package/src/spec/{spec.ts → graph.ts} +12 -4
- package/src/spec/index.ts +1 -1
- package/src/spec/theme.ts +1 -5
- package/src/spec/viewport.ts +1 -1
- package/src/themes/base.ts +12 -9
- package/src/themes/types.ts +0 -2
- package/src/transforms/arrange-draw-order.ts +1 -1
- package/src/transforms/process-parallel-edges.ts +5 -7
- package/src/transforms/types.ts +1 -1
- package/src/transforms/update-related-edge.ts +1 -2
- package/src/types/callable.ts +2 -2
- package/src/types/data.ts +3 -3
- package/src/types/id.ts +1 -0
- package/src/types/index.ts +1 -0
- package/src/types/style.ts +1 -3
- package/src/types/viewport.ts +4 -4
- package/src/utils/animation.ts +6 -6
- package/src/utils/behaviors/brush.ts +1 -2
- package/src/utils/behaviors/lasso.ts +1 -2
- package/src/utils/behaviors/utils.ts +1 -1
- package/src/utils/change.ts +7 -3
- package/src/utils/data.ts +2 -2
- package/src/utils/edge.ts +1 -1
- package/src/utils/element.ts +2 -2
- package/src/utils/event/events.ts +3 -1
- package/src/utils/event/index.ts +1 -1
- package/src/utils/id.ts +1 -2
- package/src/utils/palette.ts +2 -2
- package/src/utils/relation.ts +3 -4
- package/src/utils/style.ts +3 -3
- package/src/utils/visibility.ts +1 -1
- package/dist/lib/runtime/index.d.ts +0 -6
- package/dist/lib/spec/element/base.d.ts +0 -6
- package/esm/plugins/hull/shape.js.map +0 -1
- package/esm/runtime/index.d.ts +0 -6
- package/esm/runtime/index.js +0 -7
- package/esm/runtime/index.js.map +0 -1
- package/esm/spec/element/base.d.ts +0 -6
- package/esm/spec/element/base.js +0 -2
- package/esm/spec/element/base.js.map +0 -1
- package/esm/spec/spec.js +0 -2
- package/esm/spec/spec.js.map +0 -1
- package/lib/plugins/hull/shape.js.map +0 -1
- package/lib/runtime/index.d.ts +0 -6
- package/lib/runtime/index.js +0 -8
- package/lib/runtime/index.js.map +0 -1
- package/lib/spec/element/base.d.ts +0 -6
- package/lib/spec/element/base.js.map +0 -1
- package/lib/spec/spec.js.map +0 -1
- package/src/runtime/index.ts +0 -7
- package/src/spec/element/base.ts +0 -6
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { BaseNode } from './base-node';
|
|
2
2
|
export { Circle } from './circle';
|
|
3
3
|
export { Diamond } from './diamond';
|
|
4
|
+
export { Donut } from './donut';
|
|
4
5
|
export { Ellipse } from './ellipse';
|
|
5
6
|
export { Hexagon } from './hexagon';
|
|
7
|
+
export { HTML } from './html';
|
|
6
8
|
export { Image } from './image';
|
|
7
9
|
export { Rect } from './rect';
|
|
8
10
|
export { Star } from './star';
|
|
@@ -10,8 +12,10 @@ export { Triangle } from './triangle';
|
|
|
10
12
|
export type { BaseNodeStyleProps } from './base-node';
|
|
11
13
|
export type { CircleStyleProps } from './circle';
|
|
12
14
|
export type { DiamondStyleProps } from './diamond';
|
|
15
|
+
export type { DonutStyleProps } from './donut';
|
|
13
16
|
export type { EllipseStyleProps } from './ellipse';
|
|
14
17
|
export type { HexagonStyleProps } from './hexagon';
|
|
18
|
+
export type { HTMLStyleProps } from './html';
|
|
15
19
|
export type { ImageStyleProps } from './image';
|
|
16
20
|
export type { RectStyleProps } from './rect';
|
|
17
21
|
export type { StarStyleProps } from './star';
|
|
@@ -7,7 +7,7 @@ type BadgeOptions = DisplayObjectConfig<BadgeStyleProps>;
|
|
|
7
7
|
export declare class Badge extends BaseShape<BadgeStyleProps> {
|
|
8
8
|
static defaultStyleProps: Partial<BadgeStyleProps>;
|
|
9
9
|
constructor(options: BadgeOptions);
|
|
10
|
-
protected getBadgeStyle(attributes: ParsedBadgeStyleProps): Omit<Required<LabelStyleProps>, "transform" | "x" | "y" | "z" | "
|
|
10
|
+
protected getBadgeStyle(attributes: ParsedBadgeStyleProps): Omit<Required<LabelStyleProps>, "transform" | "x" | "y" | "z" | "transformOrigin" | "zIndex" | "context" | "className">;
|
|
11
11
|
render(attributes?: ParsedBadgeStyleProps, container?: Group): void;
|
|
12
12
|
connectedCallback(): void;
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DisplayObjectConfig, Group, PathStyleProps } from '@antv/g';
|
|
2
|
-
import type { LabelStyleProps } from '../../elements/shapes';
|
|
3
|
-
import { BaseShape } from '../../elements/shapes';
|
|
4
2
|
import type { CardinalPlacement, PrefixObject } from '../../types';
|
|
5
|
-
type
|
|
3
|
+
import type { LabelStyleProps } from '../shapes';
|
|
4
|
+
import { BaseShape } from './base-shape';
|
|
5
|
+
interface ContourLabelStyleProps extends LabelStyleProps {
|
|
6
6
|
/**
|
|
7
7
|
* <zh/> 标签位置,可选值为 'top'、'right'、'bottom'、'left'、'center';默认为 'bottom'
|
|
8
8
|
* <en/> Label position, optional values are 'top', 'right', 'bottom', 'left', 'center'; default is 'bottom'
|
|
@@ -12,10 +12,10 @@ type HullLabelStyleProps = LabelStyleProps & {
|
|
|
12
12
|
* <zh/> 标签是否贴合轮廓,默认为 true
|
|
13
13
|
* <en/> Whether the label is close to the contour, default is true
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
closeToPath?: boolean;
|
|
16
16
|
/**
|
|
17
|
-
* <zh/> 标签是否跟随轮廓旋转,默认为 true,仅在
|
|
18
|
-
* <en/> Whether the label rotates with the contour, default is true. Only effective when
|
|
17
|
+
* <zh/> 标签是否跟随轮廓旋转,默认为 true,仅在 closeToPath 为 true 时生效
|
|
18
|
+
* <en/> Whether the label rotates with the contour, default is true. Only effective when closeToPath is true
|
|
19
19
|
*/
|
|
20
20
|
autoRotate?: boolean;
|
|
21
21
|
/**
|
|
@@ -33,17 +33,17 @@ type HullLabelStyleProps = LabelStyleProps & {
|
|
|
33
33
|
* <en/> The maximum width of the text, which will be automatically ellipsis if exceeded
|
|
34
34
|
*/
|
|
35
35
|
maxWidth?: number;
|
|
36
|
-
}
|
|
37
|
-
export type
|
|
36
|
+
}
|
|
37
|
+
export type ContourStyleProps = PathStyleProps & {
|
|
38
38
|
label?: boolean;
|
|
39
|
-
} & PrefixObject<
|
|
40
|
-
type
|
|
41
|
-
type
|
|
42
|
-
export declare class
|
|
43
|
-
static defaultStyleProps: Partial<
|
|
44
|
-
constructor(options:
|
|
45
|
-
protected getLabelStyle(attributes:
|
|
46
|
-
protected
|
|
47
|
-
render(attributes:
|
|
39
|
+
} & PrefixObject<ContourLabelStyleProps, 'label'>;
|
|
40
|
+
type ParsedContourStyleProps = Required<ContourStyleProps>;
|
|
41
|
+
type ContourOptions = DisplayObjectConfig<ContourStyleProps>;
|
|
42
|
+
export declare class Contour extends BaseShape<ContourStyleProps> {
|
|
43
|
+
static defaultStyleProps: Partial<ContourStyleProps>;
|
|
44
|
+
constructor(options: ContourOptions);
|
|
45
|
+
protected getLabelStyle(attributes: ParsedContourStyleProps): LabelStyleProps | false;
|
|
46
|
+
protected getKeyStyle(attributes: ParsedContourStyleProps): PathStyleProps;
|
|
47
|
+
render(attributes: ParsedContourStyleProps, container: Group): void;
|
|
48
48
|
}
|
|
49
49
|
export {};
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { Badge } from './badge';
|
|
7
7
|
export { BaseShape } from './base-shape';
|
|
8
|
+
export { Contour } from './contour';
|
|
8
9
|
export { Icon } from './icon';
|
|
9
10
|
export { Label } from './label';
|
|
10
11
|
export type { BadgeStyleProps } from './badge';
|
|
11
12
|
export type { BaseShapeStyleProps } from './base-shape';
|
|
13
|
+
export type { ContourStyleProps } from './contour';
|
|
12
14
|
export type { IconStyleProps } from './icon';
|
|
13
15
|
export type { LabelStyleProps } from './label';
|
package/dist/lib/exports.d.ts
CHANGED
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { omitStyleProps, subStyleProps } from './utils/prefix';
|
|
3
|
-
import { treeToGraphData } from './utils/tree';
|
|
4
|
-
export { BaseBehavior, DragCanvas, ZoomCanvas } from './behaviors';
|
|
1
|
+
export { BaseBehavior, BrushSelect, ClickElement, CollapseExpand, CreateEdge, DragCanvas, DragElement, DragElementForce, FocusElement, HoverElement, LassoSelect, ZoomCanvas, } from './behaviors';
|
|
5
2
|
export { CanvasEvent, ComboEvent, CommonEvent, ContainerEvent, EdgeEvent, ExtensionCategory, GraphEvent, NodeEvent, } from './constants';
|
|
6
3
|
export { BaseCombo, CircleCombo, RectCombo } from './elements/combos';
|
|
7
4
|
export { BaseEdge, Cubic, CubicHorizontal, CubicVertical, Line, Polyline, Quadratic } from './elements/edges';
|
|
8
|
-
export { BaseNode, Circle, Diamond, Ellipse, Hexagon, Image, Rect, Star, Triangle } from './elements/nodes';
|
|
5
|
+
export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
|
|
9
6
|
export { BaseShape } from './elements/shapes';
|
|
10
|
-
export {
|
|
7
|
+
export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3Force3DLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, compactBox, dendrogram, indented, mindmap, } from './layouts';
|
|
8
|
+
export { BasePlugin, BubbleSets, CameraSetting, Contextmenu, GridLine, History, Hull, Legend, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
|
|
11
9
|
export { getExtension, getExtensions, register } from './registry';
|
|
12
10
|
export { Graph } from './runtime/graph';
|
|
13
11
|
export { BaseTransform } from './transforms';
|
|
12
|
+
export { idOf } from './utils/id';
|
|
13
|
+
export { omitStyleProps, subStyleProps } from './utils/prefix';
|
|
14
14
|
export { Shortcut } from './utils/shortcut';
|
|
15
|
-
export
|
|
15
|
+
export { parseSize } from './utils/size';
|
|
16
|
+
export { treeToGraphData } from './utils/tree';
|
|
17
|
+
export type { BaseStyleProps } from '@antv/g';
|
|
18
|
+
export type { AntVDagreLayoutOptions, CircularLayoutOptions, ComboCombinedLayoutOptions, ConcentricLayoutOptions, D3Force3DLayoutOptions, D3ForceLayoutOptions, DagreLayoutOptions, ForceAtlas2LayoutOptions, ForceLayoutOptions, FruchtermanLayoutOptions, GridLayoutOptions, MDSLayoutOptions, RadialLayoutOptions, RandomLayoutOptions, } from '@antv/layout';
|
|
19
|
+
export type { BaseBehaviorOptions, BrushSelectOptions, ClickElementOptions, CollapseExpandOptions, CreateEdgeOptions, DragCanvasOptions, DragElementForceOptions, DragElementOptions, FocusElementOptions, HoverElementOptions, LassoSelectOptions, ZoomCanvasOptions, } from './behaviors';
|
|
16
20
|
export type { BaseComboStyleProps, CircleComboStyleProps, RectComboStyleProps } from './elements/combos';
|
|
17
21
|
export type { BaseEdgeStyleProps, CubicHorizontalStyleProps, CubicStyleProps, CubicVerticalStyleProps, LineStyleProps, PolylineStyleProps, QuadraticStyleProps, } from './elements/edges';
|
|
18
|
-
export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
|
|
22
|
+
export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HTMLStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
|
|
19
23
|
export type { BaseShapeStyleProps } from './elements/shapes';
|
|
20
|
-
export type { BasePluginOptions, CameraSettingOptions,
|
|
24
|
+
export type { BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
|
|
21
25
|
export type { RuntimeContext } from './runtime/types';
|
|
22
|
-
export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions,
|
|
26
|
+
export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, GraphData, GraphOptions, LayoutOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, ViewportOptions, } from './spec';
|
|
23
27
|
export type { BaseTransformOptions } from './transforms';
|
|
24
|
-
export type { IAnimateEvent, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Point, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
|
|
28
|
+
export type { CardinalPlacement, Combo, CornerPlacement, DirectionalPlacement, Edge, Element, ElementType, IAnimateEvent, ID, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Node, Placement, Point, RelativePlacement, State, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
|
|
25
29
|
export type { ShortcutKey } from './utils/shortcut';
|
|
26
|
-
declare const Utils: {
|
|
27
|
-
idOf: typeof idOf;
|
|
28
|
-
treeToGraphData: typeof treeToGraphData;
|
|
29
|
-
subStyleProps: typeof subStyleProps;
|
|
30
|
-
omitStyleProps: typeof omitStyleProps;
|
|
31
|
-
};
|
|
32
|
-
declare const Theme: {
|
|
33
|
-
dark: import("./themes/types").Theme;
|
|
34
|
-
light: import("./themes/types").Theme;
|
|
35
|
-
};
|
|
36
|
-
export { Theme, Utils };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IBubbleSetOptions } from 'bubblesets-js';
|
|
2
|
+
import type { ContourStyleProps } from '../elements/shapes';
|
|
3
|
+
import type { RuntimeContext } from '../runtime/types';
|
|
4
|
+
import type { CallableValue, ID } from '../types';
|
|
5
|
+
import type { BasePluginOptions } from './base-plugin';
|
|
6
|
+
import { BasePlugin } from './base-plugin';
|
|
7
|
+
export interface BubbleSetsOptions extends BasePluginOptions, IBubbleSetOptions, ContourStyleProps {
|
|
8
|
+
/**
|
|
9
|
+
* <zh/> 成员元素,包括节点和边
|
|
10
|
+
*
|
|
11
|
+
* <en/> Member elements, including nodes and edges
|
|
12
|
+
*/
|
|
13
|
+
members: ID[];
|
|
14
|
+
/**
|
|
15
|
+
* <zh/> 需要避开的元素,在绘制轮廓时不会包含这些元素。目前支持设置节点
|
|
16
|
+
*
|
|
17
|
+
* <en/> Elements to avoid, these elements will not be included when drawing the contour, currently only nodes are supported
|
|
18
|
+
*/
|
|
19
|
+
avoidMembers?: ID[];
|
|
20
|
+
}
|
|
21
|
+
export declare class BubbleSets extends BasePlugin<BubbleSetsOptions> {
|
|
22
|
+
private shape;
|
|
23
|
+
private bubbleSets;
|
|
24
|
+
private path;
|
|
25
|
+
private members;
|
|
26
|
+
private avoidMembers;
|
|
27
|
+
private bubbleSetOptions;
|
|
28
|
+
static defaultOptions: Partial<BubbleSetsOptions>;
|
|
29
|
+
constructor(context: RuntimeContext, options: BubbleSetsOptions);
|
|
30
|
+
private bindEvents;
|
|
31
|
+
private init;
|
|
32
|
+
private parseOptions;
|
|
33
|
+
private drawBubbleSets;
|
|
34
|
+
private updateBubbleSetsPath;
|
|
35
|
+
private getPath;
|
|
36
|
+
addMember(members: ID | ID[]): void;
|
|
37
|
+
removeMember(members: ID | ID[]): void;
|
|
38
|
+
updateMember(members: CallableValue<ID[]>): void;
|
|
39
|
+
getMember(): string[];
|
|
40
|
+
addAvoidMember(avoidMembers: ID | ID[]): void;
|
|
41
|
+
removeAvoidMember(avoidMembers: ID | ID[]): void;
|
|
42
|
+
updateAvoidMember(avoidMembers: ID | ID[]): void;
|
|
43
|
+
getAvoidMember(): string[];
|
|
44
|
+
destroy(): void;
|
|
45
|
+
}
|
|
@@ -39,9 +39,11 @@ export interface CameraSettingOptions extends BasePluginOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
fov?: number;
|
|
41
41
|
/**
|
|
42
|
-
* <zh/>
|
|
42
|
+
* <zh/> 相机视口宽高比,仅在透视相机下有效
|
|
43
|
+
* - 设置为 'auto' 时,会自动根据画布宽高比设置
|
|
43
44
|
*
|
|
44
|
-
* <en/> Camera viewport aspect ratio, only valid in perspective camera.
|
|
45
|
+
* <en/> Camera viewport aspect ratio, only valid in perspective camera.
|
|
46
|
+
* - When set to 'auto', it will be automatically set according to the canvas aspect ratio
|
|
45
47
|
*/
|
|
46
48
|
aspect?: number | 'auto';
|
|
47
49
|
/**
|
|
@@ -52,6 +52,7 @@ export type ContextmenuOptions = BasePluginOptions & {
|
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
54
|
* <zh/> 支持处理事件,并显示右键菜单,在菜单点击之后,可以触发相应的事件。
|
|
55
|
+
*
|
|
55
56
|
* <en/> Support processing events and displaying right-click menus.
|
|
56
57
|
* After clicking the menu, you can trigger the corresponding event.
|
|
57
58
|
*/
|
|
@@ -1,19 +1,62 @@
|
|
|
1
|
-
import { BaseStyleProps } from '@antv/g';
|
|
2
1
|
import type { RuntimeContext } from '../runtime/types';
|
|
3
2
|
import type { BasePluginOptions } from './base-plugin';
|
|
4
3
|
import { BasePlugin } from './base-plugin';
|
|
5
|
-
export interface GridLineOptions extends BasePluginOptions
|
|
6
|
-
/**
|
|
4
|
+
export interface GridLineOptions extends BasePluginOptions {
|
|
5
|
+
/**
|
|
6
|
+
* <zh/> 网格线颜色
|
|
7
|
+
*
|
|
8
|
+
* <en/> Grid line color
|
|
9
|
+
* @defaultValue '#0001'
|
|
10
|
+
*/
|
|
11
|
+
stroke?: string;
|
|
12
|
+
/**
|
|
13
|
+
* <zh/> 网格线宽
|
|
14
|
+
*
|
|
15
|
+
* <en/> Grid line width
|
|
16
|
+
* @defaultValue 1
|
|
17
|
+
*/
|
|
18
|
+
lineWidth?: number | string;
|
|
19
|
+
/**
|
|
20
|
+
* <zh/> 单个网格的大小
|
|
21
|
+
*
|
|
22
|
+
* <en/> The size of a single grid
|
|
23
|
+
* @defaultValue 20
|
|
24
|
+
*/
|
|
7
25
|
size?: number;
|
|
8
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* <zh/> 是否显示边框
|
|
28
|
+
*
|
|
29
|
+
* <en/> Whether to show the border
|
|
30
|
+
* @defaultValue true
|
|
31
|
+
*/
|
|
9
32
|
border?: boolean;
|
|
10
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* <zh/> 边框线宽
|
|
35
|
+
*
|
|
36
|
+
* <en/> Border line width
|
|
37
|
+
* @defaultValue 1
|
|
38
|
+
*/
|
|
11
39
|
borderLineWidth?: number;
|
|
12
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* <zh/> 边框颜色
|
|
42
|
+
*
|
|
43
|
+
* <en/> Border color
|
|
44
|
+
* @defaultValue '#0001'
|
|
45
|
+
*/
|
|
13
46
|
borderStroke?: string;
|
|
14
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* <zh/> 边框样式
|
|
49
|
+
*
|
|
50
|
+
* <en/> Border style
|
|
51
|
+
* @defaultValue 'solid'
|
|
52
|
+
*/
|
|
15
53
|
borderStyle?: string;
|
|
16
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* <zh/> 是否跟随图移动
|
|
56
|
+
*
|
|
57
|
+
* <en/> Whether to follow with the graph
|
|
58
|
+
* @defaultValue false
|
|
59
|
+
*/
|
|
17
60
|
follow?: boolean;
|
|
18
61
|
}
|
|
19
62
|
export declare class GridLine extends BasePlugin<GridLineOptions> {
|
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ContourStyleProps } from '../../elements/shapes';
|
|
2
2
|
import type { RuntimeContext } from '../../runtime/types';
|
|
3
|
-
import type { CallableValue } from '../../types';
|
|
3
|
+
import type { CallableValue, ID } from '../../types';
|
|
4
4
|
import type { BasePluginOptions } from '../base-plugin';
|
|
5
5
|
import { BasePlugin } from '../base-plugin';
|
|
6
|
-
|
|
7
|
-
export interface HullOptions extends BasePluginOptions, HullStyleProps {
|
|
6
|
+
export interface HullOptions extends BasePluginOptions, ContourStyleProps {
|
|
8
7
|
/**
|
|
9
8
|
* <zh/> Hull 内的元素
|
|
9
|
+
*
|
|
10
10
|
* <en/> Elements in Hull
|
|
11
11
|
*/
|
|
12
12
|
members?: ID[];
|
|
13
13
|
/**
|
|
14
14
|
* <zh/> 凹度,数值越大凹度越小;默认为 Infinity 代表为 Convex Hull
|
|
15
|
+
*
|
|
15
16
|
* <en/> Concavity. Default is Infinity, which means Convex Hull
|
|
17
|
+
* @defaultValue Infinity
|
|
16
18
|
*/
|
|
17
19
|
concavity?: number;
|
|
18
20
|
/**
|
|
19
21
|
* <zh/> 内边距,默认为 10
|
|
22
|
+
*
|
|
20
23
|
* <en/> Padding, default is 10
|
|
24
|
+
* @defaultValue 10
|
|
21
25
|
*/
|
|
22
26
|
padding?: number;
|
|
23
27
|
/**
|
|
24
28
|
* <zh/> 拐角类型,目前支持 'rounded'、'smooth' 和 'sharp'
|
|
29
|
+
*
|
|
25
30
|
* <en/> Corner type, currently supports 'rounded', 'smooth' and 'sharp'
|
|
31
|
+
* @defaultValue 'rounded'
|
|
26
32
|
*/
|
|
27
33
|
corner?: 'rounded' | 'smooth' | 'sharp';
|
|
28
34
|
}
|
|
@@ -38,11 +44,7 @@ export declare class Hull extends BasePlugin<HullOptions> {
|
|
|
38
44
|
* <en/> Hull path
|
|
39
45
|
*/
|
|
40
46
|
private path;
|
|
41
|
-
|
|
42
|
-
* <zh> 是否初次渲染完成
|
|
43
|
-
* <en> Whether the first rendering is completed
|
|
44
|
-
*/
|
|
45
|
-
private firstRender;
|
|
47
|
+
private optionsCache;
|
|
46
48
|
static defaultOptions: Partial<HullOptions>;
|
|
47
49
|
constructor(context: RuntimeContext, options: HullOptions);
|
|
48
50
|
private bindEvents;
|
|
@@ -51,9 +53,38 @@ export declare class Hull extends BasePlugin<HullOptions> {
|
|
|
51
53
|
private updateHullPath;
|
|
52
54
|
private getHullPath;
|
|
53
55
|
private getPadding;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
/**
|
|
57
|
+
* <zh/> 添加 Hull 成员
|
|
58
|
+
*
|
|
59
|
+
* <en/> Add Hull member
|
|
60
|
+
* @param members - <zh/> 元素 Ids | <en/> Element Ids
|
|
61
|
+
*/
|
|
62
|
+
addMember(members: ID | ID[]): void;
|
|
63
|
+
/**
|
|
64
|
+
* <zh/> 移除 Hull 成员
|
|
65
|
+
*
|
|
66
|
+
* <en/> Remove Hull member
|
|
67
|
+
* @param members - <zh/> 元素 Ids | <en/> Element Ids
|
|
68
|
+
*/
|
|
69
|
+
removeMember(members: ID | ID[]): void;
|
|
70
|
+
/**
|
|
71
|
+
* <zh/> 更新 Hull 成员
|
|
72
|
+
*
|
|
73
|
+
* <en/> Update Hull member
|
|
74
|
+
* @param members - <zh/> 元素 Ids | <en/> Element Ids
|
|
75
|
+
*/
|
|
76
|
+
updateMember(members: CallableValue<ID[]>): void;
|
|
77
|
+
/**
|
|
78
|
+
* <zh/> 获取 Hull 成员
|
|
79
|
+
*
|
|
80
|
+
* <en/> Get Hull member
|
|
81
|
+
* @returns <zh/> 元素 Ids | <en/> Element Ids
|
|
82
|
+
*/
|
|
83
|
+
getMember(): string[];
|
|
84
|
+
/**
|
|
85
|
+
* <zh/> 销毁 Hull
|
|
86
|
+
*
|
|
87
|
+
* <en/> Destroy Hull
|
|
88
|
+
*/
|
|
58
89
|
destroy(): void;
|
|
59
90
|
}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
export { BasePlugin } from './base-plugin';
|
|
2
|
+
export { BubbleSets } from './bubble-sets';
|
|
2
3
|
export { CameraSetting } from './camera-setting';
|
|
3
4
|
export { Contextmenu } from './contextmenu';
|
|
4
5
|
export { GridLine } from './grid-line';
|
|
5
6
|
export { History } from './history';
|
|
6
7
|
export { Hull } from './hull';
|
|
7
8
|
export { Legend } from './legend';
|
|
9
|
+
export { Timebar } from './timebar';
|
|
8
10
|
export { Toolbar } from './toolbar';
|
|
9
11
|
export { Tooltip } from './tooltip';
|
|
10
12
|
export { Watermark } from './watermark';
|
|
11
13
|
export type { BasePluginOptions } from './base-plugin';
|
|
14
|
+
export type { BubbleSetsOptions } from './bubble-sets';
|
|
12
15
|
export type { CameraSettingOptions } from './camera-setting';
|
|
13
16
|
export type { ContextmenuOptions } from './contextmenu';
|
|
14
17
|
export type { GridLineOptions } from './grid-line';
|
|
15
18
|
export type { HistoryOptions } from './history';
|
|
16
19
|
export type { HullOptions } from './hull';
|
|
17
20
|
export type { LegendOptions } from './legend';
|
|
21
|
+
export type { TimebarOptions } from './timebar';
|
|
18
22
|
export type { ToolbarOptions } from './toolbar';
|
|
19
23
|
export type { TooltipOptions } from './tooltip';
|
|
20
24
|
export type { WatermarkOptions } from './watermark';
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { BasePlugin } from './base-plugin';
|
|
2
|
+
import type { RuntimeContext } from '../runtime/types';
|
|
3
|
+
import type { ElementDatum, ElementType } from '../types';
|
|
4
|
+
import type { BasePluginOptions } from './base-plugin';
|
|
5
|
+
/**
|
|
6
|
+
* <zh/> Timebar 时间条的配置项。
|
|
7
|
+
* <en/> The configuration item of the Timebar.
|
|
8
|
+
*/
|
|
9
|
+
export interface TimebarOptions extends BasePluginOptions {
|
|
10
|
+
/**
|
|
11
|
+
* <zh/> 给工具栏的 DOM 追加的类名,便于自定义样式
|
|
12
|
+
*
|
|
13
|
+
* <en/> The class name appended to the menu DOM for custom styles
|
|
14
|
+
* @defaultValue 'g6-timebar'
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* <zh/> X 位置
|
|
19
|
+
*
|
|
20
|
+
* <en/> X position
|
|
21
|
+
* @remarks
|
|
22
|
+
* <zh/> 设置后 `position` 会失效
|
|
23
|
+
*
|
|
24
|
+
* <en/> Setting will invalidate `position`
|
|
25
|
+
*/
|
|
26
|
+
x?: number;
|
|
27
|
+
/**
|
|
28
|
+
* <zh/> Y 位置
|
|
29
|
+
*
|
|
30
|
+
* <en/> Y position
|
|
31
|
+
* <zh/> 设置后 `position` 会失效
|
|
32
|
+
*
|
|
33
|
+
* <en/> Setting will invalidate `position`
|
|
34
|
+
*/
|
|
35
|
+
y?: number;
|
|
36
|
+
/**
|
|
37
|
+
* <zh/> 时间条宽度
|
|
38
|
+
*
|
|
39
|
+
* <en/> Timebar width
|
|
40
|
+
* @defaultValue 450
|
|
41
|
+
*/
|
|
42
|
+
width?: number;
|
|
43
|
+
/**
|
|
44
|
+
* <zh/> 时间条高度
|
|
45
|
+
*
|
|
46
|
+
* <en/> Timebar height
|
|
47
|
+
* @defaultValue 60
|
|
48
|
+
*/
|
|
49
|
+
height?: number;
|
|
50
|
+
/**
|
|
51
|
+
* <zh/> Timebar 的位置, 当前可配置 'bottom' | 'top'
|
|
52
|
+
*
|
|
53
|
+
* <en/> Timebar location, currently configurable 'bottom' | 'top'
|
|
54
|
+
* @defaultValue 'bottom'
|
|
55
|
+
*/
|
|
56
|
+
position?: 'bottom' | 'top';
|
|
57
|
+
/**
|
|
58
|
+
* <zh/> 获取元素时间
|
|
59
|
+
*
|
|
60
|
+
* <en/> Get element time
|
|
61
|
+
*/
|
|
62
|
+
getTime?: (datum: ElementDatum) => number;
|
|
63
|
+
/**
|
|
64
|
+
* <zh/> 时间数据
|
|
65
|
+
*
|
|
66
|
+
* <en/> Time data
|
|
67
|
+
* @remarks
|
|
68
|
+
* <zh/> timebarType 为 'chart' 时,需要额外传入 value 字段作为图表数据
|
|
69
|
+
*
|
|
70
|
+
* <en/> When timebarType is 'chart', you need to pass in the value field as chart data
|
|
71
|
+
*/
|
|
72
|
+
data: number[] | {
|
|
73
|
+
time: number;
|
|
74
|
+
value: number;
|
|
75
|
+
}[];
|
|
76
|
+
/**
|
|
77
|
+
* <zh/> Timebar 展示类型
|
|
78
|
+
* - time: 显示为时间轴
|
|
79
|
+
* - chart: 显示为趋势图
|
|
80
|
+
*
|
|
81
|
+
* <en/> Timebar Displays the type
|
|
82
|
+
* - time: Display as a timeline
|
|
83
|
+
* - chart: Display as a trend chart
|
|
84
|
+
* @defaultValue 'time'
|
|
85
|
+
*/
|
|
86
|
+
timebarType?: 'time' | 'chart';
|
|
87
|
+
/**
|
|
88
|
+
* <zh/> 筛选类型
|
|
89
|
+
*
|
|
90
|
+
* <en/> Filter element types
|
|
91
|
+
*/
|
|
92
|
+
elementTypes?: ElementType[];
|
|
93
|
+
/**
|
|
94
|
+
* <zh/> 筛选模式
|
|
95
|
+
* - modify: 通过修改图数据进行筛选
|
|
96
|
+
* - visibility: 通过修改元素可见性进行筛选
|
|
97
|
+
*
|
|
98
|
+
* <en/> Filter mode
|
|
99
|
+
* - modify: Filter by modifying the graph data.
|
|
100
|
+
* - visibility: Filter by modifying element visibility
|
|
101
|
+
* @defaultValue 'modify'
|
|
102
|
+
*/
|
|
103
|
+
mode?: 'modify' | 'visibility';
|
|
104
|
+
/**
|
|
105
|
+
* <zh/> 当前时间值
|
|
106
|
+
*
|
|
107
|
+
* <en/> Current time value
|
|
108
|
+
*/
|
|
109
|
+
values?: number | [number, number] | Date | [Date, Date];
|
|
110
|
+
/**
|
|
111
|
+
* <zh/> 图表模式下自定义时间格式化
|
|
112
|
+
*
|
|
113
|
+
* <en/> Custom time formatting in chart mode
|
|
114
|
+
*/
|
|
115
|
+
labelFormatter?: (time: number | Date) => string;
|
|
116
|
+
/**
|
|
117
|
+
* <zh/> 是否循环播放
|
|
118
|
+
*
|
|
119
|
+
* <en/> Whether to loop
|
|
120
|
+
*/
|
|
121
|
+
loop?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* <zh/> 时间区间变化时执行的回调
|
|
124
|
+
*
|
|
125
|
+
* <en/> Callback executed when the time interval changes
|
|
126
|
+
*/
|
|
127
|
+
onChange?: (values: number | [number, number]) => void;
|
|
128
|
+
/**
|
|
129
|
+
* <zh/> 重置时执行的回调
|
|
130
|
+
*
|
|
131
|
+
* <en/> Callback executed when reset
|
|
132
|
+
*/
|
|
133
|
+
onReset?: () => void;
|
|
134
|
+
/**
|
|
135
|
+
* <zh/> 播放速度变化时执行的回调
|
|
136
|
+
*
|
|
137
|
+
* <en/> Callback executed when the playback speed changes
|
|
138
|
+
*/
|
|
139
|
+
onSpeedChange?: (speed: number) => void;
|
|
140
|
+
/**
|
|
141
|
+
* <zh/> 开始播放时执行的回调
|
|
142
|
+
*
|
|
143
|
+
* <en/> Callback executed when playback starts
|
|
144
|
+
*/
|
|
145
|
+
onPlay?: () => void;
|
|
146
|
+
/**
|
|
147
|
+
* <zh/> 暂停时执行的回调
|
|
148
|
+
*
|
|
149
|
+
* <en/> Callback executed when paused
|
|
150
|
+
*/
|
|
151
|
+
onPause?: () => void;
|
|
152
|
+
/**
|
|
153
|
+
* <zh/> 后退时执行的回调
|
|
154
|
+
*
|
|
155
|
+
* <en/> Callback executed when backward
|
|
156
|
+
*/
|
|
157
|
+
onBackward?: () => void;
|
|
158
|
+
/**
|
|
159
|
+
* <zh/> 前进时执行的回调
|
|
160
|
+
*
|
|
161
|
+
* <en/> Callback executed when forward
|
|
162
|
+
*/
|
|
163
|
+
onForward?: () => void;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* <zh/> 时间组件
|
|
167
|
+
*
|
|
168
|
+
* <en/> Timebar
|
|
169
|
+
*/
|
|
170
|
+
export declare class Timebar extends BasePlugin<TimebarOptions> {
|
|
171
|
+
static defaultOptions: Partial<TimebarOptions>;
|
|
172
|
+
private timebar?;
|
|
173
|
+
private canvas?;
|
|
174
|
+
private wrapper?;
|
|
175
|
+
private originalData?;
|
|
176
|
+
constructor(context: RuntimeContext, options: TimebarOptions);
|
|
177
|
+
/**
|
|
178
|
+
* <zh/> 播放
|
|
179
|
+
*
|
|
180
|
+
* <en/> Play
|
|
181
|
+
*/
|
|
182
|
+
play(): void;
|
|
183
|
+
/**
|
|
184
|
+
* <zh/> 暂停
|
|
185
|
+
*
|
|
186
|
+
* <en/> Pause
|
|
187
|
+
*/
|
|
188
|
+
pause(): void;
|
|
189
|
+
/**
|
|
190
|
+
* <zh/> 前进
|
|
191
|
+
*
|
|
192
|
+
* <en/> Forward
|
|
193
|
+
*/
|
|
194
|
+
forward(): void;
|
|
195
|
+
/**
|
|
196
|
+
* <zh/> 后退
|
|
197
|
+
*
|
|
198
|
+
* <en/> Backward
|
|
199
|
+
*/
|
|
200
|
+
backward(): void;
|
|
201
|
+
/**
|
|
202
|
+
* <zh/> 重置
|
|
203
|
+
*
|
|
204
|
+
* <en/> Reset
|
|
205
|
+
*/
|
|
206
|
+
reset(): void;
|
|
207
|
+
update(options: Partial<TimebarOptions>): void;
|
|
208
|
+
/**
|
|
209
|
+
* <zh/> 备份数据
|
|
210
|
+
*
|
|
211
|
+
* <en/> Backup data
|
|
212
|
+
*/
|
|
213
|
+
private backup;
|
|
214
|
+
private upsertTimebar;
|
|
215
|
+
private upsertWrapper;
|
|
216
|
+
private upsertCanvas;
|
|
217
|
+
private filterElements;
|
|
218
|
+
private hiddenElements;
|
|
219
|
+
/**
|
|
220
|
+
* <zh/> 销毁时间条
|
|
221
|
+
*
|
|
222
|
+
* <en/> Destroy the timebar
|
|
223
|
+
*/
|
|
224
|
+
destroy(): void;
|
|
225
|
+
}
|
|
@@ -7,9 +7,9 @@ export interface TooltipOptions extends BasePluginOptions, Pick<TooltipStyleProp
|
|
|
7
7
|
/** <zh/> 触发方式 | <en/> Event type that triggers display of tooltip */
|
|
8
8
|
trigger?: 'hover' | 'click';
|
|
9
9
|
/** <zh/> 自定义内容 | <en/> Function for getting tooltip content */
|
|
10
|
-
getContent?: (
|
|
10
|
+
getContent?: (event: IElementEvent, items: ElementDatum[]) => HTMLElement | string;
|
|
11
11
|
/** <zh/> 是否启用 | <en/> Is enable */
|
|
12
|
-
enable?: boolean | ((
|
|
12
|
+
enable?: boolean | ((event: IElementEvent) => boolean);
|
|
13
13
|
}
|
|
14
14
|
export declare class Tooltip extends BasePlugin<TooltipOptions> {
|
|
15
15
|
static defaultOptions: Partial<TooltipOptions>;
|
|
@@ -17,7 +17,7 @@ import type { ExtensionRegistry } from './types';
|
|
|
17
17
|
* <zh/> 要注册的扩展类,在使用时创建实例
|
|
18
18
|
*
|
|
19
19
|
* <en/> The extension class to be registered. An instance will be created upon use
|
|
20
|
-
* @
|
|
20
|
+
* @remarks
|
|
21
21
|
* <zh/> 内置扩展在项目导入时会自动注册。对于非内置扩展,可以通过 `register` 方法手动注册。扩展只需要注册一次,即可在项目的任何位置使用。
|
|
22
22
|
*
|
|
23
23
|
* <en/> Built-in extensions are automatically registered when the project is imported. For non-built-in extensions, you can manually register them using the `register` method. Extensions only need to be registered once and can be used anywhere in the project.
|