@milaboratories/miplots4 1.0.128 → 1.0.130
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/dist/DataFrame.d.ts +15 -9
- package/dist/DataFrame.d.ts.map +1 -1
- package/dist/DataFrame.js +105 -81
- package/dist/DataFrame.js.map +1 -1
- package/dist/bubble/ChartRenderer.d.ts +6 -5
- package/dist/bubble/ChartRenderer.d.ts.map +1 -1
- package/dist/bubble/ChartRenderer.js +123 -121
- package/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/bubble/components/Chart.d.ts +3 -2
- package/dist/bubble/components/Chart.d.ts.map +1 -1
- package/dist/bubble/components/Chart.js +78 -97
- package/dist/bubble/components/Chart.js.map +1 -1
- package/dist/bubble/components/ChartsGroup.d.ts +6 -5
- package/dist/bubble/components/ChartsGroup.d.ts.map +1 -1
- package/dist/bubble/components/ChartsGroup.js +39 -37
- package/dist/bubble/components/ChartsGroup.js.map +1 -1
- package/dist/bubble/getCellTooltip.d.ts +5 -0
- package/dist/bubble/getCellTooltip.d.ts.map +1 -0
- package/dist/bubble/getCellTooltip.js +28 -0
- package/dist/bubble/getCellTooltip.js.map +1 -0
- package/dist/bubble/{getCells.d.ts → getGroupedCellsData.d.ts} +4 -4
- package/dist/bubble/getGroupedCellsData.d.ts.map +1 -0
- package/dist/bubble/getGroupedCellsData.js +94 -0
- package/dist/bubble/getGroupedCellsData.js.map +1 -0
- package/dist/bubble/index.d.ts +4 -4
- package/dist/bubble/index.d.ts.map +1 -1
- package/dist/bubble/index.js +47 -42
- package/dist/bubble/index.js.map +1 -1
- package/dist/bubble/utils/calculateCaptionTails.d.ts +2 -2
- package/dist/bubble/utils/calculateCaptionTails.d.ts.map +1 -1
- package/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
- package/dist/common/Legend.d.ts.map +1 -1
- package/dist/common/Legend.js.map +1 -1
- package/dist/common/Tooltip.js +1 -1
- package/dist/common/Tooltip.js.map +1 -1
- package/dist/common/types.d.ts +1 -1
- package/dist/common/types.d.ts.map +1 -1
- package/dist/common/useDataFrame.d.ts +11 -0
- package/dist/common/useDataFrame.d.ts.map +1 -0
- package/dist/common/useDataFrame.js +20 -0
- package/dist/common/useDataFrame.js.map +1 -0
- package/dist/dendro/ChartRenderer.d.ts +9 -8
- package/dist/dendro/ChartRenderer.d.ts.map +1 -1
- package/dist/dendro/ChartRenderer.js +187 -187
- package/dist/dendro/ChartRenderer.js.map +1 -1
- package/dist/dendro/components/Chart.d.ts +8 -8
- package/dist/dendro/components/Chart.d.ts.map +1 -1
- package/dist/dendro/components/Chart.js +35 -35
- package/dist/dendro/components/Chart.js.map +1 -1
- package/dist/dendro/components/Heatmap.d.ts +3 -3
- package/dist/dendro/components/Heatmap.d.ts.map +1 -1
- package/dist/dendro/components/Heatmap.js +23 -23
- package/dist/dendro/components/Heatmap.js.map +1 -1
- package/dist/dendro/components/Legend.d.ts.map +1 -1
- package/dist/dendro/components/Legend.js.map +1 -1
- package/dist/dendro/components/LinksGroup.d.ts +6 -6
- package/dist/dendro/components/LinksGroup.d.ts.map +1 -1
- package/dist/dendro/components/LinksGroup.js +17 -17
- package/dist/dendro/components/LinksGroup.js.map +1 -1
- package/dist/dendro/components/NodesGroup.d.ts +7 -7
- package/dist/dendro/components/NodesGroup.d.ts.map +1 -1
- package/dist/dendro/components/NodesGroup.js +29 -29
- package/dist/dendro/components/NodesGroup.js.map +1 -1
- package/dist/dendro/components/types.d.ts +2 -2
- package/dist/dendro/components/types.d.ts.map +1 -1
- package/dist/dendro/getHeatmapData.d.ts +2 -2
- package/dist/dendro/getHeatmapData.d.ts.map +1 -1
- package/dist/dendro/getHeatmapData.js +48 -44
- package/dist/dendro/getHeatmapData.js.map +1 -1
- package/dist/dendro/getHierarchyData.d.ts +3 -3
- package/dist/dendro/getHierarchyData.d.ts.map +1 -1
- package/dist/dendro/getHierarchyData.js +31 -31
- package/dist/dendro/getHierarchyData.js.map +1 -1
- package/dist/dendro/index.d.ts +5 -5
- package/dist/dendro/index.d.ts.map +1 -1
- package/dist/dendro/index.js +86 -89
- package/dist/dendro/index.js.map +1 -1
- package/dist/discrete/ChartRenderer.d.ts +6 -6
- package/dist/discrete/ChartRenderer.d.ts.map +1 -1
- package/dist/discrete/ChartRenderer.js +197 -196
- package/dist/discrete/ChartRenderer.js.map +1 -1
- package/dist/discrete/DiscreteSettingsImpl.d.ts +3 -3
- package/dist/discrete/DiscreteSettingsImpl.d.ts.map +1 -1
- package/dist/discrete/DiscreteSettingsImpl.js +8 -8
- package/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/discrete/components/layers/BoxElement.js.map +1 -1
- package/dist/discrete/index.d.ts +1 -1
- package/dist/discrete/index.d.ts.map +1 -1
- package/dist/discrete/index.js +109 -106
- package/dist/discrete/index.js.map +1 -1
- package/dist/discrete/layers/bar.d.ts +2 -2
- package/dist/discrete/layers/bar.d.ts.map +1 -1
- package/dist/discrete/layers/bar.js +32 -37
- package/dist/discrete/layers/bar.js.map +1 -1
- package/dist/discrete/layers/binnedDots.d.ts +3 -3
- package/dist/discrete/layers/binnedDots.d.ts.map +1 -1
- package/dist/discrete/layers/binnedDots.js +66 -78
- package/dist/discrete/layers/binnedDots.js.map +1 -1
- package/dist/discrete/layers/boxes.d.ts +3 -4
- package/dist/discrete/layers/boxes.d.ts.map +1 -1
- package/dist/discrete/layers/boxes.js +59 -60
- package/dist/discrete/layers/boxes.js.map +1 -1
- package/dist/discrete/layers/dots.d.ts +2 -3
- package/dist/discrete/layers/dots.d.ts.map +1 -1
- package/dist/discrete/layers/dots.js +30 -30
- package/dist/discrete/layers/dots.js.map +1 -1
- package/dist/discrete/layers/lines.js +11 -10
- package/dist/discrete/layers/lines.js.map +1 -1
- package/dist/discrete/layers/logo.d.ts +2 -2
- package/dist/discrete/layers/logo.d.ts.map +1 -1
- package/dist/discrete/layers/logo.js +21 -21
- package/dist/discrete/layers/logo.js.map +1 -1
- package/dist/discrete/layers/pairedPoints.d.ts +2 -2
- package/dist/discrete/layers/pairedPoints.d.ts.map +1 -1
- package/dist/discrete/layers/pairedPoints.js +62 -62
- package/dist/discrete/layers/pairedPoints.js.map +1 -1
- package/dist/discrete/layers/sina.d.ts +3 -4
- package/dist/discrete/layers/sina.d.ts.map +1 -1
- package/dist/discrete/layers/sina.js +67 -71
- package/dist/discrete/layers/sina.js.map +1 -1
- package/dist/discrete/layers/stackedBar.d.ts +1 -1
- package/dist/discrete/layers/stackedBar.d.ts.map +1 -1
- package/dist/discrete/layers/stackedBar.js +25 -25
- package/dist/discrete/layers/stackedBar.js.map +1 -1
- package/dist/discrete/layers/violins.js +13 -13
- package/dist/discrete/utils/getOutliersBounds.d.ts +1 -1
- package/dist/discrete/utils/getOutliersBounds.d.ts.map +1 -1
- package/dist/discrete/utils/getOutliersBounds.js +5 -5
- package/dist/discrete/utils/getOutliersBounds.js.map +1 -1
- package/dist/discrete/utils/splitTextByWidth.js +1 -1
- package/dist/discrete/utils/splitTextByWidth.js.map +1 -1
- package/dist/heatmap/ChartRenderer.d.ts +7 -6
- package/dist/heatmap/ChartRenderer.d.ts.map +1 -1
- package/dist/heatmap/ChartRenderer.js +286 -266
- package/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.d.ts +2 -2
- package/dist/heatmap/HeatmapSettingsImpl.d.ts.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.js +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/heatmap/components/Annotations/Annotation.d.ts.map +1 -1
- package/dist/heatmap/components/Annotations/Annotation.js +40 -39
- package/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/heatmap/components/Captions/GroupCaptions.d.ts.map +1 -1
- package/dist/heatmap/components/Captions/GroupCaptions.js +45 -36
- package/dist/heatmap/components/Captions/GroupCaptions.js.map +1 -1
- package/dist/heatmap/components/Chart.d.ts.map +1 -1
- package/dist/heatmap/components/Chart.js +104 -101
- package/dist/heatmap/components/Chart.js.map +1 -1
- package/dist/heatmap/components/ChartsGroup.d.ts +2 -2
- package/dist/heatmap/components/ChartsGroup.d.ts.map +1 -1
- package/dist/heatmap/components/ChartsGroup.js +14 -14
- package/dist/heatmap/components/ChartsGroup.js.map +1 -1
- package/dist/heatmap/components/Dendrograms.d.ts +3 -1
- package/dist/heatmap/components/Dendrograms.d.ts.map +1 -1
- package/dist/heatmap/components/Dendrograms.js +54 -48
- package/dist/heatmap/components/Dendrograms.js.map +1 -1
- package/dist/heatmap/components/types.d.ts +5 -4
- package/dist/heatmap/components/types.d.ts.map +1 -1
- package/dist/heatmap/getCells.d.ts +3 -2
- package/dist/heatmap/getCells.d.ts.map +1 -1
- package/dist/heatmap/getCells.js +97 -93
- package/dist/heatmap/getCells.js.map +1 -1
- package/dist/heatmap/getDendrograms.d.ts +2 -2
- package/dist/heatmap/getDendrograms.d.ts.map +1 -1
- package/dist/heatmap/getDendrograms.js +36 -36
- package/dist/heatmap/getDendrograms.js.map +1 -1
- package/dist/heatmap/index.d.ts +3 -3
- package/dist/heatmap/index.d.ts.map +1 -1
- package/dist/heatmap/index.js +13 -12
- package/dist/heatmap/index.js.map +1 -1
- package/dist/heatmap/utils/calculateAnnotationTitleSizes.d.ts.map +1 -1
- package/dist/heatmap/utils/calculateAnnotationTitleSizes.js +1 -1
- package/dist/heatmap/utils/calculateAnnotationTitleSizes.js.map +1 -1
- package/dist/heatmap/utils/calculateCaptionTails.d.ts +3 -3
- package/dist/heatmap/utils/calculateCaptionTails.d.ts.map +1 -1
- package/dist/heatmap/utils/calculateCaptionTails.js +89 -54
- package/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
- package/dist/heatmap/utils/calculateChartSideElementSizes.js +19 -19
- package/dist/heatmap/utils/calculateChartSideElementSizes.js.map +1 -1
- package/dist/histogram/ChartRenderer.d.ts +6 -5
- package/dist/histogram/ChartRenderer.d.ts.map +1 -1
- package/dist/histogram/ChartRenderer.js +154 -153
- package/dist/histogram/ChartRenderer.js.map +1 -1
- package/dist/histogram/HistogramSettingsImpl.d.ts +2 -2
- package/dist/histogram/HistogramSettingsImpl.d.ts.map +1 -1
- package/dist/histogram/HistogramSettingsImpl.js.map +1 -1
- package/dist/histogram/components/Chart.js +48 -48
- package/dist/histogram/components/Chart.js.map +1 -1
- package/dist/histogram/components/types.d.ts +4 -3
- package/dist/histogram/components/types.d.ts.map +1 -1
- package/dist/histogram/getHistogramData.d.ts +7 -7
- package/dist/histogram/getHistogramData.d.ts.map +1 -1
- package/dist/histogram/getHistogramData.js +52 -53
- package/dist/histogram/getHistogramData.js.map +1 -1
- package/dist/histogram/index.d.ts +3 -3
- package/dist/histogram/index.d.ts.map +1 -1
- package/dist/histogram/index.js +49 -45
- package/dist/histogram/index.js.map +1 -1
- package/dist/node_modules/@d3fc/d3fc-axis/src/axisBase.js +10 -10
- package/dist/node_modules/d3-array/src/min.js +5 -11
- package/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/d3-shape/src/area.js +30 -30
- package/dist/node_modules/d3-shape/src/line.js +6 -6
- package/dist/node_modules/d3-shape/src/line.js.map +1 -1
- package/dist/node_modules/kdbush/index.js +148 -0
- package/dist/node_modules/kdbush/index.js.map +1 -0
- package/dist/scatterplot/ChartRenderer.d.ts +7 -6
- package/dist/scatterplot/ChartRenderer.d.ts.map +1 -1
- package/dist/scatterplot/ChartRenderer.js +212 -195
- package/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts +2 -2
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.js +8 -8
- package/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/scatterplot/components/ChartAxisTitles.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartAxisTitles.js +31 -30
- package/dist/scatterplot/components/ChartAxisTitles.js.map +1 -1
- package/dist/scatterplot/components/ChartLayersData.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartLayersData.js +138 -156
- package/dist/scatterplot/components/ChartLayersData.js.map +1 -1
- package/dist/scatterplot/components/ChartTooltip.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartTooltip.js +28 -27
- package/dist/scatterplot/components/ChartTooltip.js.map +1 -1
- package/dist/scatterplot/components/ChartTrendsData.js +21 -21
- package/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
- package/dist/scatterplot/components/ChartsGroup.js +3 -3
- package/dist/scatterplot/components/ChartsGroup.js.map +1 -1
- package/dist/scatterplot/components/types.d.ts +7 -7
- package/dist/scatterplot/components/types.d.ts.map +1 -1
- package/dist/scatterplot/constants.d.ts +1 -1
- package/dist/scatterplot/constants.d.ts.map +1 -1
- package/dist/scatterplot/constants.js.map +1 -1
- package/dist/scatterplot/dots.d.ts +2 -2
- package/dist/scatterplot/dots.d.ts.map +1 -1
- package/dist/scatterplot/dots.js +21 -21
- package/dist/scatterplot/dots.js.map +1 -1
- package/dist/scatterplot/getLayersData.d.ts +3 -3
- package/dist/scatterplot/getLayersData.d.ts.map +1 -1
- package/dist/scatterplot/getLayersData.js +12 -15
- package/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/scatterplot/index.d.ts +4 -4
- package/dist/scatterplot/index.d.ts.map +1 -1
- package/dist/scatterplot/index.js +71 -72
- package/dist/scatterplot/index.js.map +1 -1
- package/dist/scatterplot/linearRegression.d.ts +5 -4
- package/dist/scatterplot/linearRegression.d.ts.map +1 -1
- package/dist/scatterplot/linearRegression.js +88 -86
- package/dist/scatterplot/linearRegression.js.map +1 -1
- package/dist/scatterplot/utils/createAesGetter.d.ts +3 -2
- package/dist/scatterplot/utils/createAesGetter.d.ts.map +1 -1
- package/dist/scatterplot/utils/createAesGetter.js +21 -21
- package/dist/scatterplot/utils/createAesGetter.js.map +1 -1
- package/dist/scatterplot/utils/createLegendInfo.d.ts +2 -10
- package/dist/scatterplot/utils/createLegendInfo.d.ts.map +1 -1
- package/dist/scatterplot/utils/createLegendInfo.js +44 -37
- package/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
- package/dist/scatterplot/utils/getVisibleLabels.d.ts +6 -9
- package/dist/scatterplot/utils/getVisibleLabels.d.ts.map +1 -1
- package/dist/scatterplot/utils/getVisibleLabels.js +46 -56
- package/dist/scatterplot/utils/getVisibleLabels.js.map +1 -1
- package/dist/scatterplot-umap/ChartRenderer.d.ts +18 -15
- package/dist/scatterplot-umap/ChartRenderer.d.ts.map +1 -1
- package/dist/scatterplot-umap/ChartRenderer.js +231 -214
- package/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.d.ts +2 -2
- package/dist/scatterplot-umap/SettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.js +6 -6
- package/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/scatterplot-umap/colors.d.ts +6 -0
- package/dist/scatterplot-umap/colors.d.ts.map +1 -0
- package/dist/scatterplot-umap/colors.js +42 -0
- package/dist/scatterplot-umap/colors.js.map +1 -0
- package/dist/scatterplot-umap/components/Lasso.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/Lasso.js +148 -124
- package/dist/scatterplot-umap/components/Lasso.js.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.d.ts +2 -2
- package/dist/scatterplot-umap/components/LowerSVG.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.js +88 -87
- package/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/scatterplot-umap/components/UpperSVG.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/UpperSVG.js +20 -19
- package/dist/scatterplot-umap/components/UpperSVG.js.map +1 -1
- package/dist/scatterplot-umap/index.d.ts +0 -2
- package/dist/scatterplot-umap/index.d.ts.map +1 -1
- package/dist/scatterplot-umap/index.js +77 -104
- package/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/scatterplot-umap/types.d.ts +7 -10
- package/dist/scatterplot-umap/types.d.ts.map +1 -1
- package/dist/types/bubble.d.ts +12 -12
- package/dist/types/common.d.ts +4 -3
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +1 -1
- package/dist/types/common.js.map +1 -1
- package/dist/types/dendro.d.ts +10 -10
- package/dist/types/dendro.d.ts.map +1 -1
- package/dist/types/dendro.js +1 -1
- package/dist/types/dendro.js.map +1 -1
- package/dist/types/discrete.d.ts +14 -14
- package/dist/types/discrete.d.ts.map +1 -1
- package/dist/types/discrete.js +3 -3
- package/dist/types/discrete.js.map +1 -1
- package/dist/types/heatmap.d.ts +28 -28
- package/dist/types/heatmap.d.ts.map +1 -1
- package/dist/types/heatmap.js +1 -1
- package/dist/types/heatmap.js.map +1 -1
- package/dist/types/histogram.d.ts +8 -8
- package/dist/types/histogram.d.ts.map +1 -1
- package/dist/types/histogram.js +1 -1
- package/dist/types/histogram.js.map +1 -1
- package/dist/types/scatterplot-umap.d.ts +11 -15
- package/dist/types/scatterplot-umap.d.ts.map +1 -1
- package/dist/types/scatterplot-umap.js +9 -9
- package/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/types/scatterplot.d.ts +12 -12
- package/dist/types/scatterplot.d.ts.map +1 -1
- package/dist/types/scatterplot.js +1 -1
- package/dist/types/scatterplot.js.map +1 -1
- package/dist/utils/TextMeasurer/TextMeasurer.d.ts +7 -0
- package/dist/utils/TextMeasurer/TextMeasurer.d.ts.map +1 -0
- package/dist/utils/TextMeasurer/TextMeasurer.js +42 -0
- package/dist/utils/TextMeasurer/TextMeasurer.js.map +1 -0
- package/dist/utils/TextMeasurer/charToWidth.json.js +155 -0
- package/dist/utils/TextMeasurer/charToWidth.json.js.map +1 -0
- package/dist/utils/arrangeLegendParts.js +1 -1
- package/dist/utils/arrangeLegendParts.js.map +1 -1
- package/dist/utils/getChartEdgeSides.d.ts +1 -1
- package/dist/utils/getLegendWidth.d.ts.map +1 -1
- package/dist/utils/getLegendWidth.js +1 -1
- package/dist/utils/getLegendWidth.js.map +1 -1
- package/package.json +5 -3
- package/dist/bubble/getCells.d.ts.map +0 -1
- package/dist/bubble/getCells.js +0 -91
- package/dist/bubble/getCells.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/add.js +0 -30
- package/dist/node_modules/d3-quadtree/src/add.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/cover.js +0 -29
- package/dist/node_modules/d3-quadtree/src/cover.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/data.js +0 -12
- package/dist/node_modules/d3-quadtree/src/data.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/extent.js +0 -7
- package/dist/node_modules/d3-quadtree/src/extent.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/find.js +0 -26
- package/dist/node_modules/d3-quadtree/src/find.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/quad.js +0 -7
- package/dist/node_modules/d3-quadtree/src/quad.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/quadtree.js +0 -51
- package/dist/node_modules/d3-quadtree/src/quadtree.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/remove.js +0 -21
- package/dist/node_modules/d3-quadtree/src/remove.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/root.js +0 -7
- package/dist/node_modules/d3-quadtree/src/root.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/size.js +0 -12
- package/dist/node_modules/d3-quadtree/src/size.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/visit.js +0 -14
- package/dist/node_modules/d3-quadtree/src/visit.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/visitAfter.js +0 -19
- package/dist/node_modules/d3-quadtree/src/visitAfter.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/x.js +0 -11
- package/dist/node_modules/d3-quadtree/src/x.js.map +0 -1
- package/dist/node_modules/d3-quadtree/src/y.js +0 -11
- package/dist/node_modules/d3-quadtree/src/y.js.map +0 -1
- package/dist/utils/TextMeasurer.d.ts +0 -8
- package/dist/utils/TextMeasurer.d.ts.map +0 -1
- package/dist/utils/TextMeasurer.js +0 -27
- package/dist/utils/TextMeasurer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotation.js","sources":["../../../../src/heatmap/components/Annotations/Annotation.tsx"],"sourcesContent":["import { createPortal } from 'react-dom';\nimport type { TooltipsData } from '../../../common/Tooltip';\nimport { BLACK } from '../../../constants';\nimport type { DataValue } from '../../../types';\nimport { ANNOTATION_WIDTH } from '../../constants';\nimport type { Cell, GroupedCellsData } from '../../getCells';\nimport type { HeatmapSettingsImpl } from '../../HeatmapSettingsImpl';\nimport type { AnnotationColorScales, AnnotationTooltipData, ChartScales } from '../types';\n\nfunction getTextPosition(\n vertical: boolean,\n annotationPosition: string,\n titlePosition: string,\n width: number,\n height: number\n) {\n if (vertical) {\n const x = ANNOTATION_WIDTH / 2;\n const y = titlePosition === 'top' ? -5 : height + 5;\n const rotate = annotationPosition === 'left' ? -90 : 90;\n const anchor = annotationPosition === 'left' && titlePosition === 'top' ? 'start' : 'end';\n return {x, y, rotate, anchor};\n }\n const x = titlePosition === 'right' ? width + 5 : -5;\n const y = ANNOTATION_WIDTH / 2;\n const anchor = titlePosition === 'right' ? 'start' : 'end';\n return {x, y, rotate: 0, anchor};\n}\ninterface AnnotationProps {\n facetKey: string;\n scales: ChartScales;\n data: Record<string, DataValue>;\n annotation: HeatmapSettingsImpl['annotations'][0];\n stepX: number;\n stepY: number;\n vertical?: boolean;\n x: number;\n y: number;\n width: number;\n height: number;\n showTitle: boolean;\n colorScale: AnnotationColorScales[string];\n aes: HeatmapSettingsImpl['aes'];\n frame: HeatmapSettingsImpl['chartSettings']['frame'];\n xGroupKeys: string[];\n yGroupKeys: string[];\n xKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['xKeysByGroups'];\n yKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['yKeysByGroups'];\n tooltipsData: TooltipsData<Cell | AnnotationTooltipData>;\n activeElementContainer?: Element;\n}\n\nfunction isAnnotationTooltip(d:Cell|AnnotationTooltipData|null):d is AnnotationTooltipData {\n return d !== null && !('data' in d);\n}\n\nexport function Annotation({\n facetKey,\n data,\n scales,\n stepX,\n stepY,\n x,\n y,\n annotation,\n showTitle,\n width,\n height,\n colorScale,\n aes,\n frame,\n xGroupKeys,\n yGroupKeys,\n xKeysByGroups,\n yKeysByGroups,\n tooltipsData,\n activeElementContainer\n}: AnnotationProps) {\n const {position, titlePosition, valueColumn} = annotation;\n const vertical = position === 'left' || position === 'right';\n const keys = (vertical ? scales.y : scales.x).domain();\n const textPosition = getTextPosition(vertical, position, titlePosition, width, height);\n const isDimmedBackground = tooltipsData.fixed && activeElementContainer;\n\n return (\n <g>\n {keys.map(key => {\n const value = data?.[key];\n const fillColor = colorScale.type === 'continuous'\n ? colorScale.scale(Number(value))\n : colorScale.scale(String(value));\n const xInner= x + (vertical ? 0 : scales.x(key));\n const yInner= y + (vertical ? scales.y(key) : 0);\n const width = vertical ? ANNOTATION_WIDTH : stepX;\n const height = vertical ? stepY : ANNOTATION_WIDTH;\n const xKey = vertical ? null : key;\n const yKey = vertical ? key : null;\n const highlighted = isDimmedBackground\n && isAnnotationTooltip(tooltipsData.selectedData)\n && tooltipsData.selectedData.xKey === xKey\n && tooltipsData.selectedData.yKey === yKey\n && facetKey === tooltipsData.currentFacet;\n const cellElement = (\n <rect\n key={key}\n x={xInner}\n y={yInner}\n width={width}\n height={height}\n fill={fillColor}\n stroke={aes.cellStrokeColor}\n onMouseOver={() => tooltipsData.onMouseEnter({\n x: xInner + width,\n y: yInner + height / 2,\n xKey,\n yKey,\n value,\n title: valueColumn.label ?? valueColumn.value\n } as AnnotationTooltipData, facetKey)}\n onMouseLeave={() => tooltipsData.onMouseLeave()}\n />\n );\n return highlighted ? createPortal(cellElement, activeElementContainer) : cellElement;\n })}\n {tooltipsData.fixed && !vertical && xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {tooltipsData.fixed && vertical && yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {frame.type === 'groups' &&\n !vertical &&\n xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {frame.type === 'groups' &&\n vertical &&\n yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {showTitle && (\n <g\n fontWeight=\"500\"\n fontSize=\"14px\"\n transform={`translate(${x + textPosition.x},${y + textPosition.y}) rotate(${textPosition.rotate})`}\n >\n <text textAnchor={textPosition.anchor} dominantBaseline=\"central\">\n {valueColumn.label ?? valueColumn.value}\n </text>\n </g>\n )}\n </g>\n );\n}\n"],"names":["getTextPosition","vertical","annotationPosition","titlePosition","width","height","x","ANNOTATION_WIDTH","y","anchor","isAnnotationTooltip","d","Annotation","facetKey","data","scales","stepX","stepY","annotation","showTitle","colorScale","aes","frame","xGroupKeys","yGroupKeys","xKeysByGroups","yKeysByGroups","tooltipsData","activeElementContainer","position","valueColumn","keys","textPosition","isDimmedBackground","key","value","fillColor","xInner","yInner","xKey","yKey","highlighted","cellElement","jsx","createPortal","xGroupKey","keysCountX","groupWidth","groupX","yGroupKey","keysCountY","groupHeight","groupY","BLACK"],"mappings":";;;;AASA,SAASA,EACLC,GACAC,GACAC,GACAC,GACAC,GACF;AACE,MAAIJ,GAAU;AACV,UAAMK,IAAIC,IAAmB,GACvBC,IAAIL,MAAkB,QAAQ,KAAKE,IAAS;AAGlD,WAAO,EAAC,GAAAC,GAAG,GAAAE,GAAG,QAFCN,MAAuB,SAAS,MAAM,IAE/B,QADPA,MAAuB,UAAUC,MAAkB,QAAQ,UAAU,MAC9DM;AAAAA,EAC1B;AACA,QAAMH,IAAIH,MAAkB,UAAUC,IAAQ,IAAI,IAC5CI,IAAID,IAAmB;AAE7B,SAAO,EAAC,GAAAD,GAAG,GAAAE,GAAG,QAAQ,GAAG,QADVL,MAAkB,UAAU,UAAU,MAC5B;AAC7B;AAyBA,SAASO,EAAoBC,GAA8D;AACvF,SAAOA,MAAM,QAAQ,EAAE,UAAUA;AACrC;AAEO,SAASC,EAAW;AAAA,EACvB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAAX;AAAA,EACA,GAAAE;AAAA,EACA,YAAAU;AAAA,EACA,WAAAC;AAAA,EACA,OAAAf;AAAA,EACA,QAAAC;AAAA,EACA,YAAAe;AAAA,EACA,KAAAC;AAAA,EACA,OAAAC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,EAAa,QAAQ,kBAAiB,WACnD,UAAAF,EAAY,SAASA,EAAY,MAAA,CACtC;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GAER;AAER;"}
|
|
1
|
+
{"version":3,"file":"Annotation.js","sources":["../../../../src/heatmap/components/Annotations/Annotation.tsx"],"sourcesContent":["import { createPortal } from 'react-dom';\nimport type { TooltipsData } from '../../../common/Tooltip';\nimport { BLACK } from '../../../constants';\nimport type { DataValue } from '../../../types';\nimport { ANNOTATION_WIDTH } from '../../constants';\nimport type { Cell, GroupedCellsData } from '../../getCells';\nimport type { HeatmapSettingsImpl } from '../../HeatmapSettingsImpl';\nimport type { AnnotationColorScales, AnnotationTooltipData, ChartScales } from '../types';\n\nfunction getTextPosition(\n vertical: boolean,\n annotationPosition: string,\n titlePosition: string,\n width: number,\n height: number\n) {\n if (vertical) {\n const x = ANNOTATION_WIDTH / 2;\n const y = titlePosition === 'top' ? -5 : height + 5;\n const rotate = annotationPosition === 'left' ? -90 : 90;\n const anchor = annotationPosition === 'left' && titlePosition === 'top' ? 'start' : 'end';\n return {x, y, rotate, anchor};\n }\n const x = titlePosition === 'right' ? width + 5 : -5;\n const y = ANNOTATION_WIDTH / 2;\n const anchor = titlePosition === 'right' ? 'start' : 'end';\n return {x, y, rotate: 0, anchor};\n}\ninterface AnnotationProps {\n facetKey: string;\n scales: ChartScales;\n data: Record<string, DataValue>;\n annotation: HeatmapSettingsImpl['annotations'][0];\n stepX: number;\n stepY: number;\n vertical?: boolean;\n x: number;\n y: number;\n width: number;\n height: number;\n showTitle: boolean;\n colorScale: AnnotationColorScales[string];\n aes: HeatmapSettingsImpl['aes'];\n frame: HeatmapSettingsImpl['chartSettings']['frame'];\n xGroupKeys: string[];\n yGroupKeys: string[];\n xKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['xKeysByGroups'];\n yKeysByGroups: GroupedCellsData['facets'][keyof GroupedCellsData['facets']]['yKeysByGroups'];\n tooltipsData: TooltipsData<Cell | AnnotationTooltipData>;\n activeElementContainer?: Element;\n}\n\nfunction isAnnotationTooltip(d:Cell|AnnotationTooltipData|null):d is AnnotationTooltipData {\n return d !== null && ('isAnnotation' in d);\n}\n\nexport function Annotation({\n facetKey,\n data,\n scales,\n stepX,\n stepY,\n x,\n y,\n annotation,\n showTitle,\n width,\n height,\n colorScale,\n aes,\n frame,\n xGroupKeys,\n yGroupKeys,\n xKeysByGroups,\n yKeysByGroups,\n tooltipsData,\n activeElementContainer\n}: AnnotationProps) {\n const {position, titlePosition, valueColumn} = annotation;\n const vertical = position === 'left' || position === 'right';\n const keys = (vertical ? scales.y : scales.x).domain();\n const textPosition = getTextPosition(vertical, position, titlePosition, width, height);\n const isDimmedBackground = tooltipsData.fixed && activeElementContainer;\n\n return (\n <g>\n {keys.map(key => {\n const value = data?.[key];\n const fillColor = colorScale.type === 'continuous'\n ? colorScale.scale(Number(value))\n : colorScale.scale(String(value));\n const xInner= x + (vertical ? 0 : scales.x(key));\n const yInner= y + (vertical ? scales.y(key) : 0);\n const width = vertical ? ANNOTATION_WIDTH : stepX;\n const height = vertical ? stepY : ANNOTATION_WIDTH;\n const xKey = vertical ? null : key;\n const yKey = vertical ? key : null;\n const highlighted = isDimmedBackground\n && isAnnotationTooltip(tooltipsData.selectedData)\n && tooltipsData.selectedData.xKey === xKey\n && tooltipsData.selectedData.yKey === yKey\n && facetKey === tooltipsData.currentFacet;\n const cellElement = (\n <rect\n key={key}\n x={xInner}\n y={yInner}\n width={width}\n height={height}\n fill={fillColor}\n stroke={aes.cellStrokeColor}\n onMouseEnter={() => tooltipsData.onMouseEnter({\n isAnnotation: true,\n x: xInner + width,\n y: yInner + height / 2,\n xKey,\n yKey,\n value,\n title: valueColumn.label ?? valueColumn.value\n } satisfies AnnotationTooltipData, facetKey)}\n onMouseLeave={() => tooltipsData.onMouseLeave()}\n />\n );\n return highlighted ? createPortal(cellElement, activeElementContainer) : cellElement;\n })}\n {tooltipsData.fixed && !vertical && xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {tooltipsData.fixed && vertical && yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke=\"none\"\n fill=\"rgba(255, 255, 255, 0.8)\"\n />\n );\n })}\n {frame.type === 'groups' &&\n !vertical &&\n xGroupKeys.map(xGroupKey => {\n const keysCountX = xKeysByGroups[xGroupKey].length;\n if (keysCountX === 0) {\n return null;\n }\n const groupWidth = keysCountX * stepX;\n const groupX = scales.x(xKeysByGroups[xGroupKey][0]);\n return (\n <rect\n key={`${groupX}_${y}`}\n x={groupX + x}\n y={y}\n width={groupWidth}\n height={ANNOTATION_WIDTH}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {frame.type === 'groups' &&\n vertical &&\n yGroupKeys.map(yGroupKey => {\n const keysCountY = yKeysByGroups[yGroupKey].length;\n if (keysCountY === 0) {\n return null;\n }\n const groupHeight = keysCountY * stepY;\n const groupY = scales.y(yKeysByGroups[yGroupKey][0]);\n return (\n <rect\n key={`${x}_${groupY}`}\n x={x}\n y={groupY + y}\n width={ANNOTATION_WIDTH}\n height={groupHeight}\n stroke={BLACK}\n fill=\"none\"\n />\n );\n })}\n {showTitle && (\n <g\n fontWeight=\"500\"\n fontSize=\"14px\"\n transform={`translate(${x + textPosition.x},${y + textPosition.y}) rotate(${textPosition.rotate})`}\n >\n <text textAnchor={textPosition.anchor} dominantBaseline=\"central\">\n {valueColumn.label ?? valueColumn.value}\n </text>\n </g>\n )}\n </g>\n );\n}\n"],"names":["getTextPosition","vertical","annotationPosition","titlePosition","width","height","x","ANNOTATION_WIDTH","y","anchor","isAnnotationTooltip","d","Annotation","facetKey","data","scales","stepX","stepY","annotation","showTitle","colorScale","aes","frame","xGroupKeys","yGroupKeys","xKeysByGroups","yKeysByGroups","tooltipsData","activeElementContainer","position","valueColumn","keys","textPosition","isDimmedBackground","key","value","fillColor","xInner","yInner","xKey","yKey","highlighted","cellElement","jsx","createPortal","xGroupKey","keysCountX","groupWidth","groupX","yGroupKey","keysCountY","groupHeight","groupY","BLACK"],"mappings":";;;;AASA,SAASA,EACLC,GACAC,GACAC,GACAC,GACAC,GACF;AACE,MAAIJ,GAAU;AACV,UAAMK,IAAIC,IAAmB,GACvBC,IAAIL,MAAkB,QAAQ,KAAKE,IAAS;AAGlD,WAAO,EAAC,GAAAC,GAAG,GAAAE,GAAG,QAFCN,MAAuB,SAAS,MAAM,IAE/B,QADPA,MAAuB,UAAUC,MAAkB,QAAQ,UAAU,MAC9DM;AAAAA,EAC1B;AACA,QAAMH,IAAIH,MAAkB,UAAUC,IAAQ,IAAI,IAC5CI,IAAID,IAAmB;AAE7B,SAAO,EAAC,GAAAD,GAAG,GAAAE,GAAG,QAAQ,GAAG,QADVL,MAAkB,UAAU,UAAU,MAC5B;AAC7B;AAyBA,SAASO,EAAoBC,GAA8D;AACvF,SAAOA,MAAM,QAAS,kBAAkBA;AAC5C;AAEO,SAASC,EAAW;AAAA,EACvB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAAX;AAAA,EACA,GAAAE;AAAA,EACA,YAAAU;AAAA,EACA,WAAAC;AAAA,EACA,OAAAf;AAAA,EACA,QAAAC;AAAA,EACA,YAAAe;AAAA,EACA,KA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,gBAAAA,EAAAA,IAAC,QAAA,EAAK,YAAYX,EAAa,QAAQ,kBAAiB,WACnD,UAAAF,EAAY,SAASA,EAAY,MAAA,CACtC;AAAA,MAAA;AAAA,IAAA;AAAA,EACJ,GAER;AAER;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupCaptions.d.ts","sourceRoot":"","sources":["../../../../src/heatmap/components/Captions/GroupCaptions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GroupCaptions.d.ts","sourceRoot":"","sources":["../../../../src/heatmap/components/Captions/GroupCaptions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAE,uBAAuB,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAGnE,UAAU,kBAAkB;IACxB,iBAAiB,EAAE,uBAAuB,CAAC;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;IACrD,KAAK,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;IACrD,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;CAClB;AACD,wBAAgB,aAAa,CAAC,EAC1B,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,GACR,EAAE,kBAAkB,2CAiGpB"}
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
import { j as n } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { TICK_OFFSET as e } from "../../constants.js";
|
|
2
3
|
function R({
|
|
3
4
|
sideElementBBoxes: t,
|
|
4
|
-
xGroupKeys:
|
|
5
|
-
yGroupKeys:
|
|
6
|
-
xKeysByGroups:
|
|
7
|
-
yKeysByGroups:
|
|
8
|
-
xGroupLabels:
|
|
9
|
-
yGroupLabels:
|
|
10
|
-
scales:
|
|
11
|
-
stepX:
|
|
12
|
-
stepY:
|
|
13
|
-
xAxis:
|
|
14
|
-
yAxis:
|
|
15
|
-
labelAngles:
|
|
16
|
-
debug:
|
|
5
|
+
xGroupKeys: V,
|
|
6
|
+
yGroupKeys: k,
|
|
7
|
+
xKeysByGroups: x,
|
|
8
|
+
yKeysByGroups: b,
|
|
9
|
+
xGroupLabels: w,
|
|
10
|
+
yGroupLabels: C,
|
|
11
|
+
scales: j,
|
|
12
|
+
stepX: L,
|
|
13
|
+
stepY: T,
|
|
14
|
+
xAxis: F,
|
|
15
|
+
yAxis: P,
|
|
16
|
+
labelAngles: m,
|
|
17
|
+
debug: $
|
|
17
18
|
}) {
|
|
18
|
-
const
|
|
19
|
+
const W = t.top.groups.isVisible || t.bottom.groups.isVisible, a = t.top.groups.isVisible ? t.top.groups : t.bottom.groups, A = t.left.groups.isVisible || t.right.groups.isVisible, i = t.left.groups.isVisible ? t.left.groups : t.right.groups;
|
|
19
20
|
return /* @__PURE__ */ n.jsxs("g", { children: [
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
W && /* @__PURE__ */ n.jsx("g", { transform: `translate(${a.x},${a.y})`, children: V.map((o) => {
|
|
22
|
+
const l = x[o].length;
|
|
23
|
+
if (l === 0)
|
|
23
24
|
return null;
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */ n.jsxs("g", { transform: `translate(${
|
|
26
|
-
/* @__PURE__ */ n.jsx(
|
|
27
|
-
|
|
25
|
+
const r = m.xGroupLabels, c = r !== 0, g = F.groupingPosition === "top", h = l * L, s = j.x(x[o][0]) + h / 2, p = c ? g ? a.height : 0 : a.height / 2, u = -r, f = r === 45 ? 2 * e : r === 90 ? e : 0, d = c ? g ? "start" : "end" : "middle";
|
|
26
|
+
return /* @__PURE__ */ n.jsxs("g", { transform: `translate(${s},${p + f})`, children: [
|
|
27
|
+
/* @__PURE__ */ n.jsx(
|
|
28
|
+
"text",
|
|
29
|
+
{
|
|
30
|
+
transform: `rotate(${u})`,
|
|
31
|
+
dominantBaseline: "central",
|
|
32
|
+
textAnchor: d,
|
|
33
|
+
children: w[o]
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
$ && /* @__PURE__ */ n.jsx(
|
|
28
37
|
"rect",
|
|
29
38
|
{
|
|
30
|
-
x: -
|
|
31
|
-
width:
|
|
39
|
+
x: -h / 2,
|
|
40
|
+
width: h,
|
|
32
41
|
height: a.height,
|
|
33
42
|
stroke: "black",
|
|
34
43
|
fill: "none"
|
|
@@ -36,29 +45,29 @@ function R({
|
|
|
36
45
|
)
|
|
37
46
|
] }, o);
|
|
38
47
|
}) }),
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
48
|
+
A && /* @__PURE__ */ n.jsx("g", { transform: `translate(${i.x},${i.y})`, children: k.map((o) => {
|
|
49
|
+
const l = b[o].length;
|
|
50
|
+
if (l === 0)
|
|
42
51
|
return null;
|
|
43
|
-
const
|
|
44
|
-
return /* @__PURE__ */ n.jsxs("g", { transform: `translate(${
|
|
52
|
+
const r = l * T, c = P.groupingPosition === "left", g = c ? i.width : 0, h = j.y(b[o][0]) + r / 2, s = m.yGroupLabels, p = s !== 0, u = s === 45 ? -45 : (c ? -1 : 1) * (90 - s), f = s === 45 ? 2 * e : s === 90 ? e : 0, d = p ? c ? "end" : "start" : "middle";
|
|
53
|
+
return /* @__PURE__ */ n.jsxs("g", { transform: `translate(${g - f},${h})`, children: [
|
|
45
54
|
/* @__PURE__ */ n.jsx(
|
|
46
55
|
"text",
|
|
47
56
|
{
|
|
48
|
-
y:
|
|
57
|
+
y: p ? 0 : -i.width / 2,
|
|
49
58
|
transform: `rotate(${u})`,
|
|
50
59
|
dominantBaseline: "central",
|
|
51
|
-
textAnchor:
|
|
52
|
-
children:
|
|
60
|
+
textAnchor: d,
|
|
61
|
+
children: C[o]
|
|
53
62
|
}
|
|
54
63
|
),
|
|
55
|
-
|
|
64
|
+
$ && /* @__PURE__ */ n.jsx(
|
|
56
65
|
"rect",
|
|
57
66
|
{
|
|
58
|
-
x: -
|
|
59
|
-
y: -
|
|
60
|
-
width:
|
|
61
|
-
height:
|
|
67
|
+
x: -i.width / 2,
|
|
68
|
+
y: -r / 2,
|
|
69
|
+
width: i.width,
|
|
70
|
+
height: r,
|
|
62
71
|
stroke: "black",
|
|
63
72
|
fill: "none"
|
|
64
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupCaptions.js","sources":["../../../../src/heatmap/components/Captions/GroupCaptions.tsx"],"sourcesContent":["import type {ChartScales, ChartSideElementsBBoxes, LabelAngles} from '../types';\nimport type {HeatmapSettingsImpl} from '../../HeatmapSettingsImpl';\nimport React from 'react';\n\ninterface GroupCaptionsProps {\n sideElementBBoxes: ChartSideElementsBBoxes;\n xGroupKeys: string[];\n yGroupKeys: string[];\n xKeysByGroups: Record<string, string[]>;\n yKeysByGroups: Record<string, string[]>;\n xGroupLabels: Record<string, string>;\n yGroupLabels: Record<string, string>;\n scales: ChartScales;\n stepX: number;\n stepY: number;\n xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'];\n yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'];\n labelAngles: LabelAngles;\n debug: boolean;\n}\nexport function GroupCaptions({\n sideElementBBoxes,\n xGroupKeys,\n yGroupKeys,\n xKeysByGroups,\n yKeysByGroups,\n xGroupLabels,\n yGroupLabels,\n scales,\n stepX,\n stepY,\n xAxis,\n yAxis,\n labelAngles,\n debug,\n}: GroupCaptionsProps) {\n const xGroupsVisible = sideElementBBoxes.top.groups.isVisible || sideElementBBoxes.bottom.groups.isVisible;\n const xGroupsBBox = sideElementBBoxes.top.groups.isVisible\n ? sideElementBBoxes.top.groups\n : sideElementBBoxes.bottom.groups;\n\n const yGroupsVisible = sideElementBBoxes.left.groups.isVisible || sideElementBBoxes.right.groups.isVisible;\n const yGroupsBBox = sideElementBBoxes.left.groups.isVisible\n ? sideElementBBoxes.left.groups\n : sideElementBBoxes.right.groups;\n\n return (\n <g>\n {/* x group titles */}\n {xGroupsVisible && (\n <g transform={`translate(${xGroupsBBox.x},${xGroupsBBox.y})`}>\n {xGroupKeys.map(xGroupKey => {\n const keysCount = xKeysByGroups[xGroupKey].length;\n if (keysCount === 0) {\n return null;\n }\n const
|
|
1
|
+
{"version":3,"file":"GroupCaptions.js","sources":["../../../../src/heatmap/components/Captions/GroupCaptions.tsx"],"sourcesContent":["import {TICK_OFFSET} from '../../constants';\nimport type {ChartScales, ChartSideElementsBBoxes, LabelAngles} from '../types';\nimport type {HeatmapSettingsImpl} from '../../HeatmapSettingsImpl';\nimport React from 'react';\n\ninterface GroupCaptionsProps {\n sideElementBBoxes: ChartSideElementsBBoxes;\n xGroupKeys: string[];\n yGroupKeys: string[];\n xKeysByGroups: Record<string, string[]>;\n yKeysByGroups: Record<string, string[]>;\n xGroupLabels: Record<string, string>;\n yGroupLabels: Record<string, string>;\n scales: ChartScales;\n stepX: number;\n stepY: number;\n xAxis: HeatmapSettingsImpl['chartSettings']['xAxis'];\n yAxis: HeatmapSettingsImpl['chartSettings']['yAxis'];\n labelAngles: LabelAngles;\n debug: boolean;\n}\nexport function GroupCaptions({\n sideElementBBoxes,\n xGroupKeys,\n yGroupKeys,\n xKeysByGroups,\n yKeysByGroups,\n xGroupLabels,\n yGroupLabels,\n scales,\n stepX,\n stepY,\n xAxis,\n yAxis,\n labelAngles,\n debug,\n}: GroupCaptionsProps) {\n const xGroupsVisible = sideElementBBoxes.top.groups.isVisible || sideElementBBoxes.bottom.groups.isVisible;\n const xGroupsBBox = sideElementBBoxes.top.groups.isVisible\n ? sideElementBBoxes.top.groups\n : sideElementBBoxes.bottom.groups;\n\n const yGroupsVisible = sideElementBBoxes.left.groups.isVisible || sideElementBBoxes.right.groups.isVisible;\n const yGroupsBBox = sideElementBBoxes.left.groups.isVisible\n ? sideElementBBoxes.left.groups\n : sideElementBBoxes.right.groups;\n\n return (\n <g>\n {/* x group titles */}\n {xGroupsVisible && (\n <g transform={`translate(${xGroupsBBox.x},${xGroupsBBox.y})`}>\n {xGroupKeys.map(xGroupKey => {\n const keysCount = xKeysByGroups[xGroupKey].length;\n if (keysCount === 0) {\n return null;\n }\n const angle = labelAngles.xGroupLabels;\n const inclined = angle !== 0;\n const onTop = xAxis.groupingPosition === 'top';\n const groupWidth = keysCount * stepX;\n const x = scales.x(xKeysByGroups[xGroupKey][0]) + groupWidth / 2;\n const y = inclined ? (onTop ? xGroupsBBox.height : 0) : xGroupsBBox.height / 2;\n const rotate = -angle;\n const offset = angle === 45 ? 2 * TICK_OFFSET : angle === 90 ? TICK_OFFSET : 0;\n const textAnchor = !inclined ? 'middle' : onTop ? 'start' : 'end';\n return (\n <g key={xGroupKey} transform={`translate(${x},${y + offset})`}>\n <text\n transform={`rotate(${rotate})`}\n dominantBaseline=\"central\"\n textAnchor={textAnchor}\n >\n {xGroupLabels[xGroupKey]}\n </text>\n {debug && (\n <rect\n x={-groupWidth / 2}\n width={groupWidth}\n height={xGroupsBBox.height}\n stroke=\"black\"\n fill=\"none\"\n />\n )}\n </g>\n );\n })}\n </g>\n )}\n {/* y group titles */}\n {yGroupsVisible && (\n <g transform={`translate(${yGroupsBBox.x},${yGroupsBBox.y})`}>\n {yGroupKeys.map(yGroupKey => {\n const keysCount = yKeysByGroups[yGroupKey].length;\n if (keysCount === 0) {\n return null;\n }\n const groupWidth = keysCount * stepY;\n const onLeft = yAxis.groupingPosition === 'left';\n const x = onLeft ? yGroupsBBox.width : 0;\n const y = scales.y(yKeysByGroups[yGroupKey][0]) + groupWidth / 2;\n const angle = labelAngles.yGroupLabels;\n const inclined = angle !== 0;\n const rotate = angle === 45 ? -45 : (onLeft ? -1 : 1) * (90 - angle);\n const offset = angle === 45 ? 2 * TICK_OFFSET : angle === 90 ? TICK_OFFSET : 0;\n const textAnchor = !inclined ? 'middle' : onLeft ? 'end' : 'start';\n return (\n <g key={yGroupKey} transform={`translate(${x - offset},${y})`}>\n <text\n y={inclined ? 0 : -yGroupsBBox.width / 2}\n transform={`rotate(${rotate})`}\n dominantBaseline=\"central\"\n textAnchor={textAnchor}\n >\n {yGroupLabels[yGroupKey]}\n </text>\n {debug && (\n <rect\n x={-yGroupsBBox.width / 2}\n y={-groupWidth / 2}\n width={yGroupsBBox.width}\n height={groupWidth}\n stroke=\"black\"\n fill=\"none\"\n />\n )}\n </g>\n );\n })}\n </g>\n )}\n </g>\n );\n}\n"],"names":["GroupCaptions","sideElementBBoxes","xGroupKeys","yGroupKeys","xKeysByGroups","yKeysByGroups","xGroupLabels","yGroupLabels","scales","stepX","stepY","xAxis","yAxis","labelAngles","debug","xGroupsVisible","xGroupsBBox","yGroupsVisible","yGroupsBBox","jsx","xGroupKey","keysCount","angle","inclined","onTop","groupWidth","x","y","rotate","offset","TICK_OFFSET","textAnchor","jsxs","yGroupKey","onLeft"],"mappings":";;AAqBO,SAASA,EAAc;AAAA,EAC1B,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,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AAAA,YACG,GAAG,CAACD,EAAY,QAAQ;AAAA,YACxB,GAAG,CAACO,IAAa;AAAA,YACjB,OAAOP,EAAY;AAAA,YACnB,QAAQO;AAAA,YACR,QAAO;AAAA,YACP,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACT,EAAA,GAjBAQ,CAmBR;AAAA,IAER,CAAC,EAAA,CACL;AAAA,EAAA,GAER;AAER;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/heatmap/components/Chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/heatmap/components/Chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKlE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA4CtM,wBAAgB,KAAK,CAAC,SAAS,EAAE,EAC7B,WAAW,EACX,QAAQ,EACR,UAAU,EACV,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,GAAG,EACH,WAAW,EACX,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,YAAY,GACf,EAAE;IACC,QAAQ,EAAE,MA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,54 +1,55 @@
|
|
|
1
1
|
import { j as r } from "../../node_modules/react/jsx-runtime.js";
|
|
2
|
-
import { r as
|
|
3
|
-
import { r as
|
|
2
|
+
import { r as te } from "../../_virtual/index.js";
|
|
3
|
+
import { r as ne } from "../../node_modules/react-dom/index.js";
|
|
4
4
|
import { Tooltip as S } from "../../common/Tooltip.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { useDataFrame as oe } from "../../common/useDataFrame.js";
|
|
6
|
+
import { FONT_SIZE as re, FACET_TITLE_OFFSET as ie } from "../constants.js";
|
|
7
|
+
import { Annotations as fe } from "./Annotations/index.js";
|
|
8
|
+
import { Captions as ue } from "./Captions/index.js";
|
|
9
|
+
import { Dendrograms as xe } from "./Dendrograms.js";
|
|
9
10
|
import { Frames as le } from "./Frames.js";
|
|
10
|
-
function
|
|
11
|
+
function F(e) {
|
|
11
12
|
if (e === null)
|
|
12
13
|
return "null";
|
|
13
14
|
if (typeof e == "number") {
|
|
14
|
-
const
|
|
15
|
-
return
|
|
15
|
+
const n = e > 0 ? Math.floor(e) : Math.ceil(e), o = e - n;
|
|
16
|
+
return n + Number(o.toPrecision(2));
|
|
16
17
|
}
|
|
17
18
|
return e;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
`X: ${o.xLabels[
|
|
22
|
-
`Y: ${o.yLabels[
|
|
23
|
-
`Value: ${
|
|
20
|
+
function me(e, n, o, i = []) {
|
|
21
|
+
const m = [
|
|
22
|
+
`X: ${o.xLabels[n.x]}`,
|
|
23
|
+
`Y: ${o.yLabels[n.y]}`,
|
|
24
|
+
`Value: ${F(n.value)}${n.value !== n.normalizedValue ? ` (${F(n.normalizedValue)})` : ""}`
|
|
24
25
|
];
|
|
25
|
-
for (const
|
|
26
|
-
m.push(`${
|
|
26
|
+
for (const a of i)
|
|
27
|
+
m.push(`${a.label}: ${e.getColumnValue(a.value, n.idx)}`);
|
|
27
28
|
return m;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return e.xKey &&
|
|
30
|
+
function ae(e, n) {
|
|
31
|
+
const o = [];
|
|
32
|
+
return e.xKey && o.push(`X: ${n.xLabels[e.xKey]}`), e.yKey && o.push(`Y: ${n.yLabels[e.yKey]}`), o.push(`${e.title}: ${F(e.value)}`), o;
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
return e !== null &&
|
|
34
|
+
function ce(e) {
|
|
35
|
+
return e !== null && "isAnnotation" in e;
|
|
35
36
|
}
|
|
36
37
|
function W(e) {
|
|
37
|
-
return e !== null && "
|
|
38
|
+
return e !== null && "isCell" in e;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function pe({
|
|
40
41
|
dendrograms: e,
|
|
41
|
-
facetKey:
|
|
42
|
-
dimensions:
|
|
42
|
+
facetKey: n,
|
|
43
|
+
dimensions: o,
|
|
43
44
|
scales: i,
|
|
44
45
|
cells: m,
|
|
45
|
-
xGroupKeys:
|
|
46
|
-
yGroupKeys:
|
|
47
|
-
xKeysByGroups:
|
|
48
|
-
yKeysByGroups:
|
|
46
|
+
xGroupKeys: a,
|
|
47
|
+
yGroupKeys: C,
|
|
48
|
+
xKeysByGroups: j,
|
|
49
|
+
yKeysByGroups: b,
|
|
49
50
|
colorScale: z,
|
|
50
51
|
chartSettings: h,
|
|
51
|
-
cellsMeta:
|
|
52
|
+
cellsMeta: f,
|
|
52
53
|
stepX: c,
|
|
53
54
|
stepY: s,
|
|
54
55
|
sharedX: H,
|
|
@@ -56,145 +57,147 @@ function Ce({
|
|
|
56
57
|
annotations: N,
|
|
57
58
|
annotationColorScales: P,
|
|
58
59
|
dendrogramAesScales: R,
|
|
59
|
-
aes:
|
|
60
|
+
aes: T,
|
|
60
61
|
labelAngles: Z,
|
|
61
|
-
chartSizes:
|
|
62
|
-
margins:
|
|
63
|
-
tooltipsContainer:
|
|
62
|
+
chartSizes: g,
|
|
63
|
+
margins: $,
|
|
64
|
+
tooltipsContainer: A,
|
|
64
65
|
tooltipsData: t
|
|
65
66
|
}) {
|
|
66
|
-
const [
|
|
67
|
-
left:
|
|
68
|
-
right:
|
|
69
|
-
top:
|
|
70
|
-
bottom:
|
|
71
|
-
}, k = !1,
|
|
72
|
-
return /* @__PURE__ */ r.jsxs("g", { transform: `translate(${
|
|
73
|
-
/* @__PURE__ */ r.jsxs("g", { transform: `translate(${
|
|
67
|
+
const q = oe(), [y, J] = te.useState(), { xAxis: Q, yAxis: U, tooltips: p } = h, { width: V, height: v } = o.inner, { padding: x, chartEdgeSides: D, sideElementBBoxes: l } = o, { xGroupLabels: K, yGroupLabels: G, xLabels: Y, yLabels: X } = f, E = i.x.domain(), w = i.y.domain(), _ = {
|
|
68
|
+
left: $.left + o.left + x.left,
|
|
69
|
+
right: g.totalWidth - ($.left + o.left + x.left),
|
|
70
|
+
top: $.top + o.top + x.top,
|
|
71
|
+
bottom: g.totalHeight - ($.top + o.top + x.top)
|
|
72
|
+
}, k = !1, M = y && t.fixed;
|
|
73
|
+
return /* @__PURE__ */ r.jsxs("g", { transform: `translate(${o.left},${o.top})`, fontSize: re, children: [
|
|
74
|
+
/* @__PURE__ */ r.jsxs("g", { transform: `translate(${x.left},${x.top})`, children: [
|
|
74
75
|
/* @__PURE__ */ r.jsx(
|
|
75
|
-
|
|
76
|
+
fe,
|
|
76
77
|
{
|
|
77
|
-
facetKey:
|
|
78
|
-
sideElementBBoxes:
|
|
78
|
+
facetKey: n,
|
|
79
|
+
sideElementBBoxes: l,
|
|
79
80
|
annotations: N,
|
|
80
|
-
cellsMeta:
|
|
81
|
+
cellsMeta: f,
|
|
81
82
|
annotationColorScales: P,
|
|
82
83
|
sharedX: H,
|
|
83
84
|
sharedY: I,
|
|
84
|
-
chartEdgeSides:
|
|
85
|
-
width:
|
|
86
|
-
height:
|
|
85
|
+
chartEdgeSides: D,
|
|
86
|
+
width: V,
|
|
87
|
+
height: v,
|
|
87
88
|
scales: i,
|
|
88
89
|
stepX: c,
|
|
89
90
|
stepY: s,
|
|
90
|
-
aes:
|
|
91
|
+
aes: T,
|
|
91
92
|
frame: h.frame,
|
|
92
|
-
xGroupKeys:
|
|
93
|
-
yGroupKeys:
|
|
94
|
-
xKeysByGroups:
|
|
95
|
-
yKeysByGroups:
|
|
93
|
+
xGroupKeys: a,
|
|
94
|
+
yGroupKeys: C,
|
|
95
|
+
xKeysByGroups: j,
|
|
96
|
+
yKeysByGroups: b,
|
|
96
97
|
tooltipsData: t,
|
|
97
|
-
activeElementContainer:
|
|
98
|
+
activeElementContainer: y
|
|
98
99
|
}
|
|
99
100
|
),
|
|
100
101
|
/* @__PURE__ */ r.jsx(
|
|
101
|
-
|
|
102
|
+
xe,
|
|
102
103
|
{
|
|
103
104
|
dendrograms: e,
|
|
104
|
-
sideElementBBoxes:
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
sideElementBBoxes: l,
|
|
106
|
+
xGroupKeys: f.xGroupKeys,
|
|
107
|
+
yGroupKeys: f.yGroupKeys,
|
|
108
|
+
xDataByKeys: f.xDataByKeys,
|
|
109
|
+
yDataByKeys: f.yDataByKeys,
|
|
107
110
|
aesScales: R
|
|
108
111
|
}
|
|
109
112
|
),
|
|
110
|
-
|
|
113
|
+
l.top.facetTitle.isVisible && /* @__PURE__ */ r.jsx(
|
|
111
114
|
"text",
|
|
112
115
|
{
|
|
113
|
-
x:
|
|
114
|
-
y:
|
|
116
|
+
x: l.top.facetTitle.x,
|
|
117
|
+
y: l.top.facetTitle.y + l.top.facetTitle.height - ie,
|
|
115
118
|
fontWeight: "500",
|
|
116
119
|
fontSize: "20px",
|
|
117
|
-
children:
|
|
120
|
+
children: f.facetKeyValues[n].join(", ")
|
|
118
121
|
}
|
|
119
122
|
),
|
|
120
123
|
k,
|
|
121
|
-
|
|
122
|
-
(d) =>
|
|
124
|
+
E.map(
|
|
125
|
+
(d) => w.map((L) => {
|
|
123
126
|
var O;
|
|
124
|
-
const
|
|
127
|
+
const u = (O = m == null ? void 0 : m[d]) == null ? void 0 : O[L], ee = M && W(t.selectedData) && (u == null ? void 0 : u.id) === t.selectedData.id, B = u ? /* @__PURE__ */ r.jsx(
|
|
125
128
|
"rect",
|
|
126
129
|
{
|
|
127
130
|
x: i.x(d),
|
|
128
|
-
y: i.y(
|
|
131
|
+
y: i.y(L),
|
|
129
132
|
width: c,
|
|
130
133
|
height: s,
|
|
131
|
-
stroke:
|
|
132
|
-
fill:
|
|
133
|
-
onMouseOver: () => t.onMouseEnter(
|
|
134
|
+
stroke: T.cellStrokeColor,
|
|
135
|
+
fill: u.value === null ? T.emptyCellColor : z(u.normalizedValue),
|
|
136
|
+
onMouseOver: () => t.onMouseEnter(u, n),
|
|
134
137
|
onMouseLeave: () => t.onMouseLeave()
|
|
135
138
|
},
|
|
136
|
-
|
|
139
|
+
u ? u.id : `${d}_${L}`
|
|
137
140
|
) : null;
|
|
138
|
-
return
|
|
141
|
+
return ee ? ne.createPortal(B, y) : B;
|
|
139
142
|
})
|
|
140
143
|
),
|
|
141
144
|
/* @__PURE__ */ r.jsx(
|
|
142
145
|
le,
|
|
143
146
|
{
|
|
144
147
|
frame: h.frame,
|
|
145
|
-
xGroupKeys:
|
|
146
|
-
yGroupKeys:
|
|
147
|
-
xKeysByGroups:
|
|
148
|
-
yKeysByGroups:
|
|
148
|
+
xGroupKeys: a,
|
|
149
|
+
yGroupKeys: C,
|
|
150
|
+
xKeysByGroups: j,
|
|
151
|
+
yKeysByGroups: b,
|
|
149
152
|
scales: i,
|
|
150
153
|
stepX: c,
|
|
151
154
|
stepY: s,
|
|
152
|
-
width:
|
|
153
|
-
height:
|
|
155
|
+
width: V,
|
|
156
|
+
height: v
|
|
154
157
|
}
|
|
155
158
|
),
|
|
156
159
|
/* @__PURE__ */ r.jsx(
|
|
157
|
-
|
|
160
|
+
ue,
|
|
158
161
|
{
|
|
159
|
-
xAxis:
|
|
160
|
-
yAxis:
|
|
162
|
+
xAxis: Q,
|
|
163
|
+
yAxis: U,
|
|
161
164
|
scales: i,
|
|
162
165
|
stepX: c,
|
|
163
166
|
stepY: s,
|
|
164
167
|
debug: k,
|
|
165
|
-
sideElementBBoxes:
|
|
166
|
-
xKeys:
|
|
167
|
-
yKeys:
|
|
168
|
-
xGroupKeys:
|
|
169
|
-
yGroupKeys:
|
|
170
|
-
xKeysByGroups:
|
|
171
|
-
yKeysByGroups:
|
|
172
|
-
xGroupLabels:
|
|
173
|
-
yGroupLabels:
|
|
168
|
+
sideElementBBoxes: l,
|
|
169
|
+
xKeys: E,
|
|
170
|
+
yKeys: w,
|
|
171
|
+
xGroupKeys: a,
|
|
172
|
+
yGroupKeys: C,
|
|
173
|
+
xKeysByGroups: j,
|
|
174
|
+
yKeysByGroups: b,
|
|
175
|
+
xGroupLabels: K,
|
|
176
|
+
yGroupLabels: G,
|
|
174
177
|
labelAngles: Z,
|
|
175
178
|
xLabels: Y,
|
|
176
179
|
yLabels: X
|
|
177
180
|
}
|
|
178
181
|
)
|
|
179
182
|
] }),
|
|
180
|
-
h.tooltips.show && W(t.selectedData) && t.currentFacet ===
|
|
183
|
+
h.tooltips.show && W(t.selectedData) && t.currentFacet === n && /* @__PURE__ */ r.jsx(
|
|
181
184
|
S,
|
|
182
185
|
{
|
|
183
|
-
content:
|
|
186
|
+
content: me(q, t.selectedData, f, p == null ? void 0 : p.content),
|
|
184
187
|
x: i.x(String(t.selectedData.x)) + c / 2,
|
|
185
188
|
y: i.y(String(t.selectedData.y)) + s / 2,
|
|
186
|
-
offset:
|
|
189
|
+
offset: E.length > 1 ? c / 2 : 0,
|
|
187
190
|
active: !0,
|
|
188
191
|
sideDistances: _,
|
|
189
192
|
fixed: t.fixed,
|
|
190
193
|
onClose: t.onClose,
|
|
191
|
-
container:
|
|
194
|
+
container: A
|
|
192
195
|
}
|
|
193
196
|
),
|
|
194
|
-
h.tooltips.show &&
|
|
197
|
+
h.tooltips.show && ce(t.selectedData) && t.currentFacet === n && /* @__PURE__ */ r.jsx(
|
|
195
198
|
S,
|
|
196
199
|
{
|
|
197
|
-
content:
|
|
200
|
+
content: ae(t.selectedData, f),
|
|
198
201
|
x: t.selectedData.x,
|
|
199
202
|
y: t.selectedData.y,
|
|
200
203
|
offset: 0,
|
|
@@ -202,16 +205,16 @@ function Ce({
|
|
|
202
205
|
sideDistances: _,
|
|
203
206
|
fixed: t.fixed,
|
|
204
207
|
onClose: t.onClose,
|
|
205
|
-
container:
|
|
208
|
+
container: A
|
|
206
209
|
}
|
|
207
210
|
),
|
|
208
|
-
/* @__PURE__ */ r.jsxs("g", { transform: `translate(${
|
|
209
|
-
t.fixed && /* @__PURE__ */ r.jsx("rect", { width:
|
|
211
|
+
/* @__PURE__ */ r.jsxs("g", { transform: `translate(${x.left},${x.top})`, children: [
|
|
212
|
+
t.fixed && /* @__PURE__ */ r.jsx("rect", { width: g.chartWidth, height: g.chartHeight, fill: "rgba(255, 255, 255, 0.8)" }),
|
|
210
213
|
/* @__PURE__ */ r.jsx(
|
|
211
214
|
"g",
|
|
212
215
|
{
|
|
213
216
|
ref: (d) => {
|
|
214
|
-
d && !
|
|
217
|
+
d && !y && J(d);
|
|
215
218
|
}
|
|
216
219
|
}
|
|
217
220
|
)
|
|
@@ -219,6 +222,6 @@ function Ce({
|
|
|
219
222
|
] });
|
|
220
223
|
}
|
|
221
224
|
export {
|
|
222
|
-
|
|
225
|
+
pe as Chart
|
|
223
226
|
};
|
|
224
227
|
//# sourceMappingURL=Chart.js.map
|