@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,34 @@
|
|
|
1
|
+
import { BarPlotOptions, DataLabelsOptions } from "./bar-plot";
|
|
2
|
+
import { CategoryValueChart, CategoryValueChartOptions } from "../category-value-chart";
|
|
3
|
+
/**
|
|
4
|
+
* Options for a Bar chart
|
|
5
|
+
* @group Charts
|
|
6
|
+
* @category Bar Chart
|
|
7
|
+
*/
|
|
8
|
+
export interface BarChartOptions extends Omit<CategoryValueChartOptions, "plots"> {
|
|
9
|
+
plotOptions?: BarPlotOptions;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to stack series values next to each other, optionally as a percentage stack (which takes up the available space and shows each component proportionally)
|
|
12
|
+
*/
|
|
13
|
+
stacked?: boolean | "percent" | "default";
|
|
14
|
+
/**
|
|
15
|
+
* Whether to group multiple stacks side-by-side within a single category.
|
|
16
|
+
*/
|
|
17
|
+
grouped?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The field in the data objects used to identify the stack/group.
|
|
20
|
+
*/
|
|
21
|
+
groupField?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Options for data labels
|
|
24
|
+
*/
|
|
25
|
+
dataLabels?: DataLabelsOptions;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A Bar chart: the value axis is the X axis and the category axis is the Y axis.
|
|
29
|
+
* @group Charts
|
|
30
|
+
* @category Bar Chart
|
|
31
|
+
*/
|
|
32
|
+
export declare class BarChart extends CategoryValueChart {
|
|
33
|
+
constructor(container: HTMLElement | SVGElement, options: BarChartOptions);
|
|
34
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { CategoryVsAxisPlot, XYPlot, XYPlotOptions } from "../plot";
|
|
2
|
+
import { ChartDimensions } from "../definitions";
|
|
3
|
+
import { ChartSVGElement } from "../util";
|
|
4
|
+
import { DomainExtentMap } from "../domain_scale_utilities";
|
|
5
|
+
import { CategoryValueChart } from "../category-value-chart";
|
|
6
|
+
export declare const DEFAULT_CATEGORY_FILL_RATIO = 0.8;
|
|
7
|
+
export declare const DEFAULT_MAXIMUM_BAR_WIDTH = 50;
|
|
8
|
+
export declare const DEFAULT_BAR_GAP = 10;
|
|
9
|
+
/**
|
|
10
|
+
* Base interface for plots that are stackable.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface StackedPlot {
|
|
14
|
+
stacked?: boolean | "percent" | "default";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Base interface for options for plots that are stackable.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export interface StackablePlotOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Whether to stack series values on top of each other.
|
|
23
|
+
*/
|
|
24
|
+
stacked?: boolean | "percent" | "default";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Defines the format for data labels options.
|
|
28
|
+
*/
|
|
29
|
+
export type DataLabelsOptions = boolean | string;
|
|
30
|
+
/**
|
|
31
|
+
* Options for a bar/column chart plot
|
|
32
|
+
* @group Charts
|
|
33
|
+
* @category Bar Chart
|
|
34
|
+
*/
|
|
35
|
+
export interface BarPlotOptions extends XYPlotOptions, StackablePlotOptions {
|
|
36
|
+
/**
|
|
37
|
+
* How much of the space available to each category to use for the bars in the chart. Defaults to 0.8. You should not set this to a value greater than 1.
|
|
38
|
+
*/
|
|
39
|
+
fillRatio?: number;
|
|
40
|
+
/**
|
|
41
|
+
* The maximum size of a bar representing a value. Defaults to 50 pixels. This value applies to the category axis, NOT the value axis! In the value axis the size of the bar maps the value being displayed.
|
|
42
|
+
*/
|
|
43
|
+
maxBarSize?: number;
|
|
44
|
+
/**
|
|
45
|
+
* The width/height to use for bars representing values. If you provide this the chart will not check whether it results in any overlap. Defaults to null.
|
|
46
|
+
*/
|
|
47
|
+
barSize?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The amount of space to leave between bars of the same category when there are multiple series.
|
|
50
|
+
*/
|
|
51
|
+
barGap?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Options for data labels. If true, the value for the bar is shown. If a string, it is used as a format string.
|
|
54
|
+
*/
|
|
55
|
+
dataLabels?: DataLabelsOptions;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
type BarDimensions = {
|
|
61
|
+
barSize: number;
|
|
62
|
+
gapBetweenBars: number;
|
|
63
|
+
spaceUsedPerCategory: number;
|
|
64
|
+
spacePerCategory: number;
|
|
65
|
+
barsPerCategory: number;
|
|
66
|
+
};
|
|
67
|
+
export declare function isBarPlot(pl: XYPlot): pl is BarPlot;
|
|
68
|
+
/**
|
|
69
|
+
* A bar plot is used for both a BarChart and a ColumnChart.
|
|
70
|
+
* @group Charts
|
|
71
|
+
* @category Bar Chart
|
|
72
|
+
*/
|
|
73
|
+
export declare class BarPlot extends CategoryVsAxisPlot {
|
|
74
|
+
chart: CategoryValueChart;
|
|
75
|
+
protected options: BarPlotOptions;
|
|
76
|
+
static type: string;
|
|
77
|
+
stacked: boolean | "percent" | "default";
|
|
78
|
+
private $distinctStacks;
|
|
79
|
+
constructor(chart: CategoryValueChart, options: BarPlotOptions);
|
|
80
|
+
getDomainExtents(): DomainExtentMap;
|
|
81
|
+
protected computeBarSize(availableSpace: number): BarDimensions;
|
|
82
|
+
$getBarCenter(category: number, series: number, dim: ChartDimensions): number;
|
|
83
|
+
private $computeBarPlacements;
|
|
84
|
+
private $computeBarPlacementsStackedPercent;
|
|
85
|
+
private $computeBarPlacementsStacked;
|
|
86
|
+
private $computeBarPlacementsDefault;
|
|
87
|
+
$draw(svgRoot: ChartSVGElement, dim: ChartDimensions, minPlottableValue: number, maxPlottableValue: number): void;
|
|
88
|
+
private $drawDataLabel;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BrowserElement } from "../../browser-ui";
|
|
2
|
+
import { BarPlotOptions, DataLabelsOptions } from "./bar-plot";
|
|
3
|
+
import { CategoryValueChart, CategoryValueChartOptions } from "../category-value-chart";
|
|
4
|
+
/**
|
|
5
|
+
* Options for a column chart.
|
|
6
|
+
* @group Charts
|
|
7
|
+
* @category Column Chart
|
|
8
|
+
*/
|
|
9
|
+
export interface ColumnChartOptions extends Omit<CategoryValueChartOptions, "plots"> {
|
|
10
|
+
plotOptions?: BarPlotOptions;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to stack series values next to each other, optionally as a percentage stack (which takes up the available space and shows each component proportionally)
|
|
13
|
+
*/
|
|
14
|
+
stacked?: boolean | "percent" | "default";
|
|
15
|
+
/**
|
|
16
|
+
* Whether to group multiple stacks side-by-side within a single category.
|
|
17
|
+
*/
|
|
18
|
+
grouped?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The field in the data objects used to identify the stack/group.
|
|
21
|
+
*/
|
|
22
|
+
groupField?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Options for data labels
|
|
25
|
+
*/
|
|
26
|
+
dataLabels?: DataLabelsOptions;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A column chart. Sets an inverted {@link BarPlot}. In a ColumnChart the value axis is the Y axis and the category axis is the X axis.
|
|
30
|
+
* @group Charts
|
|
31
|
+
* @category Column Chart
|
|
32
|
+
*/
|
|
33
|
+
export declare class ColumnChart extends CategoryValueChart {
|
|
34
|
+
constructor(container: BrowserElement, options: ColumnChartOptions);
|
|
35
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import { OptimisticEventGenerator, ColorGenerator, PointXY, ObjectData, DataSource, Node, Group } from "../core";
|
|
2
|
+
import { EventManager, BrowserElement, FontSpec, ImageExportOptions, ImageReadyFunction } from "../browser-ui";
|
|
3
|
+
import { ChartSVGElement } from "./util";
|
|
4
|
+
import { ChartLegend, LegendSpec } from "./legend";
|
|
5
|
+
import { TooltipOptions } from "./tooltip";
|
|
6
|
+
import { ChartDimensions } from "./definitions";
|
|
7
|
+
import { ChartExporter, ChartExporterOptions } from "./chart-exporter";
|
|
8
|
+
import { ChartZoomControls } from "./chart-zoom-controls";
|
|
9
|
+
export declare const DEFAULT_BACKGROUND_COLOR = "#FFFFFF";
|
|
10
|
+
export declare const DEFAULT_MARGIN = 15;
|
|
11
|
+
/**
|
|
12
|
+
* Middle alignment (centered) for chart title.
|
|
13
|
+
* @constant
|
|
14
|
+
* @group Charts
|
|
15
|
+
*/
|
|
16
|
+
export declare const CHART_TITLE_ALIGN_MIDDLE = "middle";
|
|
17
|
+
/**
|
|
18
|
+
* Left alignment for chart title.
|
|
19
|
+
* @constant
|
|
20
|
+
* @group Charts
|
|
21
|
+
*/
|
|
22
|
+
export declare const CHART_TITLE_ALIGN_LEFT = "left";
|
|
23
|
+
/**
|
|
24
|
+
* Right alignment for chart title.
|
|
25
|
+
* @constant
|
|
26
|
+
* @group Charts
|
|
27
|
+
*/
|
|
28
|
+
export declare const CHART_TITLE_ALIGN_RIGHT = "right";
|
|
29
|
+
/**
|
|
30
|
+
* Chart title alignment
|
|
31
|
+
*/
|
|
32
|
+
export type ChartTitleAlignment = typeof CHART_TITLE_ALIGN_LEFT | typeof CHART_TITLE_ALIGN_MIDDLE | typeof CHART_TITLE_ALIGN_RIGHT;
|
|
33
|
+
/**
|
|
34
|
+
* Defines placing the chart title at the top of the chart
|
|
35
|
+
* @constant
|
|
36
|
+
* @group Charts
|
|
37
|
+
*/
|
|
38
|
+
export declare const CHART_TITLE_PLACEMENT_TOP = "top";
|
|
39
|
+
/**
|
|
40
|
+
* Defines placing the chart title at the bottom of the chart
|
|
41
|
+
* @constant
|
|
42
|
+
* @group Charts
|
|
43
|
+
*/
|
|
44
|
+
export declare const CHART_TITLE_PLACEMENT_BOTTOM = "bottom";
|
|
45
|
+
/**
|
|
46
|
+
* Chart title placement - at the top or the bottom.
|
|
47
|
+
*/
|
|
48
|
+
export type ChartTitlePlacement = typeof CHART_TITLE_PLACEMENT_TOP | typeof CHART_TITLE_PLACEMENT_BOTTOM;
|
|
49
|
+
/**
|
|
50
|
+
* Base settings for a title.
|
|
51
|
+
* @group Charts
|
|
52
|
+
* @category Options
|
|
53
|
+
*/
|
|
54
|
+
export interface BaseTitleSpec {
|
|
55
|
+
/**
|
|
56
|
+
* The text to display.
|
|
57
|
+
*/
|
|
58
|
+
text?: string;
|
|
59
|
+
/**
|
|
60
|
+
* How much blank space to leave after the title.
|
|
61
|
+
*/
|
|
62
|
+
padding?: number;
|
|
63
|
+
/**
|
|
64
|
+
* If the title is too wide for the chart, this defines the amount of the width of the chart that it should fill, before being wrapped. Ignored if you set titleWrap:false. Defaults to 0.9.
|
|
65
|
+
*/
|
|
66
|
+
fillRatio?: number;
|
|
67
|
+
/**
|
|
68
|
+
* If the title is too wide for the chart, this flag controls whether or not the title is wrapped. It defaults to true.
|
|
69
|
+
*/
|
|
70
|
+
wrap?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Definition of a title used in a chart.
|
|
74
|
+
* @group Charts
|
|
75
|
+
* @category Options
|
|
76
|
+
*/
|
|
77
|
+
export interface ChartTitleSpec extends BaseTitleSpec {
|
|
78
|
+
/**
|
|
79
|
+
* Where to place the title - top or bottom. Defaults to top.
|
|
80
|
+
*/
|
|
81
|
+
placement?: ChartTitlePlacement;
|
|
82
|
+
/**
|
|
83
|
+
* Specs for the font to use for the title. In the title, the default font size is 20px, and style is 'bold'
|
|
84
|
+
*/
|
|
85
|
+
font?: FontSpec;
|
|
86
|
+
/**
|
|
87
|
+
* How to align the text - left, middle or right
|
|
88
|
+
*/
|
|
89
|
+
align?: ChartTitleAlignment;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Definition of a chart subtitle.
|
|
93
|
+
* @group Charts
|
|
94
|
+
* @category Options
|
|
95
|
+
*/
|
|
96
|
+
export interface SubtitleSpec extends BaseTitleSpec {
|
|
97
|
+
/**
|
|
98
|
+
* Spec for the font to use for the subtitle. Default size is 16px and style is 'italic'.
|
|
99
|
+
*/
|
|
100
|
+
font?: FontSpec;
|
|
101
|
+
/**
|
|
102
|
+
* How to align the text - left, middle or right
|
|
103
|
+
*/
|
|
104
|
+
align?: ChartTitleAlignment;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Middle alignment (centered) for axis title.
|
|
108
|
+
* @constant
|
|
109
|
+
* @group Charts
|
|
110
|
+
*/
|
|
111
|
+
export declare const CHART_AXIS_TITLE_ALIGN_MIDDLE = "middle";
|
|
112
|
+
/**
|
|
113
|
+
* At start alignment for axis title.
|
|
114
|
+
* @constant
|
|
115
|
+
* @group Charts
|
|
116
|
+
*/
|
|
117
|
+
export declare const CHART_AXIS_TITLE_ALIGN_START = "start";
|
|
118
|
+
/**
|
|
119
|
+
* At end alignment for axis title.
|
|
120
|
+
* @constant
|
|
121
|
+
* @group Charts
|
|
122
|
+
*/
|
|
123
|
+
export declare const CHART_AXIS_TITLE_ALIGN_END = "end";
|
|
124
|
+
/**
|
|
125
|
+
* Axis title alignment - start, middle or end. Middle is the default.
|
|
126
|
+
*/
|
|
127
|
+
export type AxisTitleAlignment = typeof CHART_AXIS_TITLE_ALIGN_MIDDLE | typeof CHART_AXIS_TITLE_ALIGN_START | typeof CHART_AXIS_TITLE_ALIGN_END;
|
|
128
|
+
/**
|
|
129
|
+
* Definition of the title for an axis
|
|
130
|
+
* @group Charts
|
|
131
|
+
* @category Options
|
|
132
|
+
*/
|
|
133
|
+
export interface AxisTitleSpec extends BaseTitleSpec {
|
|
134
|
+
/**
|
|
135
|
+
* Spec for the font to use for the axis. Default size is 14px and style is 'normal'.
|
|
136
|
+
*/
|
|
137
|
+
font?: FontSpec;
|
|
138
|
+
/**
|
|
139
|
+
* How to align the text - start, middle or end
|
|
140
|
+
*/
|
|
141
|
+
align?: AxisTitleAlignment;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Defines a function that is used to accept or reject specific nodes/groups in the data source a chart is attached to.
|
|
145
|
+
* @group Charts
|
|
146
|
+
* @category Options
|
|
147
|
+
*/
|
|
148
|
+
export type ChartModelFilter = (v: Node | Group) => boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Base options for charts.
|
|
151
|
+
* @group Charts
|
|
152
|
+
* @category Options
|
|
153
|
+
*/
|
|
154
|
+
export interface BaseChartOptions {
|
|
155
|
+
/**
|
|
156
|
+
* Message to display when the chart has no data. Defaults to "No data".
|
|
157
|
+
*/
|
|
158
|
+
emptyMessage?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Styles for legend and grid.
|
|
161
|
+
*/
|
|
162
|
+
style?: ChartStyleOptions;
|
|
163
|
+
/**
|
|
164
|
+
* Padding to leave underneath the title
|
|
165
|
+
*/
|
|
166
|
+
titlePadding?: number;
|
|
167
|
+
/**
|
|
168
|
+
* Defaults to true, meaning the chart will redraw when its container element resizes.
|
|
169
|
+
*/
|
|
170
|
+
resizeObserver?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Optional color to use for every series. Overrides any colorGenerator.
|
|
173
|
+
*/
|
|
174
|
+
defaultColor?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Optional function to call in order to establish the color to be used for each series
|
|
177
|
+
*/
|
|
178
|
+
colorGenerator?: ColorGenerator;
|
|
179
|
+
margin?: number;
|
|
180
|
+
/**
|
|
181
|
+
* Width for the chart. If omitted, width is computed from the width of the chart's container
|
|
182
|
+
*/
|
|
183
|
+
width?: number;
|
|
184
|
+
/**
|
|
185
|
+
* Height for the chart. If omitted, height is computed from the width of the chart's container
|
|
186
|
+
*/
|
|
187
|
+
height?: number;
|
|
188
|
+
/**
|
|
189
|
+
* Background color for chart. Defaults to #FFFFFF. You can also use the `.vjs-chart-background` css class to set this.
|
|
190
|
+
*/
|
|
191
|
+
backgroundColor?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Title for the chart.
|
|
194
|
+
*/
|
|
195
|
+
title?: ChartTitleSpec;
|
|
196
|
+
/**
|
|
197
|
+
* Subtitle for the chart.
|
|
198
|
+
*/
|
|
199
|
+
subtitle?: SubtitleSpec;
|
|
200
|
+
/**
|
|
201
|
+
* Either a boolean true/false, indicating the legend should be shown/hidden, or a spec for a legend.
|
|
202
|
+
*/
|
|
203
|
+
legend?: boolean | LegendSpec;
|
|
204
|
+
/**
|
|
205
|
+
* Options for a tooltip for the chart.
|
|
206
|
+
*/
|
|
207
|
+
tooltip?: TooltipOptions;
|
|
208
|
+
/**
|
|
209
|
+
* Optional data to load into the chart.
|
|
210
|
+
*/
|
|
211
|
+
data?: Array<ObjectData>;
|
|
212
|
+
/**
|
|
213
|
+
* Optional URL from which to retrieve data to load into the chart
|
|
214
|
+
*/
|
|
215
|
+
url?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Optional data source (of type `DataSource`, meaning both `VisuallyJsModel` and `Selection` are supported) from which to retrieve data to load into the chart.
|
|
218
|
+
*/
|
|
219
|
+
dataSource?: DataSource;
|
|
220
|
+
/**
|
|
221
|
+
* When you provide `dataSource`, you can also provide a filter which accepts or rejects specific nodes/groups in the data source.
|
|
222
|
+
*/
|
|
223
|
+
dataSourceFilter?: ChartModelFilter;
|
|
224
|
+
controls?: {
|
|
225
|
+
/**
|
|
226
|
+
* Configuration for an export menu with default settings. You can provide an object containing settings for an export menu if you want to customise it, or just `true` for the default menu. The exporter is not shown by default.
|
|
227
|
+
*/
|
|
228
|
+
exporter?: boolean | ChartExporterOptions;
|
|
229
|
+
/**
|
|
230
|
+
* Whether or not to show the zoom controls. Defaults to true (when zoom is enabled).
|
|
231
|
+
*/
|
|
232
|
+
zoom?: boolean;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Optional zoom configuration.
|
|
236
|
+
*/
|
|
237
|
+
zoom?: {
|
|
238
|
+
/**
|
|
239
|
+
* Whether or not zoom is enabled.
|
|
240
|
+
*/
|
|
241
|
+
enabled?: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Zoom range to support. Defaults to [0.05, 3]
|
|
244
|
+
*/
|
|
245
|
+
range?: [number, number];
|
|
246
|
+
/**
|
|
247
|
+
* Initial zoom value. Defaults to 1.
|
|
248
|
+
*/
|
|
249
|
+
initialValue?: number;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
export declare const DEFAULT_GRID_LINE_COLOR = "#AAAAAA";
|
|
253
|
+
export declare const DEFAULT_LEGEND_OUTLINE_WIDTH = 1;
|
|
254
|
+
export declare const DEFAULT_LEGEND_BACKGROUND_COLOR = "#FFFFFFCC";
|
|
255
|
+
/**
|
|
256
|
+
* @internal
|
|
257
|
+
*/
|
|
258
|
+
export interface ChartStyle {
|
|
259
|
+
gridLineColor: string;
|
|
260
|
+
legendOutlineColor: string;
|
|
261
|
+
legendOutlineWidth: number;
|
|
262
|
+
legendBackgroundColor: string;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Basic style options for a chart.
|
|
266
|
+
* @group Charts
|
|
267
|
+
* @category Options
|
|
268
|
+
*/
|
|
269
|
+
export interface ChartStyleOptions {
|
|
270
|
+
/**
|
|
271
|
+
* What color to draw gridlines.
|
|
272
|
+
*/
|
|
273
|
+
gridLineColor?: string;
|
|
274
|
+
/**
|
|
275
|
+
* What color to draw as outline for the legend
|
|
276
|
+
*/
|
|
277
|
+
legendOutlineColor?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Width of the legend outline
|
|
280
|
+
*/
|
|
281
|
+
legendOutlineWidth?: number;
|
|
282
|
+
/**
|
|
283
|
+
* Background color for the legend.
|
|
284
|
+
*/
|
|
285
|
+
legendBackgroundColor?: string;
|
|
286
|
+
/**
|
|
287
|
+
* What color to draw crosshairs
|
|
288
|
+
*/
|
|
289
|
+
crosshairColor?: string;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Base class for charts. This class is abstract; you won't need to interact with this class unless you're making your own chart type.
|
|
293
|
+
* @group Charts
|
|
294
|
+
*/
|
|
295
|
+
export declare abstract class BaseChart extends OptimisticEventGenerator {
|
|
296
|
+
container: BrowserElement;
|
|
297
|
+
style: ChartStyle;
|
|
298
|
+
dim: ChartDimensions;
|
|
299
|
+
protected _zoom: number;
|
|
300
|
+
protected _zoomRange: [number, number];
|
|
301
|
+
protected _zoomEnabled: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* @internal
|
|
304
|
+
*/
|
|
305
|
+
$resizeObserver: ResizeObserver;
|
|
306
|
+
$eventManager: EventManager;
|
|
307
|
+
colorGenerator: ColorGenerator<ObjectData>;
|
|
308
|
+
private _backgroundColor;
|
|
309
|
+
/**
|
|
310
|
+
* color to use for every series. Not set by default.
|
|
311
|
+
* @internal
|
|
312
|
+
*/
|
|
313
|
+
$defaultColor: string;
|
|
314
|
+
$emptyMessage: string;
|
|
315
|
+
$errorMessage: string;
|
|
316
|
+
$showTitle: boolean;
|
|
317
|
+
$title: string;
|
|
318
|
+
$showSubtitle: boolean;
|
|
319
|
+
$subtitle: string;
|
|
320
|
+
$titleAlign: ChartTitleAlignment;
|
|
321
|
+
$subtitleAlign: ChartTitleAlignment;
|
|
322
|
+
$subtitleFontSize: number;
|
|
323
|
+
$titlePlacement: ChartTitlePlacement;
|
|
324
|
+
$titleFillRatio: number;
|
|
325
|
+
$titleWrap: boolean;
|
|
326
|
+
$titleFontSize: number;
|
|
327
|
+
titlePadding: number;
|
|
328
|
+
margin: number;
|
|
329
|
+
legend: ChartLegend;
|
|
330
|
+
_requestedWidth: number;
|
|
331
|
+
_requestedHeight: number;
|
|
332
|
+
_hasDrawn: boolean;
|
|
333
|
+
_exporter: ChartExporter;
|
|
334
|
+
_zoomControls: ChartZoomControls;
|
|
335
|
+
_controlsContainer: BrowserElement;
|
|
336
|
+
protected constructor(container: BrowserElement, options?: BaseChartOptions);
|
|
337
|
+
/**
|
|
338
|
+
* for subclasses to bind to events
|
|
339
|
+
* @param evt
|
|
340
|
+
* @param selector
|
|
341
|
+
* @param callback
|
|
342
|
+
*/
|
|
343
|
+
protected $bind(evt: string, selector: string, callback: (e: MouseEvent) => any): void;
|
|
344
|
+
/**
|
|
345
|
+
* Gets the chart's title, if defined.
|
|
346
|
+
*/
|
|
347
|
+
getTitle(): string;
|
|
348
|
+
/**
|
|
349
|
+
* Returns an SVG export of the chart. All CSS classes, and operational attributes are stripped. Crosshair elements are also removed.
|
|
350
|
+
* @param width Optional width for the output SVG.
|
|
351
|
+
* @param height Optional height for the output SVG.
|
|
352
|
+
*/
|
|
353
|
+
exportSVG(width?: number, height?: number): string;
|
|
354
|
+
/**
|
|
355
|
+
* Returns an image export of the chart. All CSS classes, and operational attributes are stripped. Crosshair elements are also removed.
|
|
356
|
+
*/
|
|
357
|
+
exportImage(options: ImageExportOptions, onready: ImageReadyFunction): void;
|
|
358
|
+
destroy(): void;
|
|
359
|
+
$draw(): void;
|
|
360
|
+
private _renderControls;
|
|
361
|
+
protected abstract $drawChart(svgRoot: ChartSVGElement, width: number, height: number, backgroundElement: ChartSVGElement): void;
|
|
362
|
+
$drawEmptyMessage(svgRoot: ChartSVGElement, width: number, height: number, backgroundElement: ChartSVGElement): void;
|
|
363
|
+
$drawErrorMessage(svgRoot: ChartSVGElement, width: number, height: number, backgroundElement: ChartSVGElement): void;
|
|
364
|
+
/**
|
|
365
|
+
*
|
|
366
|
+
* @internal
|
|
367
|
+
* @param svgRoot
|
|
368
|
+
* @param width
|
|
369
|
+
*/
|
|
370
|
+
$precomputeTitle(svgRoot: SVGElement, width: number): ChartSVGElement;
|
|
371
|
+
$getBackgroundColor(): string;
|
|
372
|
+
abstract hasData(): boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Map the given page location to an x/y location on the chart's canvas
|
|
375
|
+
* @param pl
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
$fromPageLocation(pl: PointXY): PointXY;
|
|
379
|
+
/**
|
|
380
|
+
* Map the location of the given page event to an x/y location on the chart
|
|
381
|
+
* @param e
|
|
382
|
+
* @internal
|
|
383
|
+
*/
|
|
384
|
+
$fromEventLocation(e: Event): PointXY;
|
|
385
|
+
/**
|
|
386
|
+
* Gets the current zoom level.
|
|
387
|
+
*/
|
|
388
|
+
getZoom(): number;
|
|
389
|
+
/**
|
|
390
|
+
* Sets the current zoom level. Clamped to the current zoom range.
|
|
391
|
+
* @param z The zoom level to set.
|
|
392
|
+
*/
|
|
393
|
+
setZoom(z: number): number;
|
|
394
|
+
private _applyZoom;
|
|
395
|
+
}
|