@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/gini-impurity-entropy-chart/element/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,8BAA8B,yBAkE1C,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
const
|
|
2
|
+
const giniImpurityEntropyChartStyles = css`
|
|
3
3
|
:host {
|
|
4
4
|
display: block;
|
|
5
5
|
position: relative;
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
|
-
min-height:
|
|
8
|
+
min-height: 220px;
|
|
9
9
|
color: var(--ui9000-color-text, #111827);
|
|
10
10
|
font-family: var(--ui9000-font-family, system-ui, sans-serif);
|
|
11
11
|
box-sizing: border-box;
|
|
12
12
|
}
|
|
13
13
|
.chart-root {
|
|
14
|
+
flex: 1;
|
|
15
|
+
min-height: 0;
|
|
14
16
|
width: 100%;
|
|
15
17
|
height: 100%;
|
|
16
18
|
min-height: inherit;
|
|
@@ -26,10 +28,10 @@ const donutGroupChartStyles = css`
|
|
|
26
28
|
background: var(--ui9000-color-text, #111827);
|
|
27
29
|
color: #fff;
|
|
28
30
|
box-shadow: 0 4px 12px rgb(0 0 0 / 18%);
|
|
29
|
-
transform: translate(-50%, calc(-100% -
|
|
31
|
+
transform: translate(-50%, calc(-100% - 10px));
|
|
30
32
|
white-space: nowrap;
|
|
31
33
|
}
|
|
32
|
-
.tooltip .
|
|
34
|
+
.tooltip .name {
|
|
33
35
|
font-weight: 600;
|
|
34
36
|
margin-bottom: 2px;
|
|
35
37
|
}
|
|
@@ -38,19 +40,23 @@ const donutGroupChartStyles = css`
|
|
|
38
40
|
align-items: center;
|
|
39
41
|
gap: 6px;
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
/** Mirrors the plot: the curve under the cursor reads full strength. */
|
|
44
|
+
.tooltip .row.dimmed {
|
|
45
|
+
opacity: 0.55;
|
|
46
|
+
}
|
|
47
|
+
.tooltip .row.active {
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
}
|
|
50
|
+
.tooltip .dot {
|
|
42
51
|
width: 8px;
|
|
43
52
|
height: 8px;
|
|
44
|
-
border-radius:
|
|
45
|
-
flex:
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
flex-shrink: 0;
|
|
46
55
|
}
|
|
47
56
|
.tooltip .value {
|
|
48
57
|
margin-left: auto;
|
|
49
58
|
font-variant-numeric: tabular-nums;
|
|
50
59
|
}
|
|
51
|
-
.tooltip .share {
|
|
52
|
-
opacity: 0.75;
|
|
53
|
-
}
|
|
54
60
|
.empty {
|
|
55
61
|
display: grid;
|
|
56
62
|
place-items: center;
|
|
@@ -61,6 +67,6 @@ const donutGroupChartStyles = css`
|
|
|
61
67
|
}
|
|
62
68
|
`;
|
|
63
69
|
export {
|
|
64
|
-
|
|
70
|
+
giniImpurityEntropyChartStyles
|
|
65
71
|
};
|
|
66
72
|
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/gini-impurity-entropy-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const giniImpurityEntropyChartStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1;\n min-height: 0;\n width: 100%;\n height: 100%;\n min-height: inherit;\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n margin-bottom: 2px;\n }\n .tooltip .row {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n /** Mirrors the plot: the curve under the cursor reads full strength. */\n .tooltip .row.dimmed {\n opacity: 0.55;\n }\n .tooltip .row.active {\n font-weight: 600;\n }\n .tooltip .dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n flex-shrink: 0;\n }\n .tooltip .value {\n margin-left: auto;\n font-variant-numeric: tabular-nums;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,iCAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/dist/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { Ui9000ChartElement } from '../../../element/ui9000-chart-base.js';
|
|
3
|
+
export declare class Ui9000GiniImpurityEntropyChart extends Ui9000ChartElement {
|
|
4
|
+
static styles: import('lit').CSSResult[];
|
|
5
|
+
showGrid: boolean;
|
|
6
|
+
showLegend: boolean;
|
|
7
|
+
showTooltip: boolean;
|
|
8
|
+
/** Client `showPHat` — vertical guide at the observed class proportion. */
|
|
9
|
+
showPHat: boolean;
|
|
10
|
+
/** Client `showCI` — shaded confidence band around `pHat`. */
|
|
11
|
+
showCI: boolean;
|
|
12
|
+
/** Client `showSplit` — child markers plus their ΔGini. */
|
|
13
|
+
showSplit: boolean;
|
|
14
|
+
private _tooltip;
|
|
15
|
+
private _empty;
|
|
16
|
+
private _resizeObserver?;
|
|
17
|
+
private _raf;
|
|
18
|
+
/** Tooltip state re-renders on every mousemove — never re-parse the payload. */
|
|
19
|
+
private _model?;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
disconnectedCallback(): void;
|
|
22
|
+
updated(changed: PropertyValues): void;
|
|
23
|
+
private scheduleDraw;
|
|
24
|
+
private parseModel;
|
|
25
|
+
private renderLegend;
|
|
26
|
+
private draw;
|
|
27
|
+
private renderTooltip;
|
|
28
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'ui9000-gini-impurity-entropy-chart': Ui9000GiniImpurityEntropyChart;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export declare function registerGiniImpurityEntropyChart(): void;
|
|
36
|
+
//# sourceMappingURL=ui9000-gini-impurity-entropy-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui9000-gini-impurity-entropy-chart.d.ts","sourceRoot":"","sources":["../../../../src/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKzD,OAAO,EAEL,kBAAkB,EACnB,MAAM,uCAAuC,CAAC;AA0B/C,qBACa,8BAA+B,SAAQ,kBAAkB;IACpE,OAAgB,MAAM,4BAAsD;IAG5E,QAAQ,UAAQ;IAGhB,UAAU,UAAQ;IAGlB,WAAW,UAAQ;IAEnB,2EAA2E;IAE3E,QAAQ,UAAS;IAEjB,8DAA8D;IAE9D,MAAM,UAAS;IAEf,2DAA2D;IAE3D,SAAS,UAAS;IAGlB,OAAO,CAAC,QAAQ,CAMA;IAGhB,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,OAAO,CAAC,IAAI,CAAK;IACjB,gFAAgF;IAChF,OAAO,CAAC,MAAM,CAAC,CAAmD;IAEzD,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAM5B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAI/C,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,IAAI;IA2CZ,OAAO,CAAC,aAAa;IAiBZ,MAAM;CAiBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oCAAoC,EAAE,8BAA8B,CAAC;KACtE;CACF;AAED,wBAAgB,gCAAgC,IAAI,IAAI,CAOvD"}
|
package/dist/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.js
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { nothing, html } from "lit";
|
|
2
|
+
import { property, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import { readThemeFromElement } from "../../../context/widget-context.js";
|
|
4
|
+
import { renderChartLegend } from "../../../element/chart-legend-render.js";
|
|
5
|
+
import { Ui9000ChartElement } from "../../../element/ui9000-chart-base.js";
|
|
6
|
+
import { parseJsonAttr, getGiniImpurityEntropyDimensions } from "../../../utils/chart-helpers.js";
|
|
7
|
+
import { chartPropsChanged } from "../../../utils/lit-draw.js";
|
|
8
|
+
import { renderGiniImpurityEntropyChart } from "../render/draw.js";
|
|
9
|
+
import { giniImpurityEntropyChartStyles } from "./styles.js";
|
|
10
|
+
import { normalizeGiniImpurityEntropyData } from "../lib/normalize.js";
|
|
11
|
+
import { formatProbability, formatImpurityValue } from "../lib/format.js";
|
|
12
|
+
import { chartShellStyles } from "../../../element/chart-shell-styles.js";
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
16
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
17
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
18
|
+
if (decorator = decorators[i])
|
|
19
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
20
|
+
if (kind && result) __defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
let Ui9000GiniImpurityEntropyChart = class extends Ui9000ChartElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.showGrid = true;
|
|
27
|
+
this.showLegend = true;
|
|
28
|
+
this.showTooltip = true;
|
|
29
|
+
this.showPHat = false;
|
|
30
|
+
this.showCI = false;
|
|
31
|
+
this.showSplit = false;
|
|
32
|
+
this._tooltip = null;
|
|
33
|
+
this._empty = false;
|
|
34
|
+
this._raf = 0;
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
this._resizeObserver = new ResizeObserver(() => this.scheduleDraw());
|
|
39
|
+
this._resizeObserver.observe(this);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
var _a;
|
|
43
|
+
(_a = this._resizeObserver) == null ? void 0 : _a.disconnect();
|
|
44
|
+
cancelAnimationFrame(this._raf);
|
|
45
|
+
super.disconnectedCallback();
|
|
46
|
+
}
|
|
47
|
+
updated(changed) {
|
|
48
|
+
if (chartPropsChanged(changed)) this.scheduleDraw();
|
|
49
|
+
}
|
|
50
|
+
scheduleDraw() {
|
|
51
|
+
cancelAnimationFrame(this._raf);
|
|
52
|
+
this._raf = requestAnimationFrame(() => this.draw());
|
|
53
|
+
}
|
|
54
|
+
parseModel() {
|
|
55
|
+
var _a;
|
|
56
|
+
const key = `${this.showPHat}|${this.showCI}|${this.showSplit}|${this.dataJson}`;
|
|
57
|
+
if (((_a = this._model) == null ? void 0 : _a.key) === key) return this._model.value;
|
|
58
|
+
const raw = parseJsonAttr(this.dataJson, null);
|
|
59
|
+
const value = normalizeGiniImpurityEntropyData(raw, {
|
|
60
|
+
// Only pass a flag on when set, so the widget `meta` stays in charge.
|
|
61
|
+
showPHat: this.showPHat || void 0,
|
|
62
|
+
showCI: this.showCI || void 0,
|
|
63
|
+
showSplit: this.showSplit || void 0
|
|
64
|
+
});
|
|
65
|
+
this._model = { key, value };
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
renderLegend(model) {
|
|
69
|
+
if (!this.showLegend || !model.series.length) return nothing;
|
|
70
|
+
return renderChartLegend(
|
|
71
|
+
model.series.map((s) => ({
|
|
72
|
+
label: s.name,
|
|
73
|
+
swatch: s.dash ? { kind: "dashed-line", color: s.color } : { kind: "line", color: s.color }
|
|
74
|
+
}))
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
draw() {
|
|
78
|
+
var _a;
|
|
79
|
+
const root = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
80
|
+
".chart-root"
|
|
81
|
+
);
|
|
82
|
+
if (!root) return;
|
|
83
|
+
const model = this.parseModel();
|
|
84
|
+
this._empty = model.series.length === 0;
|
|
85
|
+
if (this._empty) {
|
|
86
|
+
root.replaceChildren();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const { width, height, margin } = getGiniImpurityEntropyDimensions(root);
|
|
90
|
+
renderGiniImpurityEntropyChart(root, {
|
|
91
|
+
model,
|
|
92
|
+
width,
|
|
93
|
+
height,
|
|
94
|
+
margin,
|
|
95
|
+
theme: readThemeFromElement(this),
|
|
96
|
+
showGrid: this.showGrid,
|
|
97
|
+
...this.axisLabelHandlers(),
|
|
98
|
+
onHover: this.showTooltip ? ({ p, entries, activeSeriesId, event }) => {
|
|
99
|
+
const rect = this.getBoundingClientRect();
|
|
100
|
+
this._tooltip = {
|
|
101
|
+
x: event.clientX - rect.left,
|
|
102
|
+
y: event.clientY - rect.top,
|
|
103
|
+
p,
|
|
104
|
+
entries,
|
|
105
|
+
activeSeriesId
|
|
106
|
+
};
|
|
107
|
+
} : void 0,
|
|
108
|
+
onLeave: this.showTooltip ? () => {
|
|
109
|
+
this._tooltip = null;
|
|
110
|
+
} : void 0
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
renderTooltip() {
|
|
114
|
+
if (!this._tooltip) return nothing;
|
|
115
|
+
const { x, y, p, entries, activeSeriesId } = this._tooltip;
|
|
116
|
+
return html`<div class="tooltip" part="tooltip" style="left:${x}px;top:${y}px">
|
|
117
|
+
<div class="name">p = ${formatProbability(p)}</div>
|
|
118
|
+
${entries.map(
|
|
119
|
+
(entry) => html`<div
|
|
120
|
+
class="row ${entry.seriesId === activeSeriesId ? "active" : "dimmed"}"
|
|
121
|
+
>
|
|
122
|
+
<span class="dot" style="background:${entry.color}"></span>
|
|
123
|
+
<span>${entry.seriesName}</span>
|
|
124
|
+
<span class="value">${formatImpurityValue(entry.value)}</span>
|
|
125
|
+
</div>`
|
|
126
|
+
)}
|
|
127
|
+
</div>`;
|
|
128
|
+
}
|
|
129
|
+
render() {
|
|
130
|
+
const title = this.headerTitle();
|
|
131
|
+
const model = this.parseModel();
|
|
132
|
+
return html`
|
|
133
|
+
<div class="widget-shell" part="shell">
|
|
134
|
+
${this.renderShellHeader(title)}
|
|
135
|
+
<div class="widget-body">
|
|
136
|
+
${this.renderLegend(model)}
|
|
137
|
+
<div class="chart-root" part="chart" ?hidden=${this._empty}></div>
|
|
138
|
+
${this._empty ? html`<div class="empty" part="empty">No data</div>` : nothing}
|
|
139
|
+
${this.renderTooltip()} ${this.renderShellLabelTooltip()}
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
Ui9000GiniImpurityEntropyChart.styles = [giniImpurityEntropyChartStyles, chartShellStyles];
|
|
146
|
+
__decorateClass([
|
|
147
|
+
property({ type: Boolean, attribute: "show-grid" })
|
|
148
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "showGrid", 2);
|
|
149
|
+
__decorateClass([
|
|
150
|
+
property({ type: Boolean, attribute: "show-legend" })
|
|
151
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "showLegend", 2);
|
|
152
|
+
__decorateClass([
|
|
153
|
+
property({ type: Boolean, attribute: "show-tooltip" })
|
|
154
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "showTooltip", 2);
|
|
155
|
+
__decorateClass([
|
|
156
|
+
property({ type: Boolean, attribute: "show-p-hat" })
|
|
157
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "showPHat", 2);
|
|
158
|
+
__decorateClass([
|
|
159
|
+
property({ type: Boolean, attribute: "show-ci" })
|
|
160
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "showCI", 2);
|
|
161
|
+
__decorateClass([
|
|
162
|
+
property({ type: Boolean, attribute: "show-split" })
|
|
163
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "showSplit", 2);
|
|
164
|
+
__decorateClass([
|
|
165
|
+
state()
|
|
166
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "_tooltip", 2);
|
|
167
|
+
__decorateClass([
|
|
168
|
+
state()
|
|
169
|
+
], Ui9000GiniImpurityEntropyChart.prototype, "_empty", 2);
|
|
170
|
+
Ui9000GiniImpurityEntropyChart = __decorateClass([
|
|
171
|
+
customElement("ui9000-gini-impurity-entropy-chart")
|
|
172
|
+
], Ui9000GiniImpurityEntropyChart);
|
|
173
|
+
function registerGiniImpurityEntropyChart() {
|
|
174
|
+
if (!customElements.get("ui9000-gini-impurity-entropy-chart")) {
|
|
175
|
+
customElements.define(
|
|
176
|
+
"ui9000-gini-impurity-entropy-chart",
|
|
177
|
+
Ui9000GiniImpurityEntropyChart
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
registerGiniImpurityEntropyChart();
|
|
182
|
+
export {
|
|
183
|
+
Ui9000GiniImpurityEntropyChart,
|
|
184
|
+
registerGiniImpurityEntropyChart
|
|
185
|
+
};
|
|
186
|
+
//# sourceMappingURL=ui9000-gini-impurity-entropy-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui9000-gini-impurity-entropy-chart.js","sources":["../../../../src/components/gini-impurity-entropy-chart/element/ui9000-gini-impurity-entropy-chart.ts"],"sourcesContent":["import { html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { readThemeFromElement } from '../../../context/widget-context.js';\nimport { renderChartLegend } from '../../../element/chart-legend-render.js';\nimport {\n chartShellStyles,\n Ui9000ChartElement,\n} from '../../../element/ui9000-chart-base.js';\nimport type { DataPoint } from '../../../types/index.js';\nimport {\n getGiniImpurityEntropyDimensions,\n parseJsonAttr,\n} from '../../../utils/chart-helpers.js';\nimport { chartPropsChanged } from '../../../utils/lit-draw.js';\nimport {\n formatImpurityValue,\n formatProbability,\n normalizeGiniImpurityEntropyData,\n type GiniImpurityEntropyChartData,\n type GiniImpurityEntropyFusePayload,\n type GiniImpurityEntropyModel,\n} from '../lib/index.js';\nimport {\n renderGiniImpurityEntropyChart,\n type GiniHoverEntry,\n} from '../render/draw.js';\nimport { giniImpurityEntropyChartStyles } from './styles.js';\n\ntype GiniPayload =\n | DataPoint[]\n | GiniImpurityEntropyChartData\n | GiniImpurityEntropyFusePayload;\n\n@customElement('ui9000-gini-impurity-entropy-chart')\nexport class Ui9000GiniImpurityEntropyChart extends Ui9000ChartElement {\n static override styles = [giniImpurityEntropyChartStyles, chartShellStyles];\n\n @property({ type: Boolean, attribute: 'show-grid' })\n showGrid = true;\n\n @property({ type: Boolean, attribute: 'show-legend' })\n showLegend = true;\n\n @property({ type: Boolean, attribute: 'show-tooltip' })\n showTooltip = true;\n\n /** Client `showPHat` — vertical guide at the observed class proportion. */\n @property({ type: Boolean, attribute: 'show-p-hat' })\n showPHat = false;\n\n /** Client `showCI` — shaded confidence band around `pHat`. */\n @property({ type: Boolean, attribute: 'show-ci' })\n showCI = false;\n\n /** Client `showSplit` — child markers plus their ΔGini. */\n @property({ type: Boolean, attribute: 'show-split' })\n showSplit = false;\n\n @state()\n private _tooltip: {\n x: number;\n y: number;\n p: number;\n entries: GiniHoverEntry[];\n activeSeriesId: string | null;\n } | null = null;\n\n @state()\n private _empty = false;\n\n private _resizeObserver?: ResizeObserver;\n private _raf = 0;\n /** Tooltip state re-renders on every mousemove — never re-parse the payload. */\n private _model?: { key: string; value: GiniImpurityEntropyModel };\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._resizeObserver = new ResizeObserver(() => this.scheduleDraw());\n this._resizeObserver.observe(this);\n }\n\n override disconnectedCallback(): void {\n this._resizeObserver?.disconnect();\n cancelAnimationFrame(this._raf);\n super.disconnectedCallback();\n }\n\n override updated(changed: PropertyValues): void {\n if (chartPropsChanged(changed)) this.scheduleDraw();\n }\n\n private scheduleDraw(): void {\n cancelAnimationFrame(this._raf);\n this._raf = requestAnimationFrame(() => this.draw());\n }\n\n private parseModel(): GiniImpurityEntropyModel {\n const key = `${this.showPHat}|${this.showCI}|${this.showSplit}|${this.dataJson}`;\n if (this._model?.key === key) return this._model.value;\n\n const raw = parseJsonAttr<GiniPayload | null>(this.dataJson, null);\n const value = normalizeGiniImpurityEntropyData(raw, {\n // Only pass a flag on when set, so the widget `meta` stays in charge.\n showPHat: this.showPHat || undefined,\n showCI: this.showCI || undefined,\n showSplit: this.showSplit || undefined,\n });\n this._model = { key, value };\n return value;\n }\n\n private renderLegend(model: GiniImpurityEntropyModel) {\n if (!this.showLegend || !model.series.length) return nothing;\n return renderChartLegend(\n model.series.map((s) => ({\n label: s.name,\n swatch: s.dash\n ? { kind: 'dashed-line' as const, color: s.color }\n : { kind: 'line' as const, color: s.color },\n })),\n );\n }\n\n private draw(): void {\n const root = this.shadowRoot?.querySelector(\n '.chart-root',\n ) as HTMLElement | null;\n if (!root) return;\n\n const model = this.parseModel();\n this._empty = model.series.length === 0;\n if (this._empty) {\n root.replaceChildren();\n return;\n }\n\n const { width, height, margin } = getGiniImpurityEntropyDimensions(root);\n\n renderGiniImpurityEntropyChart(root, {\n model,\n width,\n height,\n margin,\n theme: readThemeFromElement(this),\n showGrid: this.showGrid,\n ...this.axisLabelHandlers(),\n onHover: this.showTooltip\n ? ({ p, entries, activeSeriesId, event }) => {\n const rect = this.getBoundingClientRect();\n this._tooltip = {\n x: event.clientX - rect.left,\n y: event.clientY - rect.top,\n p,\n entries,\n activeSeriesId,\n };\n }\n : undefined,\n onLeave: this.showTooltip\n ? () => {\n this._tooltip = null;\n }\n : undefined,\n });\n }\n\n private renderTooltip() {\n if (!this._tooltip) return nothing;\n const { x, y, p, entries, activeSeriesId } = this._tooltip;\n return html`<div class=\"tooltip\" part=\"tooltip\" style=\"left:${x}px;top:${y}px\">\n <div class=\"name\">p = ${formatProbability(p)}</div>\n ${entries.map(\n (entry) => html`<div\n class=\"row ${entry.seriesId === activeSeriesId ? 'active' : 'dimmed'}\"\n >\n <span class=\"dot\" style=\"background:${entry.color}\"></span>\n <span>${entry.seriesName}</span>\n <span class=\"value\">${formatImpurityValue(entry.value)}</span>\n </div>`,\n )}\n </div>`;\n }\n\n override render() {\n const title = this.headerTitle();\n const model = this.parseModel();\n return html`\n <div class=\"widget-shell\" part=\"shell\">\n ${this.renderShellHeader(title)}\n <div class=\"widget-body\">\n ${this.renderLegend(model)}\n <div class=\"chart-root\" part=\"chart\" ?hidden=${this._empty}></div>\n ${this._empty\n ? html`<div class=\"empty\" part=\"empty\">No data</div>`\n : nothing}\n ${this.renderTooltip()} ${this.renderShellLabelTooltip()}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ui9000-gini-impurity-entropy-chart': Ui9000GiniImpurityEntropyChart;\n }\n}\n\nexport function registerGiniImpurityEntropyChart(): void {\n if (!customElements.get('ui9000-gini-impurity-entropy-chart')) {\n customElements.define(\n 'ui9000-gini-impurity-entropy-chart',\n Ui9000GiniImpurityEntropyChart,\n );\n }\n}\n\nregisterGiniImpurityEntropyChart();\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmCO,IAAM,iCAAN,cAA6C,mBAAmB;AAAA,EAAhE,cAAA;AAAA,UAAA,GAAA,SAAA;AAIL,SAAA,WAAW;AAGX,SAAA,aAAa;AAGb,SAAA,cAAc;AAId,SAAA,WAAW;AAIX,SAAA,SAAS;AAIT,SAAA,YAAY;AAGZ,SAAQ,WAMG;AAGX,SAAQ,SAAS;AAGjB,SAAQ,OAAO;AAAA,EAAA;AAAA,EAIN,oBAA0B;AACjC,UAAM,kBAAA;AACN,SAAK,kBAAkB,IAAI,eAAe,MAAM,KAAK,cAAc;AACnE,SAAK,gBAAgB,QAAQ,IAAI;AAAA,EACnC;AAAA,EAES,uBAA6B;;AACpC,eAAK,oBAAL,mBAAsB;AACtB,yBAAqB,KAAK,IAAI;AAC9B,UAAM,qBAAA;AAAA,EACR;AAAA,EAES,QAAQ,SAA+B;AAC9C,QAAI,kBAAkB,OAAO,EAAG,MAAK,aAAA;AAAA,EACvC;AAAA,EAEQ,eAAqB;AAC3B,yBAAqB,KAAK,IAAI;AAC9B,SAAK,OAAO,sBAAsB,MAAM,KAAK,MAAM;AAAA,EACrD;AAAA,EAEQ,aAAuC;;AAC7C,UAAM,MAAM,GAAG,KAAK,QAAQ,IAAI,KAAK,MAAM,IAAI,KAAK,SAAS,IAAI,KAAK,QAAQ;AAC9E,UAAI,UAAK,WAAL,mBAAa,SAAQ,IAAK,QAAO,KAAK,OAAO;AAEjD,UAAM,MAAM,cAAkC,KAAK,UAAU,IAAI;AACjE,UAAM,QAAQ,iCAAiC,KAAK;AAAA;AAAA,MAElD,UAAU,KAAK,YAAY;AAAA,MAC3B,QAAQ,KAAK,UAAU;AAAA,MACvB,WAAW,KAAK,aAAa;AAAA,IAAA,CAC9B;AACD,SAAK,SAAS,EAAE,KAAK,MAAA;AACrB,WAAO;AAAA,EACT;AAAA,EAEQ,aAAa,OAAiC;AACpD,QAAI,CAAC,KAAK,cAAc,CAAC,MAAM,OAAO,OAAQ,QAAO;AACrD,WAAO;AAAA,MACL,MAAM,OAAO,IAAI,CAAC,OAAO;AAAA,QACvB,OAAO,EAAE;AAAA,QACT,QAAQ,EAAE,OACN,EAAE,MAAM,eAAwB,OAAO,EAAE,MAAA,IACzC,EAAE,MAAM,QAAiB,OAAO,EAAE,MAAA;AAAA,MAAM,EAC5C;AAAA,IAAA;AAAA,EAEN;AAAA,EAEQ,OAAa;;AACnB,UAAM,QAAO,UAAK,eAAL,mBAAiB;AAAA,MAC5B;AAAA;AAEF,QAAI,CAAC,KAAM;AAEX,UAAM,QAAQ,KAAK,WAAA;AACnB,SAAK,SAAS,MAAM,OAAO,WAAW;AACtC,QAAI,KAAK,QAAQ;AACf,WAAK,gBAAA;AACL;AAAA,IACF;AAEA,UAAM,EAAE,OAAO,QAAQ,OAAA,IAAW,iCAAiC,IAAI;AAEvE,mCAA+B,MAAM;AAAA,MACnC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,qBAAqB,IAAI;AAAA,MAChC,UAAU,KAAK;AAAA,MACf,GAAG,KAAK,kBAAA;AAAA,MACR,SAAS,KAAK,cACV,CAAC,EAAE,GAAG,SAAS,gBAAgB,YAAY;AACzC,cAAM,OAAO,KAAK,sBAAA;AAClB,aAAK,WAAW;AAAA,UACd,GAAG,MAAM,UAAU,KAAK;AAAA,UACxB,GAAG,MAAM,UAAU,KAAK;AAAA,UACxB;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MAEJ,IACA;AAAA,MACJ,SAAS,KAAK,cACV,MAAM;AACJ,aAAK,WAAW;AAAA,MAClB,IACA;AAAA,IAAA,CACL;AAAA,EACH;AAAA,EAEQ,gBAAgB;AACtB,QAAI,CAAC,KAAK,SAAU,QAAO;AAC3B,UAAM,EAAE,GAAG,GAAG,GAAG,SAAS,eAAA,IAAmB,KAAK;AAClD,WAAO,uDAAuD,CAAC,UAAU,CAAC;AAAA,8BAChD,kBAAkB,CAAC,CAAC;AAAA,QAC1C,QAAQ;AAAA,MACR,CAAC,UAAU;AAAA,uBACI,MAAM,aAAa,iBAAiB,WAAW,QAAQ;AAAA;AAAA,gDAE9B,MAAM,KAAK;AAAA,kBACzC,MAAM,UAAU;AAAA,gCACF,oBAAoB,MAAM,KAAK,CAAC;AAAA;AAAA,IAAA,CAEzD;AAAA;AAAA,EAEL;AAAA,EAES,SAAS;AAChB,UAAM,QAAQ,KAAK,YAAA;AACnB,UAAM,QAAQ,KAAK,WAAA;AACnB,WAAO;AAAA;AAAA,UAED,KAAK,kBAAkB,KAAK,CAAC;AAAA;AAAA,YAE3B,KAAK,aAAa,KAAK,CAAC;AAAA,yDACqB,KAAK,MAAM;AAAA,YACxD,KAAK,SACH,sDACA,OAAO;AAAA,YACT,KAAK,cAAA,CAAe,IAAI,KAAK,yBAAyB;AAAA;AAAA;AAAA;AAAA,EAIhE;AACF;AAtKa,+BACK,SAAS,CAAC,gCAAgC,gBAAgB;AAG1E,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,aAAa;AAAA,GAHxC,+BAIX,WAAA,YAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,eAAe;AAAA,GAN1C,+BAOX,WAAA,cAAA,CAAA;AAGA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,gBAAgB;AAAA,GAT3C,+BAUX,WAAA,eAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,cAAc;AAAA,GAbzC,+BAcX,WAAA,YAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,WAAW;AAAA,GAjBtC,+BAkBX,WAAA,UAAA,CAAA;AAIA,gBAAA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,cAAc;AAAA,GArBzC,+BAsBX,WAAA,aAAA,CAAA;AAGQ,gBAAA;AAAA,EADP,MAAA;AAAM,GAxBI,+BAyBH,WAAA,YAAA,CAAA;AASA,gBAAA;AAAA,EADP,MAAA;AAAM,GAjCI,+BAkCH,WAAA,UAAA,CAAA;AAlCG,iCAAN,gBAAA;AAAA,EADN,cAAc,oCAAoC;AAAA,GACtC,8BAAA;AA8KN,SAAS,mCAAyC;AACvD,MAAI,CAAC,eAAe,IAAI,oCAAoC,GAAG;AAC7D,mBAAe;AAAA,MACb;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF;AAEA,iCAAA;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Ui9000GiniImpurityEntropyChart, registerGiniImpurityEntropyChart, } from './element/ui9000-gini-impurity-entropy-chart.js';
|
|
2
|
+
export { renderGiniImpurityEntropyChart, type GiniHoverEntry, type RenderGiniImpurityEntropyChartOptions, } from './render/index.js';
|
|
3
|
+
export { collectPExtent, collectValueExtent, extractSeriesFromData, formatImpurityTick, formatImpurityValue, formatProbability, giniImpurity, nearestPoint, normalizeGiniImpurityEntropyData, resolveOverlays, splitAnnotation, DEFAULT_SERIES_KEYS, DEFAULT_SERIES_STYLE, DEFAULT_Y_LABEL, SERIES_LABELS, type GiniImpurityEntropyChartData, type GiniImpurityEntropyFusePayload, type GiniImpurityEntropyModel, type GiniOverlayFlags, type GiniOverlays, type GiniSeries, type GiniSeriesPoint, type SplitAnnotation, } from './lib/index.js';
|
|
4
|
+
export { default as giniImpurityEntropyChartMetadata } from './metadata.json';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/gini-impurity-entropy-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,GACjC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,8BAA8B,EAC9B,KAAK,cAAc,EACnB,KAAK,qCAAqC,GAC3C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,gCAAgC,EAChC,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { registerGiniImpurityEntropyChart } from "./element/ui9000-gini-impurity-entropy-chart.js";
|
|
2
|
+
import { Ui9000GiniImpurityEntropyChart } from "./element/ui9000-gini-impurity-entropy-chart.js";
|
|
3
|
+
import { default as default2 } from "./metadata.json.js";
|
|
4
|
+
import { DEFAULT_SERIES_KEYS, DEFAULT_SERIES_STYLE, DEFAULT_Y_LABEL, SERIES_LABELS } from "./lib/types.js";
|
|
5
|
+
import { collectPExtent, collectValueExtent } from "./lib/domain.js";
|
|
6
|
+
import { extractSeriesFromData, nearestPoint } from "./lib/series.js";
|
|
7
|
+
import { formatImpurityTick, formatImpurityValue, formatProbability } from "./lib/format.js";
|
|
8
|
+
import { giniImpurity, resolveOverlays, splitAnnotation } from "./lib/overlays.js";
|
|
9
|
+
import { normalizeGiniImpurityEntropyData } from "./lib/normalize.js";
|
|
10
|
+
import { renderGiniImpurityEntropyChart } from "./render/draw.js";
|
|
11
|
+
export {
|
|
12
|
+
DEFAULT_SERIES_KEYS,
|
|
13
|
+
DEFAULT_SERIES_STYLE,
|
|
14
|
+
DEFAULT_Y_LABEL,
|
|
15
|
+
SERIES_LABELS,
|
|
16
|
+
Ui9000GiniImpurityEntropyChart,
|
|
17
|
+
collectPExtent,
|
|
18
|
+
collectValueExtent,
|
|
19
|
+
extractSeriesFromData,
|
|
20
|
+
formatImpurityTick,
|
|
21
|
+
formatImpurityValue,
|
|
22
|
+
formatProbability,
|
|
23
|
+
giniImpurity,
|
|
24
|
+
default2 as giniImpurityEntropyChartMetadata,
|
|
25
|
+
nearestPoint,
|
|
26
|
+
normalizeGiniImpurityEntropyData,
|
|
27
|
+
registerGiniImpurityEntropyChart,
|
|
28
|
+
renderGiniImpurityEntropyChart,
|
|
29
|
+
resolveOverlays,
|
|
30
|
+
splitAnnotation
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GiniSeries } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* X domain from every sampled `p`. The client fits the data rather than
|
|
4
|
+
* assuming [0, 1], so a partial probability sweep still fills the plot.
|
|
5
|
+
*/
|
|
6
|
+
export declare function collectPExtent(series: GiniSeries[]): [number, number];
|
|
7
|
+
/** Y domain from every metric value — not zero-anchored, matching the client. */
|
|
8
|
+
export declare function collectValueExtent(series: GiniSeries[]): [number, number];
|
|
9
|
+
//# sourceMappingURL=domain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../../src/components/gini-impurity-entropy-chart/lib/domain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAmB7C;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAMrE;AAED,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAMzE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const FLAT_DOMAIN_EPSILON = 1e-6;
|
|
2
|
+
function extentOf(values, fallback) {
|
|
3
|
+
let min = Infinity;
|
|
4
|
+
let max = -Infinity;
|
|
5
|
+
for (const v of values) {
|
|
6
|
+
if (!Number.isFinite(v)) continue;
|
|
7
|
+
if (v < min) min = v;
|
|
8
|
+
if (v > max) max = v;
|
|
9
|
+
}
|
|
10
|
+
if (!Number.isFinite(min) || !Number.isFinite(max)) return fallback;
|
|
11
|
+
if (!(max > min)) return [min - FLAT_DOMAIN_EPSILON, max + FLAT_DOMAIN_EPSILON];
|
|
12
|
+
return [min, max];
|
|
13
|
+
}
|
|
14
|
+
function collectPExtent(series) {
|
|
15
|
+
const values = [];
|
|
16
|
+
for (const s of series) {
|
|
17
|
+
for (const point of s.points) values.push(point.p);
|
|
18
|
+
}
|
|
19
|
+
return extentOf(values, [0, 1]);
|
|
20
|
+
}
|
|
21
|
+
function collectValueExtent(series) {
|
|
22
|
+
const values = [];
|
|
23
|
+
for (const s of series) {
|
|
24
|
+
for (const point of s.points) values.push(point.value);
|
|
25
|
+
}
|
|
26
|
+
return extentOf(values, [0, 1]);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
collectPExtent,
|
|
30
|
+
collectValueExtent
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=domain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.js","sources":["../../../../src/components/gini-impurity-entropy-chart/lib/domain.ts"],"sourcesContent":["import type { GiniSeries } from './types.js';\n\n/** Widths a flat domain is padded by so a constant curve still has a range. */\nconst FLAT_DOMAIN_EPSILON = 1e-6;\n\nfunction extentOf(values: number[], fallback: [number, number]): [number, number] {\n let min = Infinity;\n let max = -Infinity;\n for (const v of values) {\n if (!Number.isFinite(v)) continue;\n if (v < min) min = v;\n if (v > max) max = v;\n }\n if (!Number.isFinite(min) || !Number.isFinite(max)) return fallback;\n // Client: `sameP` / `sameY` widen a degenerate domain instead of clamping.\n if (!(max > min)) return [min - FLAT_DOMAIN_EPSILON, max + FLAT_DOMAIN_EPSILON];\n return [min, max];\n}\n\n/**\n * X domain from every sampled `p`. The client fits the data rather than\n * assuming [0, 1], so a partial probability sweep still fills the plot.\n */\nexport function collectPExtent(series: GiniSeries[]): [number, number] {\n const values: number[] = [];\n for (const s of series) {\n for (const point of s.points) values.push(point.p);\n }\n return extentOf(values, [0, 1]);\n}\n\n/** Y domain from every metric value — not zero-anchored, matching the client. */\nexport function collectValueExtent(series: GiniSeries[]): [number, number] {\n const values: number[] = [];\n for (const s of series) {\n for (const point of s.points) values.push(point.value);\n }\n return extentOf(values, [0, 1]);\n}\n"],"names":[],"mappings":"AAGA,MAAM,sBAAsB;AAE5B,SAAS,SAAS,QAAkB,UAA8C;AAChF,MAAI,MAAM;AACV,MAAI,MAAM;AACV,aAAW,KAAK,QAAQ;AACtB,QAAI,CAAC,OAAO,SAAS,CAAC,EAAG;AACzB,QAAI,IAAI,IAAK,OAAM;AACnB,QAAI,IAAI,IAAK,OAAM;AAAA,EACrB;AACA,MAAI,CAAC,OAAO,SAAS,GAAG,KAAK,CAAC,OAAO,SAAS,GAAG,EAAG,QAAO;AAE3D,MAAI,EAAE,MAAM,KAAM,QAAO,CAAC,MAAM,qBAAqB,MAAM,mBAAmB;AAC9E,SAAO,CAAC,KAAK,GAAG;AAClB;AAMO,SAAS,eAAe,QAAwC;AACrE,QAAM,SAAmB,CAAA;AACzB,aAAW,KAAK,QAAQ;AACtB,eAAW,SAAS,EAAE,OAAQ,QAAO,KAAK,MAAM,CAAC;AAAA,EACnD;AACA,SAAO,SAAS,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChC;AAGO,SAAS,mBAAmB,QAAwC;AACzE,QAAM,SAAmB,CAAA;AACzB,aAAW,KAAK,QAAQ;AACtB,eAAW,SAAS,EAAE,OAAQ,QAAO,KAAK,MAAM,KAAK;AAAA,EACvD;AACA,SAAO,SAAS,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChC;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client Y ticks use `d3-format(".1f")`. Impurity indices live in [0, 1], so a
|
|
3
|
+
* single decimal is right; anything larger falls back to compact notation.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatImpurityTick(value: number): string;
|
|
6
|
+
/** X ticks / tooltip probabilities — trims the trailing zeros `.1f` would add. */
|
|
7
|
+
export declare function formatProbability(value: number): string;
|
|
8
|
+
/** Tooltip readout for a metric value. */
|
|
9
|
+
export declare function formatImpurityValue(value: number): string;
|
|
10
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/components/gini-impurity-entropy-chart/lib/format.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,0CAA0C;AAC1C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { formatCompactNumber } from "../../../utils/fusedash-visual.js";
|
|
2
|
+
function formatImpurityTick(value) {
|
|
3
|
+
if (!Number.isFinite(value)) return "";
|
|
4
|
+
if (Math.abs(value) >= 1e3) return formatCompactNumber(value, 1);
|
|
5
|
+
return value.toFixed(1);
|
|
6
|
+
}
|
|
7
|
+
function formatProbability(value) {
|
|
8
|
+
if (!Number.isFinite(value)) return "";
|
|
9
|
+
if (Number.isInteger(value)) return String(value);
|
|
10
|
+
return String(Number(value.toFixed(4)));
|
|
11
|
+
}
|
|
12
|
+
function formatImpurityValue(value) {
|
|
13
|
+
if (!Number.isFinite(value)) return "";
|
|
14
|
+
if (Math.abs(value) >= 1e3) return formatCompactNumber(value, 2);
|
|
15
|
+
return value.toFixed(3);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
formatImpurityTick,
|
|
19
|
+
formatImpurityValue,
|
|
20
|
+
formatProbability
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sources":["../../../../src/components/gini-impurity-entropy-chart/lib/format.ts"],"sourcesContent":["import { formatCompactNumber } from '../../../utils/fusedash-visual.js';\n\n/**\n * Client Y ticks use `d3-format(\".1f\")`. Impurity indices live in [0, 1], so a\n * single decimal is right; anything larger falls back to compact notation.\n */\nexport function formatImpurityTick(value: number): string {\n if (!Number.isFinite(value)) return '';\n if (Math.abs(value) >= 1000) return formatCompactNumber(value, 1);\n return value.toFixed(1);\n}\n\n/** X ticks / tooltip probabilities — trims the trailing zeros `.1f` would add. */\nexport function formatProbability(value: number): string {\n if (!Number.isFinite(value)) return '';\n if (Number.isInteger(value)) return String(value);\n return String(Number(value.toFixed(4)));\n}\n\n/** Tooltip readout for a metric value. */\nexport function formatImpurityValue(value: number): string {\n if (!Number.isFinite(value)) return '';\n if (Math.abs(value) >= 1000) return formatCompactNumber(value, 2);\n return value.toFixed(3);\n}\n"],"names":[],"mappings":";AAMO,SAAS,mBAAmB,OAAuB;AACxD,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,MAAI,KAAK,IAAI,KAAK,KAAK,IAAM,QAAO,oBAAoB,OAAO,CAAC;AAChE,SAAO,MAAM,QAAQ,CAAC;AACxB;AAGO,SAAS,kBAAkB,OAAuB;AACvD,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,MAAI,OAAO,UAAU,KAAK,EAAG,QAAO,OAAO,KAAK;AAChD,SAAO,OAAO,OAAO,MAAM,QAAQ,CAAC,CAAC,CAAC;AACxC;AAGO,SAAS,oBAAoB,OAAuB;AACzD,MAAI,CAAC,OAAO,SAAS,KAAK,EAAG,QAAO;AACpC,MAAI,KAAK,IAAI,KAAK,KAAK,IAAM,QAAO,oBAAoB,OAAO,CAAC;AAChE,SAAO,MAAM,QAAQ,CAAC;AACxB;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DEFAULT_SERIES_KEYS, DEFAULT_SERIES_STYLE, DEFAULT_Y_LABEL, SERIES_LABELS, type GiniImpurityEntropyChartData, type GiniImpurityEntropyFusePayload, type GiniImpurityEntropyModel, type GiniOverlays, type GiniSeries, type GiniSeriesPoint, } from './types.js';
|
|
2
|
+
export { normalizeGiniImpurityEntropyData, type GiniOverlayFlags, } from './normalize.js';
|
|
3
|
+
export { extractSeriesFromData, nearestPoint } from './series.js';
|
|
4
|
+
export { collectPExtent, collectValueExtent } from './domain.js';
|
|
5
|
+
export { giniImpurity, resolveOverlays, splitAnnotation, type SplitAnnotation, } from './overlays.js';
|
|
6
|
+
export { formatImpurityTick, formatImpurityValue, formatProbability, } from './format.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/gini-impurity-entropy-chart/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gCAAgC,EAChC,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,EACf,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataPoint } from '../../../types/index.js';
|
|
2
|
+
import { GiniImpurityEntropyChartData, GiniImpurityEntropyFusePayload, GiniImpurityEntropyModel, GiniOverlays } from './types.js';
|
|
3
|
+
/** Host-supplied overlay switches; each falls back to the widget `meta`. */
|
|
4
|
+
export type GiniOverlayFlags = Pick<Partial<GiniOverlays>, 'showPHat' | 'showCI' | 'showSplit'>;
|
|
5
|
+
/** Normalize chat / FuseDash WidgetItem payloads into one impurity-curve model. */
|
|
6
|
+
export declare function normalizeGiniImpurityEntropyData(input: DataPoint[] | GiniImpurityEntropyChartData | GiniImpurityEntropyFusePayload | null | undefined, flags?: GiniOverlayFlags): GiniImpurityEntropyModel;
|
|
7
|
+
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/components/gini-impurity-entropy-chart/lib/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AASzD,OAAO,EAKL,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAGlB,MAAM,YAAY,CAAC;AAEpB,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,OAAO,CAAC,YAAY,CAAC,EACrB,UAAU,GAAG,QAAQ,GAAG,WAAW,CACpC,CAAC;AA+HF,mFAAmF;AACnF,wBAAgB,gCAAgC,CAC9C,KAAK,EACD,SAAS,EAAE,GACX,4BAA4B,GAC5B,8BAA8B,GAC9B,IAAI,GACJ,SAAS,EACb,KAAK,GAAE,gBAAqB,GAC3B,wBAAwB,CAqB1B"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { resolveFormattingColor } from "../../../utils/fuse-palette.js";
|
|
2
|
+
import { isFuseWidgetPayload, firstField } from "../../../utils/fuse-widget.js";
|
|
3
|
+
import { resolveOverlays } from "./overlays.js";
|
|
4
|
+
import { extractSeriesFromData } from "./series.js";
|
|
5
|
+
import { DEFAULT_Y_LABEL, DEFAULT_SERIES_KEYS, SERIES_LABELS, DEFAULT_SERIES_STYLE } from "./types.js";
|
|
6
|
+
function emptyModel(flags) {
|
|
7
|
+
return {
|
|
8
|
+
series: [],
|
|
9
|
+
xLabel: "",
|
|
10
|
+
yLabel: DEFAULT_Y_LABEL,
|
|
11
|
+
overlays: resolveOverlays(null, flags)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function resolveSeriesKeys(yAxe) {
|
|
15
|
+
const keys = Array.isArray(yAxe) ? yAxe.map(String).filter(Boolean) : [];
|
|
16
|
+
if (keys.length > 0 && keys[0] !== "value") return keys;
|
|
17
|
+
return DEFAULT_SERIES_KEYS;
|
|
18
|
+
}
|
|
19
|
+
function styleFor(key, index, count, formatting) {
|
|
20
|
+
const preset = DEFAULT_SERIES_STYLE[key];
|
|
21
|
+
if (preset) return preset;
|
|
22
|
+
return {
|
|
23
|
+
color: resolveFormattingColor(formatting, key, count),
|
|
24
|
+
dash: index > 0 ? "5,5" : void 0
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function toSeries(points, key, index, count, formatting) {
|
|
28
|
+
const { color, dash } = styleFor(key, index, count, formatting);
|
|
29
|
+
return {
|
|
30
|
+
id: key,
|
|
31
|
+
name: SERIES_LABELS[key] ?? key,
|
|
32
|
+
color,
|
|
33
|
+
dash,
|
|
34
|
+
points
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function fromFuseWidget(widget, flags) {
|
|
38
|
+
var _a, _b, _c, _d;
|
|
39
|
+
const xField = firstField(widget.xAxe) ?? "p";
|
|
40
|
+
const keys = resolveSeriesKeys(widget.yAxe);
|
|
41
|
+
const extracted = extractSeriesFromData(widget.data, xField, keys);
|
|
42
|
+
const series = keys.filter((key) => {
|
|
43
|
+
var _a2;
|
|
44
|
+
return (_a2 = extracted[key]) == null ? void 0 : _a2.length;
|
|
45
|
+
}).map(
|
|
46
|
+
(key, index, kept) => toSeries(extracted[key], key, index, kept.length, widget.formatting)
|
|
47
|
+
);
|
|
48
|
+
return {
|
|
49
|
+
series,
|
|
50
|
+
xLabel: ((_b = (_a = widget.axisDetails) == null ? void 0 : _a[xField]) == null ? void 0 : _b.label) ?? xField,
|
|
51
|
+
yLabel: ((_d = (_c = widget.axisDetails) == null ? void 0 : _c.value) == null ? void 0 : _d.label) ?? DEFAULT_Y_LABEL,
|
|
52
|
+
overlays: resolveOverlays(widget.meta, flags)
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function toPoints(raw) {
|
|
56
|
+
const points = [];
|
|
57
|
+
for (const item of raw) {
|
|
58
|
+
const p = Number(item == null ? void 0 : item.x);
|
|
59
|
+
const value = Number(item == null ? void 0 : item.y);
|
|
60
|
+
if (!Number.isFinite(p) || !Number.isFinite(value)) continue;
|
|
61
|
+
points.push({ p, value });
|
|
62
|
+
}
|
|
63
|
+
return points.sort((a, b) => a.p - b.p);
|
|
64
|
+
}
|
|
65
|
+
function fromChatPayload(chart, flags) {
|
|
66
|
+
const base = {
|
|
67
|
+
xLabel: chart.xLabel ?? "",
|
|
68
|
+
yLabel: chart.yLabel ?? DEFAULT_Y_LABEL,
|
|
69
|
+
overlays: resolveOverlays(chart.meta, flags)
|
|
70
|
+
};
|
|
71
|
+
const rawSeries = chart.series ?? [];
|
|
72
|
+
if (rawSeries.length) {
|
|
73
|
+
const series = [];
|
|
74
|
+
rawSeries.forEach((s, index) => {
|
|
75
|
+
const points2 = toPoints(s.points ?? []);
|
|
76
|
+
if (!points2.length) return;
|
|
77
|
+
const preset = DEFAULT_SERIES_STYLE[s.id];
|
|
78
|
+
series.push({
|
|
79
|
+
id: s.id || `series-${index}`,
|
|
80
|
+
name: s.name ?? SERIES_LABELS[s.id] ?? s.id,
|
|
81
|
+
color: s.color ?? (preset == null ? void 0 : preset.color) ?? resolveFormattingColor(null, s.id, rawSeries.length),
|
|
82
|
+
dash: s.dash ?? (preset == null ? void 0 : preset.dash),
|
|
83
|
+
points: points2
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
return { ...base, series };
|
|
87
|
+
}
|
|
88
|
+
const points = toPoints(chart.points ?? []);
|
|
89
|
+
if (!points.length) return { ...base, series: [] };
|
|
90
|
+
return {
|
|
91
|
+
...base,
|
|
92
|
+
series: [toSeries(points, DEFAULT_SERIES_KEYS[1], 0, 1, null)]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function normalizeGiniImpurityEntropyData(input, flags = {}) {
|
|
96
|
+
if (!input) return emptyModel(flags);
|
|
97
|
+
if (Array.isArray(input)) {
|
|
98
|
+
const points = toPoints(
|
|
99
|
+
input.map((d) => ({ x: d == null ? void 0 : d.label, y: Number(d == null ? void 0 : d.value) }))
|
|
100
|
+
);
|
|
101
|
+
if (!points.length) return emptyModel(flags);
|
|
102
|
+
return {
|
|
103
|
+
series: [toSeries(points, DEFAULT_SERIES_KEYS[1], 0, 1, null)],
|
|
104
|
+
xLabel: "",
|
|
105
|
+
yLabel: DEFAULT_Y_LABEL,
|
|
106
|
+
overlays: resolveOverlays(null, flags)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (isFuseWidgetPayload(input)) {
|
|
110
|
+
return fromFuseWidget(input, flags);
|
|
111
|
+
}
|
|
112
|
+
return fromChatPayload(input, flags);
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
normalizeGiniImpurityEntropyData
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=normalize.js.map
|