@visuallyjs/browser-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/visuallyjs-theme.css +148 -0
- package/css/visuallyjs.css +1879 -0
- package/js/visuallyjs.browser-ui.cjs.js +143 -0
- package/js/visuallyjs.browser-ui.esm.js +143 -0
- package/package.json +16 -0
- package/types/browser-ui/base-dom-ui-layout-adapter.d.ts +14 -0
- package/types/browser-ui/browser-ui.d.ts +95 -0
- package/types/browser-ui/browser-util.d.ts +233 -0
- package/types/browser-ui/browser-visuallyjs-instance.d.ts +881 -0
- package/types/browser-ui/canvas-layout-adapter.d.ts +15 -0
- package/types/browser-ui/collicat.d.ts +245 -0
- package/types/browser-ui/components/controls/controls-component.d.ts +137 -0
- package/types/browser-ui/components/controls/copy-paste-controls-component.d.ts +9 -0
- package/types/browser-ui/components/controls/css-classes.d.ts +79 -0
- package/types/browser-ui/components/controls/index.d.ts +4 -0
- package/types/browser-ui/components/controls/svg-export-component.d.ts +60 -0
- package/types/browser-ui/components/edge-type-picker/edge-type-picker.d.ts +37 -0
- package/types/browser-ui/components/edge-type-picker/index.d.ts +1 -0
- package/types/browser-ui/components/index.d.ts +4 -0
- package/types/browser-ui/components/inspector/color-picker-tag.d.ts +32 -0
- package/types/browser-ui/components/inspector/definitions.d.ts +114 -0
- package/types/browser-ui/components/inspector/edge-type-tag.d.ts +15 -0
- package/types/browser-ui/components/inspector/index.d.ts +6 -0
- package/types/browser-ui/components/inspector/inspector.d.ts +138 -0
- package/types/browser-ui/components/inspector/shape-type-inspector.d.ts +43 -0
- package/types/browser-ui/components/inspector/vanilla-inspector.d.ts +39 -0
- package/types/browser-ui/components/palette/index.d.ts +2 -0
- package/types/browser-ui/components/palette/palette-content-generator.d.ts +14 -0
- package/types/browser-ui/components/palette/palette-options.d.ts +159 -0
- package/types/browser-ui/components/palette/palette.d.ts +126 -0
- package/types/browser-ui/connector-editor.d.ts +65 -0
- package/types/browser-ui/connector-editors/anchors.d.ts +31 -0
- package/types/browser-ui/connector-editors/css-constants.d.ts +33 -0
- package/types/browser-ui/connector-editors/definitions.d.ts +74 -0
- package/types/browser-ui/connector-editors/editor-base.d.ts +177 -0
- package/types/browser-ui/connector-editors/index.d.ts +52 -0
- package/types/browser-ui/connector-editors/util.d.ts +33 -0
- package/types/browser-ui/connector-editors-bezier/bezier-editor.d.ts +82 -0
- package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +42 -0
- package/types/browser-ui/connector-editors-bezier/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/css-constants.d.ts +28 -0
- package/types/browser-ui/connector-editors-orthogonal/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/orthogonal-editor.d.ts +86 -0
- package/types/browser-ui/connector-editors-straight/auto-split-mode.d.ts +24 -0
- package/types/browser-ui/connector-editors-straight/click-split-mode.d.ts +20 -0
- package/types/browser-ui/connector-editors-straight/css-constants.d.ts +30 -0
- package/types/browser-ui/connector-editors-straight/definitions.d.ts +69 -0
- package/types/browser-ui/connector-editors-straight/index.d.ts +11 -0
- package/types/browser-ui/connector-editors-straight/straight-editor.d.ts +42 -0
- package/types/browser-ui/constants.d.ts +79 -0
- package/types/browser-ui/copy-paste/clipboard.d.ts +34 -0
- package/types/browser-ui/copy-paste/index.d.ts +2 -0
- package/types/browser-ui/copy-paste/transformer.d.ts +14 -0
- package/types/browser-ui/css-constants.d.ts +436 -0
- package/types/browser-ui/d.d.ts +2 -0
- package/types/browser-ui/definitions.d.ts +442 -0
- package/types/browser-ui/dialogs/binder.d.ts +49 -0
- package/types/browser-ui/dialogs/constants.d.ts +51 -0
- package/types/browser-ui/dialogs/dialogs.d.ts +30 -0
- package/types/browser-ui/dialogs/index.d.ts +3 -0
- package/types/browser-ui/drag-manager-2.d.ts +54 -0
- package/types/browser-ui/edge-handler-base.d.ts +168 -0
- package/types/browser-ui/edge-input-handler.d.ts +116 -0
- package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +22 -0
- package/types/browser-ui/edge-mappings/index.d.ts +1 -0
- package/types/browser-ui/edge-relocate-handler.d.ts +51 -0
- package/types/browser-ui/element-drag-handler-2.d.ts +254 -0
- package/types/browser-ui/element-dragger.d.ts +45 -0
- package/types/browser-ui/element-facade.d.ts +11 -0
- package/types/browser-ui/event-manager.d.ts +50 -0
- package/types/browser-ui/fixed-layer.d.ts +107 -0
- package/types/browser-ui/group-layout-adapter.d.ts +19 -0
- package/types/browser-ui/html-element-overlay.d.ts +32 -0
- package/types/browser-ui/icons/definitions.d.ts +59 -0
- package/types/browser-ui/icons/icon-renderer.d.ts +43 -0
- package/types/browser-ui/icons/index.d.ts +2 -0
- package/types/browser-ui/index.d.ts +48 -0
- package/types/browser-ui/pan-zoom-options.d.ts +262 -0
- package/types/browser-ui/pan-zoom.d.ts +674 -0
- package/types/browser-ui/paper-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/paper-renderer/index.d.ts +2 -0
- package/types/browser-ui/paper-renderer/paper.d.ts +50 -0
- package/types/browser-ui/pinch-listener.d.ts +33 -0
- package/types/browser-ui/plugins/background/available-backgrounds.d.ts +12 -0
- package/types/browser-ui/plugins/background/background-options.d.ts +62 -0
- package/types/browser-ui/plugins/background/background-plugin.d.ts +62 -0
- package/types/browser-ui/plugins/background/generated-grid-background.d.ts +230 -0
- package/types/browser-ui/plugins/background/index.d.ts +6 -0
- package/types/browser-ui/plugins/background/simple-background.d.ts +33 -0
- package/types/browser-ui/plugins/background/tiled-background.d.ts +118 -0
- package/types/browser-ui/plugins/browser-ui-plugin.d.ts +90 -0
- package/types/browser-ui/plugins/edge-routing/index.d.ts +66 -0
- package/types/browser-ui/plugins/index.d.ts +5 -0
- package/types/browser-ui/plugins/selected-edge-highlight/index.d.ts +1 -0
- package/types/browser-ui/plugins/selected-edge-highlight/selected-edge-highlight-plugin.d.ts +36 -0
- package/types/browser-ui/plugins/ui-states/index.d.ts +2 -0
- package/types/browser-ui/plugins/ui-states/ui-state.d.ts +14 -0
- package/types/browser-ui/plugins/ui-states/ui-states-plugin.d.ts +69 -0
- package/types/browser-ui/positioning-and-sizing-utils.d.ts +103 -0
- package/types/browser-ui/shape-library/index.d.ts +4 -0
- package/types/browser-ui/shape-library/shape-library-definitions.d.ts +243 -0
- package/types/browser-ui/shape-library/shape-library.d.ts +266 -0
- package/types/browser-ui/shape-library/shapes-basic.d.ts +7 -0
- package/types/browser-ui/shape-library/shapes-flowchart.d.ts +7 -0
- package/types/browser-ui/storage.d.ts +8 -0
- package/types/browser-ui/surface-renderer/anim/anim.d.ts +64 -0
- package/types/browser-ui/surface-renderer/anim/constants.d.ts +74 -0
- package/types/browser-ui/surface-renderer/anim/definitions.d.ts +134 -0
- package/types/browser-ui/surface-renderer/anim/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +23 -0
- package/types/browser-ui/surface-renderer/css-classes.d.ts +64 -0
- package/types/browser-ui/surface-renderer/decorators.d.ts +162 -0
- package/types/browser-ui/surface-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/surface-renderer/diagrams/constants.d.ts +28 -0
- package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +528 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-cell.d.ts +123 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +116 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-palette.d.ts +11 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +112 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +221 -0
- package/types/browser-ui/surface-renderer/diagrams/index.d.ts +25 -0
- package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +59 -0
- package/types/browser-ui/surface-renderer/diagrams/util.d.ts +15 -0
- package/types/browser-ui/surface-renderer/elastic-group-manager.d.ts +102 -0
- package/types/browser-ui/surface-renderer/index.d.ts +34 -0
- package/types/browser-ui/surface-renderer/params.d.ts +175 -0
- package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +26 -0
- package/types/browser-ui/surface-renderer/plugins/controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/drag-groups-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +25 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/index.d.ts +10 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso.d.ts +74 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/miniview-plugin.d.ts +235 -0
- package/types/browser-ui/surface-renderer/plugins/palette/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +17 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +55 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/border-drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +411 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/handle-gen.d.ts +15 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/resizing-tools-plugin.d.ts +185 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/util.d.ts +16 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +128 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/definitions.d.ts +90 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +64 -0
- package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +127 -0
- package/types/browser-ui/surface-renderer/shape-palette.d.ts +55 -0
- package/types/browser-ui/surface-renderer/surface-decorator.d.ts +35 -0
- package/types/browser-ui/surface-renderer/surface-events.d.ts +9 -0
- package/types/browser-ui/surface-renderer/surface-render-options.d.ts +125 -0
- package/types/browser-ui/surface-renderer/surface.d.ts +665 -0
- package/types/browser-ui/svg-component.d.ts +6 -0
- package/types/browser-ui/svg-element-connector.d.ts +16 -0
- package/types/browser-ui/svg-element-overlay.d.ts +55 -0
- package/types/browser-ui/svg-export/definitions.d.ts +153 -0
- package/types/browser-ui/svg-export/image-export-ui.d.ts +20 -0
- package/types/browser-ui/svg-export/image-exporter.d.ts +15 -0
- package/types/browser-ui/svg-export/index.d.ts +6 -0
- package/types/browser-ui/svg-export/svg-export-ui.d.ts +11 -0
- package/types/browser-ui/svg-export/svg-exporter.d.ts +8 -0
- package/types/browser-ui/svg-export/util.d.ts +23 -0
- package/types/browser-ui/svg-util.d.ts +27 -0
- package/types/browser-ui/templating/browser-ui-recado.d.ts +48 -0
- package/types/browser-ui/templating/custom-tag-definition.d.ts +32 -0
- package/types/browser-ui/templating/index.d.ts +11 -0
- package/types/browser-ui/templating/recado-template-renderer.d.ts +69 -0
- package/types/browser-ui/ui-path.d.ts +57 -0
- package/types/browser-ui/util.d.ts +4 -0
- package/types/browser-ui/wheel-listener.d.ts +2 -0
- package/types/charts/area/area-chart.d.ts +85 -0
- package/types/charts/area/index.d.ts +1 -0
- package/types/charts/bar-and-column/bar-chart.d.ts +34 -0
- package/types/charts/bar-and-column/bar-plot.d.ts +90 -0
- package/types/charts/bar-and-column/column-chart.d.ts +35 -0
- package/types/charts/bar-and-column/index.d.ts +3 -0
- package/types/charts/base-chart.d.ts +395 -0
- package/types/charts/base-xy-chart.d.ts +224 -0
- package/types/charts/bubble/bubble-chart.d.ts +30 -0
- package/types/charts/bubble/definitions.d.ts +32 -0
- package/types/charts/bubble/index.d.ts +2 -0
- package/types/charts/category-value-chart.d.ts +146 -0
- package/types/charts/chart-exporter.d.ts +38 -0
- package/types/charts/chart-zoom-controls.d.ts +23 -0
- package/types/charts/constants.d.ts +16 -0
- package/types/charts/css-classes.d.ts +312 -0
- package/types/charts/datasource.d.ts +61 -0
- package/types/charts/definitions.d.ts +261 -0
- package/types/charts/domain_scale_utilities.d.ts +72 -0
- package/types/charts/dual-value-chart.d.ts +60 -0
- package/types/charts/gauge/definitions.d.ts +108 -0
- package/types/charts/gauge/gauge-chart.d.ts +91 -0
- package/types/charts/gauge/index.d.ts +2 -0
- package/types/charts/index.d.ts +25 -0
- package/types/charts/legend.d.ts +120 -0
- package/types/charts/line/index.d.ts +1 -0
- package/types/charts/line/line-chart.d.ts +79 -0
- package/types/charts/markers.d.ts +13 -0
- package/types/charts/pie/index.d.ts +1 -0
- package/types/charts/pie/pie-chart.d.ts +146 -0
- package/types/charts/plot.d.ts +75 -0
- package/types/charts/sankey/index.d.ts +1 -0
- package/types/charts/sankey/preprocessor.d.ts +37 -0
- package/types/charts/sankey/sankey.d.ts +208 -0
- package/types/charts/scatter/definitions.d.ts +6 -0
- package/types/charts/scatter/index.d.ts +2 -0
- package/types/charts/scatter/scatter-chart.d.ts +16 -0
- package/types/charts/series/array-based-series.d.ts +95 -0
- package/types/charts/series/collation-series.d.ts +24 -0
- package/types/charts/series/definitions.d.ts +52 -0
- package/types/charts/series/dual-value-chart-series.d.ts +26 -0
- package/types/charts/series/index.d.ts +7 -0
- package/types/charts/series/record-based-series.d.ts +58 -0
- package/types/charts/series/series.d.ts +66 -0
- package/types/charts/series/summing-collation-series.d.ts +31 -0
- package/types/charts/series/summing-series.d.ts +19 -0
- package/types/charts/series-based-chart.d.ts +59 -0
- package/types/charts/tooltip.d.ts +167 -0
- package/types/charts/util.d.ts +149 -0
- package/types/core/astar/astar-path-finder.d.ts +37 -0
- package/types/core/astar/astar-util.d.ts +100 -0
- package/types/core/astar/candidate-finder.d.ts +16 -0
- package/types/core/astar/candidate-sorter.d.ts +10 -0
- package/types/core/astar/definitions.d.ts +185 -0
- package/types/core/astar/index.d.ts +3 -0
- package/types/core/astar/path-to-segments.d.ts +45 -0
- package/types/core/autosaver.d.ts +67 -0
- package/types/core/color-generator.d.ts +66 -0
- package/types/core/constants.d.ts +181 -0
- package/types/core/csv-loader.d.ts +84 -0
- package/types/core/datamodel/data-model.d.ts +23 -0
- package/types/core/datamodel/vertex-definition.d.ts +40 -0
- package/types/core/datasource.d.ts +87 -0
- package/types/core/event-constants.d.ts +308 -0
- package/types/core/event-generator.d.ts +102 -0
- package/types/core/filterable-dataset.d.ts +38 -0
- package/types/core/geom.d.ts +278 -0
- package/types/core/index.d.ts +39 -0
- package/types/core/io.d.ts +106 -0
- package/types/core/layout/absolute-layout.d.ts +91 -0
- package/types/core/layout/abstract-layout-adapter.d.ts +17 -0
- package/types/core/layout/abstract-layout.d.ts +192 -0
- package/types/core/layout/circular/circular-layout.d.ts +31 -0
- package/types/core/layout/circular/index.d.ts +1 -0
- package/types/core/layout/empty-layout.d.ts +17 -0
- package/types/core/layout/force-directed/force-directed-layout.d.ts +148 -0
- package/types/core/layout/force-directed/index.d.ts +1 -0
- package/types/core/layout/grid/definitions.d.ts +81 -0
- package/types/core/layout/grid/grid-layout.d.ts +60 -0
- package/types/core/layout/grid/index.d.ts +2 -0
- package/types/core/layout/hierarchical/abstract-hierarchical-layout.d.ts +90 -0
- package/types/core/layout/hierarchical/balloon-layout.d.ts +62 -0
- package/types/core/layout/hierarchical/definitions.d.ts +45 -0
- package/types/core/layout/hierarchical/hierarchical-layout.d.ts +102 -0
- package/types/core/layout/hierarchical/index.d.ts +5 -0
- package/types/core/layout/hierarchical/parent-relative-placement.d.ts +96 -0
- package/types/core/layout/hierarchy/assign-layers-stage.d.ts +26 -0
- package/types/core/layout/hierarchy/crossing-stage.d.ts +78 -0
- package/types/core/layout/hierarchy/definitions.d.ts +261 -0
- package/types/core/layout/hierarchy/edge-routing.d.ts +25 -0
- package/types/core/layout/hierarchy/hierarchy-layout-stage.d.ts +9 -0
- package/types/core/layout/hierarchy/hierarchy-layout.d.ts +87 -0
- package/types/core/layout/hierarchy/index.d.ts +11 -0
- package/types/core/layout/hierarchy/model.d.ts +167 -0
- package/types/core/layout/hierarchy/parent-relative-placement.d.ts +69 -0
- package/types/core/layout/hierarchy/placement-stage.d.ts +82 -0
- package/types/core/layout/hierarchy/util.d.ts +13 -0
- package/types/core/layout/hierarchy/vertex-set.d.ts +45 -0
- package/types/core/layout/index.d.ts +10 -0
- package/types/core/layout/layouts.d.ts +10 -0
- package/types/core/magnetizer.d.ts +232 -0
- package/types/core/model/anchor.d.ts +38 -0
- package/types/core/model/cluster.d.ts +19 -0
- package/types/core/model/defs.d.ts +8 -0
- package/types/core/model/djikstra.d.ts +26 -0
- package/types/core/model/floyd-warshall.d.ts +15 -0
- package/types/core/model/graph.d.ts +1166 -0
- package/types/core/model/path.d.ts +227 -0
- package/types/core/params.d.ts +476 -0
- package/types/core/renderer.d.ts +74 -0
- package/types/core/router/common.d.ts +104 -0
- package/types/core/router/direct-router.d.ts +12 -0
- package/types/core/router/index.d.ts +3 -0
- package/types/core/router/orthogonal-router.d.ts +46 -0
- package/types/core/rtree/definitions.d.ts +24 -0
- package/types/core/rtree/hilbert.d.ts +9 -0
- package/types/core/rtree/index.d.ts +4 -0
- package/types/core/rtree/rtree.d.ts +102 -0
- package/types/core/rtree/util.d.ts +55 -0
- package/types/core/search/index.d.ts +1 -0
- package/types/core/search/visuallyjs-search.d.ts +167 -0
- package/types/core/selection.d.ts +394 -0
- package/types/core/templates/abstract-entry.d.ts +19 -0
- package/types/core/templates/comment-entry.d.ts +11 -0
- package/types/core/templates/core.d.ts +162 -0
- package/types/core/templates/custom-tag.d.ts +74 -0
- package/types/core/templates/defs.d.ts +123 -0
- package/types/core/templates/each-entry.d.ts +23 -0
- package/types/core/templates/element-entry.d.ts +18 -0
- package/types/core/templates/elements.d.ts +14 -0
- package/types/core/templates/executions.d.ts +100 -0
- package/types/core/templates/expressions.d.ts +47 -0
- package/types/core/templates/fake-dom.d.ts +42 -0
- package/types/core/templates/headless.d.ts +15 -0
- package/types/core/templates/if-entry.d.ts +25 -0
- package/types/core/templates/index.d.ts +14 -0
- package/types/core/templates/parser.d.ts +84 -0
- package/types/core/templates/text-entry.d.ts +17 -0
- package/types/core/templates/tmpl-entry.d.ts +13 -0
- package/types/core/toolkit.d.ts +1314 -0
- package/types/core/undo-redo/compound-action.d.ts +19 -0
- package/types/core/undo-redo/edge-action.d.ts +62 -0
- package/types/core/undo-redo/group-action.d.ts +60 -0
- package/types/core/undo-redo/move-action.d.ts +18 -0
- package/types/core/undo-redo/node-group-action.d.ts +62 -0
- package/types/core/undo-redo/port-action.d.ts +29 -0
- package/types/core/undo-redo/renderer-vertex-removed-action.d.ts +17 -0
- package/types/core/undo-redo/set-type-action.d.ts +14 -0
- package/types/core/undo-redo/undo-redo.d.ts +203 -0
- package/types/core/undo-redo/update-action.d.ts +20 -0
- package/types/core/undo-redo/vertex-update-action.d.ts +12 -0
- package/types/core/util.d.ts +661 -0
- package/types/index.d.ts +16 -0
- package/types/l.d.ts +2 -0
- package/types/test-support/index.d.ts +1 -0
- package/types/test-support/test-support.d.ts +833 -0
- package/types/ui/common/abstract-segment.d.ts +88 -0
- package/types/ui/common/anchor.d.ts +280 -0
- package/types/ui/common/connector.d.ts +106 -0
- package/types/ui/common/index.d.ts +5 -0
- package/types/ui/common/overlay.d.ts +117 -0
- package/types/ui/common/paint-style.d.ts +33 -0
- package/types/ui/connector-bezier/abstract-bezier-connector.d.ts +68 -0
- package/types/ui/connector-bezier/bezier-connector.d.ts +34 -0
- package/types/ui/connector-bezier/bezier-segment.d.ts +31 -0
- package/types/ui/connector-bezier/bezier.d.ts +129 -0
- package/types/ui/connector-bezier/index.d.ts +6 -0
- package/types/ui/connector-bezier/operations.d.ts +18 -0
- package/types/ui/connector-bezier/quadratic-bezier-connector.d.ts +35 -0
- package/types/ui/connector-orthogonal/default-orthogonal-path-compute.d.ts +11 -0
- package/types/ui/connector-orthogonal/definitions.d.ts +120 -0
- package/types/ui/connector-orthogonal/index.d.ts +7 -0
- package/types/ui/connector-orthogonal/modern-source-target-relocator.d.ts +37 -0
- package/types/ui/connector-orthogonal/operations.d.ts +49 -0
- package/types/ui/connector-orthogonal/stub-calculators.d.ts +12 -0
- package/types/ui/connector-orthogonal/utils.d.ts +134 -0
- package/types/ui/connector-orthogonal/vertex-avoidance.d.ts +29 -0
- package/types/ui/connector-straight/index.d.ts +2 -0
- package/types/ui/connector-straight/operations.d.ts +55 -0
- package/types/ui/connector-straight/straight-connector.d.ts +121 -0
- package/types/ui/copy-paste/clipboard.d.ts +45 -0
- package/types/ui/copy-paste/copy-data.d.ts +93 -0
- package/types/ui/copy-paste/index.d.ts +2 -0
- package/types/ui/core/callbacks.d.ts +48 -0
- package/types/ui/core/component/component.d.ts +115 -0
- package/types/ui/core/connector/abstract-connector.d.ts +66 -0
- package/types/ui/core/connector/arc-segment.d.ts +39 -0
- package/types/ui/core/connector/connection-impl.d.ts +81 -0
- package/types/ui/core/connector/connections.d.ts +113 -0
- package/types/ui/core/connector/connectors.d.ts +205 -0
- package/types/ui/core/connector/operations.d.ts +0 -0
- package/types/ui/core/connector/segments.d.ts +24 -0
- package/types/ui/core/connector/straight-segment.d.ts +32 -0
- package/types/ui/core/constants.d.ts +181 -0
- package/types/ui/core/context.d.ts +26 -0
- package/types/ui/core/core-events.d.ts +7 -0
- package/types/ui/core/core.d.ts +1734 -0
- package/types/ui/core/css-constants.d.ts +149 -0
- package/types/ui/core/defaults.d.ts +242 -0
- package/types/ui/core/definitions.d.ts +540 -0
- package/types/ui/core/event-constants.d.ts +510 -0
- package/types/ui/core/factory/anchor-record-factory.d.ts +17 -0
- package/types/ui/core/factory/continuous-anchors.d.ts +27 -0
- package/types/ui/core/factory/overlay-factory.d.ts +8 -0
- package/types/ui/core/grid-profile.d.ts +28 -0
- package/types/ui/core/group-collapse-expand.d.ts +23 -0
- package/types/ui/core/group-sizer.d.ts +9 -0
- package/types/ui/core/index.d.ts +45 -0
- package/types/ui/core/magnetize-profile.d.ts +82 -0
- package/types/ui/core/overlay/arrow-overlay.d.ts +34 -0
- package/types/ui/core/overlay/custom-overlay.d.ts +38 -0
- package/types/ui/core/overlay/diamond-overlay.d.ts +14 -0
- package/types/ui/core/overlay/dot-overlay.d.ts +54 -0
- package/types/ui/core/overlay/ellipse-overlay.d.ts +60 -0
- package/types/ui/core/overlay/label-overlay.d.ts +37 -0
- package/types/ui/core/overlay/overlay.d.ts +131 -0
- package/types/ui/core/overlay/plain-arrow-overlay.d.ts +15 -0
- package/types/ui/core/overlay/rectangle-overlay.d.ts +66 -0
- package/types/ui/core/params.d.ts +223 -0
- package/types/ui/core/router/astar-path-finder.d.ts +29 -0
- package/types/ui/core/router/base-router.d.ts +100 -0
- package/types/ui/core/router/default-router.d.ts +38 -0
- package/types/ui/core/router/index.d.ts +5 -0
- package/types/ui/core/router/router-utils.d.ts +118 -0
- package/types/ui/core/router/router.d.ts +30 -0
- package/types/ui/core/type-descriptors.d.ts +83 -0
- package/types/ui/core/ui-model.d.ts +65 -0
- package/types/ui/core/view/common-options.d.ts +15 -0
- package/types/ui/core/view/edge-options.d.ts +126 -0
- package/types/ui/core/view/events.d.ts +159 -0
- package/types/ui/core/view/group-options.d.ts +75 -0
- package/types/ui/core/view/index.d.ts +35 -0
- package/types/ui/core/view/node-options.d.ts +20 -0
- package/types/ui/core/view/node-or-port-options.d.ts +28 -0
- package/types/ui/core/view/port-options.d.ts +51 -0
- package/types/ui/core/view/vertex-options.d.ts +28 -0
- package/types/ui/core/viewport.d.ts +297 -0
- package/types/ui/index.d.ts +9 -0
- package/types/ui/plugins/definitions.d.ts +118 -0
- package/types/ui/plugins/index.d.ts +2 -0
- package/types/ui/plugins/plugins.d.ts +7 -0
- package/types/ui/property-mappings/definitions.d.ts +28 -0
- package/types/ui/property-mappings/index.d.ts +2 -0
- package/types/ui/property-mappings/property-mapper.d.ts +16 -0
- package/types/ui/util/index.d.ts +3 -0
- package/types/ui/util/property-tracker.d.ts +8 -0
- package/types/ui/util/svg-constants.d.ts +111 -0
- package/types/ui/util/util.d.ts +69 -0
- package/types/version.d.ts +1 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { XYChart } from "./base-xy-chart";
|
|
2
|
+
import { ChartSVGElement } from "./util";
|
|
3
|
+
import { ChartDimensions } from "./definitions";
|
|
4
|
+
import { DomainExtentMap } from "./domain_scale_utilities";
|
|
5
|
+
/**
|
|
6
|
+
* Base interface for plots. This interface is a placeholder and defines no properties.
|
|
7
|
+
* @group Charts
|
|
8
|
+
* @category Definitions
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface Plot {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Definition of a plot: a type, some options (the type of which varies based on the type of the plot), and the ID of the value axis the plot represents.
|
|
15
|
+
* @group Charts
|
|
16
|
+
* @category Definitions
|
|
17
|
+
*/
|
|
18
|
+
export interface PlotDefinition {
|
|
19
|
+
type: string;
|
|
20
|
+
options?: any;
|
|
21
|
+
valueAxis?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Base options for an XY plot
|
|
25
|
+
* @group Charts
|
|
26
|
+
* @category XY Chart
|
|
27
|
+
*/
|
|
28
|
+
export interface XYPlotOptions {
|
|
29
|
+
/**
|
|
30
|
+
* ID of the value axis to attach to. Defaults to `DEFAULT`.
|
|
31
|
+
*/
|
|
32
|
+
valueAxis?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Base class for XY plots.
|
|
36
|
+
* @group Charts
|
|
37
|
+
* @category XY Chart
|
|
38
|
+
*/
|
|
39
|
+
export declare abstract class XYPlot implements Plot {
|
|
40
|
+
chart: XYChart<any>;
|
|
41
|
+
type: string;
|
|
42
|
+
$valueAxis: string;
|
|
43
|
+
protected constructor(chart: XYChart<any>, options: XYPlotOptions, type: string);
|
|
44
|
+
abstract $draw(svgRoot: ChartSVGElement, dim: ChartDimensions, minPlottableValue: number, maxPlottableValue: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Return domain extents needed by this plot (e.g. {x:{min,max}, y:{min,max}}).
|
|
47
|
+
* Default: none.
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
getDomainExtents(): DomainExtentMap;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* This plot type expects a category axis and a value axis. It derives an `$inverted` flag by testing the $xAxisType against "value" - if true, not inverted, if false, inverted.
|
|
55
|
+
* @group Charts
|
|
56
|
+
*/
|
|
57
|
+
export declare abstract class CategoryVsAxisPlot extends XYPlot {
|
|
58
|
+
get $inverted(): boolean;
|
|
59
|
+
}
|
|
60
|
+
type PlotConstructor = (c: XYChart<any>, o: any) => XYPlot;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* @param type
|
|
64
|
+
* @param c
|
|
65
|
+
*/
|
|
66
|
+
export declare function addXYPlotType(type: string, c: PlotConstructor): void;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @param type
|
|
70
|
+
* @param xy
|
|
71
|
+
* @param options
|
|
72
|
+
*/
|
|
73
|
+
export declare function createXYPlot(type: string, xy: XYChart<any>, options: any): XYPlot;
|
|
74
|
+
export declare function isStackedPlot(pl: any): boolean;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sankey';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DataSource, Edge, HierarchyLayoutLayerEntry, Size, Vertex } from "../../core";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @param edge
|
|
5
|
+
* @param valueProperty
|
|
6
|
+
*/
|
|
7
|
+
export declare function _getEdgeValue(edge: Edge, valueProperty: string): number;
|
|
8
|
+
/** @internal */
|
|
9
|
+
export interface SankeyLayerEntry extends HierarchyLayoutLayerEntry {
|
|
10
|
+
obj: Vertex;
|
|
11
|
+
id: string;
|
|
12
|
+
size: Size;
|
|
13
|
+
layer: number;
|
|
14
|
+
type: string;
|
|
15
|
+
edges: Array<Edge>;
|
|
16
|
+
vertexSet: any;
|
|
17
|
+
offset: number;
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
export interface SankeyLayer {
|
|
21
|
+
entries: Array<SankeyLayerEntry>;
|
|
22
|
+
size: number;
|
|
23
|
+
offset: number;
|
|
24
|
+
layer: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @param model
|
|
29
|
+
* @param nodeWidth
|
|
30
|
+
* @param nodePadding
|
|
31
|
+
* @param width
|
|
32
|
+
* @param height
|
|
33
|
+
*/
|
|
34
|
+
export declare function preprocess(model: DataSource, nodeWidth: number, nodePadding: number, width: number, height: number, valueProperty: string): {
|
|
35
|
+
layers: SankeyLayer[];
|
|
36
|
+
scale: number;
|
|
37
|
+
};
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { SankeyLayer } from './preprocessor';
|
|
2
|
+
import { Node, Edge, Vertex, DataSource, VisuallyJsDefaultJSON } from "../../core";
|
|
3
|
+
import { BrowserElement, BrowserUIModel, FontSpec } from "../../browser-ui";
|
|
4
|
+
import { ChartSVGElement } from "../util";
|
|
5
|
+
import { BaseChart, BaseChartOptions } from "../base-chart";
|
|
6
|
+
import { Tooltip, TooltipOptions } from "../tooltip";
|
|
7
|
+
import { ChartDimensions } from "../definitions";
|
|
8
|
+
/**
|
|
9
|
+
* Assigned to edges in Sankey chart
|
|
10
|
+
* @group Charts
|
|
11
|
+
* @category CSS Classes
|
|
12
|
+
* @cssClass
|
|
13
|
+
* @context sankey
|
|
14
|
+
*/
|
|
15
|
+
export declare const CLASS_SANKEY_EDGE = "vjs-sankey-edge";
|
|
16
|
+
/**
|
|
17
|
+
* Assigned to edges/nodes in Sankey chart when something is selected but this edge/node is not in the selected path
|
|
18
|
+
* @group Charts
|
|
19
|
+
* @category CSS Classes
|
|
20
|
+
* @cssClass
|
|
21
|
+
* @context sankey
|
|
22
|
+
*/
|
|
23
|
+
export declare const CLASS_SANKEY_UNSELECTED = "vjs-sankey-unselected";
|
|
24
|
+
/**
|
|
25
|
+
* Assigned to edges/nodes in Sankey chart when the edge/node forms part of the selected path.
|
|
26
|
+
* @group Charts
|
|
27
|
+
* @category CSS Classes
|
|
28
|
+
* @cssClass
|
|
29
|
+
* @context sankey
|
|
30
|
+
*/
|
|
31
|
+
export declare const CLASS_SANKEY_SELECTED = "vjs-sankey-selected";
|
|
32
|
+
/**
|
|
33
|
+
* Assigned to the sankey chart container
|
|
34
|
+
* @group Charts
|
|
35
|
+
* @category CSS Classes
|
|
36
|
+
* @cssClass
|
|
37
|
+
* @context sankey
|
|
38
|
+
*/
|
|
39
|
+
export declare const CLASS_SANKEY_CHART = "vjs-sankey";
|
|
40
|
+
/**
|
|
41
|
+
* Assigned to nodes in a sankey chart
|
|
42
|
+
* @group Charts
|
|
43
|
+
* @category CSS Classes
|
|
44
|
+
* @cssClass
|
|
45
|
+
* @context sankey
|
|
46
|
+
*/
|
|
47
|
+
export declare const CLASS_SANKEY_NODE = "vjs-sankey-node";
|
|
48
|
+
/**
|
|
49
|
+
* Assigned to labels in a sankey chart
|
|
50
|
+
* @group Charts
|
|
51
|
+
* @category CSS Classes
|
|
52
|
+
* @cssClass
|
|
53
|
+
* @context sankey
|
|
54
|
+
*/
|
|
55
|
+
export declare const CLASS_SANKEY_LABEL = "vjs-sankey-label";
|
|
56
|
+
/**
|
|
57
|
+
* Options for Sankey diagram
|
|
58
|
+
*/
|
|
59
|
+
export interface SankeyOptions extends Omit<BaseChartOptions, "data"> {
|
|
60
|
+
/**
|
|
61
|
+
* Strategy for link color: static uses a single color, source-target paints a gradient from source to target, target uses the target node color, source uses the source node color.
|
|
62
|
+
*/
|
|
63
|
+
linkColorStrategy?: "static" | "source-target" | "target" | "source";
|
|
64
|
+
/**
|
|
65
|
+
* Link color to use when linkColorStrategy is 'static'. Defaults to "#444444"
|
|
66
|
+
*/
|
|
67
|
+
linkColor?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Width, in pixels, of nodes. Defaults to 15.
|
|
70
|
+
*/
|
|
71
|
+
nodeWidth?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Spacing, in pixels, between nodes. Defaults to 10.
|
|
74
|
+
*/
|
|
75
|
+
nodePadding?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Padding to leave around the chart. Defaults to 20 pixels.
|
|
78
|
+
*/
|
|
79
|
+
padding?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Defaults to true - the charts responds to mouse hover events and highlights edges, nodes and paths.
|
|
82
|
+
*/
|
|
83
|
+
interactive?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Options for the node labels.
|
|
86
|
+
*/
|
|
87
|
+
labels?: {
|
|
88
|
+
/**
|
|
89
|
+
* Optional font spec to use for node labels. Defaults to 12px.
|
|
90
|
+
*/
|
|
91
|
+
font?: FontSpec;
|
|
92
|
+
/**
|
|
93
|
+
* Optional padding to use for node labels. Defaults to 5 pixels.
|
|
94
|
+
*/
|
|
95
|
+
padding?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Optional background color to use for node labels. Defaults to "#FFFFFF56".
|
|
98
|
+
*/
|
|
99
|
+
backgroundColor?: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Optional suffix to append to tooltip labels.
|
|
103
|
+
*/
|
|
104
|
+
tooltipSuffix?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Optional CSV data to load. Each line should be in the format `source,target,value`.
|
|
107
|
+
*/
|
|
108
|
+
csvData?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Optional dataset to load.
|
|
111
|
+
*/
|
|
112
|
+
jsonData?: VisuallyJsDefaultJSON;
|
|
113
|
+
/**
|
|
114
|
+
* When using a data source, this property tells the chart which field contains edge values. It defaults to `value`.
|
|
115
|
+
*/
|
|
116
|
+
valueProperty?: string;
|
|
117
|
+
/**
|
|
118
|
+
* When using a data source, this property tells the chart which field contains node labels. It defaults to `labels`. If there is no value provided for the property with this key, the node's ID is used as the label.
|
|
119
|
+
*/
|
|
120
|
+
labelProperty?: string;
|
|
121
|
+
pivot?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A Sankey chart visualizes data flow between nodes.
|
|
125
|
+
* @group Charts
|
|
126
|
+
* @category Sankey
|
|
127
|
+
*/
|
|
128
|
+
export declare class SankeyChart extends BaseChart {
|
|
129
|
+
linkColorStrategy: "static" | "source-target" | "target" | "source";
|
|
130
|
+
linkColor: string;
|
|
131
|
+
_nodeWidth: number;
|
|
132
|
+
_nodePadding: number;
|
|
133
|
+
_tooltipSuffix: string;
|
|
134
|
+
_model: BrowserUIModel;
|
|
135
|
+
_pivotModel: BrowserUIModel;
|
|
136
|
+
get currentModel(): BrowserUIModel;
|
|
137
|
+
_interactive: boolean;
|
|
138
|
+
_dataSource: DataSource;
|
|
139
|
+
_valueProperty: string;
|
|
140
|
+
_labelProperty: string;
|
|
141
|
+
_currentVertex: Node;
|
|
142
|
+
_currentEdges: Array<[Edge, ChartSVGElement]>;
|
|
143
|
+
_currentCluster: {
|
|
144
|
+
vertices: Array<Vertex>;
|
|
145
|
+
edges: Array<Edge>;
|
|
146
|
+
};
|
|
147
|
+
_edgeElements: Record<string, ChartSVGElement>;
|
|
148
|
+
_nodeElements: Record<string, ChartSVGElement>;
|
|
149
|
+
_labelElements: Record<string, ChartSVGElement>;
|
|
150
|
+
_labelBackgroundElements: Record<string, ChartSVGElement>;
|
|
151
|
+
_layers: Array<SankeyLayer>;
|
|
152
|
+
_pivotProperty: string;
|
|
153
|
+
_labelOptions: {
|
|
154
|
+
font: FontSpec;
|
|
155
|
+
padding: number;
|
|
156
|
+
backgroundColor: string;
|
|
157
|
+
};
|
|
158
|
+
$tooltip: SankeyTooltip;
|
|
159
|
+
private _assignLinkColor;
|
|
160
|
+
constructor(container: BrowserElement, options: SankeyOptions);
|
|
161
|
+
$drawDecoration(svgRoot: ChartSVGElement, width: number, height: number): ChartDimensions;
|
|
162
|
+
$drawChart(svgRoot: ChartSVGElement, width: number, height: number, backgroundElement: ChartSVGElement): void;
|
|
163
|
+
private nodeDecorator;
|
|
164
|
+
private edgeDecorator;
|
|
165
|
+
private _init;
|
|
166
|
+
private _loadPivotData;
|
|
167
|
+
private _loadFromDatasource;
|
|
168
|
+
/**
|
|
169
|
+
* Load data, either from a URL, CSV string, JS object or a DataSource.
|
|
170
|
+
* @param options
|
|
171
|
+
*/
|
|
172
|
+
load(options: {
|
|
173
|
+
url?: string;
|
|
174
|
+
csvData?: string;
|
|
175
|
+
dataType?: string;
|
|
176
|
+
jsonData?: VisuallyJsDefaultJSON;
|
|
177
|
+
}): void;
|
|
178
|
+
hasData(): boolean;
|
|
179
|
+
destroy(): void;
|
|
180
|
+
private _clearVertex;
|
|
181
|
+
/**
|
|
182
|
+
* Find the index of the layer the given vertex is in.
|
|
183
|
+
* @param vertex
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
private _getLayerIndex;
|
|
187
|
+
private _getNeighbors;
|
|
188
|
+
private _track2;
|
|
189
|
+
private _setVertex;
|
|
190
|
+
private _initEvents;
|
|
191
|
+
/**
|
|
192
|
+
* Redraw the chart and pivot around a specific edge property.
|
|
193
|
+
* @param property
|
|
194
|
+
*/
|
|
195
|
+
pivot(property: string): void;
|
|
196
|
+
/**
|
|
197
|
+
* Alias to `pivot(null)`
|
|
198
|
+
*/
|
|
199
|
+
clearPivot(): void;
|
|
200
|
+
}
|
|
201
|
+
declare class SankeyTooltip extends Tooltip {
|
|
202
|
+
private valueProperty;
|
|
203
|
+
private labelProperty;
|
|
204
|
+
constructor(parentElement: BrowserElement, options: TooltipOptions, valueProperty: string, labelProperty: string);
|
|
205
|
+
showEdgeTooltip(edge: Edge, e: MouseEvent, edgeElement: ChartSVGElement): void;
|
|
206
|
+
showNodeTooltip(node: Node, e: MouseEvent, nodeElement: ChartSVGElement): void;
|
|
207
|
+
}
|
|
208
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BrowserElement } from "../../browser-ui";
|
|
2
|
+
import { ObjectData } from "../../core";
|
|
3
|
+
import { DualValueChart } from "../dual-value-chart";
|
|
4
|
+
import { DualValueChartSeries } from "../series";
|
|
5
|
+
import { ScatterChartOptions } from "./definitions";
|
|
6
|
+
/**
|
|
7
|
+
* A scatter chart represents data in 2 axes.
|
|
8
|
+
* @group Charts
|
|
9
|
+
* @category Scatter Chart
|
|
10
|
+
*/
|
|
11
|
+
export declare class ScatterChart extends DualValueChart {
|
|
12
|
+
options: ScatterChartOptions;
|
|
13
|
+
constructor(container: BrowserElement, options: ScatterChartOptions);
|
|
14
|
+
$getMarkerSize(s: DualValueChartSeries, point: ObjectData): number;
|
|
15
|
+
$getDataPointCssClass(): string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ChartSeries, ChartSeriesOptions } from "./series";
|
|
2
|
+
import { ObjectData } from "../../core/model/graph";
|
|
3
|
+
import { RealisedSeries } from "./definitions";
|
|
4
|
+
import { BaseChart } from "../base-chart";
|
|
5
|
+
export declare const DEFAULT_ARRAY_SERIES_STEP = 1;
|
|
6
|
+
export declare const DEFAULT_ARRAY_SERIES_RANGE_START_FIELD = "rangeStart";
|
|
7
|
+
export declare const DEFAULT_ARRAY_SERIES_VALUES_FIELD = "values";
|
|
8
|
+
export declare const DEFAULT_ARRAY_SERIES_MIN_VALUES_FIELD = "minValues";
|
|
9
|
+
export declare const DEFAULT_ARRAY_SERIES_MAX_VALUES_FIELD = "maxValues";
|
|
10
|
+
export declare const DEFAULT_ARRAY_SERIES_LABEL_FIELD = "label";
|
|
11
|
+
export declare const DEFAULT_ARRAY_SERIES_ID_FIELD = "id";
|
|
12
|
+
/**
|
|
13
|
+
* Definition of a function that can generate labels for an array series.
|
|
14
|
+
* @param index The index of the data point for which we need a label
|
|
15
|
+
* @param data The data object from which the series is being populated
|
|
16
|
+
*/
|
|
17
|
+
export type ArraySeriesLabelGenerator = (index: number, data: ObjectData) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Array based chart series - each category is represented by a single record, which has either a field containing an array of values, or both a field containing minimum values and a field containing maximum values.
|
|
20
|
+
* @group Charts
|
|
21
|
+
* @category Definitions
|
|
22
|
+
*/
|
|
23
|
+
export interface ArrayBasedSeriesOptions extends ChartSeriesOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Start value for the series. Defaults to 0.
|
|
26
|
+
*/
|
|
27
|
+
startPoint?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Step between values in the series. Defaults to 1.
|
|
30
|
+
*/
|
|
31
|
+
step?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Currently unused.
|
|
34
|
+
*/
|
|
35
|
+
rangeStartField?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The field containing the array of values. Defaults to `"values"`.
|
|
38
|
+
*/
|
|
39
|
+
valuesField?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The field containing the array of minimum values. This is required if you want to draw an Area chart - and you also need to provide the `maxValuesField`. Defaults to `"minValues"`.
|
|
42
|
+
*/
|
|
43
|
+
minValuesField?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The field containing the array of maximum values. This is required if you want to draw an Area chart - and you also need to provide the `minValuesField`. Defaults to `"maxValues"`.
|
|
46
|
+
*/
|
|
47
|
+
maxValuesField?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Optional field which contains the label for the series itself. Defaults to `"label"`.
|
|
50
|
+
*/
|
|
51
|
+
labelField?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Optional field which contains the ID for the series. If not provided, an id will be auto generated.
|
|
54
|
+
*/
|
|
55
|
+
idField?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Labels to use for the series. Optional. If omitted the label for each data point is computed from `startPoint` + `step`. Providing labels in the series is useful when your data is not strictly numeric increasing, or you want to customise its display.
|
|
58
|
+
*/
|
|
59
|
+
labels?: Array<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Optional function to use to generate labels for each step in the array series. This offers the most customisation of all - each time a data point in the series is drawn, this function is invoked, and the return value is used as the label on the category axis.
|
|
62
|
+
* @param index
|
|
63
|
+
* @param data
|
|
64
|
+
*/
|
|
65
|
+
labelGenerator?: ArraySeriesLabelGenerator;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A series in which each category is represented by a single record, which has a field containing an array of values. This series type requires that the user provides a start point. The series has a default 'step' of 1, meaning that the series advances by 1 for each subsequent value in the array, but you can set the step. By default the series will extract the array of values from a field names 'values', but that can also be set.
|
|
69
|
+
*
|
|
70
|
+
* It is not necessary that each record has the same number of data points. By default, if some record has fewer points than other records, its series will just be truncated. You can also provide a `rangeStart` value inside a series record, which indicates where the array of values for the given series begins.
|
|
71
|
+
*
|
|
72
|
+
* @group Charts
|
|
73
|
+
*/
|
|
74
|
+
export declare class ArrayBasedSeries extends ChartSeries {
|
|
75
|
+
private chart;
|
|
76
|
+
static type: string;
|
|
77
|
+
startPoint: number;
|
|
78
|
+
step: number;
|
|
79
|
+
rangeStartField: string;
|
|
80
|
+
$valuesField: string;
|
|
81
|
+
$minValuesField: string;
|
|
82
|
+
$maxValuesField: string;
|
|
83
|
+
$labelField: string;
|
|
84
|
+
$idField: string;
|
|
85
|
+
$labels: Array<string>;
|
|
86
|
+
$labelGenerator: ArraySeriesLabelGenerator;
|
|
87
|
+
$series: Array<RealisedSeries>;
|
|
88
|
+
values: Array<number>;
|
|
89
|
+
constructor(options: ArrayBasedSeriesOptions, chart: BaseChart);
|
|
90
|
+
addValue(data: ObjectData): void;
|
|
91
|
+
private _computeCategoryLabel;
|
|
92
|
+
private _computeDefaultCategoryLabel;
|
|
93
|
+
expand(): Array<RealisedSeries>;
|
|
94
|
+
reset(): void;
|
|
95
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChartSeries, ChartSeriesOptions } from "./series";
|
|
2
|
+
import { ObjectData } from "../../core";
|
|
3
|
+
import { RealisedSeries } from "./definitions";
|
|
4
|
+
export interface CollationSeriesOptions extends ChartSeriesOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Name of the field containing values. Defaults to "value".
|
|
7
|
+
*/
|
|
8
|
+
valueField?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class CollationSeries extends ChartSeries {
|
|
11
|
+
static type: string;
|
|
12
|
+
counts: Map<any, number>;
|
|
13
|
+
id: string;
|
|
14
|
+
color: string;
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Name of the field containing values. Defaults to "value".
|
|
18
|
+
*/
|
|
19
|
+
valueField: string;
|
|
20
|
+
constructor(options: CollationSeriesOptions);
|
|
21
|
+
addValue(data: ObjectData): void;
|
|
22
|
+
reset(): void;
|
|
23
|
+
expand(): Array<RealisedSeries>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A series that has been preprocessed and can be included on a chart.
|
|
3
|
+
*/
|
|
4
|
+
import { ObjectData } from "../../core";
|
|
5
|
+
import { ChartSeriesOptions } from "./series";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface RealisedSeries {
|
|
10
|
+
isRangeSeries(): boolean;
|
|
11
|
+
getCategories(): Array<ObjectData>;
|
|
12
|
+
values: Array<{
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
}>;
|
|
16
|
+
color: string;
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
total: number;
|
|
20
|
+
label: string;
|
|
21
|
+
id: string;
|
|
22
|
+
visible: boolean;
|
|
23
|
+
marker?: string;
|
|
24
|
+
markerType?: "circle" | "square" | "cross";
|
|
25
|
+
markerSize?: number;
|
|
26
|
+
stack?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Options for a dual value axis chart
|
|
30
|
+
*/
|
|
31
|
+
export interface DualValueSeriesOptions extends ChartSeriesOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Name of the field from which to extract X axis data points
|
|
34
|
+
*/
|
|
35
|
+
xAxisField: string;
|
|
36
|
+
/**
|
|
37
|
+
* Name of the field from which to extract Y axis data points
|
|
38
|
+
*/
|
|
39
|
+
yAxisField: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether or not to show an outline around the markers. Defaults to false.
|
|
42
|
+
*/
|
|
43
|
+
outline?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The width of the outline in pixels. Defaults to 1.
|
|
46
|
+
*/
|
|
47
|
+
outlineWidth?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Color for outline. If not provided, a contrasting color will be computed.
|
|
50
|
+
*/
|
|
51
|
+
outlineColor?: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ObjectData } from "../../core";
|
|
2
|
+
import { ChartSeries, HasMarkerSeries, MarkerResolutionFunction } from "./series";
|
|
3
|
+
import { RealisedSeries } from "./definitions";
|
|
4
|
+
import { DualValueChartAxis } from "../definitions";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class DualValueChartSeries extends ChartSeries implements HasMarkerSeries {
|
|
9
|
+
readonly xAxisField: string;
|
|
10
|
+
readonly yAxisField: string;
|
|
11
|
+
$data: Array<ObjectData>;
|
|
12
|
+
$xAxis: DualValueChartAxis;
|
|
13
|
+
$yAxis: DualValueChartAxis;
|
|
14
|
+
marker?: string;
|
|
15
|
+
markerType?: "circle" | "square" | "cross";
|
|
16
|
+
markerSize?: number;
|
|
17
|
+
color?: string;
|
|
18
|
+
outline?: boolean;
|
|
19
|
+
outlineWidth?: number;
|
|
20
|
+
outlineColor?: string;
|
|
21
|
+
resolveMarker?: MarkerResolutionFunction;
|
|
22
|
+
constructor(xAxisField: string, yAxisField: string, marker?: string, markerType?: "circle" | "square" | "cross", markerSize?: number, color?: string, outline?: boolean, outlineWidth?: number, outlineColor?: string, resolveMarker?: MarkerResolutionFunction);
|
|
23
|
+
reset(): void;
|
|
24
|
+
addValue(o: ObjectData): void;
|
|
25
|
+
expand(): Array<RealisedSeries>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ChartSeries, ChartSeriesOptions } from "./series";
|
|
2
|
+
import { ObjectData } from "../../core";
|
|
3
|
+
import { RealisedSeries } from "./definitions";
|
|
4
|
+
/**
|
|
5
|
+
* Options for a RecordBasedSeries.
|
|
6
|
+
* @group Charts
|
|
7
|
+
* @category Definitions
|
|
8
|
+
*/
|
|
9
|
+
export interface RecordBasedSeriesOptions extends ChartSeriesOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Name of the field containing values. Defaults to "value".
|
|
12
|
+
*/
|
|
13
|
+
valueField?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Name of the field containing minimum values, when the series is used in a range plot. Defaults to "minValue".
|
|
16
|
+
*/
|
|
17
|
+
minValueField?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Name of the field containing maximum values, when the series is used in a range plot. Defaults to "maxValue".
|
|
20
|
+
*/
|
|
21
|
+
maxValueField?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A Series in which each individual step of the series is represented by a single record. Like say you have corn and wheat production estimates for a set of countries - each country would be a single record, inside which there is an entry for corn and one for wheat. Or maybe you have a trophy count for some football teams, how many times they have won the FA cup, british premier league and champions league, say. In that case each team is a record, and the count of trophies in each league is an entry.
|
|
25
|
+
*
|
|
26
|
+
* @group Charts
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare class RecordBasedSeries extends ChartSeries implements RealisedSeries {
|
|
30
|
+
static type: string;
|
|
31
|
+
color: string;
|
|
32
|
+
min: number;
|
|
33
|
+
max: number;
|
|
34
|
+
total: number;
|
|
35
|
+
label: string;
|
|
36
|
+
id: string;
|
|
37
|
+
visible: boolean;
|
|
38
|
+
categories: Array<ObjectData>;
|
|
39
|
+
values: Array<{
|
|
40
|
+
min: number;
|
|
41
|
+
max: number;
|
|
42
|
+
}>;
|
|
43
|
+
valueField?: string;
|
|
44
|
+
minValueField?: string;
|
|
45
|
+
maxValueField?: string;
|
|
46
|
+
marker?: string;
|
|
47
|
+
markerType?: "circle" | "square" | "cross";
|
|
48
|
+
markerSize?: number;
|
|
49
|
+
private _groupField;
|
|
50
|
+
private _groups;
|
|
51
|
+
isRangeSeries(): boolean;
|
|
52
|
+
constructor(options: RecordBasedSeriesOptions, color: string, groupField?: string);
|
|
53
|
+
reset(): void;
|
|
54
|
+
toggleVisible(): void;
|
|
55
|
+
addValue(data: ObjectData): void;
|
|
56
|
+
getCategories(): Array<ObjectData>;
|
|
57
|
+
expand(): Array<RealisedSeries>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ObjectData } from "../../core/model/graph";
|
|
2
|
+
import { RealisedSeries } from "./definitions";
|
|
3
|
+
import { RecordBasedSeries } from "./record-based-series";
|
|
4
|
+
import { ArrayBasedSeries } from "./array-based-series";
|
|
5
|
+
import { CollationSeries } from "./collation-series";
|
|
6
|
+
/**
|
|
7
|
+
* Defines a function that can resolve a custom SVG marker for a specific data point.
|
|
8
|
+
*/
|
|
9
|
+
export type MarkerResolutionFunction = (point: ObjectData) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Base interface for chart series options.
|
|
12
|
+
* @group Charts
|
|
13
|
+
* @category Definitions
|
|
14
|
+
*/
|
|
15
|
+
export interface ChartSeriesOptions {
|
|
16
|
+
/**
|
|
17
|
+
* The id of the series.
|
|
18
|
+
*/
|
|
19
|
+
id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Label for the series. Optional.
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Color to use for the series. This is optional and if not provided the chart will use a color from its installed {@link ColorGenerator}.
|
|
26
|
+
*/
|
|
27
|
+
color?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Defines the series type.
|
|
30
|
+
*/
|
|
31
|
+
type?: typeof RecordBasedSeries.type | typeof ArrayBasedSeries.type | typeof CollationSeries.type;
|
|
32
|
+
/**
|
|
33
|
+
* Optional template to use for markers. This should be a string in VisuallyJs's internal template format, with namespaced SVG elements.
|
|
34
|
+
*/
|
|
35
|
+
marker?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Size (in pixels) to use for data points. Defaults to 10 pixels. For circular markers this equates to the diameter; for square/cross this is width/height
|
|
38
|
+
*/
|
|
39
|
+
markerSize?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Type of marker to draw. Defaults to "circle".
|
|
42
|
+
*/
|
|
43
|
+
markerType?: "circle" | "square" | "cross";
|
|
44
|
+
/**
|
|
45
|
+
* Optional function to resolve a marker SVG string for each data point.
|
|
46
|
+
*/
|
|
47
|
+
resolveMarker?: MarkerResolutionFunction;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @group Charts
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare abstract class ChartSeries {
|
|
54
|
+
abstract reset(): void;
|
|
55
|
+
abstract addValue(data: ObjectData): void;
|
|
56
|
+
/**
|
|
57
|
+
* Expand the given series into a set of RealisedSeries objects. For RecordBasedSeries this just means to return the series itself, as it is already fully realised. But for ArrayBasedSeries this method returns a set of RealisedSeries, one for each value that was added to the array based series.
|
|
58
|
+
*/
|
|
59
|
+
abstract expand(): Array<RealisedSeries>;
|
|
60
|
+
}
|
|
61
|
+
export interface HasMarkerSeries {
|
|
62
|
+
marker?: string;
|
|
63
|
+
markerType?: "circle" | "square" | "cross";
|
|
64
|
+
markerSize?: number;
|
|
65
|
+
resolveMarker?: MarkerResolutionFunction;
|
|
66
|
+
}
|