@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,176 +0,0 @@
|
|
|
1
|
-
import { Selection } from 'd3-selection'
|
|
2
|
-
import { arc } from 'd3-shape'
|
|
3
|
-
import { hierarchy, partition } from 'd3-hierarchy'
|
|
4
|
-
import { scaleLinear, ScaleLinear } from 'd3-scale'
|
|
5
|
-
import { group, max, min, sum } from 'd3-array'
|
|
6
|
-
|
|
7
|
-
// Core
|
|
8
|
-
import { ComponentCore } from 'core/component'
|
|
9
|
-
import { SeriesDataModel } from 'data-models/series'
|
|
10
|
-
|
|
11
|
-
// Types
|
|
12
|
-
import { VerticalAlign } from 'types/text'
|
|
13
|
-
|
|
14
|
-
// Utils
|
|
15
|
-
import { getColor, getHexValue } from 'utils/color'
|
|
16
|
-
import { getString, getValue, isNumber } from 'utils/data'
|
|
17
|
-
import { smartTransition } from 'utils/d3'
|
|
18
|
-
import { wrapSVGText } from 'utils/text'
|
|
19
|
-
|
|
20
|
-
// Local Types
|
|
21
|
-
import { NestedDonutDirection, NestedDonutLayerSettings, NestedDonutSegment, defaultLayerSettings } from './types'
|
|
22
|
-
|
|
23
|
-
// Config
|
|
24
|
-
import { NestedDonutConfig, NestedDonutConfigInterface } from './config'
|
|
25
|
-
|
|
26
|
-
// Modules
|
|
27
|
-
import { createArc, updateArc, removeArc } from './modules/arc'
|
|
28
|
-
import { createLabel, updateLabel, removeLabel } from './modules/label'
|
|
29
|
-
|
|
30
|
-
// Styles
|
|
31
|
-
import * as s from './style'
|
|
32
|
-
|
|
33
|
-
export class NestedDonut<Datum> extends ComponentCore<
|
|
34
|
-
Datum[],
|
|
35
|
-
NestedDonutConfig<Datum>,
|
|
36
|
-
NestedDonutConfigInterface<Datum>
|
|
37
|
-
> {
|
|
38
|
-
static selectors = s
|
|
39
|
-
static cssVariables = s.variables
|
|
40
|
-
config: NestedDonutConfig<Datum> = new NestedDonutConfig()
|
|
41
|
-
datamodel: SeriesDataModel<Datum> = new SeriesDataModel()
|
|
42
|
-
|
|
43
|
-
arcBackground: Selection<SVGPathElement, unknown, SVGGElement, unknown>
|
|
44
|
-
arcGroup: Selection<SVGGElement, unknown, SVGGElement, unknown>
|
|
45
|
-
centralLabel: Selection<SVGTextElement, unknown, SVGGElement, unknown>
|
|
46
|
-
centralSubLabel: Selection<SVGTextElement, unknown, SVGGElement, unknown>
|
|
47
|
-
|
|
48
|
-
arcGen = arc<Partial<NestedDonutSegment<Datum>>>()
|
|
49
|
-
radiusScale: ScaleLinear<number, number> = scaleLinear()
|
|
50
|
-
colorScale: ScaleLinear<string, string> = scaleLinear()
|
|
51
|
-
|
|
52
|
-
events = { }
|
|
53
|
-
|
|
54
|
-
constructor (config?: NestedDonutConfigInterface<Datum>) {
|
|
55
|
-
super()
|
|
56
|
-
if (config) this.config.init(config)
|
|
57
|
-
this.arcBackground = this.g.append('path')
|
|
58
|
-
this.arcGroup = this.g.append('g')
|
|
59
|
-
this.centralLabel = this.g.append('text')
|
|
60
|
-
.attr('class', s.centralLabel)
|
|
61
|
-
this.centralSubLabel = this.g.append('text')
|
|
62
|
-
.attr('class', s.centralSubLabel)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
private getHierarchyData (): NestedDonutSegment<Datum>[] {
|
|
66
|
-
const { config, datamodel } = this
|
|
67
|
-
|
|
68
|
-
const layerAccessors = config.layers?.map(layerAccessor => (d: Datum, i: number) => getString(d, layerAccessor, i))
|
|
69
|
-
const nestedData = group(datamodel.data, ...layerAccessors as [(d: Datum) => string])
|
|
70
|
-
const rootNode = hierarchy(nestedData).count()
|
|
71
|
-
const partitionData = partition().size([config.angleRange[1], 1])(rootNode) as NestedDonutSegment<Datum>
|
|
72
|
-
|
|
73
|
-
partitionData.eachBefore((node, index) => {
|
|
74
|
-
const scale = this.colorScale.domain([-1, node.children?.length])
|
|
75
|
-
node._id = this.uid + index
|
|
76
|
-
node._layer = node.depth - 1
|
|
77
|
-
|
|
78
|
-
node.data = { key: node.data[0], root: node.parent?.data.root ?? node.data[0] }
|
|
79
|
-
node.children?.forEach((child, i) => {
|
|
80
|
-
child._index = i
|
|
81
|
-
child._state = {
|
|
82
|
-
fill:
|
|
83
|
-
getColor(child, config.color, i, child.depth !== 1) ??
|
|
84
|
-
scale.range(['#fff', getHexValue(node._state.fill, this.element)])(i),
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
const segments = partitionData.descendants().filter(d => d.parent && d.children && d.data.key)
|
|
89
|
-
return segments
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
_render (customDuration?: number): void {
|
|
93
|
-
const { config } = this
|
|
94
|
-
const duration = isNumber(customDuration) ? customDuration : config.duration
|
|
95
|
-
|
|
96
|
-
const layers: NestedDonutLayerSettings[] = config.layers?.map((_, i) => getValue(i, config.layerSettings) ?? defaultLayerSettings)
|
|
97
|
-
const data = this.getHierarchyData()
|
|
98
|
-
|
|
99
|
-
const outerRadius = Math.min(this._width, this._height) / 2
|
|
100
|
-
const innerRadius = Math.max(0, outerRadius - sum(layers, d => d.width + config.layerPadding))
|
|
101
|
-
|
|
102
|
-
const yMin = min(data, d => d.y0)
|
|
103
|
-
const yMax = max(data, d => d.y1)
|
|
104
|
-
|
|
105
|
-
this.radiusScale
|
|
106
|
-
.domain(config.direction === NestedDonutDirection.OUTWARDS ? [yMin, yMax] : [yMax, yMin])
|
|
107
|
-
.range([innerRadius, outerRadius])
|
|
108
|
-
|
|
109
|
-
this.arcGen
|
|
110
|
-
.startAngle(d => d.x0)
|
|
111
|
-
.endAngle(d => d.x1)
|
|
112
|
-
.innerRadius(d => this.radiusScale(d.y0))
|
|
113
|
-
.outerRadius(d => this.radiusScale(d.y1))
|
|
114
|
-
.padAngle(config.padAngle)
|
|
115
|
-
.cornerRadius(config.cornerRadius)
|
|
116
|
-
|
|
117
|
-
this.arcGroup.attr('transform', `translate(${this._width / 2},${this._height / 2})`)
|
|
118
|
-
|
|
119
|
-
// Arcs
|
|
120
|
-
const arcs = this.arcGroup
|
|
121
|
-
.selectAll<SVGPathElement, NestedDonutSegment<Datum>>(`.${s.segment}`)
|
|
122
|
-
.data(data, d => d._id)
|
|
123
|
-
|
|
124
|
-
const arcsEnter = arcs.enter().append('path')
|
|
125
|
-
.attr('class', s.segment)
|
|
126
|
-
.call(createArc, config)
|
|
127
|
-
|
|
128
|
-
arcs.merge(arcsEnter)
|
|
129
|
-
.call(updateArc, config, this.arcGen, duration)
|
|
130
|
-
|
|
131
|
-
arcs.exit<NestedDonutSegment<Datum>>()
|
|
132
|
-
.attr('class', s.segmentExit)
|
|
133
|
-
.call(removeArc, duration)
|
|
134
|
-
|
|
135
|
-
// Segment labels
|
|
136
|
-
const arcLabels = this.arcGroup
|
|
137
|
-
.selectAll<SVGTextElement, NestedDonutSegment<Datum>>(`.${s.segmentLabel}`)
|
|
138
|
-
.data(data, d => d._id)
|
|
139
|
-
|
|
140
|
-
const arcLabelsEnter = arcLabels.enter().append('text')
|
|
141
|
-
.attr('class', s.segmentLabel)
|
|
142
|
-
.call(createLabel, config)
|
|
143
|
-
|
|
144
|
-
arcLabels.merge(arcLabelsEnter)
|
|
145
|
-
.call(updateLabel, config, this.arcGen, duration)
|
|
146
|
-
|
|
147
|
-
arcLabels.exit<NestedDonutSegment<Datum>>()
|
|
148
|
-
.call(removeLabel, duration)
|
|
149
|
-
|
|
150
|
-
// Chart labels
|
|
151
|
-
this.centralLabel
|
|
152
|
-
.attr('transform', `translate(${this._width / 2},${this._height / 2})`)
|
|
153
|
-
.attr('dy', config.centralSubLabel ? '-0.55em' : null)
|
|
154
|
-
.text(config.centralLabel ?? null)
|
|
155
|
-
|
|
156
|
-
this.centralSubLabel
|
|
157
|
-
.attr('transform', `translate(${this._width / 2},${this._height / 2})`)
|
|
158
|
-
.attr('dy', config.centralLabel ? '0.55em' : null)
|
|
159
|
-
.text(config.centralSubLabel ?? null)
|
|
160
|
-
|
|
161
|
-
if (config.centralSubLabelWrap) wrapSVGText(this.centralSubLabel, innerRadius * 1.9, VerticalAlign.Top)
|
|
162
|
-
|
|
163
|
-
// Background
|
|
164
|
-
this.arcBackground.attr('class', s.background)
|
|
165
|
-
.attr('visibility', config.showBackground ? null : 'hidden')
|
|
166
|
-
.attr('transform', `translate(${this._width / 2},${this._height / 2})`)
|
|
167
|
-
|
|
168
|
-
smartTransition(this.arcBackground, duration)
|
|
169
|
-
.attr('d', arc()({
|
|
170
|
-
startAngle: config.angleRange?.[0] ?? config.angleRange?.[0] ?? 0,
|
|
171
|
-
endAngle: config.angleRange?.[1] ?? config.angleRange?.[1] ?? 2 * Math.PI,
|
|
172
|
-
innerRadius,
|
|
173
|
-
outerRadius,
|
|
174
|
-
}))
|
|
175
|
-
}
|
|
176
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Selection } from 'd3-selection'
|
|
2
|
-
import { Transition } from 'd3-transition'
|
|
3
|
-
import { interpolate } from 'd3-interpolate'
|
|
4
|
-
import { Arc } from 'd3-shape'
|
|
5
|
-
|
|
6
|
-
// Utils
|
|
7
|
-
import { getColor } from 'utils/color'
|
|
8
|
-
import { smartTransition } from 'utils/d3'
|
|
9
|
-
|
|
10
|
-
// Local Types
|
|
11
|
-
import { NestedDonutSegment } from '../types'
|
|
12
|
-
|
|
13
|
-
// Config
|
|
14
|
-
import { NestedDonutConfig } from '../config'
|
|
15
|
-
|
|
16
|
-
type AnimState = { x0: number; x1: number; y0: number; y1: number }
|
|
17
|
-
export interface ArcNode extends SVGElement {
|
|
18
|
-
_animState?: AnimState;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function createArc<Datum> (
|
|
22
|
-
selection: Selection<SVGPathElement, NestedDonutSegment<Datum>, SVGGElement, unknown>,
|
|
23
|
-
config: NestedDonutConfig<Datum>
|
|
24
|
-
): void {
|
|
25
|
-
selection
|
|
26
|
-
.style('fill', d => getColor(d, config.color) ?? d._state.fill)
|
|
27
|
-
.style('opacity', 0)
|
|
28
|
-
.each((d, i, els) => {
|
|
29
|
-
const arcNode: ArcNode = els[i]
|
|
30
|
-
const angleCenter = (d.x0 + d.x1) / 2
|
|
31
|
-
const angleHalfWidth = (d.x1 - d.x0) / 2
|
|
32
|
-
arcNode._animState = {
|
|
33
|
-
x0: angleCenter - angleHalfWidth,
|
|
34
|
-
x1: angleCenter + angleHalfWidth,
|
|
35
|
-
y0: d.y0,
|
|
36
|
-
y1: d.y1,
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function updateArc<Datum> (
|
|
42
|
-
selection: Selection<SVGPathElement, NestedDonutSegment<Datum>, SVGGElement, unknown>,
|
|
43
|
-
config: NestedDonutConfig<Datum>,
|
|
44
|
-
arcGen: Arc<any, AnimState>,
|
|
45
|
-
duration: number
|
|
46
|
-
): void {
|
|
47
|
-
selection
|
|
48
|
-
.style('transition', `fill ${duration}ms`) // Animate color with CSS because we're using CSS-variables
|
|
49
|
-
.style('fill', d => getColor(d, config.color) ?? d._state.fill)
|
|
50
|
-
|
|
51
|
-
if (duration) {
|
|
52
|
-
const transition = smartTransition(selection, duration)
|
|
53
|
-
.style('opacity', 1) as Transition<SVGPathElement, NestedDonutSegment<Datum>, SVGGElement, ArcNode>
|
|
54
|
-
|
|
55
|
-
transition.attrTween('d', (d, i, els) => {
|
|
56
|
-
const arcNode: ArcNode = els[i]
|
|
57
|
-
const nextAnimState = { x0: d.x0, x1: d.x1, y0: d.y0, y1: d.y1 }
|
|
58
|
-
const datum = interpolate(arcNode._animState, nextAnimState)
|
|
59
|
-
|
|
60
|
-
return (t: number): string => {
|
|
61
|
-
arcNode._animState = datum(t)
|
|
62
|
-
return arcGen(arcNode._animState)
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
} else {
|
|
66
|
-
selection.attr('d', arcGen)
|
|
67
|
-
.style('opacity', 1)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function removeArc<Datum> (
|
|
72
|
-
selection: Selection<SVGPathElement, NestedDonutSegment<Datum>, SVGGElement, unknown>,
|
|
73
|
-
duration: number
|
|
74
|
-
): void {
|
|
75
|
-
smartTransition(selection, duration)
|
|
76
|
-
.style('opacity', 0)
|
|
77
|
-
.remove()
|
|
78
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Selection } from 'd3-selection'
|
|
2
|
-
import { color } from 'd3-color'
|
|
3
|
-
import { Arc } from 'd3-shape'
|
|
4
|
-
|
|
5
|
-
// Utils
|
|
6
|
-
import { getColor, hexToBrightness } from 'utils/color'
|
|
7
|
-
import { smartTransition } from 'utils/d3'
|
|
8
|
-
import { getString } from 'utils/data'
|
|
9
|
-
|
|
10
|
-
// Config
|
|
11
|
-
import { NestedDonutConfig } from '../config'
|
|
12
|
-
|
|
13
|
-
// Local Types
|
|
14
|
-
import { NestedDonutSegment } from '../types'
|
|
15
|
-
|
|
16
|
-
// Styles
|
|
17
|
-
import { labelColors } from '../style'
|
|
18
|
-
|
|
19
|
-
function getLabelFillColor<Datum> (
|
|
20
|
-
d: NestedDonutSegment<Datum>,
|
|
21
|
-
config: NestedDonutConfig<Datum>
|
|
22
|
-
): string {
|
|
23
|
-
const c = getColor(d, config.color, d._index, true)
|
|
24
|
-
const colorParsed = color(c)
|
|
25
|
-
const brightness = colorParsed ? hexToBrightness(colorParsed.hex()) : 0
|
|
26
|
-
return brightness > 0.65 ? labelColors.dark : labelColors.light
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function createLabel<Datum> (
|
|
30
|
-
selection: Selection<SVGTextElement, NestedDonutSegment<Datum>, SVGGElement, unknown>,
|
|
31
|
-
config: NestedDonutConfig<Datum>
|
|
32
|
-
): void {
|
|
33
|
-
selection
|
|
34
|
-
.text(d => getString(d, config.label) ?? d.data.key)
|
|
35
|
-
.style('opacity', 0)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function updateLabel<Datum> (
|
|
39
|
-
selection: Selection<SVGTextElement, NestedDonutSegment<Datum>, SVGGElement, unknown>,
|
|
40
|
-
config: NestedDonutConfig<Datum>,
|
|
41
|
-
arcGen: Arc<unknown, NestedDonutSegment<Datum>>,
|
|
42
|
-
duration: number
|
|
43
|
-
): void {
|
|
44
|
-
smartTransition(selection, duration)
|
|
45
|
-
.style('opacity', 1)
|
|
46
|
-
|
|
47
|
-
selection
|
|
48
|
-
.text(d => getString(d, config.label) ?? d.data.key)
|
|
49
|
-
.attr('x', d => arcGen.centroid(d)[0])
|
|
50
|
-
.attr('y', d => arcGen.centroid(d)[1])
|
|
51
|
-
.style('fill', d => getLabelFillColor(d, config))
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function removeLabel<Datum> (
|
|
55
|
-
selection: Selection<SVGTextElement, NestedDonutSegment<Datum>, SVGGElement, unknown>,
|
|
56
|
-
duration: number
|
|
57
|
-
): void {
|
|
58
|
-
smartTransition(selection, duration)
|
|
59
|
-
.style('opacity', 0)
|
|
60
|
-
.remove()
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/css'
|
|
2
|
-
|
|
3
|
-
// Utils
|
|
4
|
-
import { getCssVarNames, injectGlobalCssVariables } from 'utils/style'
|
|
5
|
-
|
|
6
|
-
export const labelColors = {
|
|
7
|
-
dark: '#5b5f6d',
|
|
8
|
-
light: '#fff',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const cssVarDefaults = {
|
|
12
|
-
'--vis-nested-donut-background-color': '#E7E9F3',
|
|
13
|
-
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
14
|
-
'--vis-nested-donut-font-family': undefined,
|
|
15
|
-
|
|
16
|
-
// Central label
|
|
17
|
-
'--vis-nested-donut-central-label-font-size': '16px',
|
|
18
|
-
'--vis-nested-donut-central-label-font-weight': 600,
|
|
19
|
-
'--vis-nested-donut-central-label-text-color': labelColors.dark,
|
|
20
|
-
|
|
21
|
-
// Central sub-label
|
|
22
|
-
'--vis-nested-donut-central-sublabel-font-size': '12px;',
|
|
23
|
-
'--vis-nested-donut-central-sublabel-font-weight': 500,
|
|
24
|
-
'--vis-nested-donut-central-sublabel-text-color': labelColors.dark,
|
|
25
|
-
|
|
26
|
-
// Segments
|
|
27
|
-
'--vis-nested-donut-segment-stroke-width': '1px',
|
|
28
|
-
'--vis-nested-donut-segment-stroke-color': '',
|
|
29
|
-
|
|
30
|
-
/* Dark theme */
|
|
31
|
-
'--vis-dark-nested-donut-background-color': '#18160C',
|
|
32
|
-
'--vis-dark-nested-donut-central-label-text-color': labelColors.light,
|
|
33
|
-
'--vis-dark-nested-donut-central-sublabel-text-color': labelColors.light,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export const root = css`
|
|
37
|
-
label: nested-donut-component;
|
|
38
|
-
`
|
|
39
|
-
|
|
40
|
-
export const variables = getCssVarNames(cssVarDefaults)
|
|
41
|
-
injectGlobalCssVariables(cssVarDefaults, root)
|
|
42
|
-
|
|
43
|
-
export const background = css`
|
|
44
|
-
label: background;
|
|
45
|
-
fill: var(--vis-donut-background-color);
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
export const segment = css`
|
|
49
|
-
label: segment;
|
|
50
|
-
stroke-width: var(--vis-nested-donut-segment-stroke-width);
|
|
51
|
-
stroke: var(--vis-nested-donut-segment-stroke-color, var(--vis-donut-background-color));
|
|
52
|
-
`
|
|
53
|
-
|
|
54
|
-
export const segmentLabel = css`
|
|
55
|
-
label: segment-label;
|
|
56
|
-
text-anchor: middle;
|
|
57
|
-
dominant-baseline: middle;
|
|
58
|
-
`
|
|
59
|
-
|
|
60
|
-
export const segmentExit = css`
|
|
61
|
-
label: segment-exit;
|
|
62
|
-
`
|
|
63
|
-
|
|
64
|
-
export const centralLabel = css`
|
|
65
|
-
label: central-label;
|
|
66
|
-
text-anchor: middle;
|
|
67
|
-
dominant-baseline: middle;
|
|
68
|
-
font-size: var(--vis-nested-donut-central-label-font-size);
|
|
69
|
-
font-family: var(--vis-nested-donut-central-label-font-family, var(--vis-font-family));
|
|
70
|
-
font-weight: var(--vis-nested-donut-central-label-font-weight);
|
|
71
|
-
fill: var(--vis-nested-donut-central-label-text-color);
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
export const centralSubLabel = css`
|
|
75
|
-
label: central-sub-label;
|
|
76
|
-
text-anchor: middle;
|
|
77
|
-
dominant-baseline: middle;
|
|
78
|
-
font-size: var(--vis-nested-donut-central-sublabel-font-size);
|
|
79
|
-
font-family: var(--vis-nested-donut-central-sublabel-font-family, var(--vis-font-family));
|
|
80
|
-
font-weight: var(--vis-nested-donut-central-sublabel-font-weight);
|
|
81
|
-
fill: var(--vis-nested-donut-central-sublabel-text-color);
|
|
82
|
-
`
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HierarchyRectangularNode } from 'd3-hierarchy'
|
|
2
|
-
|
|
3
|
-
export type NestedDonutSegmentDatum<Datum> = {
|
|
4
|
-
key: string;
|
|
5
|
-
root?: string;
|
|
6
|
-
values?: (Datum | NestedDonutSegmentDatum<Datum>)[];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type NestedDonutSegment<Datum> = HierarchyRectangularNode<NestedDonutSegmentDatum<Datum>> & {
|
|
10
|
-
_id: string;
|
|
11
|
-
_layer: number;
|
|
12
|
-
_index?: number;
|
|
13
|
-
_state?: {
|
|
14
|
-
fill?: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export enum NestedDonutDirection {
|
|
19
|
-
INWARDS = 'inwards',
|
|
20
|
-
OUTWARDS = 'outwards',
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type NestedDonutLayerSettings = {
|
|
24
|
-
width?: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const defaultLayerSettings = {
|
|
28
|
-
width: 50,
|
|
29
|
-
}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
/* eslint-disable dot-notation */
|
|
2
|
-
|
|
3
|
-
// Config
|
|
4
|
-
import { ComponentConfigInterface, ComponentConfig } from 'core/component/config'
|
|
5
|
-
|
|
6
|
-
// Utils
|
|
7
|
-
import { getNumber } from 'utils/data'
|
|
8
|
-
|
|
9
|
-
// Types
|
|
10
|
-
import { ColorAccessor, GenericAccessor, NumericAccessor, StringAccessor } from 'types/accessor'
|
|
11
|
-
import { TrimMode, VerticalAlign, FitMode } from 'types/text'
|
|
12
|
-
import { Position } from 'types/position'
|
|
13
|
-
import {
|
|
14
|
-
SankeyInputLink,
|
|
15
|
-
SankeyInputNode,
|
|
16
|
-
SankeyNodeAlign,
|
|
17
|
-
SankeySubLabelPlacement,
|
|
18
|
-
SankeyExitTransitionType,
|
|
19
|
-
SankeyEnterTransitionType,
|
|
20
|
-
SankeyLink,
|
|
21
|
-
SankeyNode,
|
|
22
|
-
} from './types'
|
|
23
|
-
|
|
24
|
-
export interface SankeyConfigInterface<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfigInterface {
|
|
25
|
-
// General
|
|
26
|
-
/** Node / Link id accessor function. Used for mapping of data updates to corresponding SVG objects. Default: `(d, i) => d.id ?? i.toString()` */
|
|
27
|
-
id?: (d: SankeyInputNode | SankeyInputLink, i: number, ...any) => string;
|
|
28
|
-
/** Coefficient to scale the height of the diagram when the amount of links is low: `C * links.length`, clamped to `[height / 2, height]`. Default: `1/16` */
|
|
29
|
-
heightNormalizationCoeff?: number;
|
|
30
|
-
/** Type of animation on removing nodes. Default: `ExitTransitionType.Default` */
|
|
31
|
-
exitTransitionType?: SankeyExitTransitionType;
|
|
32
|
-
/** Type of animation on creating nodes. Default: `EnterTransitionType.Default` */
|
|
33
|
-
enterTransitionType?: SankeyEnterTransitionType;
|
|
34
|
-
/** Highlight the corresponding subtree on node / link hover. Default: `false` */
|
|
35
|
-
highlightSubtreeOnHover?: boolean;
|
|
36
|
-
/** Highlight animation duration, ms. Default: `400` */
|
|
37
|
-
highlightDuration?: number;
|
|
38
|
-
/** Highlight delay, ms. Default: `1000` */
|
|
39
|
-
highlightDelay?: number;
|
|
40
|
-
/** Sankey algorithm iterations. Default: `32` */
|
|
41
|
-
iterations?: number;
|
|
42
|
-
|
|
43
|
-
// Sorting
|
|
44
|
-
/** Sankey node sorting function. Default: `undefined`.
|
|
45
|
-
* Node sorting is applied to nodes in one layer (column). Layer by layer.
|
|
46
|
-
* Options: `undefined` - the order is determined by the layout;
|
|
47
|
-
* `null` - the order is fixed by the input;
|
|
48
|
-
* sort function - the order is determined by the function.
|
|
49
|
-
*/
|
|
50
|
-
nodeSort?: ((node1: SankeyNode<N, L>, node2: SankeyNode<N, L>) => number) | null | undefined;
|
|
51
|
-
/** Sankey link sorting function. Default: `(link2, link1) => link1.value - link2.value`.
|
|
52
|
-
* Link sorting is applied to the source (exiting) links within one node.
|
|
53
|
-
* Options: `undefined` - the order is determined by the layout;
|
|
54
|
-
* `null` - the order is fixed by the input;
|
|
55
|
-
* sort function - the order is determined by the function.
|
|
56
|
-
*/
|
|
57
|
-
linkSort?: ((link1: SankeyLink<N, L>, link2: SankeyLink<N, L>) => number) | null | undefined;
|
|
58
|
-
|
|
59
|
-
// Nodes
|
|
60
|
-
/** Sankey node width in pixels */
|
|
61
|
-
nodeWidth?: number;
|
|
62
|
-
/** Sankey node alignment method */
|
|
63
|
-
nodeAlign?: SankeyNodeAlign;
|
|
64
|
-
/** Horizontal space between the nodes. Extended Sizing property only. Default: `150` */
|
|
65
|
-
nodeHorizontalSpacing?: number;
|
|
66
|
-
/** Minimum node height. Extended Sizing property only. Default: `20` */
|
|
67
|
-
nodeMinHeight?: number;
|
|
68
|
-
/** Maximum node height. Extended Sizing property only. Default: `100` */
|
|
69
|
-
nodeMaxHeight?: number;
|
|
70
|
-
/** Sankey vertical separation between nodes in pixels. Default: `2` */
|
|
71
|
-
nodePadding?: number;
|
|
72
|
-
/** Display the graph when data has just one element */
|
|
73
|
-
showSingleNode?: boolean;
|
|
74
|
-
/** Node cursor on hover. Default: `undefined` */
|
|
75
|
-
nodeCursor?: StringAccessor<SankeyNode<N, L>>;
|
|
76
|
-
/** Node icon accessor function or value. Default: `undefined` */
|
|
77
|
-
nodeIcon?: StringAccessor<SankeyNode<N, L>>;
|
|
78
|
-
/** Node color accessor function or value. Default: `undefined` */
|
|
79
|
-
nodeColor?: ColorAccessor<SankeyNode<N, L>>;
|
|
80
|
-
/** Node `fixedValue` accessor function or constant. It defines the node value that will be used to calculate
|
|
81
|
-
* the height of the nodes by d3-sankey (by default the height will be based on aggregated `linkValue`).
|
|
82
|
-
* Default: `n => n.fixedValue`
|
|
83
|
-
*/
|
|
84
|
-
nodeFixedValue?: NumericAccessor<N>;
|
|
85
|
-
/** Icon color accessor function or value. Default: `undefined` */
|
|
86
|
-
nodeIconColor?: ColorAccessor<SankeyNode<N, L>>;
|
|
87
|
-
|
|
88
|
-
// Links
|
|
89
|
-
/** Link color accessor function or value. Default: `l => l.color` */
|
|
90
|
-
linkColor?: StringAccessor<SankeyLink<N, L>>;
|
|
91
|
-
/** Link flow accessor function or value. Default: `l => l.value` */
|
|
92
|
-
linkValue?: NumericAccessor<L>;
|
|
93
|
-
/** Link cursor on hover. Default: `undefined` */
|
|
94
|
-
linkCursor?: StringAccessor<SankeyLink<N, L>>;
|
|
95
|
-
|
|
96
|
-
// Labels
|
|
97
|
-
/** Node label accessor function or value. Default: `n => n.label` */
|
|
98
|
-
label?: StringAccessor<SankeyNode<N, L>>;
|
|
99
|
-
/** Node sub-label accessor function or value. Default: `undefined` */
|
|
100
|
-
subLabel?: StringAccessor<SankeyNode<N, L>>;
|
|
101
|
-
/** Label position relative to the Node. Default: `Position.AUTO` */
|
|
102
|
-
labelPosition?: GenericAccessor<Position.Auto | Position.Left | Position.Right | string, SankeyNode<N, L>>;
|
|
103
|
-
/** Label vertical alignment */
|
|
104
|
-
labelVerticalAlign?: VerticalAlign | string;
|
|
105
|
-
/** Label background */
|
|
106
|
-
labelBackground?: boolean;
|
|
107
|
-
/** Label fit mode (wrap or trim). Default: `FitMode.TRIM` **/
|
|
108
|
-
labelFit?: FitMode;
|
|
109
|
-
/** Maximum label with in pixels. Default: `70` */
|
|
110
|
-
labelMaxWidth?: number;
|
|
111
|
-
/** Expand trimmed label on hover. Default: `true` */
|
|
112
|
-
labelExpandTrimmedOnHover?: boolean;
|
|
113
|
-
/** Label trimming mode. Default: `TrimMode.Middle` */
|
|
114
|
-
labelTrimMode?: TrimMode;
|
|
115
|
-
/** Label font size in pixels. If not provided, the value of CSS variable `--vis-sankey-node-label-font-size` will be used. Default: `undefined` */
|
|
116
|
-
labelFontSize?: number;
|
|
117
|
-
/** Label text separators for wrapping. Default: `[' ', '-']` */
|
|
118
|
-
labelTextSeparator?: string[];
|
|
119
|
-
/** Force break words to fit long labels. Default: `true` */
|
|
120
|
-
labelForceWordBreak?: boolean;
|
|
121
|
-
/** Label color. Default: `undefined` */
|
|
122
|
-
labelColor?: ColorAccessor<SankeyNode<N, L>>;
|
|
123
|
-
/** Label cursor on hover. Default: `undefined` */
|
|
124
|
-
labelCursor?: StringAccessor<SankeyNode<N, L>>;
|
|
125
|
-
/** Custom function to set the label visibility. Default: `undefined` */
|
|
126
|
-
labelVisibility?: ((d: SankeyNode<N, L>, bbox: { x: number; y: number; width: number; height: number }, hovered: boolean) => boolean) | undefined;
|
|
127
|
-
/** Sub-label font size in pixels. If not provided, the value of CSS variable `--vis-sankey-node-sublabel-font-size` will be used. Default: `undefined` */
|
|
128
|
-
subLabelFontSize?: number;
|
|
129
|
-
/** Sub-label color. Default: `undefined` */
|
|
130
|
-
subLabelColor?: ColorAccessor<SankeyNode<N, L>>;
|
|
131
|
-
/** Sub-label position. Default: `SankeySubLabelPlacement.Below` */
|
|
132
|
-
subLabelPlacement?: SankeySubLabelPlacement | string;
|
|
133
|
-
/**
|
|
134
|
-
* Sub-label to label width ratio when `subLabelPlacement` is set to `SankeySubLabelPlacement.Inline`
|
|
135
|
-
* Default: `0.4`, which means that 40% of `labelMaxWidth` will be given to sub-label, and 60% to the main label.
|
|
136
|
-
*/
|
|
137
|
-
subLabelToLabelInlineWidthRatio?: number;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export class SankeyConfig<N extends SankeyInputNode, L extends SankeyInputLink> extends ComponentConfig implements SankeyConfigInterface<N, L> {
|
|
141
|
-
// General
|
|
142
|
-
heightNormalizationCoeff = 1 / 16
|
|
143
|
-
exitTransitionType = SankeyExitTransitionType.Default
|
|
144
|
-
enterTransitionType = SankeyEnterTransitionType.Default
|
|
145
|
-
// eslint-disable-next-line dot-notation
|
|
146
|
-
id = (d: SankeyInputNode | SankeyInputLink, i: number): string => d['_id'] ?? `${i}`
|
|
147
|
-
highlightSubtreeOnHover = false
|
|
148
|
-
highlightDuration = 300
|
|
149
|
-
highlightDelay = 1000
|
|
150
|
-
iterations = 32
|
|
151
|
-
|
|
152
|
-
// Sorting
|
|
153
|
-
linkSort = (link2: L, link1: L): number => getNumber(link1, this.linkValue) - getNumber(link2, this.linkValue)
|
|
154
|
-
nodeSort = undefined
|
|
155
|
-
|
|
156
|
-
// Nodes
|
|
157
|
-
nodeWidth = 25
|
|
158
|
-
nodeAlign = SankeyNodeAlign.Justify
|
|
159
|
-
nodeHorizontalSpacing = 150
|
|
160
|
-
nodeMinHeight = 20
|
|
161
|
-
nodeMaxHeight = 100
|
|
162
|
-
nodePadding = 2
|
|
163
|
-
nodeColor = (d: SankeyNode<N, L>): string => d['color']
|
|
164
|
-
nodeFixedValue = (d: N): number => d['fixedValue']
|
|
165
|
-
showSingleNode = true
|
|
166
|
-
nodeCursor = undefined
|
|
167
|
-
nodeIcon = undefined
|
|
168
|
-
nodeIconColor = undefined
|
|
169
|
-
|
|
170
|
-
// Labels
|
|
171
|
-
label = (d: SankeyNode<N, L>): string => d['label']
|
|
172
|
-
labelPosition = Position.Auto
|
|
173
|
-
labelVerticalAlign = VerticalAlign.Middle
|
|
174
|
-
labelBackground = false
|
|
175
|
-
labelTextSeparator = [' ', '-']
|
|
176
|
-
labelFit = FitMode.Trim
|
|
177
|
-
labelTrimMode = TrimMode.Middle
|
|
178
|
-
labelForceWordBreak = true
|
|
179
|
-
labelFontSize = undefined
|
|
180
|
-
labelCursor = undefined
|
|
181
|
-
labelColor = undefined
|
|
182
|
-
labelMaxWidth = 70
|
|
183
|
-
labelExpandTrimmedOnHover = true
|
|
184
|
-
labelVisibility = undefined
|
|
185
|
-
subLabel = undefined
|
|
186
|
-
subLabelFontSize = undefined
|
|
187
|
-
subLabelColor = undefined
|
|
188
|
-
subLabelPlacement = SankeySubLabelPlacement.Below
|
|
189
|
-
subLabelToLabelInlineWidthRatio = 0.4
|
|
190
|
-
|
|
191
|
-
// Links
|
|
192
|
-
linkValue = (d: L): number => d['value']
|
|
193
|
-
linkColor = (d: SankeyLink<N, L>): string => d['color']
|
|
194
|
-
linkCursor = undefined
|
|
195
|
-
}
|