@milaboratories/miplots4 1.0.129 → 1.0.131
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 +232 -230
- 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/Chart.d.ts.map +1 -1
- package/dist/heatmap/components/Chart.js +90 -89
- 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/types.d.ts +3 -2
- 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/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 +1 -1
- package/dist/heatmap/utils/calculateCaptionTails.d.ts.map +1 -1
- package/dist/heatmap/utils/calculateCaptionTails.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 +213 -209
- 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 +28 -28
- 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 +41 -38
- 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/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 +27 -25
- 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/formatColumnValue.d.ts +5 -0
- package/dist/scatterplot/utils/formatColumnValue.d.ts.map +1 -0
- package/dist/scatterplot/utils/formatColumnValue.js +11 -0
- package/dist/scatterplot/utils/formatColumnValue.js.map +1 -0
- 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 +25 -25
- 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/LowerSVG.d.ts +2 -2
- package/dist/scatterplot-umap/components/LowerSVG.d.ts.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.js +97 -94
- 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 -102
- 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 +44 -12
- package/dist/types/bubble.d.ts.map +1 -1
- package/dist/types/common.d.ts +22 -3
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +3 -1
- package/dist/types/common.js.map +1 -1
- package/dist/types/dendro.d.ts +113 -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 +99 -22
- 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 +187 -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 +30 -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 +149 -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 +164 -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,75 +1,77 @@
|
|
|
1
1
|
var st = Object.defineProperty;
|
|
2
|
-
var et = (
|
|
3
|
-
var b = (
|
|
4
|
-
import { j as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
2
|
+
var et = (p, s, e) => s in p ? st(p, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[s] = e;
|
|
3
|
+
var b = (p, s, e) => et(p, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
+
import { j as P } from "../node_modules/react/jsx-runtime.js";
|
|
5
|
+
import ot from "../node_modules/lodash/lodash.js";
|
|
6
|
+
import { createRoot as it } from "../node_modules/react-dom/client.js";
|
|
7
|
+
import { Error as nt } from "../common/Error.js";
|
|
8
|
+
import { DataFrameProvider as rt } from "../common/useDataFrame.js";
|
|
9
|
+
import { DEFAULT_HEIGHT as X, DEFAULT_WIDTH as Y, TITLE_LINE_HEIGHT as at, TITLE_MARGIN as ht } from "../constants.js";
|
|
10
|
+
import { arrangeLegendParts as ct } from "../utils/arrangeLegendParts.js";
|
|
11
|
+
import { getChartEdgeSides as lt } from "../utils/getChartEdgeSides.js";
|
|
12
|
+
import { getContinuousLegendTicks as K } from "../utils/getContinuousLegendTicks.js";
|
|
13
|
+
import { TextMeasurer as ut } from "../utils/TextMeasurer/TextMeasurer.js";
|
|
14
|
+
import { ChartsGroup as pt } from "./components/ChartsGroup.js";
|
|
15
|
+
import { MIN_MARGIN as w, TITLE_LINE as q, LEGEND_OFFSET as dt, DEFAULT_AES as V, CHART_SIDE_ELEMENTS as mt, MIN_PADDING as gt } from "./constants.js";
|
|
16
|
+
import { calculateChartSideElementSizes as xt } from "./utils/calculateChartSideElementSizes.js";
|
|
17
|
+
import { calculateSideElementsBBoxes as Ct } from "./utils/calculateSideElementsBBoxes.js";
|
|
18
|
+
import { createDiscreteColorScale as J, createContinuousColorScale as ft } from "./utils/createColorScales.js";
|
|
19
|
+
import { calculateAnnotationTitleSizes as St } from "./utils/calculateAnnotationTitleSizes.js";
|
|
20
|
+
import { calculateCaptionTails as yt } from "./utils/calculateCaptionTails.js";
|
|
21
|
+
import _ from "../node_modules/d3-scale/src/ordinal.js";
|
|
22
|
+
import v from "../node_modules/d3-scale/src/linear.js";
|
|
23
|
+
import Lt from "../node_modules/d3-array/src/extent.js";
|
|
23
24
|
import Q from "../node_modules/d3-hierarchy/src/cluster.js";
|
|
24
|
-
const
|
|
25
|
-
function Z(
|
|
26
|
-
function
|
|
27
|
-
|
|
25
|
+
const bt = Math.cos(Math.PI / 4), At = 5;
|
|
26
|
+
function Z(p, s, e) {
|
|
27
|
+
function t(r) {
|
|
28
|
+
r[e] = s(r.data.height), r.children && r.children.forEach(t);
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
t(p);
|
|
30
31
|
}
|
|
31
|
-
function $(
|
|
32
|
-
function
|
|
33
|
-
i[
|
|
32
|
+
function $(p, s, e, t = e) {
|
|
33
|
+
function r(i) {
|
|
34
|
+
i[t] = i[e] + s, i.children && i.children.forEach(r);
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
+
r(p);
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
-
for (let
|
|
42
|
-
|
|
43
|
-
return
|
|
38
|
+
const zt = (p, s) => {
|
|
39
|
+
const e = Math.min(...s), t = Math.max(...s);
|
|
40
|
+
if (e === t) {
|
|
41
|
+
const a = p % 2 === 0 ? [] : [e];
|
|
42
|
+
for (let h = 1; h < p / 2 + 1; h++)
|
|
43
|
+
a.push(e + h), a.unshift(e - h);
|
|
44
|
+
return a;
|
|
44
45
|
}
|
|
45
|
-
if (
|
|
46
|
-
return [
|
|
47
|
-
const
|
|
48
|
-
for (let
|
|
49
|
-
i.push(
|
|
50
|
-
return i.push(
|
|
46
|
+
if (p < 2)
|
|
47
|
+
return [e, t];
|
|
48
|
+
const r = (t - e) / (p - 1), i = [];
|
|
49
|
+
for (let a = 0; a < p - 1; a++)
|
|
50
|
+
i.push(e + r * a);
|
|
51
|
+
return i.push(t), i;
|
|
51
52
|
};
|
|
52
|
-
function tt(
|
|
53
|
-
let
|
|
54
|
-
return
|
|
53
|
+
function tt(p, s, e) {
|
|
54
|
+
let t = e;
|
|
55
|
+
return p && (p.colorRange && (t = p.colorRange), p.method === "standardScaling" && (t = [-2, 2]), p.method === "meanNormalization" && (t = [-0.75, 0.75])), zt(s, t);
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
-
let
|
|
58
|
-
for (const
|
|
59
|
-
|
|
60
|
-
i
|
|
57
|
+
function O(p, s, e) {
|
|
58
|
+
let t = 0;
|
|
59
|
+
for (const r of p) {
|
|
60
|
+
if (s[r] === void 0) continue;
|
|
61
|
+
const i = e.getTextWidth(s[r]);
|
|
62
|
+
i > t && (t = i);
|
|
61
63
|
}
|
|
62
|
-
return
|
|
64
|
+
return t;
|
|
63
65
|
}
|
|
64
|
-
function U(
|
|
65
|
-
return
|
|
66
|
+
function U(p, s) {
|
|
67
|
+
return s === 90 ? p : s === 45 ? p * bt + (p > 0 ? 2 * At : 0) : q;
|
|
66
68
|
}
|
|
67
|
-
class
|
|
69
|
+
class qt {
|
|
68
70
|
constructor() {
|
|
69
71
|
b(this, "reactRoot", null);
|
|
70
72
|
b(this, "parentNode", null);
|
|
71
73
|
b(this, "rootNode", null);
|
|
72
|
-
b(this, "component", /* @__PURE__ */
|
|
74
|
+
b(this, "component", /* @__PURE__ */ P.jsx(P.Fragment, {}));
|
|
73
75
|
b(this, "chartsDimensions", {});
|
|
74
76
|
b(this, "chartSizes", {
|
|
75
77
|
chartWidth: Y,
|
|
@@ -109,11 +111,11 @@ class Xt {
|
|
|
109
111
|
b(this, "rowsCount", 1);
|
|
110
112
|
b(this, "scales", {
|
|
111
113
|
// scales grouped by facet
|
|
112
|
-
x: { null:
|
|
113
|
-
y: { null:
|
|
114
|
+
x: { null: _().domain(["null"]).range([1]) },
|
|
115
|
+
y: { null: _().domain(["null"]).range([1]) }
|
|
114
116
|
});
|
|
115
117
|
b(this, "step", { x: {}, y: {} });
|
|
116
|
-
b(this, "colorScale",
|
|
118
|
+
b(this, "colorScale", v().domain([0, 1]).range(["white", "black"]));
|
|
117
119
|
b(this, "annotationColorScales", {});
|
|
118
120
|
b(this, "dendrogramAesScales", {});
|
|
119
121
|
b(this, "legend", {
|
|
@@ -124,270 +126,270 @@ class Xt {
|
|
|
124
126
|
b(this, "dendrograms", {});
|
|
125
127
|
}
|
|
126
128
|
clear() {
|
|
127
|
-
var
|
|
128
|
-
this.parentNode && this.rootNode && ((
|
|
129
|
-
var
|
|
130
|
-
(
|
|
129
|
+
var s;
|
|
130
|
+
this.parentNode && this.rootNode && ((s = this.parentNode) == null || s.removeChild(this.rootNode), this.parentNode = null, this.rootNode = null), setTimeout(() => {
|
|
131
|
+
var e;
|
|
132
|
+
(e = this.reactRoot) == null || e.unmount(), this.reactRoot = null;
|
|
131
133
|
});
|
|
132
134
|
}
|
|
133
|
-
init(
|
|
134
|
-
this.parentNode === null && (this.parentNode =
|
|
135
|
+
init(s) {
|
|
136
|
+
this.parentNode === null && (this.parentNode = s, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot = it(this.rootNode));
|
|
135
137
|
}
|
|
136
|
-
updateMargins(
|
|
138
|
+
updateMargins(s) {
|
|
137
139
|
this.margins = {
|
|
138
|
-
top:
|
|
140
|
+
top: s.show ? at + ht * 2 : w,
|
|
139
141
|
bottom: w,
|
|
140
142
|
left: w,
|
|
141
143
|
right: this.legend.width + w
|
|
142
144
|
}, this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartsWidth + this.margins.right, this.chartSizes.totalHeight = this.margins.top + Math.max(this.chartSizes.chartsHeight + this.margins.bottom, this.legend.height);
|
|
143
145
|
}
|
|
144
|
-
updateLegendSize(e, t,
|
|
145
|
-
if (!
|
|
146
|
+
updateLegendSize(s, e, t, r, i) {
|
|
147
|
+
if (!e.show) {
|
|
146
148
|
this.legend = { width: 0, height: 0, items: [] };
|
|
147
149
|
return;
|
|
148
150
|
}
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
...
|
|
151
|
+
const a = this.chartSizes.chartHeight, h = [], d = { width: 0, height: 0, left: 0, top: 0 }, A = (l) => l.reduce((c, n) => (c[n] = String(n), c), {});
|
|
152
|
+
if (s === "continuous") {
|
|
153
|
+
const l = this.colorScale, c = K(l, i), n = v([c[0], c[c.length - 1]], [a, 0]), o = r.label ?? r.value;
|
|
154
|
+
h.push({
|
|
155
|
+
...d,
|
|
154
156
|
type: "continuous",
|
|
155
157
|
id: "heatmapValue",
|
|
156
|
-
scale:
|
|
157
|
-
values:
|
|
158
|
+
scale: l,
|
|
159
|
+
values: c,
|
|
158
160
|
title: o,
|
|
159
161
|
tickPositionScale: n
|
|
160
162
|
});
|
|
161
|
-
} else if (
|
|
162
|
-
const
|
|
163
|
-
|
|
163
|
+
} else if (s === "discrete") {
|
|
164
|
+
const l = this.colorScale, c = r.label ?? r.value, n = l.domain(), o = A(n);
|
|
165
|
+
h.push({ ...d, type: "discreteColor", id: "heatmapValue", title: c, scale: l, values: n, labels: o });
|
|
164
166
|
}
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
const n = this.annotationColorScales[
|
|
169
|
-
|
|
167
|
+
if (t.forEach((l) => {
|
|
168
|
+
const c = l.valueColumn.label ?? l.valueColumn.value;
|
|
169
|
+
if (l.type === "continuous") {
|
|
170
|
+
const n = this.annotationColorScales[l.id].scale, o = K(n, i), C = v([o[0], o[o.length - 1]], [a, 0]);
|
|
171
|
+
h.push({ ...d, type: "continuous", id: l.id, tickPositionScale: C, title: c, scale: n, values: o });
|
|
170
172
|
}
|
|
171
|
-
if (
|
|
172
|
-
const n = this.annotationColorScales[
|
|
173
|
-
|
|
173
|
+
if (l.type === "discrete") {
|
|
174
|
+
const n = this.annotationColorScales[l.id].scale, o = n.domain(), C = A(o);
|
|
175
|
+
h.push({ ...d, type: "discreteColor", id: l.id, title: c, scale: n, values: o, labels: C });
|
|
174
176
|
}
|
|
175
|
-
}), !
|
|
177
|
+
}), !h.length) {
|
|
176
178
|
this.legend = { width: 0, height: 0, items: [] };
|
|
177
179
|
return;
|
|
178
180
|
}
|
|
179
|
-
const
|
|
181
|
+
const x = ct(h, this.chartSizes.chartHeight), m = x[x.length - 1], y = m.left + m.width + dt;
|
|
180
182
|
this.legend = {
|
|
181
183
|
width: y,
|
|
182
|
-
height:
|
|
183
|
-
items:
|
|
184
|
+
height: a,
|
|
185
|
+
items: x
|
|
184
186
|
};
|
|
185
187
|
}
|
|
186
|
-
updateCaptionsSize(e, t,
|
|
187
|
-
const i = new
|
|
188
|
+
updateCaptionsSize(s, e, t, r) {
|
|
189
|
+
const i = new ut("bold 16px Manrope"), { xGroupKeys: a, yGroupKeys: h, xGroupLabels: d, yGroupLabels: A, xKeysByGroups: x, yKeysByGroups: m, xLabels: y, yLabels: l } = s.meta;
|
|
188
190
|
this.labelAngles = {
|
|
189
|
-
xAxisLabels:
|
|
190
|
-
yAxisLabels:
|
|
191
|
-
xGroupLabels:
|
|
192
|
-
yGroupLabels:
|
|
191
|
+
xAxisLabels: e.axisLabelsAngle,
|
|
192
|
+
yAxisLabels: t.axisLabelsAngle,
|
|
193
|
+
xGroupLabels: e.groupLabelsAngle,
|
|
194
|
+
yGroupLabels: t.groupLabelsAngle
|
|
193
195
|
};
|
|
194
|
-
const
|
|
196
|
+
const c = a.reduce((f, S) => Math.max(f, O(x[S], y, i)), 0), n = h.reduce((f, S) => Math.max(f, O(m[S], l, i)), 0), o = O(a, d, i), C = O(h, A, i), { xCaptionTail: u, yCaptionTail: g } = yt(
|
|
195
197
|
this.labelAngles,
|
|
196
|
-
|
|
198
|
+
r,
|
|
197
199
|
this.scales,
|
|
198
200
|
this.step,
|
|
199
|
-
|
|
201
|
+
s,
|
|
200
202
|
i
|
|
201
203
|
);
|
|
202
204
|
this.captionsSizes = {
|
|
203
|
-
xCaptionTail:
|
|
205
|
+
xCaptionTail: u,
|
|
204
206
|
yCaptionTail: g,
|
|
205
207
|
xGroupCaptions: U(o, this.labelAngles.xGroupLabels),
|
|
206
|
-
yGroupCaptions: U(
|
|
207
|
-
xAxisCaptions: U(
|
|
208
|
+
yGroupCaptions: U(C, this.labelAngles.yGroupLabels),
|
|
209
|
+
xAxisCaptions: U(c, this.labelAngles.xAxisLabels),
|
|
208
210
|
yAxisCaptions: U(n, this.labelAngles.yAxisLabels)
|
|
209
211
|
};
|
|
210
212
|
}
|
|
211
|
-
updateChartDimensions(e, t,
|
|
212
|
-
const m =
|
|
213
|
-
this.columnsCount = i.nRows ? Math.ceil(m / y) :
|
|
214
|
-
const { width:
|
|
213
|
+
updateChartDimensions(s, e, t, r, i, a, h, d, A, x) {
|
|
214
|
+
const m = e.length, y = Math.min(i.nRows ?? m, m), l = Math.min(i.nCols ?? m, m);
|
|
215
|
+
this.columnsCount = i.nRows ? Math.ceil(m / y) : l, this.rowsCount = Math.ceil(m / this.columnsCount);
|
|
216
|
+
const { width: c, height: n } = s, { sharedX: o, sharedY: C } = i;
|
|
215
217
|
this.chartsDimensions = {};
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
let u = 0, g = 0;
|
|
219
|
+
e.forEach((z, E) => {
|
|
220
|
+
const I = E % this.columnsCount + 1, M = lt(E, e.length, this.columnsCount, this.rowsCount), B = this.step.x[z], R = this.step.y[z], N = xt(
|
|
221
|
+
a,
|
|
222
|
+
h,
|
|
221
223
|
this.captionsSizes,
|
|
222
|
-
|
|
224
|
+
d,
|
|
223
225
|
A,
|
|
224
|
-
|
|
226
|
+
x,
|
|
225
227
|
M,
|
|
226
228
|
o,
|
|
227
|
-
|
|
229
|
+
C,
|
|
230
|
+
e,
|
|
228
231
|
t,
|
|
229
|
-
|
|
230
|
-
h,
|
|
232
|
+
r,
|
|
231
233
|
B,
|
|
232
|
-
|
|
233
|
-
),
|
|
234
|
-
function H
|
|
234
|
+
R
|
|
235
|
+
), F = St(d, M, o, C);
|
|
236
|
+
function D(H) {
|
|
235
237
|
return Math.max(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
238
|
+
mt[H].reduce((L, G) => L + N[H][G], 0),
|
|
239
|
+
F[H],
|
|
240
|
+
gt
|
|
239
241
|
);
|
|
240
242
|
}
|
|
241
243
|
const T = {
|
|
242
|
-
left:
|
|
243
|
-
right:
|
|
244
|
-
top:
|
|
245
|
-
bottom:
|
|
244
|
+
left: D("left"),
|
|
245
|
+
right: D("right"),
|
|
246
|
+
top: D("top"),
|
|
247
|
+
bottom: D("bottom")
|
|
246
248
|
};
|
|
247
249
|
T.left < this.captionsSizes.xCaptionTail && (T.left = this.captionsSizes.xCaptionTail), T.bottom < this.captionsSizes.yCaptionTail && (T.bottom = this.captionsSizes.yCaptionTail);
|
|
248
|
-
const W =
|
|
250
|
+
const W = Ct(N, c, n), j = c + T.left + T.right, k = n + T.top + T.bottom;
|
|
249
251
|
this.chartsDimensions[z] = {
|
|
250
|
-
left:
|
|
252
|
+
left: u,
|
|
251
253
|
top: g,
|
|
252
|
-
inner: { width:
|
|
254
|
+
inner: { width: c, height: n },
|
|
253
255
|
outer: { width: j, height: k },
|
|
254
256
|
padding: T,
|
|
255
257
|
sideElementBBoxes: W,
|
|
256
258
|
chartEdgeSides: M
|
|
257
|
-
},
|
|
259
|
+
}, u += j, I === this.columnsCount && (u = 0, g += k);
|
|
258
260
|
});
|
|
259
|
-
const
|
|
260
|
-
this.chartSizes.chartsWidth =
|
|
261
|
+
const f = e.slice(0, this.columnsCount).reduce((z, E) => z + this.chartsDimensions[E].outer.width, 0), S = e.filter((z, E) => E % this.columnsCount === 0).reduce((z, E) => z + this.chartsDimensions[E].outer.height, 0);
|
|
262
|
+
this.chartSizes.chartsWidth = f, this.chartSizes.chartsHeight = S;
|
|
261
263
|
}
|
|
262
|
-
updateChartsSizes(
|
|
263
|
-
const { width:
|
|
264
|
-
this.chartSizes.chartWidth =
|
|
264
|
+
updateChartsSizes(s) {
|
|
265
|
+
const { width: e, height: t } = s;
|
|
266
|
+
this.chartSizes.chartWidth = e, this.chartSizes.chartHeight = t;
|
|
265
267
|
}
|
|
266
268
|
// update scales for cell positions, x and y for each facet
|
|
267
|
-
updateScales(e, t,
|
|
268
|
-
const { width:
|
|
269
|
-
(
|
|
270
|
-
),
|
|
271
|
-
(
|
|
269
|
+
updateScales(s, e, t, r, i, a, h, d, A) {
|
|
270
|
+
const { width: x, height: m } = i, { meta: y, facets: l } = e, { sharedX: c, sharedY: n } = r, o = (u, g = {}) => u.sort(
|
|
271
|
+
(f, S) => a.sorting === "asc" ? (g[f] ?? f).localeCompare(g[S] ?? S, "en", { numeric: !0 }) : (g[S] ?? S).localeCompare(g[f] ?? f, "en", { numeric: !0 })
|
|
272
|
+
), C = (u, g = {}) => u.sort(
|
|
273
|
+
(f, S) => h.sorting === "asc" ? (g[f] ?? f).localeCompare(g[S] ?? S, "en", { numeric: !0 }) : (g[S] ?? S).localeCompare(g[f] ?? f, "en", { numeric: !0 })
|
|
272
274
|
);
|
|
273
|
-
|
|
274
|
-
const g =
|
|
275
|
+
s.forEach((u) => {
|
|
276
|
+
const g = l[u], f = o(y.xGroupKeys), S = C(y.yGroupKeys), { xKeysByGroups: z } = c ? y : g, { yKeysByGroups: E } = n ? y : g, I = f.map((L) => z[L].length), M = S.map((L) => E[L].length), B = I.reduce((L, G) => L + G, 0), R = M.reduce((L, G) => L + G, 0), N = (x - (I.filter((L) => L > 0).length - 1) * t) / B, F = (m - (M.filter((L) => L > 0).length - 1) * t) / R, D = [], T = [];
|
|
275
277
|
let W = 0;
|
|
276
|
-
|
|
277
|
-
const G =
|
|
278
|
+
f.forEach((L) => {
|
|
279
|
+
const G = d ? z[L] : o(z[L], y.xLabels);
|
|
278
280
|
T.push(...G), G.forEach(() => {
|
|
279
|
-
|
|
280
|
-
}), G.length > 0 && (W +=
|
|
281
|
+
D.push(W), W += N;
|
|
282
|
+
}), G.length > 0 && (W += t);
|
|
281
283
|
});
|
|
282
284
|
const j = [], k = [];
|
|
283
|
-
let
|
|
285
|
+
let H = 0;
|
|
284
286
|
S.forEach((L) => {
|
|
285
|
-
const G = A ? E[L] :
|
|
287
|
+
const G = A ? E[L] : C(E[L], y.yLabels);
|
|
286
288
|
k.push(...G), G.forEach(() => {
|
|
287
|
-
j.push(
|
|
288
|
-
}), G.length > 0 && (
|
|
289
|
-
}), this.scales.x[
|
|
289
|
+
j.push(H), H += F;
|
|
290
|
+
}), G.length > 0 && (H += t);
|
|
291
|
+
}), this.scales.x[u] = _().domain(T).range(D), this.scales.y[u] = _().domain(k).range(j), this.step.x[u] = N, this.step.y[u] = F;
|
|
290
292
|
});
|
|
291
293
|
}
|
|
292
|
-
updateAesScale(e, t,
|
|
293
|
-
if (
|
|
294
|
-
|
|
295
|
-
else if (
|
|
296
|
-
const
|
|
297
|
-
this.colorScale =
|
|
298
|
-
} else
|
|
299
|
-
const { xDataByKeys:
|
|
300
|
-
|
|
301
|
-
const { colors: m, type: y, axis:
|
|
294
|
+
updateAesScale(s, e, t, r, i, a, h) {
|
|
295
|
+
if (s === "continuous")
|
|
296
|
+
t.valueColors ? this.colorScale = v().domain(t.valuesByColors ?? tt(h, t.valueColors.length, e)).range(t.valueColors) : t.colorsList && (this.colorScale = v().domain(tt(h, t.colorsList.length, e)).range(t.colorsList));
|
|
297
|
+
else if (t.colorsMap) {
|
|
298
|
+
const x = Object.entries(t.colorsMap);
|
|
299
|
+
this.colorScale = _().domain(x.map((m) => m[0])).range(x.map((m) => m[1])).unknown("#ccc");
|
|
300
|
+
} else t.colorsList && (this.colorScale = J(t.colorsList, a.map(String)));
|
|
301
|
+
const { xDataByKeys: d, yDataByKeys: A } = i.meta;
|
|
302
|
+
r.forEach((x) => {
|
|
303
|
+
const { colors: m, type: y, axis: l, valueColumn: c } = x, n = (l === "x" ? d : A)[c.value];
|
|
302
304
|
if (y === "discrete") {
|
|
303
|
-
const o =
|
|
304
|
-
this.annotationColorScales[
|
|
305
|
+
const o = ot.uniq(Object.values(n).map(String)).sort();
|
|
306
|
+
this.annotationColorScales[x.id] = {
|
|
305
307
|
type: "discrete",
|
|
306
|
-
scale:
|
|
308
|
+
scale: J(m, o)
|
|
307
309
|
};
|
|
308
310
|
} else {
|
|
309
311
|
const o = Object.values(n).map(Number);
|
|
310
312
|
if (!o.length)
|
|
311
313
|
return;
|
|
312
|
-
const [
|
|
313
|
-
this.annotationColorScales[
|
|
314
|
+
const [C = o[0], u = o[0]] = Lt(o);
|
|
315
|
+
this.annotationColorScales[x.id] = {
|
|
314
316
|
type: "continuous",
|
|
315
|
-
scale:
|
|
317
|
+
scale: ft(m, C, u, 0, 0.5, 1)
|
|
316
318
|
};
|
|
317
319
|
}
|
|
318
320
|
});
|
|
319
321
|
}
|
|
320
|
-
updateDendrogram(e, t,
|
|
321
|
-
|
|
322
|
-
this.dendrograms[
|
|
323
|
-
const { xKeysByGroups: A, yKeysByGroups:
|
|
324
|
-
if (
|
|
325
|
-
const
|
|
322
|
+
updateDendrogram(s, e, t, r, i, a, h) {
|
|
323
|
+
s.forEach((d) => {
|
|
324
|
+
this.dendrograms[d] = { x: { treesByGroupKey: {}, data: a }, y: { treesByGroupKey: {}, data: h } };
|
|
325
|
+
const { xKeysByGroups: A, yKeysByGroups: x } = r[d], { hierarchyByGroupX: m, hierarchyByGroupY: y } = i[d];
|
|
326
|
+
if (a) {
|
|
327
|
+
const l = e.reduce((c, n) => {
|
|
326
328
|
var o;
|
|
327
|
-
return Math.max(
|
|
329
|
+
return Math.max(c, (o = m[n]) == null ? void 0 : o.data.height);
|
|
328
330
|
}, 0);
|
|
329
|
-
this.dendrograms[
|
|
330
|
-
const o = m[n],
|
|
331
|
-
Q().separation(() => 1).size([
|
|
331
|
+
this.dendrograms[d].x.treesByGroupKey = e.reduce((c, n) => {
|
|
332
|
+
const o = m[n], C = A[n];
|
|
333
|
+
Q().separation(() => 1).size([C.length * this.step.x[d], a.size])(
|
|
332
334
|
o
|
|
333
335
|
);
|
|
334
|
-
const
|
|
335
|
-
return Z(
|
|
336
|
-
}, {}), this.dendrograms[
|
|
336
|
+
const u = o, g = v().domain(a.position === "top" ? [0, l] : [l, 0]).range([a.size, 0]);
|
|
337
|
+
return Z(u, g, "y"), $(u, this.scales.x[d](C[0]), "x"), c[n] = u, c;
|
|
338
|
+
}, {}), this.dendrograms[d].x.data = a;
|
|
337
339
|
}
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
+
if (h) {
|
|
341
|
+
const l = t.reduce((c, n) => {
|
|
340
342
|
var o;
|
|
341
|
-
return Math.max(
|
|
343
|
+
return Math.max(c, (o = y[n]) == null ? void 0 : o.data.height);
|
|
342
344
|
}, 0);
|
|
343
|
-
this.dendrograms[
|
|
344
|
-
const o = y[n],
|
|
345
|
-
Q().separation(() => 1).size([
|
|
345
|
+
this.dendrograms[d].y.treesByGroupKey = t.reduce((c, n) => {
|
|
346
|
+
const o = y[n], C = x[n];
|
|
347
|
+
Q().separation(() => 1).size([C.length * this.step.y[d], h.size])(
|
|
346
348
|
o
|
|
347
349
|
);
|
|
348
|
-
const
|
|
349
|
-
return $(
|
|
350
|
-
}, {}), this.dendrograms[
|
|
350
|
+
const u = o, g = v().domain(h.position === "left" ? [0, l] : [l, 0]).range([h.size, 0]);
|
|
351
|
+
return $(u, this.scales.y[d](C[0]), "x", "y"), Z(u, g, "x"), c[n] = u, c;
|
|
352
|
+
}, {}), this.dendrograms[d].y.data = h;
|
|
351
353
|
}
|
|
352
354
|
});
|
|
353
355
|
}
|
|
354
|
-
updateDendrogramAesScales(
|
|
355
|
-
if (!
|
|
356
|
+
updateDendrogramAesScales(s) {
|
|
357
|
+
if (!s)
|
|
356
358
|
return;
|
|
357
|
-
const
|
|
358
|
-
this.dendrogramAesScales =
|
|
359
|
-
const i =
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
...
|
|
363
|
-
...i[
|
|
359
|
+
const e = Object.keys(s);
|
|
360
|
+
this.dendrogramAesScales = e.reduce((t, r) => {
|
|
361
|
+
const i = s[r], a = Object.keys(i);
|
|
362
|
+
return t[r] = _().domain(a).range(
|
|
363
|
+
a.map((h) => ({
|
|
364
|
+
...V,
|
|
365
|
+
...i[h]
|
|
364
366
|
}))
|
|
365
|
-
).unknown(
|
|
367
|
+
).unknown(V), t;
|
|
366
368
|
}, {});
|
|
367
369
|
}
|
|
368
|
-
render(e, t,
|
|
369
|
-
var
|
|
370
|
-
const { meta:
|
|
371
|
-
this.updateChartsSizes(
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
p,
|
|
370
|
+
render(s, e, t, r, i, a, h, d, A, x, m, y, l, c, n) {
|
|
371
|
+
var N;
|
|
372
|
+
const { meta: o, facets: C } = a, { facetKeys: u, xGroupKeys: g, yGroupKeys: f, valueExtent: S } = o, { xAxis: z, yAxis: E, title: I, size: M, valueType: B } = t;
|
|
373
|
+
this.updateChartsSizes(M), this.updateAesScale(B, S, i, h, a, l, c), this.updateScales(u, a, i.groupGap, r, M, t.xAxis, t.yAxis, A, x), this.updateCaptionsSize(a, z, E, r), this.updateChartDimensions(
|
|
374
|
+
M,
|
|
375
|
+
u,
|
|
375
376
|
g,
|
|
376
|
-
|
|
377
|
-
S,
|
|
378
|
-
z,
|
|
377
|
+
f,
|
|
379
378
|
r,
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
379
|
+
z,
|
|
380
|
+
E,
|
|
381
|
+
h,
|
|
382
|
+
A,
|
|
383
|
+
x
|
|
384
|
+
), this.updateLegendSize(B, t.legend, h, d, S), this.updateMargins(I), this.updateDendrogram(u, g, f, C, m, A, x), this.updateDendrogramAesScales(y);
|
|
385
|
+
const R = /* @__PURE__ */ P.jsx(rt, { dataFrame: s, children: /* @__PURE__ */ P.jsx(
|
|
386
|
+
pt,
|
|
385
387
|
{
|
|
386
|
-
aes:
|
|
387
|
-
annotations:
|
|
388
|
+
aes: i,
|
|
389
|
+
annotations: h,
|
|
388
390
|
annotationColorScales: this.annotationColorScales,
|
|
389
391
|
captionsSizes: this.captionsSizes,
|
|
390
|
-
cellsMeta:
|
|
392
|
+
cellsMeta: o,
|
|
391
393
|
columnsCount: this.columnsCount,
|
|
392
394
|
chartsDimensions: this.chartsDimensions,
|
|
393
395
|
chartSettings: t,
|
|
@@ -395,28 +397,28 @@ class Xt {
|
|
|
395
397
|
colorScale: this.colorScale,
|
|
396
398
|
dendrogramAesScales: this.dendrogramAesScales,
|
|
397
399
|
dendrograms: this.dendrograms,
|
|
398
|
-
facetKeys:
|
|
399
|
-
facetSettings:
|
|
400
|
-
groupedCells:
|
|
400
|
+
facetKeys: u,
|
|
401
|
+
facetSettings: r,
|
|
402
|
+
groupedCells: C,
|
|
401
403
|
labelAngles: this.labelAngles,
|
|
402
404
|
legend: this.legend,
|
|
403
405
|
margins: this.margins,
|
|
404
406
|
scales: this.scales,
|
|
405
407
|
settingsId: e,
|
|
406
408
|
step: this.step,
|
|
407
|
-
xGroupKeys:
|
|
408
|
-
yGroupKeys:
|
|
409
|
-
onTooltipHintSwitch:
|
|
409
|
+
xGroupKeys: g,
|
|
410
|
+
yGroupKeys: f,
|
|
411
|
+
onTooltipHintSwitch: n
|
|
410
412
|
}
|
|
411
|
-
);
|
|
412
|
-
this.component =
|
|
413
|
+
) });
|
|
414
|
+
this.component = R, (N = this.reactRoot) == null || N.render(R);
|
|
413
415
|
}
|
|
414
|
-
renderError(
|
|
415
|
-
var
|
|
416
|
-
(
|
|
416
|
+
renderError(s) {
|
|
417
|
+
var e;
|
|
418
|
+
(e = this.reactRoot) == null || e.render(/* @__PURE__ */ P.jsx(nt, { message: s }));
|
|
417
419
|
}
|
|
418
420
|
}
|
|
419
421
|
export {
|
|
420
|
-
|
|
422
|
+
qt as default
|
|
421
423
|
};
|
|
422
424
|
//# sourceMappingURL=ChartRenderer.js.map
|