@fusedashlabs/widgets 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -17
- package/README.md +24 -26
- package/dist/components/area-chart/element/ui9000-area-chart.d.ts +1 -1
- package/dist/components/area-grouped-bar-chart/element/ui9000-area-grouped-bar-chart.d.ts +1 -1
- package/dist/components/area-grouped-bar-chart/lib/normalize.js +3 -3
- package/dist/components/area-grouped-bar-chart/lib/normalize.js.map +1 -1
- package/dist/components/bar-chart/element/ui9000-bar-chart.d.ts +1 -1
- package/dist/components/bias-variance-tradeoff-chart/element/styles.d.ts +7 -0
- package/dist/components/bias-variance-tradeoff-chart/element/styles.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/element/styles.js +13 -0
- package/dist/components/bias-variance-tradeoff-chart/element/styles.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/element/ui9000-bias-variance-tradeoff-chart.d.ts +27 -0
- package/dist/components/bias-variance-tradeoff-chart/element/ui9000-bias-variance-tradeoff-chart.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/element/ui9000-bias-variance-tradeoff-chart.js +173 -0
- package/dist/components/bias-variance-tradeoff-chart/element/ui9000-bias-variance-tradeoff-chart.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/index.d.ts +5 -0
- package/dist/components/bias-variance-tradeoff-chart/index.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/index.js +19 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/domain.d.ts +8 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/domain.js +37 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/domain.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/format.d.ts +3 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/format.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/format.js +9 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/format.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/index.d.ts +5 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/index.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/normalize.d.ts +4 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/normalize.js +135 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/normalize.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/types.d.ts +47 -0
- package/dist/components/bias-variance-tradeoff-chart/lib/types.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/metadata.json.d.ts +41 -0
- package/dist/components/bias-variance-tradeoff-chart/metadata.json.js +42 -0
- package/dist/components/bias-variance-tradeoff-chart/metadata.json.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/render/draw.d.ts +31 -0
- package/dist/components/bias-variance-tradeoff-chart/render/draw.d.ts.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/render/draw.js +203 -0
- package/dist/components/bias-variance-tradeoff-chart/render/draw.js.map +1 -0
- package/dist/components/bias-variance-tradeoff-chart/render/index.d.ts +2 -0
- package/dist/components/bias-variance-tradeoff-chart/render/index.d.ts.map +1 -0
- package/dist/components/box-plot-chart/element/ui9000-box-plot-chart.d.ts +1 -1
- package/dist/components/bubble-chart/element/ui9000-bubble-chart.d.ts +1 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts +1 -0
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts.map +1 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.js +12 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.js.map +1 -1
- package/dist/components/chart-renderer/lib/registry.d.ts.map +1 -1
- package/dist/components/chart-renderer/lib/registry.js +29 -4
- package/dist/components/chart-renderer/lib/registry.js.map +1 -1
- package/dist/components/chart-renderer/lib/types.d.ts +5 -0
- package/dist/components/chart-renderer/lib/types.d.ts.map +1 -1
- package/dist/components/donut-chart/element/ui9000-donut-chart.d.ts +1 -1
- package/dist/components/donut-chart/element/ui9000-donut-chart.js +1 -1
- package/dist/components/donut-chart/element/ui9000-donut-chart.js.map +1 -1
- package/dist/components/gini-impurity-entropy-chart/element/styles.d.ts +2 -0
- package/dist/components/gini-impurity-entropy-chart/element/styles.d.ts.map +1 -0
- package/dist/components/{donut-group-chart → gini-impurity-entropy-chart}/element/styles.js +17 -11
- package/dist/components/gini-impurity-entropy-chart/element/styles.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.d.ts +36 -0
- package/dist/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.js +186 -0
- package/dist/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/index.d.ts +5 -0
- package/dist/components/gini-impurity-entropy-chart/index.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/index.js +32 -0
- package/dist/components/gini-impurity-entropy-chart/index.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/domain.d.ts +9 -0
- package/dist/components/gini-impurity-entropy-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/domain.js +32 -0
- package/dist/components/gini-impurity-entropy-chart/lib/domain.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/format.d.ts +10 -0
- package/dist/components/gini-impurity-entropy-chart/lib/format.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/format.js +22 -0
- package/dist/components/gini-impurity-entropy-chart/lib/format.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/index.d.ts +7 -0
- package/dist/components/gini-impurity-entropy-chart/lib/index.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/normalize.d.ts +7 -0
- package/dist/components/gini-impurity-entropy-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/normalize.js +117 -0
- package/dist/components/gini-impurity-entropy-chart/lib/normalize.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/overlays.d.ts +19 -0
- package/dist/components/gini-impurity-entropy-chart/lib/overlays.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/overlays.js +63 -0
- package/dist/components/gini-impurity-entropy-chart/lib/overlays.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/series.d.ts +12 -0
- package/dist/components/gini-impurity-entropy-chart/lib/series.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/series.js +45 -0
- package/dist/components/gini-impurity-entropy-chart/lib/series.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/types.d.ts +83 -0
- package/dist/components/gini-impurity-entropy-chart/lib/types.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/lib/types.js +19 -0
- package/dist/components/gini-impurity-entropy-chart/lib/types.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/metadata.json.d.ts +115 -0
- package/dist/components/gini-impurity-entropy-chart/metadata.json.js +42 -0
- package/dist/components/gini-impurity-entropy-chart/metadata.json.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/render/draw.d.ts +40 -0
- package/dist/components/gini-impurity-entropy-chart/render/draw.d.ts.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/render/draw.js +160 -0
- package/dist/components/gini-impurity-entropy-chart/render/draw.js.map +1 -0
- package/dist/components/gini-impurity-entropy-chart/render/index.d.ts +2 -0
- package/dist/components/gini-impurity-entropy-chart/render/index.d.ts.map +1 -0
- package/dist/components/histogram-chart/element/ui9000-histogram-chart.d.ts +1 -1
- package/dist/components/kpi-widget/element/ui9000-kpi-widget.d.ts +1 -1
- package/dist/components/kpi-widget/element/ui9000-kpi-widget.js +1 -1
- package/dist/components/line-chart/element/ui9000-line-chart.d.ts +1 -1
- package/dist/components/lollipop/element/styles.d.ts.map +1 -1
- package/dist/components/lollipop/element/styles.js +19 -1
- package/dist/components/lollipop/element/styles.js.map +1 -1
- package/dist/components/lollipop/element/ui9000-lollipop.d.ts +7 -2
- package/dist/components/lollipop/element/ui9000-lollipop.d.ts.map +1 -1
- package/dist/components/lollipop/element/ui9000-lollipop.js +68 -7
- package/dist/components/lollipop/element/ui9000-lollipop.js.map +1 -1
- package/dist/components/lollipop/index.d.ts +1 -1
- package/dist/components/lollipop/index.d.ts.map +1 -1
- package/dist/components/lollipop/index.js +2 -0
- package/dist/components/lollipop/index.js.map +1 -1
- package/dist/components/lollipop/lib/domain.d.ts +16 -1
- package/dist/components/lollipop/lib/domain.d.ts.map +1 -1
- package/dist/components/lollipop/lib/domain.js +56 -1
- package/dist/components/lollipop/lib/domain.js.map +1 -1
- package/dist/components/lollipop/lib/index.d.ts +3 -2
- package/dist/components/lollipop/lib/index.d.ts.map +1 -1
- package/dist/components/lollipop/lib/layout.d.ts +16 -0
- package/dist/components/lollipop/lib/layout.d.ts.map +1 -0
- package/dist/components/lollipop/lib/layout.js +16 -0
- package/dist/components/lollipop/lib/layout.js.map +1 -0
- package/dist/components/lollipop/lib/types.d.ts +5 -0
- package/dist/components/lollipop/lib/types.d.ts.map +1 -1
- package/dist/components/lollipop/metadata.json.d.ts +10 -0
- package/dist/components/lollipop/metadata.json.js +4 -1
- package/dist/components/lollipop/metadata.json.js.map +1 -1
- package/dist/components/lollipop/render/draw.d.ts +8 -1
- package/dist/components/lollipop/render/draw.d.ts.map +1 -1
- package/dist/components/lollipop/render/draw.js +155 -84
- package/dist/components/lollipop/render/draw.js.map +1 -1
- package/dist/components/map-chart/element/styles.d.ts +2 -0
- package/dist/components/map-chart/element/styles.d.ts.map +1 -0
- package/dist/components/map-chart/element/styles.js +372 -0
- package/dist/components/map-chart/element/styles.js.map +1 -0
- package/dist/components/map-chart/element/ui9000-map-chart.d.ts +54 -0
- package/dist/components/map-chart/element/ui9000-map-chart.d.ts.map +1 -0
- package/dist/components/map-chart/element/ui9000-map-chart.js +539 -0
- package/dist/components/map-chart/element/ui9000-map-chart.js.map +1 -0
- package/dist/components/map-chart/index.d.ts +5 -0
- package/dist/components/map-chart/index.d.ts.map +1 -0
- package/dist/components/map-chart/index.js +29 -0
- package/dist/components/map-chart/index.js.map +1 -0
- package/dist/components/map-chart/lib/constants.d.ts +34 -0
- package/dist/components/map-chart/lib/constants.d.ts.map +1 -0
- package/dist/components/map-chart/lib/constants.js +122 -0
- package/dist/components/map-chart/lib/constants.js.map +1 -0
- package/dist/components/map-chart/lib/domain.d.ts +12 -0
- package/dist/components/map-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/map-chart/lib/domain.js +105 -0
- package/dist/components/map-chart/lib/domain.js.map +1 -0
- package/dist/components/map-chart/lib/format.d.ts +8 -0
- package/dist/components/map-chart/lib/format.d.ts.map +1 -0
- package/dist/components/map-chart/lib/format.js +45 -0
- package/dist/components/map-chart/lib/format.js.map +1 -0
- package/dist/components/map-chart/lib/geo-index.d.ts +7 -0
- package/dist/components/map-chart/lib/geo-index.d.ts.map +1 -0
- package/dist/components/map-chart/lib/geo-index.js +200 -0
- package/dist/components/map-chart/lib/geo-index.js.map +1 -0
- package/dist/components/map-chart/lib/geojson.d.ts +5 -0
- package/dist/components/map-chart/lib/geojson.d.ts.map +1 -0
- package/dist/components/map-chart/lib/geojson.js +47 -0
- package/dist/components/map-chart/lib/geojson.js.map +1 -0
- package/dist/components/map-chart/lib/index.d.ts +13 -0
- package/dist/components/map-chart/lib/index.d.ts.map +1 -0
- package/dist/components/map-chart/lib/join.d.ts +7 -0
- package/dist/components/map-chart/lib/join.d.ts.map +1 -0
- package/dist/components/map-chart/lib/join.js +156 -0
- package/dist/components/map-chart/lib/join.js.map +1 -0
- package/dist/components/map-chart/lib/legend.d.ts +45 -0
- package/dist/components/map-chart/lib/legend.d.ts.map +1 -0
- package/dist/components/map-chart/lib/legend.js +108 -0
- package/dist/components/map-chart/lib/legend.js.map +1 -0
- package/dist/components/map-chart/lib/normalize.d.ts +3 -0
- package/dist/components/map-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/map-chart/lib/normalize.js +177 -0
- package/dist/components/map-chart/lib/normalize.js.map +1 -0
- package/dist/components/map-chart/lib/pmtiles.d.ts +41 -0
- package/dist/components/map-chart/lib/pmtiles.d.ts.map +1 -0
- package/dist/components/map-chart/lib/pmtiles.js +112 -0
- package/dist/components/map-chart/lib/pmtiles.js.map +1 -0
- package/dist/components/map-chart/lib/types.d.ts +128 -0
- package/dist/components/map-chart/lib/types.d.ts.map +1 -0
- package/dist/components/map-chart/metadata.json.d.ts +83 -0
- package/dist/components/map-chart/metadata.json.js +42 -0
- package/dist/components/map-chart/metadata.json.js.map +1 -0
- package/dist/components/map-chart/render/draw.d.ts +24 -0
- package/dist/components/map-chart/render/draw.d.ts.map +1 -0
- package/dist/components/map-chart/render/draw.js +455 -0
- package/dist/components/map-chart/render/draw.js.map +1 -0
- package/dist/components/map-chart/render/index.d.ts +2 -0
- package/dist/components/map-chart/render/index.d.ts.map +1 -0
- package/dist/components/matrix-chart/element/styles.d.ts +2 -0
- package/dist/components/matrix-chart/element/styles.d.ts.map +1 -0
- package/dist/components/matrix-chart/element/styles.js +97 -0
- package/dist/components/matrix-chart/element/styles.js.map +1 -0
- package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts +39 -0
- package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts.map +1 -0
- package/dist/components/matrix-chart/element/ui9000-matrix-chart.js +238 -0
- package/dist/components/matrix-chart/element/ui9000-matrix-chart.js.map +1 -0
- package/dist/components/matrix-chart/index.d.ts +5 -0
- package/dist/components/matrix-chart/index.d.ts.map +1 -0
- package/dist/components/matrix-chart/index.js +20 -0
- package/dist/components/matrix-chart/index.js.map +1 -0
- package/dist/components/matrix-chart/lib/domain.d.ts +7 -0
- package/dist/components/matrix-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/matrix-chart/lib/domain.js +58 -0
- package/dist/components/matrix-chart/lib/domain.js.map +1 -0
- package/dist/components/matrix-chart/lib/format.d.ts +5 -0
- package/dist/components/matrix-chart/lib/format.d.ts.map +1 -0
- package/dist/components/matrix-chart/lib/format.js +16 -0
- package/dist/components/matrix-chart/lib/format.js.map +1 -0
- package/dist/components/matrix-chart/lib/index.d.ts +5 -0
- package/dist/components/matrix-chart/lib/index.d.ts.map +1 -0
- package/dist/components/matrix-chart/lib/normalize.d.ts +5 -0
- package/dist/components/matrix-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/matrix-chart/lib/normalize.js +165 -0
- package/dist/components/matrix-chart/lib/normalize.js.map +1 -0
- package/dist/components/matrix-chart/lib/types.d.ts +33 -0
- package/dist/components/matrix-chart/lib/types.d.ts.map +1 -0
- package/dist/components/matrix-chart/metadata.json.d.ts +110 -0
- package/dist/components/matrix-chart/metadata.json.js +42 -0
- package/dist/components/matrix-chart/metadata.json.js.map +1 -0
- package/dist/components/matrix-chart/render/draw.d.ts +63 -0
- package/dist/components/matrix-chart/render/draw.d.ts.map +1 -0
- package/dist/components/matrix-chart/render/draw.js +225 -0
- package/dist/components/matrix-chart/render/draw.js.map +1 -0
- package/dist/components/matrix-chart/render/index.d.ts +2 -0
- package/dist/components/matrix-chart/render/index.d.ts.map +1 -0
- package/dist/components/network-graph/element/styles.d.ts +2 -0
- package/dist/components/network-graph/element/styles.d.ts.map +1 -0
- package/dist/components/network-graph/element/styles.js +272 -0
- package/dist/components/network-graph/element/styles.js.map +1 -0
- package/dist/components/network-graph/element/ui9000-network-graph.d.ts +47 -0
- package/dist/components/network-graph/element/ui9000-network-graph.d.ts.map +1 -0
- package/dist/components/network-graph/element/ui9000-network-graph.js +307 -0
- package/dist/components/network-graph/element/ui9000-network-graph.js.map +1 -0
- package/dist/components/network-graph/index.d.ts +5 -0
- package/dist/components/network-graph/index.d.ts.map +1 -0
- package/dist/components/network-graph/index.js +37 -0
- package/dist/components/network-graph/index.js.map +1 -0
- package/dist/components/network-graph/lib/domain.d.ts +96 -0
- package/dist/components/network-graph/lib/domain.d.ts.map +1 -0
- package/dist/components/network-graph/lib/domain.js +211 -0
- package/dist/components/network-graph/lib/domain.js.map +1 -0
- package/dist/components/network-graph/lib/format.d.ts +7 -0
- package/dist/components/network-graph/lib/format.d.ts.map +1 -0
- package/dist/components/network-graph/lib/format.js +29 -0
- package/dist/components/network-graph/lib/format.js.map +1 -0
- package/dist/components/network-graph/lib/index.d.ts +6 -0
- package/dist/components/network-graph/lib/index.d.ts.map +1 -0
- package/dist/components/network-graph/lib/legend.d.ts +15 -0
- package/dist/components/network-graph/lib/legend.d.ts.map +1 -0
- package/dist/components/network-graph/lib/legend.js +35 -0
- package/dist/components/network-graph/lib/legend.js.map +1 -0
- package/dist/components/network-graph/lib/normalize.d.ts +10 -0
- package/dist/components/network-graph/lib/normalize.d.ts.map +1 -0
- package/dist/components/network-graph/lib/normalize.js +140 -0
- package/dist/components/network-graph/lib/normalize.js.map +1 -0
- package/dist/components/network-graph/lib/types.d.ts +56 -0
- package/dist/components/network-graph/lib/types.d.ts.map +1 -0
- package/dist/components/network-graph/metadata.json.d.ts +91 -0
- package/dist/components/network-graph/metadata.json.js +42 -0
- package/dist/components/network-graph/metadata.json.js.map +1 -0
- package/dist/components/network-graph/render/draw.d.ts +49 -0
- package/dist/components/network-graph/render/draw.d.ts.map +1 -0
- package/dist/components/network-graph/render/draw.js +493 -0
- package/dist/components/network-graph/render/draw.js.map +1 -0
- package/dist/components/network-graph/render/index.d.ts +2 -0
- package/dist/components/network-graph/render/index.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/element/styles.d.ts +2 -0
- package/dist/components/parallel-coordinates-chart/element/styles.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/element/styles.js +71 -0
- package/dist/components/parallel-coordinates-chart/element/styles.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/element/ui9000-parallel-coordinates-chart.d.ts +33 -0
- package/dist/components/parallel-coordinates-chart/element/ui9000-parallel-coordinates-chart.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/element/ui9000-parallel-coordinates-chart.js +182 -0
- package/dist/components/parallel-coordinates-chart/element/ui9000-parallel-coordinates-chart.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/index.d.ts +5 -0
- package/dist/components/parallel-coordinates-chart/index.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/index.js +23 -0
- package/dist/components/parallel-coordinates-chart/index.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/domain.d.ts +14 -0
- package/dist/components/parallel-coordinates-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/domain.js +28 -0
- package/dist/components/parallel-coordinates-chart/lib/domain.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/format.d.ts +12 -0
- package/dist/components/parallel-coordinates-chart/lib/format.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/format.js +18 -0
- package/dist/components/parallel-coordinates-chart/lib/format.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/index.d.ts +5 -0
- package/dist/components/parallel-coordinates-chart/lib/index.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/normalize.d.ts +23 -0
- package/dist/components/parallel-coordinates-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/normalize.js +156 -0
- package/dist/components/parallel-coordinates-chart/lib/normalize.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/lib/types.d.ts +48 -0
- package/dist/components/parallel-coordinates-chart/lib/types.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/metadata.json.d.ts +103 -0
- package/dist/components/parallel-coordinates-chart/metadata.json.js +45 -0
- package/dist/components/parallel-coordinates-chart/render/draw.d.ts +30 -0
- package/dist/components/parallel-coordinates-chart/render/draw.d.ts.map +1 -0
- package/dist/components/parallel-coordinates-chart/render/draw.js +160 -0
- package/dist/components/parallel-coordinates-chart/render/draw.js.map +1 -0
- package/dist/components/parallel-coordinates-chart/render/index.d.ts +2 -0
- package/dist/components/parallel-coordinates-chart/render/index.d.ts.map +1 -0
- package/dist/components/pie-chart/element/styles.d.ts.map +1 -1
- package/dist/components/pie-chart/element/styles.js +34 -1
- package/dist/components/pie-chart/element/styles.js.map +1 -1
- package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts +1 -3
- package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts.map +1 -1
- package/dist/components/pie-chart/element/ui9000-pie-chart.js +2 -8
- package/dist/components/pie-chart/element/ui9000-pie-chart.js.map +1 -1
- package/dist/components/pie-chart/metadata.json.d.ts +1 -7
- package/dist/components/pie-chart/metadata.json.js +2 -2
- package/dist/components/polar-area-chart/element/styles.d.ts +2 -0
- package/dist/components/polar-area-chart/element/styles.d.ts.map +1 -0
- package/dist/components/polar-area-chart/element/styles.js +48 -0
- package/dist/components/polar-area-chart/element/styles.js.map +1 -0
- package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.d.ts +29 -0
- package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.d.ts.map +1 -0
- package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js +168 -0
- package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js.map +1 -0
- package/dist/components/polar-area-chart/index.d.ts +5 -0
- package/dist/components/polar-area-chart/index.d.ts.map +1 -0
- package/dist/components/polar-area-chart/index.js +19 -0
- package/dist/components/polar-area-chart/index.js.map +1 -0
- package/dist/components/polar-area-chart/lib/domain.d.ts +33 -0
- package/dist/components/polar-area-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/polar-area-chart/lib/domain.js +67 -0
- package/dist/components/polar-area-chart/lib/domain.js.map +1 -0
- package/dist/components/polar-area-chart/lib/index.d.ts +4 -0
- package/dist/components/polar-area-chart/lib/index.d.ts.map +1 -0
- package/dist/components/polar-area-chart/lib/normalize.d.ts +4 -0
- package/dist/components/polar-area-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/polar-area-chart/lib/normalize.js +183 -0
- package/dist/components/polar-area-chart/lib/normalize.js.map +1 -0
- package/dist/components/polar-area-chart/lib/types.d.ts +48 -0
- package/dist/components/polar-area-chart/lib/types.d.ts.map +1 -0
- package/dist/components/polar-area-chart/metadata.json.d.ts +79 -0
- package/dist/components/polar-area-chart/metadata.json.js +42 -0
- package/dist/components/polar-area-chart/metadata.json.js.map +1 -0
- package/dist/components/polar-area-chart/render/draw.d.ts +25 -0
- package/dist/components/polar-area-chart/render/draw.d.ts.map +1 -0
- package/dist/components/polar-area-chart/render/draw.js +127 -0
- package/dist/components/polar-area-chart/render/draw.js.map +1 -0
- package/dist/components/polar-area-chart/render/index.d.ts +2 -0
- package/dist/components/polar-area-chart/render/index.d.ts.map +1 -0
- package/dist/components/punchcard-chart/element/ui9000-punchcard-chart.d.ts +1 -1
- package/dist/components/punchcard-chart/metadata.json.d.ts +1 -1
- package/dist/components/punchcard-chart/metadata.json.js +1 -1
- package/dist/components/radar-chart/element/ui9000-radar-chart.d.ts +1 -1
- package/dist/components/radial-bar-chart/element/styles.d.ts +2 -0
- package/dist/components/radial-bar-chart/element/styles.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/element/styles.js +53 -0
- package/dist/components/radial-bar-chart/element/styles.js.map +1 -0
- package/dist/components/radial-bar-chart/element/ui9000-radial-bar-chart.d.ts +35 -0
- package/dist/components/radial-bar-chart/element/ui9000-radial-bar-chart.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/element/ui9000-radial-bar-chart.js +174 -0
- package/dist/components/radial-bar-chart/element/ui9000-radial-bar-chart.js.map +1 -0
- package/dist/components/radial-bar-chart/index.d.ts +5 -0
- package/dist/components/radial-bar-chart/index.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/index.js +21 -0
- package/dist/components/radial-bar-chart/index.js.map +1 -0
- package/dist/components/radial-bar-chart/lib/domain.d.ts +47 -0
- package/dist/components/radial-bar-chart/lib/domain.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/lib/domain.js +50 -0
- package/dist/components/radial-bar-chart/lib/domain.js.map +1 -0
- package/dist/components/radial-bar-chart/lib/format.d.ts +6 -0
- package/dist/components/radial-bar-chart/lib/format.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/lib/format.js +12 -0
- package/dist/components/radial-bar-chart/lib/format.js.map +1 -0
- package/dist/components/radial-bar-chart/lib/index.d.ts +5 -0
- package/dist/components/radial-bar-chart/lib/index.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/lib/normalize.d.ts +4 -0
- package/dist/components/radial-bar-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/lib/normalize.js +92 -0
- package/dist/components/radial-bar-chart/lib/normalize.js.map +1 -0
- package/dist/components/radial-bar-chart/lib/types.d.ts +34 -0
- package/dist/components/radial-bar-chart/lib/types.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/metadata.json.d.ts +62 -0
- package/dist/components/radial-bar-chart/metadata.json.js +42 -0
- package/dist/components/radial-bar-chart/metadata.json.js.map +1 -0
- package/dist/components/radial-bar-chart/render/draw.d.ts +29 -0
- package/dist/components/radial-bar-chart/render/draw.d.ts.map +1 -0
- package/dist/components/radial-bar-chart/render/draw.js +92 -0
- package/dist/components/radial-bar-chart/render/draw.js.map +1 -0
- package/dist/components/radial-bar-chart/render/index.d.ts +2 -0
- package/dist/components/radial-bar-chart/render/index.d.ts.map +1 -0
- package/dist/components/sankey-chart/element/styles.d.ts.map +1 -1
- package/dist/components/sankey-chart/element/styles.js +7 -27
- package/dist/components/sankey-chart/element/styles.js.map +1 -1
- package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts +6 -6
- package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts.map +1 -1
- package/dist/components/sankey-chart/element/ui9000-sankey-chart.js +39 -36
- package/dist/components/sankey-chart/element/ui9000-sankey-chart.js.map +1 -1
- package/dist/components/sankey-chart/index.js +4 -2
- package/dist/components/sankey-chart/index.js.map +1 -1
- package/dist/components/sankey-chart/lib/domain.d.ts +2 -2
- package/dist/components/sankey-chart/lib/domain.d.ts.map +1 -1
- package/dist/components/sankey-chart/lib/domain.js +1 -13
- package/dist/components/sankey-chart/lib/domain.js.map +1 -1
- package/dist/components/sankey-chart/lib/format.d.ts +1 -2
- package/dist/components/sankey-chart/lib/format.d.ts.map +1 -1
- package/dist/components/sankey-chart/lib/format.js +3 -7
- package/dist/components/sankey-chart/lib/format.js.map +1 -1
- package/dist/components/scatter-plot-chart/element/ui9000-scatter-plot.d.ts +1 -1
- package/dist/components/scatter-sparkline-chart/element/ui9000-scatter-sparkline-chart.d.ts +1 -1
- package/dist/components/spark-area-chart/element/ui9000-spark-area-chart.d.ts +1 -1
- package/dist/components/spark-line-chart/element/ui9000-spark-line-chart.d.ts +1 -1
- package/dist/components/step-line-chart/element/ui9000-step-line-chart.d.ts +1 -1
- package/dist/components/treemap-chart/element/styles.d.ts +2 -0
- package/dist/components/treemap-chart/element/styles.d.ts.map +1 -0
- package/dist/components/treemap-chart/element/styles.js +141 -0
- package/dist/components/treemap-chart/element/styles.js.map +1 -0
- package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts +35 -0
- package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts.map +1 -0
- package/dist/components/treemap-chart/element/ui9000-treemap-chart.js +177 -0
- package/dist/components/treemap-chart/element/ui9000-treemap-chart.js.map +1 -0
- package/dist/components/treemap-chart/index.d.ts +5 -0
- package/dist/components/treemap-chart/index.d.ts.map +1 -0
- package/dist/components/treemap-chart/index.js +22 -0
- package/dist/components/treemap-chart/index.js.map +1 -0
- package/dist/components/treemap-chart/lib/color.d.ts +25 -0
- package/dist/components/treemap-chart/lib/color.d.ts.map +1 -0
- package/dist/components/treemap-chart/lib/color.js +67 -0
- package/dist/components/treemap-chart/lib/color.js.map +1 -0
- package/dist/components/treemap-chart/lib/format.d.ts +7 -0
- package/dist/components/treemap-chart/lib/format.d.ts.map +1 -0
- package/dist/components/treemap-chart/lib/format.js +9 -0
- package/dist/components/treemap-chart/lib/format.js.map +1 -0
- package/dist/components/treemap-chart/lib/index.d.ts +6 -0
- package/dist/components/treemap-chart/lib/index.d.ts.map +1 -0
- package/dist/components/treemap-chart/lib/layout.d.ts +18 -0
- package/dist/components/treemap-chart/lib/layout.d.ts.map +1 -0
- package/dist/components/treemap-chart/lib/layout.js +31 -0
- package/dist/components/treemap-chart/lib/layout.js.map +1 -0
- package/dist/components/treemap-chart/lib/normalize.d.ts +4 -0
- package/dist/components/treemap-chart/lib/normalize.d.ts.map +1 -0
- package/dist/components/treemap-chart/lib/normalize.js +182 -0
- package/dist/components/treemap-chart/lib/normalize.js.map +1 -0
- package/dist/components/treemap-chart/lib/types.d.ts +63 -0
- package/dist/components/treemap-chart/lib/types.d.ts.map +1 -0
- package/dist/components/treemap-chart/metadata.json.d.ts +126 -0
- package/dist/components/treemap-chart/metadata.json.js +45 -0
- package/dist/components/treemap-chart/metadata.json.js.map +1 -0
- package/dist/components/treemap-chart/render/draw.d.ts +24 -0
- package/dist/components/treemap-chart/render/draw.d.ts.map +1 -0
- package/dist/components/treemap-chart/render/draw.js +124 -0
- package/dist/components/treemap-chart/render/draw.js.map +1 -0
- package/dist/components/treemap-chart/render/index.d.ts +2 -0
- package/dist/components/treemap-chart/render/index.d.ts.map +1 -0
- package/dist/components/violin-chart/element/ui9000-violin-chart.d.ts +1 -1
- package/dist/components/waterfall-chart/element/ui9000-waterfall-chart.d.ts +1 -1
- package/dist/element/chart-legend-render.d.ts +5 -0
- package/dist/element/chart-legend-render.d.ts.map +1 -1
- package/dist/element/chart-legend-render.js +19 -1
- package/dist/element/chart-legend-render.js.map +1 -1
- package/dist/element/chart-shell-styles.d.ts.map +1 -1
- package/dist/element/chart-shell-styles.js +35 -0
- package/dist/element/chart-shell-styles.js.map +1 -1
- package/dist/element/ui9000-chart-base.d.ts +2 -2
- package/dist/index.d.ts +20 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +178 -47
- package/dist/index.js.map +1 -1
- package/dist/lazy/bias-variance-tradeoff-chart.d.ts +4 -0
- package/dist/lazy/bias-variance-tradeoff-chart.d.ts.map +1 -0
- package/dist/lazy/bias-variance-tradeoff-chart.js +5 -0
- package/dist/lazy/bias-variance-tradeoff-chart.js.map +1 -0
- package/dist/lazy/gini-impurity-entropy-chart.d.ts +4 -0
- package/dist/lazy/gini-impurity-entropy-chart.d.ts.map +1 -0
- package/dist/lazy/gini-impurity-entropy-chart.js +5 -0
- package/dist/lazy/gini-impurity-entropy-chart.js.map +1 -0
- package/dist/lazy/index.d.ts +10 -2
- package/dist/lazy/index.d.ts.map +1 -1
- package/dist/lazy/index.js +72 -8
- package/dist/lazy/index.js.map +1 -1
- package/dist/lazy/map-chart.d.ts +4 -0
- package/dist/lazy/map-chart.d.ts.map +1 -0
- package/dist/lazy/map-chart.js +5 -0
- package/dist/lazy/map-chart.js.map +1 -0
- package/dist/lazy/matrix-chart.d.ts +4 -0
- package/dist/lazy/matrix-chart.d.ts.map +1 -0
- package/dist/lazy/matrix-chart.js +5 -0
- package/dist/lazy/matrix-chart.js.map +1 -0
- package/dist/lazy/network-graph.d.ts +4 -0
- package/dist/lazy/network-graph.d.ts.map +1 -0
- package/dist/lazy/network-graph.js +5 -0
- package/dist/lazy/network-graph.js.map +1 -0
- package/dist/lazy/parallel-coordinates-chart.d.ts +4 -0
- package/dist/lazy/parallel-coordinates-chart.d.ts.map +1 -0
- package/dist/lazy/parallel-coordinates-chart.js +5 -0
- package/dist/lazy/parallel-coordinates-chart.js.map +1 -0
- package/dist/lazy/polar-area-chart.d.ts +4 -0
- package/dist/lazy/polar-area-chart.d.ts.map +1 -0
- package/dist/lazy/polar-area-chart.js +5 -0
- package/dist/lazy/polar-area-chart.js.map +1 -0
- package/dist/lazy/radial-bar-chart.d.ts +4 -0
- package/dist/lazy/radial-bar-chart.d.ts.map +1 -0
- package/dist/lazy/radial-bar-chart.js +5 -0
- package/dist/lazy/radial-bar-chart.js.map +1 -0
- package/dist/lazy/treemap-chart.d.ts +4 -0
- package/dist/lazy/treemap-chart.d.ts.map +1 -0
- package/dist/lazy/treemap-chart.js +5 -0
- package/dist/lazy/treemap-chart.js.map +1 -0
- package/dist/node_modules/lit-html/directive.js.map +1 -0
- package/dist/node_modules/lit-html/directives/style-map.js.map +1 -0
- package/dist/node_modules/lit-html/lit-html.js.map +1 -0
- package/dist/utils/axis-units.d.ts +15 -0
- package/dist/utils/axis-units.d.ts.map +1 -0
- package/dist/utils/axis-units.js +27 -0
- package/dist/utils/axis-units.js.map +1 -0
- package/dist/utils/breakpoints.d.ts +7 -0
- package/dist/utils/breakpoints.d.ts.map +1 -0
- package/dist/utils/breakpoints.js +17 -0
- package/dist/utils/breakpoints.js.map +1 -0
- package/dist/utils/chart-helpers.d.ts +25 -6
- package/dist/utils/chart-helpers.d.ts.map +1 -1
- package/dist/utils/chart-helpers.js +70 -15
- package/dist/utils/chart-helpers.js.map +1 -1
- package/dist/utils/format-text.d.ts +22 -0
- package/dist/utils/format-text.d.ts.map +1 -0
- package/dist/utils/format-text.js +33 -0
- package/dist/utils/format-text.js.map +1 -0
- package/dist/utils/fuse-palette.d.ts +12 -0
- package/dist/utils/fuse-palette.d.ts.map +1 -1
- package/dist/utils/fuse-palette.js +23 -1
- package/dist/utils/fuse-palette.js.map +1 -1
- package/dist/utils/fuse-widget.d.ts +13 -4
- package/dist/utils/fuse-widget.d.ts.map +1 -1
- package/dist/utils/fuse-widget.js.map +1 -1
- package/dist/utils/fusedash-visual.d.ts +208 -52
- package/dist/utils/fusedash-visual.d.ts.map +1 -1
- package/dist/utils/fusedash-visual.js +162 -30
- package/dist/utils/fusedash-visual.js.map +1 -1
- package/package.json +91 -12
- package/dist/components/donut-group-chart/element/styles.d.ts +0 -2
- package/dist/components/donut-group-chart/element/styles.d.ts.map +0 -1
- package/dist/components/donut-group-chart/element/styles.js.map +0 -1
- package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts +0 -34
- package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts.map +0 -1
- package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js +0 -169
- package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js.map +0 -1
- package/dist/components/donut-group-chart/index.d.ts +0 -5
- package/dist/components/donut-group-chart/index.d.ts.map +0 -1
- package/dist/components/donut-group-chart/index.js +0 -23
- package/dist/components/donut-group-chart/lib/domain.d.ts +0 -39
- package/dist/components/donut-group-chart/lib/domain.d.ts.map +0 -1
- package/dist/components/donut-group-chart/lib/domain.js +0 -51
- package/dist/components/donut-group-chart/lib/domain.js.map +0 -1
- package/dist/components/donut-group-chart/lib/format.d.ts +0 -7
- package/dist/components/donut-group-chart/lib/format.d.ts.map +0 -1
- package/dist/components/donut-group-chart/lib/format.js +0 -21
- package/dist/components/donut-group-chart/lib/format.js.map +0 -1
- package/dist/components/donut-group-chart/lib/index.d.ts +0 -5
- package/dist/components/donut-group-chart/lib/index.d.ts.map +0 -1
- package/dist/components/donut-group-chart/lib/normalize.d.ts +0 -14
- package/dist/components/donut-group-chart/lib/normalize.d.ts.map +0 -1
- package/dist/components/donut-group-chart/lib/normalize.js +0 -98
- package/dist/components/donut-group-chart/lib/normalize.js.map +0 -1
- package/dist/components/donut-group-chart/lib/types.d.ts +0 -49
- package/dist/components/donut-group-chart/lib/types.d.ts.map +0 -1
- package/dist/components/donut-group-chart/metadata.json.d.ts +0 -113
- package/dist/components/donut-group-chart/metadata.json.js +0 -45
- package/dist/components/donut-group-chart/render/draw.d.ts +0 -44
- package/dist/components/donut-group-chart/render/draw.d.ts.map +0 -1
- package/dist/components/donut-group-chart/render/draw.js +0 -194
- package/dist/components/donut-group-chart/render/draw.js.map +0 -1
- package/dist/components/donut-group-chart/render/index.d.ts +0 -2
- package/dist/components/donut-group-chart/render/index.d.ts.map +0 -1
- package/dist/components/donut-group-chart/tests/fixtures.d.ts +0 -33
- package/dist/components/donut-group-chart/tests/fixtures.d.ts.map +0 -1
- package/dist/lazy/donut-group-chart.d.ts +0 -4
- package/dist/lazy/donut-group-chart.d.ts.map +0 -1
- package/dist/lazy/donut-group-chart.js +0 -5
- package/dist/lazy/donut-group-chart.js.map +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directive.js.map +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/directives/style-map.js.map +0 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/lit-html.js.map +0 -1
- /package/dist/components/{donut-group-chart → bias-variance-tradeoff-chart}/index.js.map +0 -0
- /package/dist/components/{donut-group-chart → parallel-coordinates-chart}/metadata.json.js.map +0 -0
- /package/dist/node_modules/{.pnpm/lit-html@3.3.3/node_modules/lit-html → lit-html}/directive.js +0 -0
- /package/dist/node_modules/{.pnpm/lit-html@3.3.3/node_modules/lit-html → lit-html}/directives/style-map.js +0 -0
- /package/dist/node_modules/{.pnpm/lit-html@3.3.3/node_modules/lit-html → lit-html}/lit-html.js +0 -0
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { registerDonutGroupChart } from "./element/ui9000-donut-group-chart.js";
|
|
2
|
-
import { Ui9000DonutGroupChart } from "./element/ui9000-donut-group-chart.js";
|
|
3
|
-
import { renderDonutGroupChart } from "./render/draw.js";
|
|
4
|
-
import { default as default2 } from "./metadata.json.js";
|
|
5
|
-
import { donutArcValues, donutGridLayout, donutRadii, gaugeRatio, resolveMax } from "./lib/domain.js";
|
|
6
|
-
import { fitLabel, formatCompact, formatPercent } from "./lib/format.js";
|
|
7
|
-
import { normalizeDonutGroupData } from "./lib/normalize.js";
|
|
8
|
-
export {
|
|
9
|
-
Ui9000DonutGroupChart,
|
|
10
|
-
donutArcValues,
|
|
11
|
-
donutGridLayout,
|
|
12
|
-
default2 as donutGroupChartMetadata,
|
|
13
|
-
donutRadii,
|
|
14
|
-
fitLabel,
|
|
15
|
-
formatCompact,
|
|
16
|
-
formatPercent,
|
|
17
|
-
gaugeRatio,
|
|
18
|
-
normalizeDonutGroupData,
|
|
19
|
-
registerDonutGroupChart,
|
|
20
|
-
renderDonutGroupChart,
|
|
21
|
-
resolveMax
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { DonutGauge } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Full scale of one gauge — FuseDash `maximalValue`, then the slice total, then
|
|
4
|
-
* the 100 the widget assumes when a row carries neither.
|
|
5
|
-
*/
|
|
6
|
-
export declare function resolveMax(item: DonutGauge, defaultMax?: number): number;
|
|
7
|
-
/** Filled share of a gauge, clamped to the track. */
|
|
8
|
-
export declare function gaugeRatio(value: number, max: number): number;
|
|
9
|
-
/**
|
|
10
|
-
* Arcs of one donut, in draw order. A gauge is the value arc plus the neutral
|
|
11
|
-
* remainder that completes the ring; a breakdown donut is its slices, negatives
|
|
12
|
-
* folded to their magnitude the way `d3-shape`'s pie generator needs them.
|
|
13
|
-
*/
|
|
14
|
-
export declare function donutArcValues(item: DonutGauge, defaultMax?: number): {
|
|
15
|
-
values: number[];
|
|
16
|
-
track: boolean;
|
|
17
|
-
};
|
|
18
|
-
export interface DonutGridLayout {
|
|
19
|
-
columns: number;
|
|
20
|
-
rows: number;
|
|
21
|
-
cellWidth: number;
|
|
22
|
-
cellHeight: number;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Places the donuts. FuseDash lays them out in one flex row; the chat host is
|
|
26
|
-
* far narrower, so cells wrap once they would fall below `minCellWidth` and the
|
|
27
|
-
* columns are then rebalanced so the last row is never left nearly empty.
|
|
28
|
-
*/
|
|
29
|
-
export declare function donutGridLayout(count: number, width: number, height: number, minCellWidth?: number): DonutGridLayout;
|
|
30
|
-
/**
|
|
31
|
-
* Ring geometry for one cell. FuseDash uses `min(w, h) / 2` with a flat 16px
|
|
32
|
-
* band, which collapses on small cells — the band is capped at half the radius
|
|
33
|
-
* so the hole never disappears.
|
|
34
|
-
*/
|
|
35
|
-
export declare function donutRadii(cellWidth: number, cellHeight: number, padding?: number, thickness?: number): {
|
|
36
|
-
outerRadius: number;
|
|
37
|
-
innerRadius: number;
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-group-chart/lib/domain.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,YAAY,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,GAAE,MAA2B,GAAG,MAAM,CAO5F;AAED,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG;IACrE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB,CAQA;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,MAA6B,GAC1C,eAAe,CAajB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,MAA4B,EACrC,SAAS,GAAE,MAA0B,GACpC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAK9C"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { FD } from "../../../utils/fusedash-visual.js";
|
|
2
|
-
function resolveMax(item, defaultMax = FD.donutDefaultMax) {
|
|
3
|
-
var _a;
|
|
4
|
-
if (item.max != null && item.max > 0) return item.max;
|
|
5
|
-
if ((_a = item.slices) == null ? void 0 : _a.length) {
|
|
6
|
-
const total = item.slices.reduce((sum, s) => sum + Math.abs(s.value), 0);
|
|
7
|
-
if (total > 0) return total;
|
|
8
|
-
}
|
|
9
|
-
return defaultMax > 0 ? defaultMax : FD.donutDefaultMax;
|
|
10
|
-
}
|
|
11
|
-
function gaugeRatio(value, max) {
|
|
12
|
-
if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) return 0;
|
|
13
|
-
return Math.min(Math.max(value / max, 0), 1);
|
|
14
|
-
}
|
|
15
|
-
function donutArcValues(item, defaultMax) {
|
|
16
|
-
const slices = item.slices ?? [];
|
|
17
|
-
if (slices.length > 1) {
|
|
18
|
-
return { values: slices.map((s) => Math.abs(s.value)), track: false };
|
|
19
|
-
}
|
|
20
|
-
const max = resolveMax(item, defaultMax);
|
|
21
|
-
const filled = Math.min(Math.max(item.value, 0), max);
|
|
22
|
-
return { values: [filled, max - filled], track: true };
|
|
23
|
-
}
|
|
24
|
-
function donutGridLayout(count, width, height, minCellWidth = FD.donutMinCellWidth) {
|
|
25
|
-
if (count <= 0 || width <= 0 || height <= 0) {
|
|
26
|
-
return { columns: 0, rows: 0, cellWidth: 0, cellHeight: 0 };
|
|
27
|
-
}
|
|
28
|
-
const fits = Math.max(1, Math.floor(width / minCellWidth));
|
|
29
|
-
const rows = Math.max(1, Math.ceil(count / Math.min(fits, count)));
|
|
30
|
-
const columns = Math.ceil(count / rows);
|
|
31
|
-
return {
|
|
32
|
-
columns,
|
|
33
|
-
rows,
|
|
34
|
-
cellWidth: width / columns,
|
|
35
|
-
cellHeight: height / rows
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function donutRadii(cellWidth, cellHeight, padding = FD.donutCellPadding, thickness = FD.donutThickness) {
|
|
39
|
-
const outerRadius = Math.min(cellWidth, cellHeight) / 2 - padding;
|
|
40
|
-
if (outerRadius <= 0) return { outerRadius: 0, innerRadius: 0 };
|
|
41
|
-
const band = Math.max(Math.min(thickness, outerRadius * 0.5), FD.donutMinThickness);
|
|
42
|
-
return { outerRadius, innerRadius: Math.max(outerRadius - band, 0) };
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
donutArcValues,
|
|
46
|
-
donutGridLayout,
|
|
47
|
-
donutRadii,
|
|
48
|
-
gaugeRatio,
|
|
49
|
-
resolveMax
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=domain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domain.js","sources":["../../../../src/components/donut-group-chart/lib/domain.ts"],"sourcesContent":["import { FD } from '../../../utils/fusedash-visual.js';\nimport type { DonutGauge, DonutSlice } from './types.js';\n\n/**\n * Full scale of one gauge — FuseDash `maximalValue`, then the slice total, then\n * the 100 the widget assumes when a row carries neither.\n */\nexport function resolveMax(item: DonutGauge, defaultMax: number = FD.donutDefaultMax): number {\n if (item.max != null && item.max > 0) return item.max;\n if (item.slices?.length) {\n const total = item.slices.reduce((sum, s) => sum + Math.abs(s.value), 0);\n if (total > 0) return total;\n }\n return defaultMax > 0 ? defaultMax : FD.donutDefaultMax;\n}\n\n/** Filled share of a gauge, clamped to the track. */\nexport function gaugeRatio(value: number, max: number): number {\n if (!Number.isFinite(value) || !Number.isFinite(max) || max <= 0) return 0;\n return Math.min(Math.max(value / max, 0), 1);\n}\n\n/**\n * Arcs of one donut, in draw order. A gauge is the value arc plus the neutral\n * remainder that completes the ring; a breakdown donut is its slices, negatives\n * folded to their magnitude the way `d3-shape`'s pie generator needs them.\n */\nexport function donutArcValues(item: DonutGauge, defaultMax?: number): {\n values: number[];\n track: boolean;\n} {\n const slices = item.slices ?? [];\n if (slices.length > 1) {\n return { values: slices.map((s: DonutSlice) => Math.abs(s.value)), track: false };\n }\n const max = resolveMax(item, defaultMax);\n const filled = Math.min(Math.max(item.value, 0), max);\n return { values: [filled, max - filled], track: true };\n}\n\nexport interface DonutGridLayout {\n columns: number;\n rows: number;\n cellWidth: number;\n cellHeight: number;\n}\n\n/**\n * Places the donuts. FuseDash lays them out in one flex row; the chat host is\n * far narrower, so cells wrap once they would fall below `minCellWidth` and the\n * columns are then rebalanced so the last row is never left nearly empty.\n */\nexport function donutGridLayout(\n count: number,\n width: number,\n height: number,\n minCellWidth: number = FD.donutMinCellWidth,\n): DonutGridLayout {\n if (count <= 0 || width <= 0 || height <= 0) {\n return { columns: 0, rows: 0, cellWidth: 0, cellHeight: 0 };\n }\n const fits = Math.max(1, Math.floor(width / minCellWidth));\n const rows = Math.max(1, Math.ceil(count / Math.min(fits, count)));\n const columns = Math.ceil(count / rows);\n return {\n columns,\n rows,\n cellWidth: width / columns,\n cellHeight: height / rows,\n };\n}\n\n/**\n * Ring geometry for one cell. FuseDash uses `min(w, h) / 2` with a flat 16px\n * band, which collapses on small cells — the band is capped at half the radius\n * so the hole never disappears.\n */\nexport function donutRadii(\n cellWidth: number,\n cellHeight: number,\n padding: number = FD.donutCellPadding,\n thickness: number = FD.donutThickness,\n): { outerRadius: number; innerRadius: number } {\n const outerRadius = Math.min(cellWidth, cellHeight) / 2 - padding;\n if (outerRadius <= 0) return { outerRadius: 0, innerRadius: 0 };\n const band = Math.max(Math.min(thickness, outerRadius * 0.5), FD.donutMinThickness);\n return { outerRadius, innerRadius: Math.max(outerRadius - band, 0) };\n}\n"],"names":[],"mappings":";AAOO,SAAS,WAAW,MAAkB,aAAqB,GAAG,iBAAyB;;AAC5F,MAAI,KAAK,OAAO,QAAQ,KAAK,MAAM,UAAU,KAAK;AAClD,OAAI,UAAK,WAAL,mBAAa,QAAQ;AACvB,UAAM,QAAQ,KAAK,OAAO,OAAO,CAAC,KAAK,MAAM,MAAM,KAAK,IAAI,EAAE,KAAK,GAAG,CAAC;AACvE,QAAI,QAAQ,EAAG,QAAO;AAAA,EACxB;AACA,SAAO,aAAa,IAAI,aAAa,GAAG;AAC1C;AAGO,SAAS,WAAW,OAAe,KAAqB;AAC7D,MAAI,CAAC,OAAO,SAAS,KAAK,KAAK,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,EAAG,QAAO;AACzE,SAAO,KAAK,IAAI,KAAK,IAAI,QAAQ,KAAK,CAAC,GAAG,CAAC;AAC7C;AAOO,SAAS,eAAe,MAAkB,YAG/C;AACA,QAAM,SAAS,KAAK,UAAU,CAAA;AAC9B,MAAI,OAAO,SAAS,GAAG;AACrB,WAAO,EAAE,QAAQ,OAAO,IAAI,CAAC,MAAkB,KAAK,IAAI,EAAE,KAAK,CAAC,GAAG,OAAO,MAAA;AAAA,EAC5E;AACA,QAAM,MAAM,WAAW,MAAM,UAAU;AACvC,QAAM,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,OAAO,CAAC,GAAG,GAAG;AACpD,SAAO,EAAE,QAAQ,CAAC,QAAQ,MAAM,MAAM,GAAG,OAAO,KAAA;AAClD;AAcO,SAAS,gBACd,OACA,OACA,QACA,eAAuB,GAAG,mBACT;AACjB,MAAI,SAAS,KAAK,SAAS,KAAK,UAAU,GAAG;AAC3C,WAAO,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,EAAA;AAAA,EAC1D;AACA,QAAM,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,YAAY,CAAC;AACzD,QAAM,OAAO,KAAK,IAAI,GAAG,KAAK,KAAK,QAAQ,KAAK,IAAI,MAAM,KAAK,CAAC,CAAC;AACjE,QAAM,UAAU,KAAK,KAAK,QAAQ,IAAI;AACtC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,WAAW,QAAQ;AAAA,IACnB,YAAY,SAAS;AAAA,EAAA;AAEzB;AAOO,SAAS,WACd,WACA,YACA,UAAkB,GAAG,kBACrB,YAAoB,GAAG,gBACuB;AAC9C,QAAM,cAAc,KAAK,IAAI,WAAW,UAAU,IAAI,IAAI;AAC1D,MAAI,eAAe,EAAG,QAAO,EAAE,aAAa,GAAG,aAAa,EAAA;AAC5D,QAAM,OAAO,KAAK,IAAI,KAAK,IAAI,WAAW,cAAc,GAAG,GAAG,GAAG,iBAAiB;AAClF,SAAO,EAAE,aAAa,aAAa,KAAK,IAAI,cAAc,MAAM,CAAC,EAAA;AACnE;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/** Value / tooltip formatting — same rule as the other ported charts. */
|
|
2
|
-
export declare function formatCompact(value: number): string;
|
|
3
|
-
/** Share of the ring, as the tooltip shows it. */
|
|
4
|
-
export declare function formatPercent(ratio: number): string;
|
|
5
|
-
/** Middle-truncate a caption to the characters its cell can actually fit. */
|
|
6
|
-
export declare function fitLabel(label: string, maxChars: number): string;
|
|
7
|
-
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-group-chart/lib/format.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIhE"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { formatCompactNumber } from "../../../utils/fusedash-visual.js";
|
|
2
|
-
function formatCompact(value) {
|
|
3
|
-
const decimals = Number.isInteger(value) && Math.abs(value) < 1e3 ? 0 : 2;
|
|
4
|
-
return formatCompactNumber(value, decimals);
|
|
5
|
-
}
|
|
6
|
-
function formatPercent(ratio) {
|
|
7
|
-
if (!Number.isFinite(ratio)) return "";
|
|
8
|
-
const pct = ratio * 100;
|
|
9
|
-
return `${pct >= 10 || pct === 0 || Number.isInteger(pct) ? Math.round(pct) : pct.toFixed(1)}%`;
|
|
10
|
-
}
|
|
11
|
-
function fitLabel(label, maxChars) {
|
|
12
|
-
if (maxChars <= 1) return label.slice(0, 1);
|
|
13
|
-
if (label.length <= maxChars) return label;
|
|
14
|
-
return `${label.slice(0, maxChars - 1)}…`;
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
fitLabel,
|
|
18
|
-
formatCompact,
|
|
19
|
-
formatPercent
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=format.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sources":["../../../../src/components/donut-group-chart/lib/format.ts"],"sourcesContent":["import { formatCompactNumber } from '../../../utils/fusedash-visual.js';\n\n/** Value / tooltip formatting — same rule as the other ported charts. */\nexport function formatCompact(value: number): string {\n const decimals = Number.isInteger(value) && Math.abs(value) < 1000 ? 0 : 2;\n return formatCompactNumber(value, decimals);\n}\n\n/** Share of the ring, as the tooltip shows it. */\nexport function formatPercent(ratio: number): string {\n if (!Number.isFinite(ratio)) return '';\n const pct = ratio * 100;\n return `${pct >= 10 || pct === 0 || Number.isInteger(pct) ? Math.round(pct) : pct.toFixed(1)}%`;\n}\n\n/** Middle-truncate a caption to the characters its cell can actually fit. */\nexport function fitLabel(label: string, maxChars: number): string {\n if (maxChars <= 1) return label.slice(0, 1);\n if (label.length <= maxChars) return label;\n return `${label.slice(0, maxChars - 1)}…`;\n}\n"],"names":[],"mappings":";AAGO,SAAS,cAAc,OAAuB;AACnD,QAAM,WAAW,OAAO,UAAU,KAAK,KAAK,KAAK,IAAI,KAAK,IAAI,MAAO,IAAI;AACzE,SAAO,oBAAoB,OAAO,QAAQ;AAC5C;AAGO,SAAS,cAAc,OAAuB;AACnD,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,QAAM,MAAM,QAAQ;AACpB,SAAO,GAAG,OAAO,MAAM,QAAQ,KAAK,OAAO,UAAU,GAAG,IAAI,KAAK,MAAM,GAAG,IAAI,IAAI,QAAQ,CAAC,CAAC;AAC9F;AAGO,SAAS,SAAS,OAAe,UAA0B;AAChE,MAAI,YAAY,EAAG,QAAO,MAAM,MAAM,GAAG,CAAC;AAC1C,MAAI,MAAM,UAAU,SAAU,QAAO;AACrC,SAAO,GAAG,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC;AACxC;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { type DonutGauge, type DonutGroupChartData, type DonutHoverEntry, type DonutSlice, type DonutStatus, } from './types.js';
|
|
2
|
-
export { normalizeDonutGroupData } from './normalize.js';
|
|
3
|
-
export { donutArcValues, donutGridLayout, donutRadii, gaugeRatio, resolveMax, type DonutGridLayout, } from './domain.js';
|
|
4
|
-
export { fitLabel, formatCompact, formatPercent } from './format.js';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-group-chart/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,cAAc,EACd,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACV,KAAK,eAAe,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataPoint } from '../../../types/index.js';
|
|
2
|
-
import { DonutGauge, DonutGroupChartData } from './types.js';
|
|
3
|
-
/** Loose row shape accepted from chat payloads and FuseDash widget data. */
|
|
4
|
-
type RawRow = Record<string, unknown>;
|
|
5
|
-
/**
|
|
6
|
-
* Normalize chat payloads and FuseDash widget data into one donut per entry.
|
|
7
|
-
*
|
|
8
|
-
* Mirrors how FuseDash `DonutGroupChart` feeds `DonutGroupItem`: a group with a
|
|
9
|
-
* single row is a gauge against `maximalValue`, a group with several rows is a
|
|
10
|
-
* breakdown donut over those rows.
|
|
11
|
-
*/
|
|
12
|
-
export declare function normalizeDonutGroupData(input: DataPoint[] | DonutGauge[] | DonutGroupChartData | RawRow[] | RawRow[][] | null | undefined): DonutGauge[];
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-group-chart/lib/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EAGpB,MAAM,YAAY,CAAC;AAEpB,4EAA4E;AAC5E,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA6FtC;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EACD,SAAS,EAAE,GACX,UAAU,EAAE,GACZ,mBAAmB,GACnB,MAAM,EAAE,GACR,MAAM,EAAE,EAAE,GACV,IAAI,GACJ,SAAS,GACZ,UAAU,EAAE,CAyCd"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
const STATUSES = ["positive", "negative", "neutral"];
|
|
2
|
-
function toStatus(value) {
|
|
3
|
-
return STATUSES.includes(value) ? value : void 0;
|
|
4
|
-
}
|
|
5
|
-
function toNumber(value) {
|
|
6
|
-
if (value == null || value === "") return void 0;
|
|
7
|
-
const n = Number(value);
|
|
8
|
-
return Number.isFinite(n) ? n : void 0;
|
|
9
|
-
}
|
|
10
|
-
function toText(value) {
|
|
11
|
-
if (value == null) return void 0;
|
|
12
|
-
const text = String(value).trim();
|
|
13
|
-
return text.length ? text : void 0;
|
|
14
|
-
}
|
|
15
|
-
function rowLabel(row, fallback) {
|
|
16
|
-
return toText(row.label) ?? toText(row.name) ?? toText(row.x) ?? toText(row.category) ?? fallback;
|
|
17
|
-
}
|
|
18
|
-
function rowValue(row) {
|
|
19
|
-
return toNumber(row.value) ?? toNumber(row.y) ?? toNumber(row.count);
|
|
20
|
-
}
|
|
21
|
-
function rowMax(row) {
|
|
22
|
-
const max = toNumber(row.max) ?? toNumber(row.maximalValue) ?? toNumber(row.total);
|
|
23
|
-
return max != null && max > 0 ? max : void 0;
|
|
24
|
-
}
|
|
25
|
-
function cleanSlices(rows) {
|
|
26
|
-
return rows.map((row) => ({ row, value: rowValue(row) })).filter((entry) => entry.value != null).map(({ row, value }, i) => ({
|
|
27
|
-
label: rowLabel(row, `Slice ${i + 1}`),
|
|
28
|
-
value,
|
|
29
|
-
color: toText(row.color)
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
function gaugeFromRow(row, index) {
|
|
33
|
-
const value = rowValue(row);
|
|
34
|
-
if (value == null) return null;
|
|
35
|
-
const label = rowLabel(row, `Item ${index + 1}`);
|
|
36
|
-
return {
|
|
37
|
-
id: toText(row.id) ?? label,
|
|
38
|
-
label,
|
|
39
|
-
value,
|
|
40
|
-
max: rowMax(row),
|
|
41
|
-
statusLabel: toText(row.statusLabel) ?? toText(row.badge),
|
|
42
|
-
status: toStatus(row.status),
|
|
43
|
-
color: toText(row.color)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function fromItems(items) {
|
|
47
|
-
return items.map((item, i) => {
|
|
48
|
-
const value = toNumber(item.value);
|
|
49
|
-
const slices = Array.isArray(item.slices) ? cleanSlices(item.slices) : [];
|
|
50
|
-
const total = slices.reduce((sum, s) => sum + s.value, 0);
|
|
51
|
-
if (value == null && !slices.length) return null;
|
|
52
|
-
const label = toText(item.label) ?? toText(item.id) ?? `Item ${i + 1}`;
|
|
53
|
-
return {
|
|
54
|
-
id: toText(item.id) ?? label,
|
|
55
|
-
label,
|
|
56
|
-
value: value ?? total,
|
|
57
|
-
max: item.max != null && item.max > 0 ? item.max : void 0,
|
|
58
|
-
statusLabel: toText(item.statusLabel),
|
|
59
|
-
status: toStatus(item.status),
|
|
60
|
-
color: toText(item.color),
|
|
61
|
-
slices: slices.length ? slices : void 0
|
|
62
|
-
};
|
|
63
|
-
}).filter((item) => item != null);
|
|
64
|
-
}
|
|
65
|
-
function normalizeDonutGroupData(input) {
|
|
66
|
-
var _a, _b;
|
|
67
|
-
if (!input) return [];
|
|
68
|
-
if (Array.isArray(input)) {
|
|
69
|
-
if (!input.length) return [];
|
|
70
|
-
if (Array.isArray(input[0])) {
|
|
71
|
-
return input.map((rows, i) => {
|
|
72
|
-
const slices = cleanSlices(Array.isArray(rows) ? rows : []);
|
|
73
|
-
if (!slices.length) return null;
|
|
74
|
-
if (slices.length === 1) return gaugeFromRow(rows[0], i);
|
|
75
|
-
const first2 = rows[0] ?? {};
|
|
76
|
-
const label = rowLabel(first2, `Item ${i + 1}`);
|
|
77
|
-
return {
|
|
78
|
-
id: toText(first2.id) ?? label,
|
|
79
|
-
label,
|
|
80
|
-
value: slices.reduce((sum, s) => sum + s.value, 0),
|
|
81
|
-
slices
|
|
82
|
-
};
|
|
83
|
-
}).filter((item) => item != null);
|
|
84
|
-
}
|
|
85
|
-
const first = input[0];
|
|
86
|
-
if (Array.isArray(first.slices)) return fromItems(input);
|
|
87
|
-
return input.map((row, i) => gaugeFromRow(row, i)).filter((item) => item != null);
|
|
88
|
-
}
|
|
89
|
-
if ((_a = input.items) == null ? void 0 : _a.length) return fromItems(input.items);
|
|
90
|
-
if ((_b = input.points) == null ? void 0 : _b.length) {
|
|
91
|
-
return input.points.map((row, i) => gaugeFromRow(row, i)).filter((item) => item != null);
|
|
92
|
-
}
|
|
93
|
-
return [];
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
normalizeDonutGroupData
|
|
97
|
-
};
|
|
98
|
-
//# sourceMappingURL=normalize.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.js","sources":["../../../../src/components/donut-group-chart/lib/normalize.ts"],"sourcesContent":["import type { DataPoint } from '../../../types/index.js';\nimport type {\n DonutGauge,\n DonutGroupChartData,\n DonutSlice,\n DonutStatus,\n} from './types.js';\n\n/** Loose row shape accepted from chat payloads and FuseDash widget data. */\ntype RawRow = Record<string, unknown>;\n\nconst STATUSES: DonutStatus[] = ['positive', 'negative', 'neutral'];\n\nfunction toStatus(value: unknown): DonutStatus | undefined {\n return STATUSES.includes(value as DonutStatus) ? (value as DonutStatus) : undefined;\n}\n\nfunction toNumber(value: unknown): number | undefined {\n if (value == null || value === '') return undefined;\n const n = Number(value);\n return Number.isFinite(n) ? n : undefined;\n}\n\nfunction toText(value: unknown): string | undefined {\n if (value == null) return undefined;\n const text = String(value).trim();\n return text.length ? text : undefined;\n}\n\n/** FuseDash `arrangeBy` / `groupBy` / chat `label` all land in the same slot. */\nfunction rowLabel(row: RawRow, fallback: string): string {\n return (\n toText(row.label) ??\n toText(row.name) ??\n toText(row.x) ??\n toText(row.category) ??\n fallback\n );\n}\n\n/** FuseDash `display` — the measured column. */\nfunction rowValue(row: RawRow): number | undefined {\n return toNumber(row.value) ?? toNumber(row.y) ?? toNumber(row.count);\n}\n\nfunction rowMax(row: RawRow): number | undefined {\n const max = toNumber(row.max) ?? toNumber(row.maximalValue) ?? toNumber(row.total);\n return max != null && max > 0 ? max : undefined;\n}\n\nfunction cleanSlices(rows: RawRow[]): DonutSlice[] {\n return rows\n .map((row) => ({ row, value: rowValue(row) }))\n .filter((entry): entry is { row: RawRow; value: number } => entry.value != null)\n .map(({ row, value }, i) => ({\n label: rowLabel(row, `Slice ${i + 1}`),\n value,\n color: toText(row.color),\n }));\n}\n\nfunction gaugeFromRow(row: RawRow, index: number): DonutGauge | null {\n const value = rowValue(row);\n if (value == null) return null;\n const label = rowLabel(row, `Item ${index + 1}`);\n return {\n id: toText(row.id) ?? label,\n label,\n value,\n max: rowMax(row),\n statusLabel: toText(row.statusLabel) ?? toText(row.badge),\n status: toStatus(row.status),\n color: toText(row.color),\n };\n}\n\n/** Already-shaped items still get their slices and ids cleaned up. */\nfunction fromItems(items: DonutGauge[]): DonutGauge[] {\n return items\n .map((item, i): DonutGauge | null => {\n const value = toNumber(item.value);\n const slices = Array.isArray(item.slices)\n ? cleanSlices(item.slices as unknown as RawRow[])\n : [];\n // a value is optional when slices carry it — the gauge then shows the sum\n const total = slices.reduce((sum, s) => sum + s.value, 0);\n if (value == null && !slices.length) return null;\n const label = toText(item.label) ?? toText(item.id) ?? `Item ${i + 1}`;\n return {\n id: toText(item.id) ?? label,\n label,\n value: value ?? total,\n max: item.max != null && item.max > 0 ? item.max : undefined,\n statusLabel: toText(item.statusLabel),\n status: toStatus(item.status),\n color: toText(item.color),\n slices: slices.length ? slices : undefined,\n };\n })\n .filter((item): item is DonutGauge => item != null);\n}\n\n/**\n * Normalize chat payloads and FuseDash widget data into one donut per entry.\n *\n * Mirrors how FuseDash `DonutGroupChart` feeds `DonutGroupItem`: a group with a\n * single row is a gauge against `maximalValue`, a group with several rows is a\n * breakdown donut over those rows.\n */\nexport function normalizeDonutGroupData(\n input:\n | DataPoint[]\n | DonutGauge[]\n | DonutGroupChartData\n | RawRow[]\n | RawRow[][]\n | null\n | undefined,\n): DonutGauge[] {\n if (!input) return [];\n\n if (Array.isArray(input)) {\n if (!input.length) return [];\n\n // FuseDash shape: one array of rows per donut\n if (Array.isArray(input[0])) {\n return (input as RawRow[][])\n .map((rows, i): DonutGauge | null => {\n const slices = cleanSlices(Array.isArray(rows) ? rows : []);\n if (!slices.length) return null;\n if (slices.length === 1) return gaugeFromRow(rows[0], i);\n const first = rows[0] ?? {};\n const label = rowLabel(first, `Item ${i + 1}`);\n return {\n id: toText(first.id) ?? label,\n label,\n value: slices.reduce((sum, s) => sum + s.value, 0),\n slices,\n };\n })\n .filter((item): item is DonutGauge => item != null);\n }\n\n const first = input[0] as RawRow;\n if (Array.isArray(first.slices)) return fromItems(input as DonutGauge[]);\n return (input as RawRow[])\n .map((row, i) => gaugeFromRow(row, i))\n .filter((item): item is DonutGauge => item != null);\n }\n\n if (input.items?.length) return fromItems(input.items);\n\n if (input.points?.length) {\n return (input.points as unknown as RawRow[])\n .map((row, i) => gaugeFromRow(row, i))\n .filter((item): item is DonutGauge => item != null);\n }\n\n return [];\n}\n"],"names":["first"],"mappings":"AAWA,MAAM,WAA0B,CAAC,YAAY,YAAY,SAAS;AAElE,SAAS,SAAS,OAAyC;AACzD,SAAO,SAAS,SAAS,KAAoB,IAAK,QAAwB;AAC5E;AAEA,SAAS,SAAS,OAAoC;AACpD,MAAI,SAAS,QAAQ,UAAU,GAAI,QAAO;AAC1C,QAAM,IAAI,OAAO,KAAK;AACtB,SAAO,OAAO,SAAS,CAAC,IAAI,IAAI;AAClC;AAEA,SAAS,OAAO,OAAoC;AAClD,MAAI,SAAS,KAAM,QAAO;AAC1B,QAAM,OAAO,OAAO,KAAK,EAAE,KAAA;AAC3B,SAAO,KAAK,SAAS,OAAO;AAC9B;AAGA,SAAS,SAAS,KAAa,UAA0B;AACvD,SACE,OAAO,IAAI,KAAK,KAChB,OAAO,IAAI,IAAI,KACf,OAAO,IAAI,CAAC,KACZ,OAAO,IAAI,QAAQ,KACnB;AAEJ;AAGA,SAAS,SAAS,KAAiC;AACjD,SAAO,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,IAAI,KAAK;AACrE;AAEA,SAAS,OAAO,KAAiC;AAC/C,QAAM,MAAM,SAAS,IAAI,GAAG,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,IAAI,KAAK;AACjF,SAAO,OAAO,QAAQ,MAAM,IAAI,MAAM;AACxC;AAEA,SAAS,YAAY,MAA8B;AACjD,SAAO,KACJ,IAAI,CAAC,SAAS,EAAE,KAAK,OAAO,SAAS,GAAG,EAAA,EAAI,EAC5C,OAAO,CAAC,UAAmD,MAAM,SAAS,IAAI,EAC9E,IAAI,CAAC,EAAE,KAAK,MAAA,GAAS,OAAO;AAAA,IAC3B,OAAO,SAAS,KAAK,SAAS,IAAI,CAAC,EAAE;AAAA,IACrC;AAAA,IACA,OAAO,OAAO,IAAI,KAAK;AAAA,EAAA,EACvB;AACN;AAEA,SAAS,aAAa,KAAa,OAAkC;AACnE,QAAM,QAAQ,SAAS,GAAG;AAC1B,MAAI,SAAS,KAAM,QAAO;AAC1B,QAAM,QAAQ,SAAS,KAAK,QAAQ,QAAQ,CAAC,EAAE;AAC/C,SAAO;AAAA,IACL,IAAI,OAAO,IAAI,EAAE,KAAK;AAAA,IACtB;AAAA,IACA;AAAA,IACA,KAAK,OAAO,GAAG;AAAA,IACf,aAAa,OAAO,IAAI,WAAW,KAAK,OAAO,IAAI,KAAK;AAAA,IACxD,QAAQ,SAAS,IAAI,MAAM;AAAA,IAC3B,OAAO,OAAO,IAAI,KAAK;AAAA,EAAA;AAE3B;AAGA,SAAS,UAAU,OAAmC;AACpD,SAAO,MACJ,IAAI,CAAC,MAAM,MAAyB;AACnC,UAAM,QAAQ,SAAS,KAAK,KAAK;AACjC,UAAM,SAAS,MAAM,QAAQ,KAAK,MAAM,IACpC,YAAY,KAAK,MAA6B,IAC9C,CAAA;AAEJ,UAAM,QAAQ,OAAO,OAAO,CAAC,KAAK,MAAM,MAAM,EAAE,OAAO,CAAC;AACxD,QAAI,SAAS,QAAQ,CAAC,OAAO,OAAQ,QAAO;AAC5C,UAAM,QAAQ,OAAO,KAAK,KAAK,KAAK,OAAO,KAAK,EAAE,KAAK,QAAQ,IAAI,CAAC;AACpE,WAAO;AAAA,MACL,IAAI,OAAO,KAAK,EAAE,KAAK;AAAA,MACvB;AAAA,MACA,OAAO,SAAS;AAAA,MAChB,KAAK,KAAK,OAAO,QAAQ,KAAK,MAAM,IAAI,KAAK,MAAM;AAAA,MACnD,aAAa,OAAO,KAAK,WAAW;AAAA,MACpC,QAAQ,SAAS,KAAK,MAAM;AAAA,MAC5B,OAAO,OAAO,KAAK,KAAK;AAAA,MACxB,QAAQ,OAAO,SAAS,SAAS;AAAA,IAAA;AAAA,EAErC,CAAC,EACA,OAAO,CAAC,SAA6B,QAAQ,IAAI;AACtD;AASO,SAAS,wBACd,OAQc;AA3GhB;AA4GE,MAAI,CAAC,MAAO,QAAO,CAAA;AAEnB,MAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,QAAI,CAAC,MAAM,OAAQ,QAAO,CAAA;AAG1B,QAAI,MAAM,QAAQ,MAAM,CAAC,CAAC,GAAG;AAC3B,aAAQ,MACL,IAAI,CAAC,MAAM,MAAyB;AACnC,cAAM,SAAS,YAAY,MAAM,QAAQ,IAAI,IAAI,OAAO,EAAE;AAC1D,YAAI,CAAC,OAAO,OAAQ,QAAO;AAC3B,YAAI,OAAO,WAAW,EAAG,QAAO,aAAa,KAAK,CAAC,GAAG,CAAC;AACvD,cAAMA,SAAQ,KAAK,CAAC,KAAK,CAAA;AACzB,cAAM,QAAQ,SAASA,QAAO,QAAQ,IAAI,CAAC,EAAE;AAC7C,eAAO;AAAA,UACL,IAAI,OAAOA,OAAM,EAAE,KAAK;AAAA,UACxB;AAAA,UACA,OAAO,OAAO,OAAO,CAAC,KAAK,MAAM,MAAM,EAAE,OAAO,CAAC;AAAA,UACjD;AAAA,QAAA;AAAA,MAEJ,CAAC,EACA,OAAO,CAAC,SAA6B,QAAQ,IAAI;AAAA,IACtD;AAEA,UAAM,QAAQ,MAAM,CAAC;AACrB,QAAI,MAAM,QAAQ,MAAM,MAAM,EAAG,QAAO,UAAU,KAAqB;AACvE,WAAQ,MACL,IAAI,CAAC,KAAK,MAAM,aAAa,KAAK,CAAC,CAAC,EACpC,OAAO,CAAC,SAA6B,QAAQ,IAAI;AAAA,EACtD;AAEA,OAAI,WAAM,UAAN,mBAAa,OAAQ,QAAO,UAAU,MAAM,KAAK;AAErD,OAAI,WAAM,WAAN,mBAAc,QAAQ;AACxB,WAAQ,MAAM,OACX,IAAI,CAAC,KAAK,MAAM,aAAa,KAAK,CAAC,CAAC,EACpC,OAAO,CAAC,SAA6B,QAAQ,IAAI;AAAA,EACtD;AAEA,SAAO,CAAA;AACT;"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** One wedge of a breakdown donut (FuseDash passes these as the group's rows). */
|
|
2
|
-
export interface DonutSlice {
|
|
3
|
-
label: string;
|
|
4
|
-
value: number;
|
|
5
|
-
/** Optional slice color; falls back to the styleId palette */
|
|
6
|
-
color?: string;
|
|
7
|
-
}
|
|
8
|
-
/** FuseDash `status` — drives the badge colors under the value. */
|
|
9
|
-
export type DonutStatus = 'positive' | 'negative' | 'neutral';
|
|
10
|
-
/**
|
|
11
|
-
* One donut in the group. With no `slices` it renders as a gauge: the value arc
|
|
12
|
-
* over a neutral track that runs to `max` (FuseDash `maximalValue`).
|
|
13
|
-
*/
|
|
14
|
-
export interface DonutGauge {
|
|
15
|
-
/** Stable id for tooltip / hover payloads */
|
|
16
|
-
id: string;
|
|
17
|
-
/** Caption under the value (FuseDash `groupBy` value) */
|
|
18
|
-
label: string;
|
|
19
|
-
/** The measured value (FuseDash `display`) */
|
|
20
|
-
value: number;
|
|
21
|
-
/** Gauge full scale — FuseDash `maximalValue`, defaults to 100 */
|
|
22
|
-
max?: number;
|
|
23
|
-
/** Text of the badge between value and label (FuseDash `statusLabel`) */
|
|
24
|
-
statusLabel?: string;
|
|
25
|
-
status?: DonutStatus;
|
|
26
|
-
/** Optional arc color; falls back to the styleId palette */
|
|
27
|
-
color?: string;
|
|
28
|
-
/** More than one slice renders a breakdown donut instead of a gauge */
|
|
29
|
-
slices?: DonutSlice[];
|
|
30
|
-
}
|
|
31
|
-
export interface DonutGroupChartData {
|
|
32
|
-
/** The donuts to draw, left to right */
|
|
33
|
-
items?: DonutGauge[];
|
|
34
|
-
/** Chat shorthand — one gauge per point, same shape as the other charts */
|
|
35
|
-
points?: {
|
|
36
|
-
x: string;
|
|
37
|
-
y: number;
|
|
38
|
-
}[];
|
|
39
|
-
}
|
|
40
|
-
/** One hovered arc, handed to the element so it can render the tooltip. */
|
|
41
|
-
export interface DonutHoverEntry {
|
|
42
|
-
itemId: string;
|
|
43
|
-
label: string;
|
|
44
|
-
color: string;
|
|
45
|
-
value: number;
|
|
46
|
-
/** Share of the donut this arc covers, 0–1 */
|
|
47
|
-
ratio: number;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-group-chart/lib/types.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,mEAAmE;AACnE,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACrC;AAED,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"id": "donut-group-chart",
|
|
3
|
-
"tag": "ui9000-donut-group-chart",
|
|
4
|
-
"title": "Donut Group Chart",
|
|
5
|
-
"description": "Chat-optimized donut group rewritten in D3 (Visx → D3). A row of KPI donuts: each entry is a gauge filled to value / max over a neutral track, or a breakdown donut when the entry carries several slices. No Redux.",
|
|
6
|
-
"chartTypeKeys": ["donutGroupChart"],
|
|
7
|
-
"chartTypeMap": {
|
|
8
|
-
"donutGroupChart": { "showValue": true, "showStatus": true, "showLabel": true }
|
|
9
|
-
},
|
|
10
|
-
"source": "client/libs/shared/components/src/Widgets/DonutGroupChart/",
|
|
11
|
-
"stack": "d3",
|
|
12
|
-
"lazyImport": "@ui9000/widgets/lazy/donut-group-chart",
|
|
13
|
-
"entry": "@ui9000/widgets/donut-group-chart",
|
|
14
|
-
"usageConditions": {
|
|
15
|
-
"host": "mcp-chat",
|
|
16
|
-
"notFor": "fusedash-editor",
|
|
17
|
-
"mapsExcluded": true,
|
|
18
|
-
"context": "theme, scale, styleId and mode come from WidgetContext CSS custom properties, not props"
|
|
19
|
-
},
|
|
20
|
-
"allowedActions": ["hover", "resize"],
|
|
21
|
-
"propsSchema": {
|
|
22
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
-
"type": "object",
|
|
24
|
-
"properties": {
|
|
25
|
-
"data": {
|
|
26
|
-
"oneOf": [
|
|
27
|
-
{
|
|
28
|
-
"type": "array",
|
|
29
|
-
"items": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"required": ["label", "value"],
|
|
32
|
-
"properties": {
|
|
33
|
-
"label": { "type": "string" },
|
|
34
|
-
"value": { "type": "number" }
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"type": "array",
|
|
40
|
-
"items": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"required": ["label", "value"],
|
|
43
|
-
"properties": {
|
|
44
|
-
"id": { "type": "string" },
|
|
45
|
-
"label": { "type": "string" },
|
|
46
|
-
"value": { "type": "number" },
|
|
47
|
-
"max": {
|
|
48
|
-
"type": "number",
|
|
49
|
-
"description": "FuseDash `maximalValue` — the gauge's full scale."
|
|
50
|
-
},
|
|
51
|
-
"statusLabel": { "type": "string" },
|
|
52
|
-
"status": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"enum": ["positive", "negative", "neutral"]
|
|
55
|
-
},
|
|
56
|
-
"color": { "type": "string" },
|
|
57
|
-
"slices": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"description": "More than one slice renders a breakdown donut instead of a gauge.",
|
|
60
|
-
"items": {
|
|
61
|
-
"type": "object",
|
|
62
|
-
"required": ["label", "value"],
|
|
63
|
-
"properties": {
|
|
64
|
-
"label": { "type": "string" },
|
|
65
|
-
"value": { "type": "number" },
|
|
66
|
-
"color": { "type": "string" }
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "object",
|
|
75
|
-
"properties": {
|
|
76
|
-
"items": { "type": "array", "items": { "type": "object" } },
|
|
77
|
-
"points": {
|
|
78
|
-
"type": "array",
|
|
79
|
-
"items": {
|
|
80
|
-
"type": "object",
|
|
81
|
-
"required": ["x", "y"],
|
|
82
|
-
"properties": {
|
|
83
|
-
"x": { "type": "string" },
|
|
84
|
-
"y": { "type": "number" }
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"scale": {
|
|
93
|
-
"type": "string",
|
|
94
|
-
"enum": ["compact", "default", "comfortable"],
|
|
95
|
-
"default": "default"
|
|
96
|
-
},
|
|
97
|
-
"max": {
|
|
98
|
-
"type": "number",
|
|
99
|
-
"default": 100,
|
|
100
|
-
"description": "Gauge full scale for entries without their own `max`."
|
|
101
|
-
},
|
|
102
|
-
"showValue": { "type": "boolean", "default": true },
|
|
103
|
-
"showStatus": { "type": "boolean", "default": true },
|
|
104
|
-
"showLabel": { "type": "boolean", "default": true },
|
|
105
|
-
"showLegend": { "type": "boolean", "default": true },
|
|
106
|
-
"showTooltip": { "type": "boolean", "default": true }
|
|
107
|
-
},
|
|
108
|
-
"required": ["data"]
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
;
|
|
112
|
-
|
|
113
|
-
export default _default;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const id = "donut-group-chart";
|
|
2
|
-
const tag = "ui9000-donut-group-chart";
|
|
3
|
-
const title = "Donut Group Chart";
|
|
4
|
-
const description = "Chat-optimized donut group rewritten in D3 (Visx → D3). A row of KPI donuts: each entry is a gauge filled to value / max over a neutral track, or a breakdown donut when the entry carries several slices. No Redux.";
|
|
5
|
-
const chartTypeKeys = ["donutGroupChart"];
|
|
6
|
-
const chartTypeMap = { "donutGroupChart": { "showValue": true, "showStatus": true, "showLabel": true } };
|
|
7
|
-
const source = "client/libs/shared/components/src/Widgets/DonutGroupChart/";
|
|
8
|
-
const stack = "d3";
|
|
9
|
-
const lazyImport = "@ui9000/widgets/lazy/donut-group-chart";
|
|
10
|
-
const entry = "@ui9000/widgets/donut-group-chart";
|
|
11
|
-
const usageConditions = { "host": "mcp-chat", "notFor": "fusedash-editor", "mapsExcluded": true, "context": "theme, scale, styleId and mode come from WidgetContext CSS custom properties, not props" };
|
|
12
|
-
const allowedActions = ["hover", "resize"];
|
|
13
|
-
const propsSchema = { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "data": { "oneOf": [{ "type": "array", "items": { "type": "object", "required": ["label", "value"], "properties": { "label": { "type": "string" }, "value": { "type": "number" } } } }, { "type": "array", "items": { "type": "object", "required": ["label", "value"], "properties": { "id": { "type": "string" }, "label": { "type": "string" }, "value": { "type": "number" }, "max": { "type": "number", "description": "FuseDash `maximalValue` — the gauge's full scale." }, "statusLabel": { "type": "string" }, "status": { "type": "string", "enum": ["positive", "negative", "neutral"] }, "color": { "type": "string" }, "slices": { "type": "array", "description": "More than one slice renders a breakdown donut instead of a gauge.", "items": { "type": "object", "required": ["label", "value"], "properties": { "label": { "type": "string" }, "value": { "type": "number" }, "color": { "type": "string" } } } } } } }, { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object" } }, "points": { "type": "array", "items": { "type": "object", "required": ["x", "y"], "properties": { "x": { "type": "string" }, "y": { "type": "number" } } } } } }] }, "scale": { "type": "string", "enum": ["compact", "default", "comfortable"], "default": "default" }, "max": { "type": "number", "default": 100, "description": "Gauge full scale for entries without their own `max`." }, "showValue": { "type": "boolean", "default": true }, "showStatus": { "type": "boolean", "default": true }, "showLabel": { "type": "boolean", "default": true }, "showLegend": { "type": "boolean", "default": true }, "showTooltip": { "type": "boolean", "default": true } }, "required": ["data"] };
|
|
14
|
-
const donutGroupMeta = {
|
|
15
|
-
id,
|
|
16
|
-
tag,
|
|
17
|
-
title,
|
|
18
|
-
description,
|
|
19
|
-
chartTypeKeys,
|
|
20
|
-
chartTypeMap,
|
|
21
|
-
source,
|
|
22
|
-
stack,
|
|
23
|
-
lazyImport,
|
|
24
|
-
entry,
|
|
25
|
-
usageConditions,
|
|
26
|
-
allowedActions,
|
|
27
|
-
propsSchema
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
allowedActions,
|
|
31
|
-
chartTypeKeys,
|
|
32
|
-
chartTypeMap,
|
|
33
|
-
donutGroupMeta as default,
|
|
34
|
-
description,
|
|
35
|
-
entry,
|
|
36
|
-
id,
|
|
37
|
-
lazyImport,
|
|
38
|
-
propsSchema,
|
|
39
|
-
source,
|
|
40
|
-
stack,
|
|
41
|
-
tag,
|
|
42
|
-
title,
|
|
43
|
-
usageConditions
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=metadata.json.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { WidgetTheme } from '../../../types/index.js';
|
|
2
|
-
import { DonutGauge, DonutHoverEntry } from '../lib/index.js';
|
|
3
|
-
export interface RenderDonutGroupChartOptions {
|
|
4
|
-
items: DonutGauge[];
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
/** FuseDash DonutGroupChart frame when omitted by the host */
|
|
8
|
-
margin?: {
|
|
9
|
-
top: number;
|
|
10
|
-
right: number;
|
|
11
|
-
bottom: number;
|
|
12
|
-
left: number;
|
|
13
|
-
};
|
|
14
|
-
theme: WidgetTheme;
|
|
15
|
-
themeMode?: 'light' | 'dark';
|
|
16
|
-
/** FuseDash page setting — picks the qualitative palette */
|
|
17
|
-
styleId?: string;
|
|
18
|
-
/** Value in the hole (FuseDash `display`) */
|
|
19
|
-
showValue?: boolean;
|
|
20
|
-
/** Badge under the value (FuseDash `statusLabel`) */
|
|
21
|
-
showStatus?: boolean;
|
|
22
|
-
/** Caption under the badge (FuseDash `groupBy` value) */
|
|
23
|
-
showLabel?: boolean;
|
|
24
|
-
/** Slice legend — breakdown donuts only */
|
|
25
|
-
showLegend?: boolean;
|
|
26
|
-
showTooltip?: boolean;
|
|
27
|
-
/** Gauge full scale for rows without their own `max` */
|
|
28
|
-
defaultMax?: number;
|
|
29
|
-
onHover?: (payload: {
|
|
30
|
-
title: string;
|
|
31
|
-
entries: DonutHoverEntry[];
|
|
32
|
-
event: MouseEvent;
|
|
33
|
-
}) => void;
|
|
34
|
-
onLeave?: () => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* FuseDash DonutGroupChart — D3 rewrite of the Visx `DonutGroupItem` row.
|
|
38
|
-
*
|
|
39
|
-
* Each entry is a ring with a KPI block in its hole: a gauge filled to
|
|
40
|
-
* `value / max` over a neutral track, or a breakdown donut when the entry
|
|
41
|
-
* carries more than one slice.
|
|
42
|
-
*/
|
|
43
|
-
export declare function renderDonutGroupChart(container: HTMLElement, options: RenderDonutGroupChartOptions): void;
|
|
44
|
-
//# sourceMappingURL=draw.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../../../src/components/donut-group-chart/render/draw.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAQL,KAAK,UAAU,EACf,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,eAAe,EAAE,CAAC;QAC3B,KAAK,EAAE,UAAU,CAAC;KACnB,KAAK,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAoCD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,4BAA4B,GACpC,IAAI,CA+MN"}
|