@unovis/ts 1.1.1-beta.7 → 1.1.1-beta.8
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/components/area/config.d.ts +25 -0
- package/components/area/config.js +16 -0
- package/components/area/config.js.map +1 -0
- package/components/area/index.d.ts +19 -0
- package/components/area/index.js +102 -0
- package/components/area/index.js.map +1 -0
- package/components/area/style.d.ts +3 -0
- package/{src/components/area/style.ts → components/area/style.js} +10 -9
- package/components/area/style.js.map +1 -0
- package/components/area/types.d.ts +6 -0
- package/components/axis/config.d.ts +71 -0
- package/components/axis/config.js +32 -0
- package/components/axis/config.js.map +1 -0
- package/components/axis/index.d.ts +44 -0
- package/components/axis/index.js +305 -0
- package/components/axis/index.js.map +1 -0
- package/components/axis/style.d.ts +9 -0
- package/{src/components/axis/style.ts → components/axis/style.js} +22 -27
- package/components/axis/style.js.map +1 -0
- package/components/axis/types.d.ts +4 -0
- package/components/axis/types.js +8 -0
- package/components/axis/types.js.map +1 -0
- package/components/brush/config.d.ts +42 -0
- package/components/brush/config.js +24 -0
- package/components/brush/config.js.map +1 -0
- package/components/brush/index.d.ts +28 -0
- package/components/brush/index.js +199 -0
- package/components/brush/index.js.map +1 -0
- package/components/brush/style.d.ts +5 -0
- package/{src/components/brush/style.ts → components/brush/style.js} +14 -15
- package/components/brush/style.js.map +1 -0
- package/components/brush/types.d.ts +7 -0
- package/components/brush/types.js +8 -0
- package/components/brush/types.js.map +1 -0
- package/components/bullet-legend/config.d.ts +34 -0
- package/components/bullet-legend/config.js +16 -0
- package/components/bullet-legend/config.js.map +1 -0
- package/components/bullet-legend/index.d.ts +19 -0
- package/components/bullet-legend/index.js +79 -0
- package/components/bullet-legend/index.js.map +1 -0
- package/components/bullet-legend/style.d.ts +6 -0
- package/{src/components/bullet-legend/style.ts → components/bullet-legend/style.js} +16 -18
- package/components/bullet-legend/style.js.map +1 -0
- package/components/bullet-legend/types.d.ts +7 -0
- package/components/bullet-legend/types.js +2 -0
- package/components/bullet-legend/types.js.map +1 -0
- package/components/chord-diagram/config.d.ts +44 -0
- package/components/chord-diagram/config.js +25 -0
- package/components/chord-diagram/config.js.map +1 -0
- package/components/chord-diagram/index.d.ts +42 -0
- package/components/chord-diagram/index.js +305 -0
- package/components/chord-diagram/index.js.map +1 -0
- package/components/chord-diagram/modules/label.d.ts +8 -0
- package/components/chord-diagram/modules/label.js +115 -0
- package/components/chord-diagram/modules/label.js.map +1 -0
- package/components/chord-diagram/modules/link.d.ts +21 -0
- package/components/chord-diagram/modules/link.js +63 -0
- package/components/chord-diagram/modules/link.js.map +1 -0
- package/components/chord-diagram/modules/node.d.ts +17 -0
- package/components/chord-diagram/modules/node.js +52 -0
- package/components/chord-diagram/modules/node.js.map +1 -0
- package/components/chord-diagram/style.d.ts +13 -0
- package/{src/components/chord-diagram/style.ts → components/chord-diagram/style.js} +30 -39
- package/components/chord-diagram/style.js.map +1 -0
- package/components/chord-diagram/types.d.ts +58 -0
- package/components/chord-diagram/types.js +8 -0
- package/components/chord-diagram/types.js.map +1 -0
- package/components/crosshair/config.d.ts +43 -0
- package/components/crosshair/config.js +19 -0
- package/components/crosshair/config.js.map +1 -0
- package/components/crosshair/index.d.ts +35 -0
- package/components/crosshair/index.js +183 -0
- package/components/crosshair/index.js.map +1 -0
- package/components/crosshair/style.d.ts +4 -0
- package/{src/components/crosshair/style.ts → components/crosshair/style.js} +12 -12
- package/components/crosshair/style.js.map +1 -0
- package/components/crosshair/types.d.ts +13 -0
- package/components/crosshair/types.js +2 -0
- package/components/crosshair/types.js.map +1 -0
- package/components/donut/config.d.ts +59 -0
- package/components/donut/config.js +28 -0
- package/components/donut/config.js.map +1 -0
- package/components/donut/index.d.ts +21 -0
- package/components/donut/index.js +107 -0
- package/components/donut/index.js.map +1 -0
- package/components/donut/modules/arc.d.ts +10 -0
- package/components/donut/modules/arc.js +59 -0
- package/components/donut/modules/arc.js.map +1 -0
- package/components/donut/style.d.ts +7 -0
- package/{src/components/donut/style.ts → components/donut/style.js} +18 -20
- package/components/donut/style.js.map +1 -0
- package/components/donut/types.d.ts +20 -0
- package/components/flow-legend/config.d.ts +29 -0
- package/components/flow-legend/config.js +18 -0
- package/components/flow-legend/config.js.map +1 -0
- package/components/flow-legend/index.d.ts +16 -0
- package/components/flow-legend/index.js +75 -0
- package/components/flow-legend/index.js.map +1 -0
- package/components/flow-legend/style.d.ts +8 -0
- package/{src/components/flow-legend/style.ts → components/flow-legend/style.js} +21 -25
- package/components/flow-legend/style.js.map +1 -0
- package/components/flow-legend/types.d.ts +9 -0
- package/components/flow-legend/types.js +8 -0
- package/components/flow-legend/types.js.map +1 -0
- package/components/free-brush/config.d.ts +45 -0
- package/components/free-brush/config.js +24 -0
- package/components/free-brush/config.js.map +1 -0
- package/components/free-brush/index.d.ts +20 -0
- package/components/free-brush/index.js +192 -0
- package/components/free-brush/index.js.map +1 -0
- package/components/free-brush/style.d.ts +4 -0
- package/{src/components/free-brush/style.ts → components/free-brush/style.js} +12 -12
- package/components/free-brush/style.js.map +1 -0
- package/components/free-brush/types.d.ts +7 -0
- package/components/free-brush/types.js +9 -0
- package/components/free-brush/types.js.map +1 -0
- package/components/graph/config.d.ts +238 -0
- package/components/graph/config.js +84 -0
- package/components/graph/config.js.map +1 -0
- package/components/graph/index.d.ts +126 -0
- package/components/graph/index.js +656 -0
- package/components/graph/index.js.map +1 -0
- package/components/graph/modules/layout-helpers.d.ts +21 -0
- package/components/graph/modules/layout-helpers.js +69 -0
- package/components/graph/modules/layout-helpers.js.map +1 -0
- package/components/graph/modules/layout.d.ts +10 -0
- package/components/graph/modules/layout.js +399 -0
- package/components/graph/modules/layout.js.map +1 -0
- package/components/graph/modules/link/helper.d.ts +25 -0
- package/components/graph/modules/link/helper.js +74 -0
- package/components/graph/modules/link/helper.js.map +1 -0
- package/components/graph/modules/link/index.d.ts +11 -0
- package/components/graph/modules/link/index.js +212 -0
- package/components/graph/modules/link/index.js.map +1 -0
- package/components/graph/modules/link/style.d.ts +15 -0
- package/{src/components/graph/modules/link/style.ts → components/graph/modules/link/style.js} +34 -45
- package/components/graph/modules/link/style.js.map +1 -0
- package/components/graph/modules/node/helper.d.ts +21 -0
- package/components/graph/modules/node/helper.js +126 -0
- package/components/graph/modules/node/helper.js.map +1 -0
- package/components/graph/modules/node/index.d.ts +11 -0
- package/components/graph/modules/node/index.js +252 -0
- package/components/graph/modules/node/index.js.map +1 -0
- package/components/graph/modules/node/style.d.ts +24 -0
- package/{src/components/graph/modules/node/style.ts → components/graph/modules/node/style.js} +52 -72
- package/components/graph/modules/node/style.js.map +1 -0
- package/components/graph/modules/panel/helper.d.ts +18 -0
- package/components/graph/modules/panel/helper.js +111 -0
- package/components/graph/modules/panel/helper.js.map +1 -0
- package/components/graph/modules/panel/index.d.ts +7 -0
- package/components/graph/modules/panel/index.js +98 -0
- package/components/graph/modules/panel/index.js.map +1 -0
- package/components/graph/modules/panel/style.d.ts +14 -0
- package/{src/components/graph/modules/panel/style.ts → components/graph/modules/panel/style.js} +32 -42
- package/components/graph/modules/panel/style.js.map +1 -0
- package/components/graph/modules/shape.d.ts +6 -0
- package/components/graph/modules/shape.js +80 -0
- package/components/graph/modules/shape.js.map +1 -0
- package/components/graph/modules/zoom-levels.d.ts +6 -0
- package/components/graph/modules/zoom-levels.js +10 -0
- package/components/graph/modules/zoom-levels.js.map +1 -0
- package/components/graph/style.d.ts +6 -0
- package/components/graph/style.js +66 -0
- package/components/graph/style.js.map +1 -0
- package/components/graph/types.d.ts +125 -0
- package/components/graph/types.js +30 -0
- package/components/graph/types.js.map +1 -0
- package/components/grouped-bar/config.d.ts +36 -0
- package/components/grouped-bar/config.js +20 -0
- package/components/grouped-bar/config.js.map +1 -0
- package/components/grouped-bar/index.d.ts +32 -0
- package/components/grouped-bar/index.js +249 -0
- package/components/grouped-bar/index.js.map +1 -0
- package/components/grouped-bar/style.d.ts +5 -0
- package/{src/components/grouped-bar/style.ts → components/grouped-bar/style.js} +14 -15
- package/components/grouped-bar/style.js.map +1 -0
- package/components/leaflet-flow-map/config.d.ts +46 -0
- package/components/leaflet-flow-map/config.js +25 -0
- package/components/leaflet-flow-map/config.js.map +1 -0
- package/components/leaflet-flow-map/index.d.ts +52 -0
- package/components/leaflet-flow-map/index.js +220 -0
- package/components/leaflet-flow-map/index.js.map +1 -0
- package/components/leaflet-flow-map/renderer-utils.d.ts +5 -0
- package/components/leaflet-flow-map/renderer-utils.js +15 -0
- package/components/leaflet-flow-map/renderer-utils.js.map +1 -0
- package/components/leaflet-flow-map/renderer.d.ts +26 -0
- package/components/leaflet-flow-map/renderer.js +117 -0
- package/components/leaflet-flow-map/renderer.js.map +1 -0
- package/components/leaflet-flow-map/shaders.d.ts +2 -0
- package/{src/components/leaflet-flow-map/shaders.ts → components/leaflet-flow-map/shaders.js} +7 -4
- package/components/leaflet-flow-map/shaders.js.map +1 -0
- package/components/leaflet-flow-map/types.d.ts +23 -0
- package/components/leaflet-map/config.d.ts +193 -0
- package/components/leaflet-map/config.js +71 -0
- package/components/leaflet-map/config.js.map +1 -0
- package/components/leaflet-map/index.d.ts +130 -0
- package/components/leaflet-map/index.js +690 -0
- package/components/leaflet-map/index.js.map +1 -0
- package/components/leaflet-map/leaflet.css.js +5 -0
- package/components/leaflet-map/leaflet.css.js.map +1 -0
- package/components/leaflet-map/modules/clusterBackground.d.ts +5 -0
- package/components/leaflet-map/modules/clusterBackground.js +27 -0
- package/components/leaflet-map/modules/clusterBackground.js.map +1 -0
- package/components/leaflet-map/modules/donut.d.ts +3 -0
- package/components/leaflet-map/modules/donut.js +25 -0
- package/components/leaflet-map/modules/donut.js.map +1 -0
- package/components/leaflet-map/modules/map.d.ts +14 -0
- package/components/leaflet-map/modules/map.js +154 -0
- package/components/leaflet-map/modules/map.js.map +1 -0
- package/components/leaflet-map/modules/node.d.ts +9 -0
- package/components/leaflet-map/modules/node.js +162 -0
- package/components/leaflet-map/modules/node.js.map +1 -0
- package/components/leaflet-map/modules/selectionRing.d.ts +7 -0
- package/components/leaflet-map/modules/selectionRing.js +41 -0
- package/components/leaflet-map/modules/selectionRing.js.map +1 -0
- package/components/leaflet-map/modules/utils.d.ts +50 -0
- package/components/leaflet-map/modules/utils.js +210 -0
- package/components/leaflet-map/modules/utils.js.map +1 -0
- package/{src/components → components}/leaflet-map/renderer/leaflet-maplibre-gl.js +78 -76
- package/components/leaflet-map/renderer/leaflet-maplibre-gl.js.map +1 -0
- package/components/leaflet-map/renderer/map-style.d.ts +4 -0
- package/components/leaflet-map/renderer/map-style.js +15 -0
- package/components/leaflet-map/renderer/map-style.js.map +1 -0
- package/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json.js +40 -0
- package/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json.js.map +1 -0
- package/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json.js +40 -0
- package/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json.js.map +1 -0
- package/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json.js +4981 -0
- package/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json.js.map +1 -0
- package/components/leaflet-map/renderer/mapboxgl-layer.d.ts +8 -0
- package/components/leaflet-map/renderer/mapboxgl-layer.js +27 -0
- package/components/leaflet-map/renderer/mapboxgl-layer.js.map +1 -0
- package/components/leaflet-map/renderer/mapboxgl-utils.d.ts +4 -0
- package/components/leaflet-map/renderer/mapboxgl-utils.js +39 -0
- package/components/leaflet-map/renderer/mapboxgl-utils.js.map +1 -0
- package/{src/components → components}/leaflet-map/renderer/maplibre-gl.css.js +4 -2
- package/components/leaflet-map/renderer/maplibre-gl.css.js.map +1 -0
- package/components/leaflet-map/style.d.ts +52 -0
- package/components/leaflet-map/style.js +183 -0
- package/components/leaflet-map/style.js.map +1 -0
- package/components/leaflet-map/types.d.ts +75 -0
- package/components/leaflet-map/types.js +15 -0
- package/components/leaflet-map/types.js.map +1 -0
- package/components/line/config.d.ts +30 -0
- package/components/line/config.js +17 -0
- package/components/line/config.js.map +1 -0
- package/components/line/index.d.ts +27 -0
- package/components/line/index.js +152 -0
- package/components/line/index.js.map +1 -0
- package/components/line/style.d.ts +6 -0
- package/{src/components/line/style.ts → components/line/style.js} +16 -18
- package/components/line/style.js.map +1 -0
- package/components/line/types.d.ts +12 -0
- package/components/nested-donut/config.d.ts +59 -0
- package/components/nested-donut/config.js +19 -0
- package/components/nested-donut/config.js.map +1 -0
- package/components/nested-donut/index.d.ts +38 -0
- package/components/nested-donut/index.js +133 -0
- package/components/nested-donut/index.js.map +1 -0
- package/components/nested-donut/modules/arc.d.ts +17 -0
- package/components/nested-donut/modules/arc.js +50 -0
- package/components/nested-donut/modules/arc.js.map +1 -0
- package/components/nested-donut/modules/label.d.ts +7 -0
- package/components/nested-donut/modules/label.js +34 -0
- package/components/nested-donut/modules/label.js.map +1 -0
- package/components/nested-donut/style.d.ts +26 -0
- package/components/nested-donut/style.js +70 -0
- package/components/nested-donut/style.js.map +1 -0
- package/components/nested-donut/types.d.ts +24 -0
- package/components/nested-donut/types.js +11 -0
- package/components/nested-donut/types.js.map +1 -0
- package/components/sankey/config.d.ts +162 -0
- package/components/sankey/config.js +65 -0
- package/components/sankey/config.js.map +1 -0
- package/components/sankey/index.d.ts +59 -0
- package/components/sankey/index.js +306 -0
- package/components/sankey/index.js.map +1 -0
- package/components/sankey/modules/label.d.ts +23 -0
- package/components/sankey/modules/label.js +168 -0
- package/components/sankey/modules/label.js.map +1 -0
- package/components/sankey/modules/link.d.ts +14 -0
- package/components/sankey/modules/link.js +108 -0
- package/components/sankey/modules/link.js.map +1 -0
- package/components/sankey/modules/node.d.ts +10 -0
- package/components/sankey/modules/node.js +156 -0
- package/components/sankey/modules/node.js.map +1 -0
- package/components/sankey/style.d.ts +20 -0
- package/{src/components/sankey/style.ts → components/sankey/style.js} +44 -60
- package/components/sankey/style.js.map +1 -0
- package/components/sankey/types.d.ts +84 -0
- package/components/sankey/types.js +34 -0
- package/components/sankey/types.js.map +1 -0
- package/components/scatter/config.d.ts +44 -0
- package/components/scatter/config.js +23 -0
- package/components/scatter/config.js.map +1 -0
- package/components/scatter/index.d.ts +28 -0
- package/components/scatter/index.js +167 -0
- package/components/scatter/index.js.map +1 -0
- package/components/scatter/modules/point.d.ts +7 -0
- package/components/scatter/modules/point.js +86 -0
- package/components/scatter/modules/point.js.map +1 -0
- package/components/scatter/modules/utils.d.ts +11 -0
- package/components/scatter/modules/utils.js +112 -0
- package/components/scatter/modules/utils.js.map +1 -0
- package/components/scatter/style.d.ts +5 -0
- package/{src/components/scatter/style.ts → components/scatter/style.js} +14 -15
- package/components/scatter/style.js.map +1 -0
- package/components/scatter/types.d.ts +19 -0
- package/components/stacked-bar/config.d.ts +38 -0
- package/components/stacked-bar/config.js +20 -0
- package/components/stacked-bar/config.js.map +1 -0
- package/components/stacked-bar/index.d.ts +28 -0
- package/components/stacked-bar/index.js +208 -0
- package/components/stacked-bar/index.js.map +1 -0
- package/components/stacked-bar/style.d.ts +5 -0
- package/{src/components/stacked-bar/style.ts → components/stacked-bar/style.js} +14 -15
- package/components/stacked-bar/style.js.map +1 -0
- package/components/stacked-bar/types.d.ts +5 -0
- package/components/timeline/config.d.ts +43 -0
- package/components/timeline/config.js +24 -0
- package/components/timeline/config.js.map +1 -0
- package/components/timeline/index.d.ts +41 -0
- package/components/timeline/index.js +244 -0
- package/components/timeline/index.js.map +1 -0
- package/components/timeline/style.d.ts +13 -0
- package/{src/components/timeline/style.ts → components/timeline/style.js} +30 -39
- package/components/timeline/style.js.map +1 -0
- package/components/tooltip/config.d.ts +68 -0
- package/components/tooltip/config.js +20 -0
- package/components/tooltip/config.js.map +1 -0
- package/components/tooltip/index.d.ts +36 -0
- package/components/tooltip/index.js +184 -0
- package/components/tooltip/index.js.map +1 -0
- package/{src/components → components}/tooltip/style.js +14 -11
- package/components/tooltip/style.js.map +1 -0
- package/components/topojson-map/config.d.ts +99 -0
- package/components/topojson-map/config.js +42 -0
- package/components/topojson-map/config.js.map +1 -0
- package/components/topojson-map/index.d.ts +52 -0
- package/components/topojson-map/index.js +355 -0
- package/components/topojson-map/index.js.map +1 -0
- package/components/topojson-map/style.d.ts +11 -0
- package/{src/components/topojson-map/style.ts → components/topojson-map/style.js} +26 -33
- package/components/topojson-map/style.js.map +1 -0
- package/components/topojson-map/types.d.ts +78 -0
- package/components/topojson-map/types.js +80 -0
- package/components/topojson-map/types.js.map +1 -0
- package/components/topojson-map/utils.d.ts +3 -0
- package/components/topojson-map/utils.js +30 -0
- package/components/topojson-map/utils.js.map +1 -0
- package/components/vis-controls/config.d.ts +12 -0
- package/components/vis-controls/config.js +13 -0
- package/components/vis-controls/config.js.map +1 -0
- package/components/vis-controls/index.d.ts +14 -0
- package/components/vis-controls/index.js +52 -0
- package/components/vis-controls/index.js.map +1 -0
- package/components/vis-controls/style.d.ts +11 -0
- package/{src/components/vis-controls/style.ts → components/vis-controls/style.js} +27 -34
- package/components/vis-controls/style.js.map +1 -0
- package/components/vis-controls/types.d.ts +13 -0
- package/components/vis-controls/types.js +8 -0
- package/components/vis-controls/types.js.map +1 -0
- package/components/xy-labels/config.d.ts +48 -0
- package/components/xy-labels/config.js +25 -0
- package/components/xy-labels/config.js.map +1 -0
- package/components/xy-labels/index.d.ts +15 -0
- package/components/xy-labels/index.js +87 -0
- package/components/xy-labels/index.js.map +1 -0
- package/components/xy-labels/modules/label.d.ts +9 -0
- package/components/xy-labels/modules/label.js +107 -0
- package/components/xy-labels/modules/label.js.map +1 -0
- package/components/xy-labels/style.d.ts +5 -0
- package/{src/components/xy-labels/style.ts → components/xy-labels/style.js} +14 -15
- package/components/xy-labels/style.js.map +1 -0
- package/components/xy-labels/types.d.ts +23 -0
- package/components/xy-labels/types.js +9 -0
- package/components/xy-labels/types.js.map +1 -0
- package/components.d.ts +51 -0
- package/components.js +29 -0
- package/components.js.map +1 -0
- package/containers/single-container/config.d.ts +12 -0
- package/containers/single-container/config.js +12 -0
- package/containers/single-container/config.js.map +1 -0
- package/containers/single-container/index.d.ts +19 -0
- package/containers/single-container/index.js +128 -0
- package/containers/single-container/index.js.map +1 -0
- package/containers/xy-container/config.d.ts +99 -0
- package/containers/xy-container/config.js +30 -0
- package/containers/xy-container/config.js.map +1 -0
- package/containers/xy-container/index.d.ts +34 -0
- package/containers/xy-container/index.js +330 -0
- package/containers/xy-container/index.js.map +1 -0
- package/containers.d.ts +6 -0
- package/containers.js +4 -0
- package/containers.js.map +1 -0
- package/core/component/config.d.ts +58 -0
- package/core/component/config.js +14 -0
- package/core/component/config.js.map +1 -0
- package/core/component/index.d.ts +43 -0
- package/core/component/index.js +118 -0
- package/core/component/index.js.map +1 -0
- package/core/component/types.d.ts +2 -0
- package/core/component/types.js +2 -0
- package/core/component/types.js.map +1 -0
- package/core/config/index.d.ts +3 -0
- package/core/config/index.js +16 -0
- package/core/config/index.js.map +1 -0
- package/core/container/config.d.ts +48 -0
- package/core/container/config.js +29 -0
- package/core/container/config.js.map +1 -0
- package/core/container/index.d.ts +26 -0
- package/core/container/index.js +106 -0
- package/core/container/index.js.map +1 -0
- package/core/xy-component/config.d.ts +38 -0
- package/core/xy-component/config.js +20 -0
- package/core/xy-component/config.js.map +1 -0
- package/core/xy-component/index.d.ts +27 -0
- package/core/xy-component/index.js +74 -0
- package/core/xy-component/index.js.map +1 -0
- package/data-models/core.d.ts +6 -0
- package/data-models/core.js +14 -0
- package/data-models/core.js.map +1 -0
- package/data-models/graph.d.ts +24 -0
- package/data-models/graph.js +107 -0
- package/data-models/graph.js.map +1 -0
- package/data-models/map-graph.d.ts +21 -0
- package/data-models/map-graph.js +62 -0
- package/data-models/map-graph.js.map +1 -0
- package/data-models/map.d.ts +5 -0
- package/data-models/map.js +12 -0
- package/data-models/map.js.map +1 -0
- package/data-models/series.d.ts +6 -0
- package/data-models/series.js +19 -0
- package/data-models/series.js.map +1 -0
- package/index.d.ts +7 -0
- package/index.js +55 -0
- package/index.js.map +1 -0
- package/maps/china-provinces.json.js +140373 -0
- package/maps/fr-regions.json.js +14162 -0
- package/maps/germany-regions.json.js +35760 -0
- package/maps/ind-regions.json.js +290584 -0
- package/maps/uk-regions.json.js +96233 -0
- package/maps/us-counties.json.js +206318 -0
- package/maps/us-states.json.js +16345 -0
- package/maps/world-110m-alpha.json.js +251366 -0
- package/maps/world-simple.json.js +89428 -0
- package/maps/world-simplest.json.js +28175 -0
- package/maps.d.ts +60 -0
- package/maps.js +23 -0
- package/package.json +1 -1
- package/styles/colors.d.ts +7 -0
- package/styles/colors.js +24 -0
- package/styles/colors.js.map +1 -0
- package/styles/index.d.ts +7 -0
- package/styles/index.js +38 -0
- package/styles/index.js.map +1 -0
- package/styles/sizes.d.ts +2 -0
- package/{src/styles/sizes.ts → styles/sizes.js} +8 -6
- package/styles/sizes.js.map +1 -0
- package/types/accessor.d.ts +5 -0
- package/types/accessor.js +2 -0
- package/types/accessor.js.map +1 -0
- package/types/component.d.ts +13 -0
- package/types/component.js +14 -0
- package/types/component.js.map +1 -0
- package/types/curve.d.ts +40 -0
- package/types/curve.js +46 -0
- package/types/curve.js.map +1 -0
- package/types/data.d.ts +7 -0
- package/types/data.js +2 -0
- package/types/data.js.map +1 -0
- package/types/direction.d.ts +6 -0
- package/types/direction.js +10 -0
- package/types/direction.js.map +1 -0
- package/types/graph.d.ts +35 -0
- package/types/graph.js +2 -0
- package/types/graph.js.map +1 -0
- package/types/map.d.ts +4 -0
- package/types/map.js +2 -0
- package/types/map.js.map +1 -0
- package/types/misc.d.ts +8 -0
- package/types/position.d.ts +20 -0
- package/types/position.js +27 -0
- package/types/position.js.map +1 -0
- package/types/scale.d.ts +23 -0
- package/types/scale.js +27 -0
- package/types/scale.js.map +1 -0
- package/types/shape.d.ts +7 -0
- package/types/shape.js +11 -0
- package/types/shape.js.map +1 -0
- package/types/spacing.d.ts +6 -0
- package/types/spacing.js +2 -0
- package/types/spacing.js.map +1 -0
- package/types/svg.d.ts +18 -0
- package/types/svg.js +22 -0
- package/types/svg.js.map +1 -0
- package/types/symbol.d.ts +18 -0
- package/types/symbol.js +24 -0
- package/types/symbol.js.map +1 -0
- package/types/text.d.ts +47 -0
- package/types/text.js +26 -0
- package/types/text.js.map +1 -0
- package/types.d.ts +27 -0
- package/types.js +30 -0
- package/types.js.map +1 -0
- package/utils/color.d.ts +10 -0
- package/utils/color.js +32 -0
- package/utils/color.js.map +1 -0
- package/utils/d3.d.ts +3 -0
- package/utils/d3.js +16 -0
- package/utils/d3.js.map +1 -0
- package/utils/data.d.ts +45 -0
- package/utils/data.js +274 -0
- package/utils/data.js.map +1 -0
- package/utils/html.d.ts +1 -0
- package/utils/html.js +16 -0
- package/utils/html.js.map +1 -0
- package/utils/map.d.ts +2 -0
- package/utils/map.js +20 -0
- package/utils/map.js.map +1 -0
- package/utils/misc.d.ts +9 -0
- package/utils/misc.js +47 -0
- package/utils/misc.js.map +1 -0
- package/utils/path.d.ts +23 -0
- package/utils/path.js +144 -0
- package/utils/path.js.map +1 -0
- package/utils/scale.d.ts +1 -0
- package/utils/style.d.ts +6 -0
- package/utils/style.js +24 -0
- package/utils/style.js.map +1 -0
- package/utils/svg.d.ts +3 -0
- package/utils/text.d.ts +139 -0
- package/utils/text.js +443 -0
- package/utils/text.js.map +1 -0
- package/utils/type.d.ts +5 -0
- package/declaration.d.ts +0 -1
- package/index.ts +0 -1
- package/licences.txt +0 -43
- package/maps.ts +0 -1
- package/rollup.config.js +0 -71
- package/rules/ts-getter-setter.js +0 -35
- package/src/components/area/config.ts +0 -29
- package/src/components/area/index.ts +0 -133
- package/src/components/area/types.ts +0 -2
- package/src/components/axis/config.ts +0 -76
- package/src/components/axis/index.ts +0 -363
- package/src/components/axis/types.ts +0 -4
- package/src/components/brush/config.ts +0 -51
- package/src/components/brush/index.ts +0 -233
- package/src/components/brush/types.ts +0 -8
- package/src/components/bullet-legend/config.ts +0 -38
- package/src/components/bullet-legend/index.ts +0 -104
- package/src/components/bullet-legend/types.ts +0 -7
- package/src/components/chord-diagram/config.ts +0 -53
- package/src/components/chord-diagram/index.ts +0 -401
- package/src/components/chord-diagram/modules/label.ts +0 -155
- package/src/components/chord-diagram/modules/link.ts +0 -91
- package/src/components/chord-diagram/modules/node.ts +0 -80
- package/src/components/chord-diagram/types.ts +0 -68
- package/src/components/crosshair/config.ts +0 -48
- package/src/components/crosshair/index.ts +0 -220
- package/src/components/crosshair/types.ts +0 -15
- package/src/components/donut/config.ts +0 -65
- package/src/components/donut/index.ts +0 -148
- package/src/components/donut/modules/arc.ts +0 -86
- package/src/components/donut/types.ts +0 -17
- package/src/components/flow-legend/config.ts +0 -31
- package/src/components/flow-legend/index.ts +0 -103
- package/src/components/flow-legend/types.ts +0 -10
- package/src/components/free-brush/config.ts +0 -54
- package/src/components/free-brush/index.ts +0 -207
- package/src/components/free-brush/types.ts +0 -8
- package/src/components/graph/config.ts +0 -280
- package/src/components/graph/index.ts +0 -809
- package/src/components/graph/modules/layout-helpers.ts +0 -96
- package/src/components/graph/modules/layout.ts +0 -502
- package/src/components/graph/modules/link/helper.ts +0 -105
- package/src/components/graph/modules/link/index.ts +0 -302
- package/src/components/graph/modules/node/helper.ts +0 -162
- package/src/components/graph/modules/node/index.ts +0 -343
- package/src/components/graph/modules/panel/helper.ts +0 -160
- package/src/components/graph/modules/panel/index.ts +0 -137
- package/src/components/graph/modules/shape.ts +0 -108
- package/src/components/graph/modules/zoom-levels.ts +0 -6
- package/src/components/graph/style.ts +0 -72
- package/src/components/graph/types.ts +0 -152
- package/src/components/grouped-bar/config.ts +0 -40
- package/src/components/grouped-bar/index.ts +0 -325
- package/src/components/leaflet-flow-map/config.ts +0 -60
- package/src/components/leaflet-flow-map/index.ts +0 -279
- package/src/components/leaflet-flow-map/renderer-utils.ts +0 -14
- package/src/components/leaflet-flow-map/renderer.ts +0 -146
- package/src/components/leaflet-flow-map/types.ts +0 -18
- package/src/components/leaflet-map/config.ts +0 -234
- package/src/components/leaflet-map/index.ts +0 -808
- package/src/components/leaflet-map/leaflet.css +0 -625
- package/src/components/leaflet-map/modules/clusterBackground.ts +0 -34
- package/src/components/leaflet-map/modules/donut.ts +0 -37
- package/src/components/leaflet-map/modules/map.ts +0 -178
- package/src/components/leaflet-map/modules/node.ts +0 -208
- package/src/components/leaflet-map/modules/selectionRing.ts +0 -63
- package/src/components/leaflet-map/modules/utils.ts +0 -290
- package/src/components/leaflet-map/renderer/map-style.ts +0 -24
- package/src/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json +0 -35
- package/src/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json +0 -35
- package/src/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json +0 -2185
- package/src/components/leaflet-map/renderer/mapboxgl-layer.ts +0 -43
- package/src/components/leaflet-map/renderer/mapboxgl-utils.ts +0 -40
- package/src/components/leaflet-map/style.ts +0 -217
- package/src/components/leaflet-map/types.ts +0 -75
- package/src/components/line/config.ts +0 -34
- package/src/components/line/index.ts +0 -188
- package/src/components/line/types.ts +0 -3
- package/src/components/nested-donut/config.ts +0 -75
- package/src/components/nested-donut/index.ts +0 -176
- package/src/components/nested-donut/modules/arc.ts +0 -78
- package/src/components/nested-donut/modules/label.ts +0 -63
- package/src/components/nested-donut/style.ts +0 -82
- package/src/components/nested-donut/types.ts +0 -29
- package/src/components/sankey/config.ts +0 -195
- package/src/components/sankey/index.ts +0 -387
- package/src/components/sankey/modules/label.ts +0 -228
- package/src/components/sankey/modules/link.ts +0 -141
- package/src/components/sankey/modules/node.ts +0 -221
- package/src/components/sankey/types.ts +0 -95
- package/src/components/scatter/config.ts +0 -49
- package/src/components/scatter/index.ts +0 -220
- package/src/components/scatter/modules/point.ts +0 -123
- package/src/components/scatter/modules/utils.ts +0 -150
- package/src/components/scatter/types.ts +0 -21
- package/src/components/stacked-bar/config.ts +0 -42
- package/src/components/stacked-bar/index.ts +0 -267
- package/src/components/stacked-bar/types.ts +0 -5
- package/src/components/timeline/config.ts +0 -49
- package/src/components/timeline/index.ts +0 -302
- package/src/components/tooltip/config.ts +0 -69
- package/src/components/tooltip/index.ts +0 -220
- package/src/components/topojson-map/config.ts +0 -124
- package/src/components/topojson-map/index.ts +0 -436
- package/src/components/topojson-map/types.ts +0 -123
- package/src/components/topojson-map/utils.ts +0 -29
- package/src/components/vis-controls/config.ts +0 -16
- package/src/components/vis-controls/index.ts +0 -68
- package/src/components/vis-controls/types.ts +0 -14
- package/src/components/xy-labels/config.ts +0 -56
- package/src/components/xy-labels/index.ts +0 -109
- package/src/components/xy-labels/modules/label.ts +0 -140
- package/src/components/xy-labels/types.ts +0 -26
- package/src/components.ts +0 -56
- package/src/containers/single-container/config.ts +0 -15
- package/src/containers/single-container/index.ts +0 -150
- package/src/containers/xy-container/config.ts +0 -112
- package/src/containers/xy-container/index.ts +0 -407
- package/src/containers.ts +0 -6
- package/src/core/component/config.ts +0 -61
- package/src/core/component/index.ts +0 -154
- package/src/core/component/types.ts +0 -9
- package/src/core/config/index.ts +0 -12
- package/src/core/container/config.ts +0 -56
- package/src/core/container/index.ts +0 -136
- package/src/core/xy-component/config.ts +0 -46
- package/src/core/xy-component/index.ts +0 -90
- package/src/data-models/core.ts +0 -15
- package/src/data-models/graph.ts +0 -138
- package/src/data-models/map-graph.ts +0 -72
- package/src/data-models/map.ts +0 -18
- package/src/data-models/series.ts +0 -16
- package/src/index.ts +0 -7
- package/src/maps/china-provinces.json +0 -1
- package/src/maps/fr-regions.json +0 -1
- package/src/maps/germany-regions.json +0 -1
- package/src/maps/ind-regions.json +0 -1
- package/src/maps/uk-regions.json +0 -1
- package/src/maps/us-counties.json +0 -1
- package/src/maps/us-states.json +0 -1
- package/src/maps/world-110m-alpha.json +0 -1
- package/src/maps/world-simple.json +0 -1
- package/src/maps/world-simplest.json +0 -1
- package/src/maps.ts +0 -34
- package/src/styles/colors.ts +0 -28
- package/src/styles/index.ts +0 -38
- package/src/types/accessor.ts +0 -5
- package/src/types/component.ts +0 -15
- package/src/types/curve.ts +0 -62
- package/src/types/data.ts +0 -5
- package/src/types/direction.ts +0 -6
- package/src/types/graph.ts +0 -40
- package/src/types/map.ts +0 -5
- package/src/types/misc.ts +0 -10
- package/src/types/position.ts +0 -23
- package/src/types/scale.ts +0 -47
- package/src/types/shape.ts +0 -7
- package/src/types/spacing.ts +0 -6
- package/src/types/svg.ts +0 -32
- package/src/types/symbol.ts +0 -21
- package/src/types/text.ts +0 -71
- package/src/types.ts +0 -31
- package/src/utils/color.ts +0 -41
- package/src/utils/d3.ts +0 -15
- package/src/utils/data.ts +0 -328
- package/src/utils/html.ts +0 -13
- package/src/utils/map.ts +0 -29
- package/src/utils/misc.ts +0 -54
- package/src/utils/path.ts +0 -196
- package/src/utils/scale.ts +0 -1
- package/src/utils/style.ts +0 -37
- package/src/utils/svg.ts +0 -49
- package/src/utils/text.ts +0 -529
- package/src/utils/type.ts +0 -9
- package/tsconfig.json +0 -29
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Selection, select } from 'd3-selection'
|
|
2
|
-
|
|
3
|
-
// Types
|
|
4
|
-
import { NumericAccessor, StringAccessor } from 'types/accessor'
|
|
5
|
-
|
|
6
|
-
// Utils
|
|
7
|
-
import { polygon } from 'utils/path'
|
|
8
|
-
import { getString } from 'utils/data'
|
|
9
|
-
|
|
10
|
-
// Types
|
|
11
|
-
|
|
12
|
-
// Local Types
|
|
13
|
-
import { GraphNodeShape } from '../types'
|
|
14
|
-
|
|
15
|
-
// Helpers
|
|
16
|
-
import { getNodeSize } from './node/helper'
|
|
17
|
-
|
|
18
|
-
export function isCustomXml (shape: GraphNodeShape): boolean {
|
|
19
|
-
return /<[a-z][\s\S]*>/i.test(shape)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function appendShape<T> (
|
|
23
|
-
selection: Selection<SVGGElement, T, SVGGElement, unknown>,
|
|
24
|
-
shapeAccessor: StringAccessor<T>,
|
|
25
|
-
shapeSelector: string,
|
|
26
|
-
customShapeSelector: string,
|
|
27
|
-
index?: number,
|
|
28
|
-
insertSelector = ':last-child'
|
|
29
|
-
): void {
|
|
30
|
-
selection.each((d, i, elements) => {
|
|
31
|
-
const element = select(elements[i])
|
|
32
|
-
const shape = getString(d, shapeAccessor, index) as GraphNodeShape
|
|
33
|
-
|
|
34
|
-
let shapeElement
|
|
35
|
-
const isCustomXmlShape = isCustomXml(shape)
|
|
36
|
-
if (isCustomXmlShape) {
|
|
37
|
-
shapeElement = element.insert('g', insertSelector)
|
|
38
|
-
.html(shape)
|
|
39
|
-
} else {
|
|
40
|
-
switch (shape) {
|
|
41
|
-
case GraphNodeShape.Square:
|
|
42
|
-
shapeElement = element.insert('rect', insertSelector)
|
|
43
|
-
.attr('rx', 5)
|
|
44
|
-
.attr('ry', 5)
|
|
45
|
-
break
|
|
46
|
-
case GraphNodeShape.Hexagon:
|
|
47
|
-
case GraphNodeShape.Triangle:
|
|
48
|
-
shapeElement = element.insert('path', insertSelector)
|
|
49
|
-
break
|
|
50
|
-
case GraphNodeShape.Circle:
|
|
51
|
-
default:
|
|
52
|
-
shapeElement = element.insert('circle', insertSelector)
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return shapeElement.attr('class', shapeSelector)
|
|
57
|
-
.classed(customShapeSelector, isCustomXmlShape)
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function updateShape<T> (
|
|
62
|
-
selection: Selection<SVGGElement, T, SVGGElement, unknown>,
|
|
63
|
-
shape: StringAccessor<T>,
|
|
64
|
-
size: NumericAccessor<T>,
|
|
65
|
-
index: number
|
|
66
|
-
): void {
|
|
67
|
-
if (selection.size() === 0) return
|
|
68
|
-
|
|
69
|
-
const d: T = selection.datum()
|
|
70
|
-
const nodeSize = getNodeSize(d, size, index)
|
|
71
|
-
selection.filter('circle')
|
|
72
|
-
.attr('r', nodeSize / 2)
|
|
73
|
-
|
|
74
|
-
selection.filter('rect')
|
|
75
|
-
.attr('width', nodeSize)
|
|
76
|
-
.attr('height', nodeSize)
|
|
77
|
-
.attr('x', -nodeSize / 2)
|
|
78
|
-
.attr('y', -nodeSize / 2)
|
|
79
|
-
|
|
80
|
-
selection.filter('path')
|
|
81
|
-
.attr('d', () => {
|
|
82
|
-
let n: number
|
|
83
|
-
switch (getString(d, shape, index)) {
|
|
84
|
-
case GraphNodeShape.Square:
|
|
85
|
-
n = 4
|
|
86
|
-
break
|
|
87
|
-
case GraphNodeShape.Triangle:
|
|
88
|
-
n = 3
|
|
89
|
-
break
|
|
90
|
-
case GraphNodeShape.Hexagon:
|
|
91
|
-
default:
|
|
92
|
-
n = 6
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return polygon(nodeSize, n)
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
selection.filter('g')
|
|
99
|
-
.filter(() => !isCustomXml(getString(d, shape, index) as GraphNodeShape))
|
|
100
|
-
.html(getString(d, shape, index))
|
|
101
|
-
|
|
102
|
-
selection.filter('g')
|
|
103
|
-
.each((d, i, elements) => {
|
|
104
|
-
const el = select(elements[i])
|
|
105
|
-
const bBox = el.node().getBBox()
|
|
106
|
-
el.attr('transform', `translate(${-bBox.width / 2},${-bBox.height / 2})`)
|
|
107
|
-
})
|
|
108
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { css, injectGlobal } from '@emotion/css'
|
|
2
|
-
import { UNOVIS_ICON_FONT_FAMILY_DEFAULT } from 'styles/index'
|
|
3
|
-
|
|
4
|
-
// Nodes
|
|
5
|
-
import * as nodeSelectors from './modules/node/style'
|
|
6
|
-
|
|
7
|
-
// Links
|
|
8
|
-
import * as linkSelectors from './modules/link/style'
|
|
9
|
-
|
|
10
|
-
export const variables = injectGlobal`
|
|
11
|
-
:root {
|
|
12
|
-
--vis-graph-icon-font-family: ${UNOVIS_ICON_FONT_FAMILY_DEFAULT};
|
|
13
|
-
}
|
|
14
|
-
`
|
|
15
|
-
|
|
16
|
-
// General
|
|
17
|
-
export const root = css`
|
|
18
|
-
label: graph-component;
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
export const background = css`
|
|
22
|
-
label: background;
|
|
23
|
-
`
|
|
24
|
-
|
|
25
|
-
export const graphGroup = css`
|
|
26
|
-
label: graph-group;
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
export const zoomOutLevel1 = css`
|
|
30
|
-
label: zoom-out-level-1;
|
|
31
|
-
|
|
32
|
-
${`.${nodeSelectors.label}`} {
|
|
33
|
-
rect {
|
|
34
|
-
stroke: none;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
export const zoomOutLevel2 = css`
|
|
40
|
-
label: zoom-out-level-2;
|
|
41
|
-
|
|
42
|
-
${`.${nodeSelectors.label}`} {
|
|
43
|
-
visibility: visible;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
${`.${nodeSelectors.nodeGauge}`} {
|
|
47
|
-
visibility: visible;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
${`.${nodeSelectors.node}`} {
|
|
51
|
-
stroke-width: 4px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
rect${`.${nodeSelectors.node}`} {
|
|
55
|
-
stroke-width: 2px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
${`.${linkSelectors.gLink}`} {
|
|
59
|
-
animation: none;
|
|
60
|
-
stroke-dasharray: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
${`.${linkSelectors.flowCircle}`} {
|
|
64
|
-
display: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
${`.${nodeSelectors.nodeSelection}`} {
|
|
68
|
-
&${`.${nodeSelectors.nodeSelectionActive}`} {
|
|
69
|
-
transform: scale(1.15);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
`
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
// Types
|
|
2
|
-
import { Position } from 'types/position'
|
|
3
|
-
import { GraphInputLink, GraphInputNode, GraphNodeCore, GraphLinkCore } from 'types/graph'
|
|
4
|
-
import { Spacing } from 'types/spacing'
|
|
5
|
-
|
|
6
|
-
export type GraphNode<
|
|
7
|
-
N extends GraphInputNode = GraphInputNode,
|
|
8
|
-
L extends GraphInputLink = GraphInputLink,
|
|
9
|
-
> = GraphNodeCore<N, L> & {
|
|
10
|
-
x?: number;
|
|
11
|
-
y?: number;
|
|
12
|
-
|
|
13
|
-
_id?: number | string;
|
|
14
|
-
_index?: number;
|
|
15
|
-
_state?: {
|
|
16
|
-
isDragged?: boolean;
|
|
17
|
-
fx?: number;
|
|
18
|
-
fy?: number;
|
|
19
|
-
selected?: boolean;
|
|
20
|
-
greyout?: boolean;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
_panels?: GraphPanel<N, L>[];
|
|
24
|
-
_isConnected?: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type GraphLink<
|
|
28
|
-
N extends GraphInputNode = GraphInputNode,
|
|
29
|
-
L extends GraphInputLink = GraphInputLink,
|
|
30
|
-
> = GraphLinkCore<N, L> & {
|
|
31
|
-
id?: number | string;
|
|
32
|
-
source: number | string | GraphNode<N>;
|
|
33
|
-
target: number | string | GraphNode<N>;
|
|
34
|
-
|
|
35
|
-
_id?: number | string;
|
|
36
|
-
_direction?: number;
|
|
37
|
-
_index?: number;
|
|
38
|
-
_neighbours?: number;
|
|
39
|
-
|
|
40
|
-
_state?: {
|
|
41
|
-
flowAnimTime?: number;
|
|
42
|
-
hovered?: boolean;
|
|
43
|
-
selected?: boolean;
|
|
44
|
-
greyout?: boolean;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export enum GraphLayoutType {
|
|
49
|
-
Circular = 'circular',
|
|
50
|
-
Concentric = 'concentric',
|
|
51
|
-
Parallel = 'parallel',
|
|
52
|
-
ParallelHorizontal = 'parallel horizontal',
|
|
53
|
-
Dagre = 'dagre',
|
|
54
|
-
Force = 'force',
|
|
55
|
-
Elk = 'elk',
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type GraphCircleLabel = {
|
|
59
|
-
text: string;
|
|
60
|
-
textColor?: string | null;
|
|
61
|
-
color?: string | null;
|
|
62
|
-
cursor?: string | null;
|
|
63
|
-
fontSize?: string | null;
|
|
64
|
-
radius?: number;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export enum GraphLinkStyle {
|
|
68
|
-
Dashed = 'dashed',
|
|
69
|
-
Solid = 'solid',
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export enum GraphLinkArrowStyle {
|
|
73
|
-
Single = 'single',
|
|
74
|
-
Double = 'double',
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export enum GraphNodeShape {
|
|
78
|
-
Circle = 'circle',
|
|
79
|
-
Square = 'square',
|
|
80
|
-
Hexagon = 'hexagon',
|
|
81
|
-
Triangle = 'triangle',
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export type GraphPanelConfig = {
|
|
85
|
-
/** Panel nodes references by unique ids */
|
|
86
|
-
nodes: (string|number)[];
|
|
87
|
-
/** Panel label */
|
|
88
|
-
label?: string;
|
|
89
|
-
/** Position of the label */
|
|
90
|
-
labelPosition?: Position.Top | Position.Bottom | string;
|
|
91
|
-
/** Color of the panel's border */
|
|
92
|
-
borderColor?: string;
|
|
93
|
-
/** Border width of the panel in pixels */
|
|
94
|
-
borderWidth?: number;
|
|
95
|
-
/** Inner padding */
|
|
96
|
-
padding?: number | Spacing;
|
|
97
|
-
/** Dashed outline showing that the panel is selected */
|
|
98
|
-
dashedOutline?: boolean;
|
|
99
|
-
/** Side icon symbol */
|
|
100
|
-
sideIconSymbol?: string;
|
|
101
|
-
/** Size of the icon as a CSS string. e.g.: `12pt` or `12px` */
|
|
102
|
-
sideIconFontSize?: string;
|
|
103
|
-
/** Color of the icon */
|
|
104
|
-
sideIconSymbolColor?: string;
|
|
105
|
-
/** Shape of the icon's background */
|
|
106
|
-
sideIconShape?: GraphNodeShape | string;
|
|
107
|
-
/** Size of the icon's background shape */
|
|
108
|
-
sideIconShapeSize?: number;
|
|
109
|
-
/** Stroke color of the icon's background shape */
|
|
110
|
-
sideIconShapeStroke?: string;
|
|
111
|
-
/** Cursor, when hovering over the icon */
|
|
112
|
-
sideIconCursor?: string;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export type GraphPanel<
|
|
116
|
-
N extends GraphInputNode = GraphInputNode,
|
|
117
|
-
L extends GraphInputLink = GraphInputLink,
|
|
118
|
-
> = GraphPanelConfig & {
|
|
119
|
-
_numNodes?: number;
|
|
120
|
-
_x?: number;
|
|
121
|
-
_y?: number;
|
|
122
|
-
_width?: number;
|
|
123
|
-
_height?: number;
|
|
124
|
-
_disabled?: boolean;
|
|
125
|
-
_padding?: Spacing;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export type GraphNodeAnimationState = {
|
|
129
|
-
endAngle: number;
|
|
130
|
-
nodeIndex: number;
|
|
131
|
-
nodeSize?: number;
|
|
132
|
-
borderWidth?: number;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export type GraphNodeAnimatedElement<T = SVGElement> = T & {
|
|
136
|
-
_animState: GraphNodeAnimationState;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export type GraphForceLayoutSettings = {
|
|
140
|
-
/** Preferred Link Distance. Default: `60` */
|
|
141
|
-
linkDistance?: number;
|
|
142
|
-
/** Link Strength [0:1]. Default: `0.45` */
|
|
143
|
-
linkStrength?: number;
|
|
144
|
-
/** Charge Force (<0 repulsion, >0 attraction). Default: `-500` */
|
|
145
|
-
charge?: number;
|
|
146
|
-
/** X-centring force. Default: `0.15` */
|
|
147
|
-
forceXStrength?: number;
|
|
148
|
-
/** Y-centring force. Default: `0.25` */
|
|
149
|
-
forceYStrength?: number;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export type GraphElkLayoutSettings = Record<string, string>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { XYComponentConfigInterface, XYComponentConfig } from 'core/xy-component/config'
|
|
2
|
-
|
|
3
|
-
// Types
|
|
4
|
-
import { StringAccessor } from 'types/accessor'
|
|
5
|
-
import { Orientation } from 'types/position'
|
|
6
|
-
|
|
7
|
-
export interface GroupedBarConfigInterface<Datum> extends XYComponentConfigInterface<Datum> {
|
|
8
|
-
/** Force set the group width in pixels. Default: `undefined` */
|
|
9
|
-
groupWidth?: number;
|
|
10
|
-
/** Maximum group width for dynamic sizing. Limits the groupWidth property from the top. Default: `undefined` */
|
|
11
|
-
groupMaxWidth?: number;
|
|
12
|
-
/** Expected step between the bar groups in the X axis units.
|
|
13
|
-
* Needed to correctly calculate the width of the bar groups when there are gaps in the data.
|
|
14
|
-
* Default: `undefined` */
|
|
15
|
-
dataStep?: number;
|
|
16
|
-
/** Fractional padding between the groups in the range of [0,1). Default: `0.05` */
|
|
17
|
-
groupPadding?: number;
|
|
18
|
-
/** Fractional padding between the bars in the range of [0,1). Default: `0` */
|
|
19
|
-
barPadding?: number;
|
|
20
|
-
/** Rounded bar corners. Boolean or number (to set the radius in pixels explicitly). Default: `2` */
|
|
21
|
-
roundedCorners?: number | boolean;
|
|
22
|
-
/** Sets the minimum bar height for better visibility of small values. Default: `1` */
|
|
23
|
-
barMinHeight?: number;
|
|
24
|
-
/** Configurable bar cursor when hovering over. Default: `null` */
|
|
25
|
-
cursor?: StringAccessor<Datum>;
|
|
26
|
-
/** Chart orientation: `Orientation.Vertical` or `Orientation.Horizontal`. Default `Orientation.Vertical` */
|
|
27
|
-
orientation?: Orientation | string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export class GroupedBarConfig<Datum> extends XYComponentConfig<Datum> implements GroupedBarConfigInterface<Datum> {
|
|
31
|
-
groupMaxWidth = undefined
|
|
32
|
-
groupWidth = undefined
|
|
33
|
-
dataStep = undefined
|
|
34
|
-
groupPadding = 0.05
|
|
35
|
-
barPadding = 0.0
|
|
36
|
-
roundedCorners = 2
|
|
37
|
-
barMinHeight = 2
|
|
38
|
-
cursor = null
|
|
39
|
-
orientation = Orientation.Vertical
|
|
40
|
-
}
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { scaleBand } from 'd3-scale'
|
|
2
|
-
import { min, max, range } from 'd3-array'
|
|
3
|
-
import { select } from 'd3'
|
|
4
|
-
|
|
5
|
-
// Core
|
|
6
|
-
import { XYComponentCore } from 'core/xy-component'
|
|
7
|
-
|
|
8
|
-
// Utils
|
|
9
|
-
import { clamp, getExtent, getMax, getMin, getNumber, getString, isArray, isEmpty, isNumber } from 'utils/data'
|
|
10
|
-
import { roundedRectPath } from 'utils/path'
|
|
11
|
-
import { smartTransition } from 'utils/d3'
|
|
12
|
-
import { getColor } from 'utils/color'
|
|
13
|
-
|
|
14
|
-
// Types
|
|
15
|
-
import { NumericAccessor } from 'types/accessor'
|
|
16
|
-
import { Spacing } from 'types/spacing'
|
|
17
|
-
import { Direction } from 'types/direction'
|
|
18
|
-
import { Orientation } from 'types/position'
|
|
19
|
-
import { ContinuousScale } from 'types/scale'
|
|
20
|
-
|
|
21
|
-
// Config
|
|
22
|
-
import { GroupedBarConfig, GroupedBarConfigInterface } from './config'
|
|
23
|
-
|
|
24
|
-
// Styles
|
|
25
|
-
import * as s from './style'
|
|
26
|
-
|
|
27
|
-
export class GroupedBar<Datum> extends XYComponentCore<Datum, GroupedBarConfig<Datum>, GroupedBarConfigInterface<Datum>> {
|
|
28
|
-
static selectors = s
|
|
29
|
-
config: GroupedBarConfig<Datum> = new GroupedBarConfig()
|
|
30
|
-
getAccessors = (): NumericAccessor<Datum>[] =>
|
|
31
|
-
isArray(this.config.y) ? this.config.y : [this.config.y]
|
|
32
|
-
|
|
33
|
-
events = {
|
|
34
|
-
[GroupedBar.selectors.barGroup]: {
|
|
35
|
-
mouseover: this._raiseSelection,
|
|
36
|
-
},
|
|
37
|
-
[GroupedBar.selectors.bar]: {
|
|
38
|
-
mouseover: this._raiseSelection,
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
private _barData: Datum[] = []
|
|
43
|
-
|
|
44
|
-
constructor (config?: GroupedBarConfigInterface<Datum>) {
|
|
45
|
-
super()
|
|
46
|
-
if (config) this.config.init(config)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get bleed (): Spacing {
|
|
50
|
-
this._barData = this._getVisibleData()
|
|
51
|
-
if (this._barData.length === 0) return { top: 0, bottom: 0, left: 0, right: 0 }
|
|
52
|
-
|
|
53
|
-
// By default, horizontal orientation is "flipped", i.e. the `yDirection` of `XYContainer` is set to `Direction.North`
|
|
54
|
-
const isHorizontalAndFlipped = !this.isVertical() && (this.dataScale.range()[0] > this.dataScale.range()[1])
|
|
55
|
-
const dataDomain = this.dataScale.domain()
|
|
56
|
-
const halfGroupWidth = this._getGroupWidth() / 2
|
|
57
|
-
|
|
58
|
-
const dataScaleValues = this._barData.map((d, i) => getNumber(d, this.config.x, i))
|
|
59
|
-
const firstDataValue = min(dataScaleValues)
|
|
60
|
-
const lastDataValue = max(dataScaleValues)
|
|
61
|
-
const firstValuePx = this.dataScale(firstDataValue)
|
|
62
|
-
const lastValuePx = this.dataScale(lastDataValue)
|
|
63
|
-
|
|
64
|
-
const dataDomainRequiredStart = this.dataScale.invert(firstValuePx + (isHorizontalAndFlipped ? halfGroupWidth : -halfGroupWidth))
|
|
65
|
-
const dataDomainRequiredEnd = this.dataScale.invert(lastValuePx + (isHorizontalAndFlipped ? -halfGroupWidth : halfGroupWidth))
|
|
66
|
-
const bleedPxStart = dataDomainRequiredStart <= dataDomain[0] ? this.dataScale(dataDomain[0]) - this.dataScale(dataDomainRequiredStart) : 0
|
|
67
|
-
const bleedPxEnd = dataDomainRequiredEnd > dataDomain[1] ? this.dataScale(dataDomainRequiredEnd) - this.dataScale(dataDomain[1]) : 0
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
top: this.isVertical() ? 0 : (isHorizontalAndFlipped ? -bleedPxEnd : bleedPxStart),
|
|
71
|
-
bottom: this.isVertical() ? 0 : (isHorizontalAndFlipped ? -bleedPxStart : bleedPxEnd),
|
|
72
|
-
left: this.isVertical() ? bleedPxStart : 0,
|
|
73
|
-
right: this.isVertical() ? bleedPxEnd : 0,
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
private get dataScale (): ContinuousScale {
|
|
78
|
-
return this.isVertical() ? this.xScale : this.yScale
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
private get valueScale (): ContinuousScale {
|
|
82
|
-
return this.isVertical() ? this.yScale : this.xScale
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private isVertical (): boolean {
|
|
86
|
-
return this.config.orientation === Orientation.Vertical
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
_render (customDuration?: number): void {
|
|
90
|
-
const { config } = this
|
|
91
|
-
const duration = isNumber(customDuration)
|
|
92
|
-
? customDuration
|
|
93
|
-
: config.duration
|
|
94
|
-
const groupWidth = this._getGroupWidth()
|
|
95
|
-
|
|
96
|
-
const yAccessors = this.getAccessors()
|
|
97
|
-
const innerBandScaleRange = [-groupWidth / 2, groupWidth / 2] as [
|
|
98
|
-
number,
|
|
99
|
-
number,
|
|
100
|
-
]
|
|
101
|
-
const innerBandScale = scaleBand<number>()
|
|
102
|
-
.domain(range(yAccessors.length))
|
|
103
|
-
.range(innerBandScaleRange)
|
|
104
|
-
.paddingInner(config.barPadding)
|
|
105
|
-
.paddingOuter(config.barPadding)
|
|
106
|
-
|
|
107
|
-
const barGroups = this.g
|
|
108
|
-
.selectAll<SVGGElement, Datum>(`.${s.barGroup}`)
|
|
109
|
-
.data(this._barData, (d, i) => `${getString(d, config.id, i) ?? i}`)
|
|
110
|
-
|
|
111
|
-
const getBarGroupsTransform = (d: Datum, i: number): string => {
|
|
112
|
-
const v = this.dataScale(getNumber(d, config.x, i))
|
|
113
|
-
const x = this.isVertical() ? v : 0
|
|
114
|
-
const y = this.isVertical() ? 0 : v
|
|
115
|
-
return `translate(${x},${y})`
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const barGroupsEnter = barGroups
|
|
119
|
-
.enter()
|
|
120
|
-
.append('g')
|
|
121
|
-
.attr('class', s.barGroup)
|
|
122
|
-
.attr('transform', getBarGroupsTransform)
|
|
123
|
-
.style('opacity', 1)
|
|
124
|
-
|
|
125
|
-
const barGroupsMerged = barGroupsEnter.merge(barGroups)
|
|
126
|
-
smartTransition(barGroupsMerged, duration)
|
|
127
|
-
.attr('transform', getBarGroupsTransform)
|
|
128
|
-
.style('opacity', 1)
|
|
129
|
-
|
|
130
|
-
const barGroupExit = barGroups.exit().attr('class', s.barGroupExit)
|
|
131
|
-
smartTransition(barGroupExit, duration).style('opacity', 0).remove()
|
|
132
|
-
|
|
133
|
-
// Animate exiting bars going down
|
|
134
|
-
smartTransition(barGroupExit.selectAll<SVGPathElement, Datum>(`.${s.bar}`), duration)
|
|
135
|
-
.attr('transform', (d, i, e) => {
|
|
136
|
-
return this.isVertical()
|
|
137
|
-
? `translate(0,${this.yScale(0)}) scale(1,0)`
|
|
138
|
-
: `translate(${this.xScale(0)},0) scale(0,1)`
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
const barWidth = innerBandScale.bandwidth()
|
|
142
|
-
const bars = barGroupsMerged
|
|
143
|
-
.selectAll<SVGPathElement, Datum>(`.${s.bar}`)
|
|
144
|
-
.data((d) => yAccessors.map(() => d))
|
|
145
|
-
|
|
146
|
-
const valueAxisDirection = this._getValueAxisDirection()
|
|
147
|
-
const barsEnter = bars
|
|
148
|
-
.enter()
|
|
149
|
-
.append('path')
|
|
150
|
-
.attr('class', s.bar)
|
|
151
|
-
.attr('d', (d, i) => {
|
|
152
|
-
const x = innerBandScale(i)
|
|
153
|
-
const y = this.valueScale(0)
|
|
154
|
-
const width = barWidth
|
|
155
|
-
const height = 0
|
|
156
|
-
return this._getBarPath(x, y, width, height, false, valueAxisDirection)
|
|
157
|
-
})
|
|
158
|
-
.style('fill', (d, i) => getColor(d, config.color, i))
|
|
159
|
-
|
|
160
|
-
const barsMerged = barsEnter.merge(bars)
|
|
161
|
-
smartTransition(barsMerged, duration)
|
|
162
|
-
.attr('d', (d, j) => {
|
|
163
|
-
const x = innerBandScale(j)
|
|
164
|
-
const width = barWidth
|
|
165
|
-
|
|
166
|
-
// Todo: Find a way to pass the datum index to `getNumber` below
|
|
167
|
-
const value = getNumber(d, yAccessors[j])
|
|
168
|
-
const isNegative = value < 0
|
|
169
|
-
let y = isNegative ? this.valueScale(0) : this.valueScale(value || 0)
|
|
170
|
-
let height = Math.abs(this.valueScale(0) - this.valueScale(value)) || 0
|
|
171
|
-
|
|
172
|
-
// Optionally set minimum bar height
|
|
173
|
-
if (height < config.barMinHeight) {
|
|
174
|
-
const dir = valueAxisDirection === Direction.North ? -1 : 1
|
|
175
|
-
y = this.valueScale(0) + dir * config.barMinHeight
|
|
176
|
-
height = config.barMinHeight
|
|
177
|
-
}
|
|
178
|
-
return this._getBarPath(x, y, width, height, isNegative, valueAxisDirection)
|
|
179
|
-
})
|
|
180
|
-
.style('fill', (d, i) => getColor(d, config.color, i))
|
|
181
|
-
.style('cursor', (d, i) => getString(d, config.cursor, i))
|
|
182
|
-
|
|
183
|
-
smartTransition(bars.exit(), duration).remove()
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
_getValueAxisDirection (): Direction.North | Direction.South {
|
|
187
|
-
return this.valueScale.range()[0] > this.valueScale.range()[1]
|
|
188
|
-
? Direction.North
|
|
189
|
-
: Direction.South
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
_getVisibleData (): Datum[] {
|
|
193
|
-
const {
|
|
194
|
-
config,
|
|
195
|
-
datamodel: { data },
|
|
196
|
-
} = this
|
|
197
|
-
const groupWidth = this._getGroupWidth()
|
|
198
|
-
const halfGroupWidth = data.length < 2 ? 0 : groupWidth / 2
|
|
199
|
-
|
|
200
|
-
const dataScale = this.dataScale
|
|
201
|
-
const xHalfGroupWidth = Math.abs(
|
|
202
|
-
(dataScale.invert(halfGroupWidth) as number) -
|
|
203
|
-
(dataScale.invert(0) as number)
|
|
204
|
-
)
|
|
205
|
-
const filtered = data?.filter((d, i) => {
|
|
206
|
-
const v = getNumber(d, config.x, i)
|
|
207
|
-
const domain: number[] | Date[] = dataScale.domain()
|
|
208
|
-
const domainMin = +domain[0]
|
|
209
|
-
const domainMax = +domain[1]
|
|
210
|
-
return (
|
|
211
|
-
v >= domainMin - xHalfGroupWidth && v <= domainMax + xHalfGroupWidth
|
|
212
|
-
)
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
return filtered
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
_getBarPath (
|
|
219
|
-
x: number,
|
|
220
|
-
y: number,
|
|
221
|
-
width: number,
|
|
222
|
-
height: number,
|
|
223
|
-
isNegative: boolean,
|
|
224
|
-
direction: Direction.North | Direction.South
|
|
225
|
-
): string {
|
|
226
|
-
const { config } = this
|
|
227
|
-
|
|
228
|
-
const cornerRadius = config.roundedCorners
|
|
229
|
-
? isNumber(config.roundedCorners)
|
|
230
|
-
? +config.roundedCorners
|
|
231
|
-
: width / 2
|
|
232
|
-
: 0
|
|
233
|
-
const cornerRadiusClamped = clamp(
|
|
234
|
-
cornerRadius,
|
|
235
|
-
0,
|
|
236
|
-
Math.min(height, width) / 2
|
|
237
|
-
)
|
|
238
|
-
|
|
239
|
-
const isNorthDirected = direction === Direction.North
|
|
240
|
-
const roundedTop = this.isVertical() && isNegative !== isNorthDirected
|
|
241
|
-
const roundedBottom = this.isVertical() && isNegative === isNorthDirected
|
|
242
|
-
const roundedLeft = !this.isVertical() && isNegative
|
|
243
|
-
const roundedRight = !this.isVertical() && !isNegative
|
|
244
|
-
|
|
245
|
-
return roundedRectPath({
|
|
246
|
-
x: this.isVertical() ? x : y + (isNorthDirected ? 0 : -height),
|
|
247
|
-
y: this.isVertical() ? y + (isNorthDirected ? 0 : -height) : x,
|
|
248
|
-
w: this.isVertical() ? width : height,
|
|
249
|
-
h: this.isVertical() ? height : width,
|
|
250
|
-
tl: roundedTop || roundedLeft,
|
|
251
|
-
tr: roundedTop || roundedRight,
|
|
252
|
-
bl: roundedBottom || roundedLeft,
|
|
253
|
-
br: roundedBottom || roundedRight,
|
|
254
|
-
r: cornerRadiusClamped,
|
|
255
|
-
})
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
_getGroupWidth (): number {
|
|
259
|
-
const {
|
|
260
|
-
config,
|
|
261
|
-
datamodel: { data },
|
|
262
|
-
} = this
|
|
263
|
-
if (isEmpty(data)) return 0
|
|
264
|
-
if (config.groupWidth) { return min([config.groupWidth, config.groupMaxWidth]) }
|
|
265
|
-
|
|
266
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
267
|
-
// @ts-ignore
|
|
268
|
-
const isOrdinal = this.dataScale.bandwidth
|
|
269
|
-
const domain = (
|
|
270
|
-
this.dataScale.domain ? this.dataScale.domain() : []
|
|
271
|
-
) as number[]
|
|
272
|
-
const domainLength = isOrdinal ? domain.length : domain[1] - domain[0]
|
|
273
|
-
|
|
274
|
-
// If the dataStep property is provided the amount of data elements is calculates as domainLength / dataStep
|
|
275
|
-
// otherwise we get the number of data elements within the domain range
|
|
276
|
-
// Or if the scale is ordinal we use data.length
|
|
277
|
-
let dataSize =
|
|
278
|
-
1 + domainLength / config.dataStep ||
|
|
279
|
-
(!isOrdinal &&
|
|
280
|
-
data.filter((d, i) => {
|
|
281
|
-
const value = getNumber(d, config.x, i)
|
|
282
|
-
return value >= domain[0] && value <= domain[1]
|
|
283
|
-
}).length) ||
|
|
284
|
-
data.length
|
|
285
|
-
|
|
286
|
-
// We increase the dataSize by 1 to take into account possible additional domain space
|
|
287
|
-
if (!isOrdinal && dataSize >= 2) dataSize += 1
|
|
288
|
-
|
|
289
|
-
const c = dataSize < 2 ? 1 : 1 - config.groupPadding
|
|
290
|
-
const groupWidth =
|
|
291
|
-
(c * (this.isVertical() ? this._width : this._height)) / dataSize
|
|
292
|
-
return min([groupWidth, config.groupMaxWidth])
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
getValueScaleExtent (scaleByVisibleData: boolean): number[] {
|
|
296
|
-
const { datamodel } = this
|
|
297
|
-
const yAccessors = this.getAccessors()
|
|
298
|
-
|
|
299
|
-
const data = scaleByVisibleData ? this._getVisibleData() : datamodel.data
|
|
300
|
-
const min = getMin(data, ...yAccessors)
|
|
301
|
-
const max = getMax(data, ...yAccessors)
|
|
302
|
-
return [min > 0 ? 0 : min, max < 0 ? 0 : max]
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
_raiseSelection (d, i, els): void {
|
|
306
|
-
select(els[i]).raise()
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
getDataScaleExtent (): number[] {
|
|
310
|
-
const { config, datamodel } = this
|
|
311
|
-
return getExtent(datamodel.data, config.x)
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
getYDataExtent (scaleByVisibleData: boolean): number[] {
|
|
315
|
-
return this.isVertical()
|
|
316
|
-
? this.getValueScaleExtent(scaleByVisibleData)
|
|
317
|
-
: this.getDataScaleExtent()
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
getXDataExtent (): number[] {
|
|
321
|
-
return this.isVertical()
|
|
322
|
-
? this.getDataScaleExtent()
|
|
323
|
-
: this.getValueScaleExtent(false)
|
|
324
|
-
}
|
|
325
|
-
}
|