@milaboratories/graph-maker 1.1.138 → 1.1.140
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/GraphMaker/components/Chart.vue.d.ts.map +1 -1
- package/dist/GraphMaker/components/Chart.vue.js +1 -0
- package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
- package/dist/GraphMaker/components/LassoControls/index.vue.js +15 -13
- package/dist/GraphMaker/components/LassoControls/index.vue.js.map +1 -1
- package/dist/GraphMaker/dataBindAes.d.ts +5 -5
- package/dist/GraphMaker/dataBindAes.d.ts.map +1 -1
- package/dist/GraphMaker/dataBindAes.js +52 -49
- package/dist/GraphMaker/dataBindAes.js.map +1 -1
- package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js +14 -14
- package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js.map +1 -1
- package/dist/GraphMaker/index.vue.d.ts.map +1 -1
- package/dist/GraphMaker/index.vue.js +125 -124
- package/dist/GraphMaker/index.vue.js.map +1 -1
- package/dist/GraphMaker/types.d.ts +1 -1
- package/dist/GraphMaker/types.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +6 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -8
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +15 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +12 -3
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +21 -0
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +10 -6
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +31 -13
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +56 -62
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +29 -13
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +20 -19
- package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +57 -54
- package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
- package/dist/lib.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js +95 -72
- package/dist/node_modules/@milaboratories/miplots4/dist/DataFrame.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +8 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js +124 -122
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js +72 -91
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js +43 -41
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js +28 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCellTooltip.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js +94 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getGroupedCellsData.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +38 -34
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js +4 -22
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Legend.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js +11 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/common/Tooltip.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js +20 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/common/useDataFrame.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +181 -181
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js +2 -2
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/DendroSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js +45 -45
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js +27 -27
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/Legend.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js +18 -18
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/LinksGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js +36 -36
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/components/NodesGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js +45 -41
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHeatmapData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js +33 -33
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/getHierarchyData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +90 -93
- package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +199 -198
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +17 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/BoxElement.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +102 -99
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js +31 -36
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/bar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js +62 -74
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/binnedDots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js +52 -53
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/boxes.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js +32 -32
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js +7 -6
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/lines.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js +23 -23
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/logo.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js +63 -63
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/pairedPoints.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js +60 -64
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/sina.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js +23 -23
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedBar.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js +5 -5
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/getOutliersBounds.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js +13 -13
- package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js +258 -256
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +81 -79
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +140 -134
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +17 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js +99 -95
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/getCells.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +32 -31
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateAnnotationTitleSizes.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/utils/calculateCaptionTails.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +143 -142
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/HistogramSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js +30 -30
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/Chart.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/components/ChartsGroup.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js +53 -54
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/getHistogramData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +62 -58
- package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/@d3fc/d3fc-axis/src/axisBase.js +7 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js +6 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-shape/src/line.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js +148 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/kdbush/index.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +172 -168
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +28 -28
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +11 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js +30 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxisTitles.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js +135 -153
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js +35 -32
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +27 -27
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +14 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/constants.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +24 -25
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +13 -13
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +69 -76
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js +85 -83
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js +20 -20
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createAesGetter.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +50 -38
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js +11 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js +46 -56
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js +18 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +223 -205
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +26 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js +42 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/colors.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +84 -81
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/SVGLayer.js +11 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js +15 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/UpperSVG.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +97 -118
- package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +3 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/histogram.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +23 -17
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +25 -19
- package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js +39 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/TextMeasurer.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js +101 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer/charToWidth.json.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js +4 -4
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arrangeLegendParts.js.map +1 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js +7 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js.map +1 -0
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/getLegendWidth.js.map +1 -1
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +1111 -1097
- package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js +0 -91
- package/dist/node_modules/@milaboratories/miplots4/dist/bubble/getCells.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js +0 -30
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/add.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js +0 -29
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/cover.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js +0 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/data.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js +0 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/extent.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js +0 -26
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/find.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js +0 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quad.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js +0 -51
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/quadtree.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js +0 -21
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/remove.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js +0 -7
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/root.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js +0 -12
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/size.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js +0 -14
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visit.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js +0 -19
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/visitAfter.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js +0 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/x.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js +0 -11
- package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-quadtree/src/y.js.map +0 -1
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js +0 -24
- package/dist/node_modules/@milaboratories/miplots4/dist/utils/TextMeasurer.js.map +0 -1
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLegendInfo.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/utils/createLegendInfo.ts"],"sourcesContent":["import {MAX_SHOWN_UNIQUE_VALUES_IN_LABELS} from '../../constants';\nimport type {DataFrame} from '../../DataFrame';\nimport type {
|
|
1
|
+
{"version":3,"file":"createLegendInfo.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/utils/createLegendInfo.ts"],"sourcesContent":["import { MAX_SHOWN_UNIQUE_VALUES_IN_LABELS } from '../../constants';\nimport type { DataFrame } from '../../DataFrame';\nimport type {AesRecord} from '../../types';\nimport type {\n AesItem,\n Category,\n ColumnName,\n ContinuousAesFromColumn,\n InheritAesScatterplot,\n ScatterplotLayer,\n ScatterplotLegendInfo\n} from '../../types';\nimport type { ScatterplotSettingsImpl } from '../ScatterplotSettingsImpl';\n\nconst categoryIndexer = (() => {\n const map = new Map<string, Map<Category, number>>();\n const clear = () => map.clear();\n const getIndex = (columnName: ColumnName, category: Category): number => {\n let categoryMap = map.get(columnName.value);\n if (categoryMap === undefined) {\n categoryMap = new Map();\n map.set(columnName.value, categoryMap);\n }\n let index = categoryMap.get(category);\n if (index === undefined) {\n index = categoryMap.size;\n categoryMap.set(category, index);\n }\n return index;\n };\n\n return {\n clear,\n getIndex,\n };\n})();\n\nexport function addPalettesToAesMapping(\n columnName: ColumnName,\n usedAesFromPalettes: Partial<Record<keyof AesItem, string[]>>,\n inheritedAes?: AesRecord\n) {\n categoryIndexer.clear();\n const hasInheritedAes = inheritedAes && Object.keys(inheritedAes).length > 0;\n const dotFill = usedAesFromPalettes['dotFill'];\n const hasDotFill = dotFill && dotFill.length > 0;\n const lineColor = usedAesFromPalettes['lineColor'];\n const hasLineColor = lineColor && lineColor.length > 0;\n const getAesField = (category: Category, field: keyof AesItem) => {\n const inheritedResult = hasInheritedAes ? inheritedAes[category]?.[field] : undefined;\n \n if (field === 'dotFill' && hasDotFill) {\n return dotFill[categoryIndexer.getIndex(columnName, category) % dotFill.length] ?? inheritedResult;\n }\n if (field === 'lineColor' && hasLineColor) {\n return lineColor[categoryIndexer.getIndex(columnName, category) % lineColor.length] ?? inheritedResult;\n }\n \n return inheritedResult;\n };\n\n return getAesField;\n}\n\nfunction isInheritMapping<T extends (string | number)>(value:T | InheritAesScatterplot | ContinuousAesFromColumn<T>):value is InheritAesScatterplot {\n return typeof value === 'object' && 'type' in value && value.type === 'grouping';\n}\nexport function createLegendInfo(\n data: DataFrame,\n grouping: ScatterplotSettingsImpl['grouping'],\n layers: ScatterplotLayer[],\n): ScatterplotLegendInfo {\n return grouping.reduce((res: ScatterplotLegendInfo, groupingElement) => {\n // TODO: remove String conversion\n const column = groupingElement.columnName;\n const order = groupingElement.order;\n const getValueLabel = (index: number) => {\n return column.valueLabels\n ? data.getColumnValueCategory(column.valueLabels, index)\n : undefined;\n };\n\n const usedAes = new Set<keyof AesItem>();\n const usedAesFromPalettes:Partial<Record<keyof AesItem, string[]>> = {}; // if there is palette in mapping then\n layers.forEach(layer => {\n if (!layer.aes) return;\n \n Object.entries(layer.aes).forEach(([key, value]) => {\n if (!(isInheritMapping(value) && value.value === column.value)) return;\n \n usedAes.add(key as keyof AesItem);\n usedAesFromPalettes[key as keyof AesItem] = value.palette;\n });\n });\n let labels: Record<Category, string> = {};\n let values: Category[] = [];\n if (usedAes.has('dotFill') || usedAes.has('dotShape')) {\n const categories = data.getColumnCategories(column.value);\n if (categories.length < MAX_SHOWN_UNIQUE_VALUES_IN_LABELS) {\n labels = categories.reduce((res, category) => {\n const index = data.getColumnCategoryRowIndex(column.value, category);\n res[category] = getValueLabel(index) ?? category;\n return res;\n }, labels);\n const sortWeights = categories.reduce((res, v) => {\n res[v] = order?.indexOf(v) ?? -1;\n return res;\n }, {} as Record<string, number>);\n values = categories.sort((a, b) => {\n if (sortWeights[a] !== sortWeights[b]) {\n return sortWeights[a] - sortWeights[b];\n }\n return labels[a]?.localeCompare(labels[b] ?? '', 'en', {numeric: true}) ?? 0;\n });\n } else {\n values = categories;\n }\n }\n res[column.value] = {\n values,\n usedAes: [...usedAes],\n aesMap: addPalettesToAesMapping(column, usedAesFromPalettes, groupingElement.inheritedAes),\n labels,\n };\n return res;\n }, {});\n}"],"names":["categoryIndexer","map","columnName","category","categoryMap","index","addPalettesToAesMapping","usedAesFromPalettes","inheritedAes","hasInheritedAes","dotFill","hasDotFill","lineColor","hasLineColor","field","inheritedResult","_a","isInheritMapping","value","createLegendInfo","data","grouping","layers","res","groupingElement","column","order","getValueLabel","usedAes","layer","key","labels","values","categories","MAX_SHOWN_UNIQUE_VALUES_IN_LABELS","sortWeights","v","a","b"],"mappings":";AAcA,MAAMA,IAAmB,uBAAM;AAC3B,QAAMC,wBAAU,IAAA;AAgBhB,SAAO;AAAA,IACH,OAhBU,MAAMA,EAAI,MAAA;AAAA,IAiBpB,UAhBa,CAACC,GAAwBC,MAA+B;AACrE,UAAIC,IAAcH,EAAI,IAAIC,EAAW,KAAK;AACtCE,MAAAA,MAAgB,WAChBA,IAAAA,oBAAkB,IAAA,GAClBH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G,CAAA,CAAE;AACT;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { numberFormat as t } from "../../utils/numberFormat.js";
|
|
2
|
+
function m(n, l, u, o = t) {
|
|
3
|
+
if (!u)
|
|
4
|
+
return null;
|
|
5
|
+
const e = n.getColumnValue(u.valueLabels ?? u.value, l);
|
|
6
|
+
return typeof e != "number" || e === null ? e : o(e);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
m as formatColumnValue
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=formatColumnValue.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/formatColumnValue.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatColumnValue.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/utils/formatColumnValue.ts"],"sourcesContent":["import type {DataFrame} from '../../DataFrame';\nimport type {ColumnName} from '../../types';\nimport {numberFormat} from '../../utils/numberFormat';\n\nexport function formatColumnValue(data:DataFrame, rowIdx:number, column:ColumnName | null | undefined, numberFormatter = numberFormat) {\n if (!column) {\n return null;\n }\n const value = data.getColumnValue(column.valueLabels ?? column.value, rowIdx);\n const isNumber = typeof value === 'number';\n if (!isNumber || value === null) {\n return value;\n }\n return numberFormatter(value);\n}"],"names":["formatColumnValue","data","rowIdx","column","numberFormatter","numberFormat","value"],"mappings":";AAIO,SAASA,EAAkBC,GAAgBC,GAAeC,GAAsCC,IAAkBC,GAAc;AACnI,MAAI,CAACF;AACD,WAAO;AAEX,QAAMG,IAAQL,EAAK,eAAeE,EAAO,eAAeA,EAAO,OAAOD,CAAM;AAE5E,SADiB,OAAOI,KAAU,YACjBA,MAAU,OAChBA,IAEJF,EAAgBE,CAAK;AAChC;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js
CHANGED
|
@@ -1,60 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return
|
|
19
|
-
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
for (const a of o)
|
|
45
|
-
for (const [h, B] of l) {
|
|
46
|
-
const t = { ...a, yPosition: h, xPosition: B };
|
|
47
|
-
if (t.bbox = c(t), t.outerBBox = f(t, e, r), P(t.outerBBox, i, n) && !s.collides(t.outerBBox)) {
|
|
48
|
-
d.push(t), s.insert(t.outerBBox);
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return d;
|
|
1
|
+
import X from "../../node_modules/rbush/index.js";
|
|
2
|
+
function a(i, e, t, o, n) {
|
|
3
|
+
return o !== "middle" && n !== "middle" && (t *= 0.7), o === "right" ? i + t : o === "middle" ? i - e / 2 : i - e - t;
|
|
4
|
+
}
|
|
5
|
+
function s(i, e, t, o, n) {
|
|
6
|
+
return o !== "middle" && n !== "middle" && (t *= 0.7), n === "middle" ? i - e / 2 : n === "top" ? i - t - e : i + t;
|
|
7
|
+
}
|
|
8
|
+
function g(i, e, t, o, n, r) {
|
|
9
|
+
return a(i, e, t, o, n) - r;
|
|
10
|
+
}
|
|
11
|
+
function p(i, e, t, o, n, r) {
|
|
12
|
+
return s(i, e, t, o, n) - r;
|
|
13
|
+
}
|
|
14
|
+
function h(i, e, t, o, n, r, m, l, u, d = { minX: 0, maxX: 0, minY: 0, maxY: 0 }) {
|
|
15
|
+
return d.minX = g(i, t, n, r, m, u), d.maxX = a(i, t, n, r, m) + t + u, d.minY = p(e, o, n, r, m, l), d.maxY = d.minY + o + 2 * l, d;
|
|
16
|
+
}
|
|
17
|
+
function b(i, e, t) {
|
|
18
|
+
return i.minX >= 0 && i.maxX <= e && i.minY >= 0 && i.maxY <= t;
|
|
19
|
+
}
|
|
20
|
+
function M(i) {
|
|
21
|
+
return a(i.x, i.width, i.padding, i.xPosition, i.yPosition);
|
|
22
|
+
}
|
|
23
|
+
function w(i) {
|
|
24
|
+
return s(i.y, i.height, i.padding, i.xPosition, i.yPosition);
|
|
25
|
+
}
|
|
26
|
+
const P = [
|
|
27
|
+
["middle", "right"],
|
|
28
|
+
["top", "right"],
|
|
29
|
+
["bottom", "right"],
|
|
30
|
+
["middle", "left"],
|
|
31
|
+
["top", "left"],
|
|
32
|
+
["bottom", "left"],
|
|
33
|
+
["top", "middle"],
|
|
34
|
+
["bottom", "middle"]
|
|
35
|
+
], x = 2, y = { minX: 0, maxX: 0, minY: 0, maxY: 0 };
|
|
36
|
+
function k(i, e, t = x, o = x) {
|
|
37
|
+
const n = y, r = new X();
|
|
38
|
+
return (m, l, u, d, Y) => {
|
|
39
|
+
for (const [f, c] of P)
|
|
40
|
+
if (h(m, l, u, d, Y, c, f, t, o, n), b(n, i, e) && !r.collides(n))
|
|
41
|
+
return r.insert({ ...n }), [c, f];
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
53
44
|
}
|
|
54
45
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
X as updateLabelsBBoxes
|
|
46
|
+
k as createLabelPositioner,
|
|
47
|
+
M as getLabelMinX,
|
|
48
|
+
w as getLabelMinY
|
|
59
49
|
};
|
|
60
50
|
//# sourceMappingURL=getVisibleLabels.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/getVisibleLabels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVisibleLabels.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/utils/getVisibleLabels.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"getVisibleLabels.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/utils/getVisibleLabels.ts"],"sourcesContent":["import RBush from 'rbush';\nimport type { Dot } from '../dots';\n\ntype XPosition = 'right' | 'middle' | 'left';\ntype YPosition = 'top' | 'middle' | 'bottom';\nexport type Label = {\n x: number;\n y: number;\n dot: Dot;\n name: string;\n width: number;\n height: number;\n padding: number;\n xPosition: XPosition;\n yPosition: YPosition;\n};\nexport type LabelBBox = {\n minX: number;\n maxX: number;\n minY: number;\n maxY: number;\n}\n\nfunction getX(x: number, width: number, padding: number, xPos: XPosition, yPos: YPosition) {\n const isCorner = xPos !== 'middle' && yPos !== 'middle';\n isCorner && (padding *= 0.7);\n return xPos === 'right'\n ? x + padding\n : xPos === 'middle'\n ? x - width / 2\n : x - width - padding;\n}\nfunction getY(y: number, height: number, padding: number, xPos: XPosition, yPos: YPosition) {\n const isCorner = xPos !== 'middle' && yPos !== 'middle';\n isCorner && (padding *= 0.7);\n return yPos === 'middle'\n ? y - height / 2\n : yPos === 'top'\n ? y - padding - height\n : y + padding;\n}\n\nfunction getXOuter(x: number, width: number, padding: number, xPos: XPosition, yPos: YPosition, offsetH:number) {\n return getX(x, width, padding, xPos, yPos) - offsetH;\n}\nfunction getYOuter(y: number, height: number, padding: number, xPos: XPosition, yPos: YPosition, offsetV:number) {\n return getY(y, height, padding, xPos, yPos) - offsetV;\n}\nfunction getLabelOuterBBox(\n x: number,\n y: number,\n width: number,\n height: number,\n padding: number,\n xPos: XPosition,\n yPos: YPosition,\n yOffset: number,\n xOffset: number,\n out = {minX: 0, maxX: 0, minY: 0, maxY: 0}\n):LabelBBox {\n out.minX = getXOuter(x, width, padding, xPos, yPos, xOffset); // consider padding for dot\n out.maxX = getX(x, width, padding, xPos, yPos) + width + xOffset;\n out.minY = getYOuter(y, height, padding, xPos, yPos, yOffset);\n out.maxY = out.minY + height + 2 * yOffset;\n\n return out;\n}\nfunction inBounds (bbox: LabelBBox, width: number, height: number) {\n return bbox.minX >= 0 && bbox.maxX <= width && bbox.minY >= 0 && bbox.maxY <= height;\n}\n\nexport function getLabelMinX(label: Label) {\n return getX(label.x, label.width, label.padding, label.xPosition, label.yPosition);\n}\nexport function getLabelMinY(label: Label) {\n return getY(label.y, label.height, label.padding, label.xPosition, label.yPosition);\n}\n\nconst positionOptions: [YPosition, XPosition][] = [\n ['middle', 'right'],\n ['top', 'right'],\n ['bottom', 'right'],\n ['middle', 'left'],\n ['top', 'left'],\n ['bottom', 'left'],\n ['top', 'middle'],\n ['bottom', 'middle'],\n];\nconst LABEL_OFFSET = 2;\nconst MUT_BBOX: LabelBBox = {minX: 0, maxX: 0, minY: 0, maxY: 0};\nexport function createLabelPositioner(chartW: number, chartH: number, yOffset = LABEL_OFFSET, xOffset = LABEL_OFFSET) {\n const outerBBox = MUT_BBOX;\n const bboxTree = new RBush<LabelBBox>();\n \n return (x: number, y: number, w: number, h: number, padding: number): null | [XPosition, YPosition] => {\n for (const [yPosition, xPosition] of positionOptions) {\n getLabelOuterBBox(x, y, w, h, padding, xPosition, yPosition, yOffset, xOffset, outerBBox);\n\n if (inBounds(outerBBox, chartW, chartH) && !bboxTree.collides(outerBBox)) {\n bboxTree.insert({...outerBBox});\n return [xPosition, yPosition];\n }\n }\n\n return null;\n };\n}"],"names":["getX","x","width","padding","xPos","yPos","getY","y","height","getXOuter","offsetH","getYOuter","offsetV","getLabelOuterBBox","yOffset","xOffset","out","inBounds","bbox","getLabelMinX","label","getLabelMinY","positionOptions","LABEL_OFFSET","MUT_BBOX","createLabelPositioner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,KAAKA,EAAK,QAAQV;AAClF;AAEO,SAASW,EAAaC,GAAc;AACvC,SAAOpB,EAAKoB,EAAM,GAAGA,EAAM,OAAOA,EAAM,SAASA,EAAM,WAAWA,EAAM,SAAS;AACrF;AACO,SAASC,EAAaD,GAAc;AACvC,SAAOd,EAAKc,EAAM,GAAGA,EAAM,QAAQA,EAAM,SAASA,EAAM,WAAWA,EAAM,SAAS;AACtF;AAEA,MAAME,IAA4C;AAAA,EAC9C,CAAC,UAAU,OAAO;AAAA,EAClB,CAAC,OAAO,OAAO;AAAA,EACf,CAAC,UAAU,OAAO;AAAA,EAClB,CAAC,UAAU,MAAM;AAAA,EACjB,CAAC,OAAO,MAAM;AAAA,EACd,CAAC,UAAU,MAAM;AAAA,EACjB,CAAC,OAAO,QAAQ;AAAA,EAChB,CAAC,UAAU,QAAQ;AACvB,GACMC,IAAe,GACfC,IAAsB,EAAC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAA;AACvD,SAASC,EAAsBC,GAAgBC,GAAgBb,IAAUS,GAAcR,IAAUQ,GAAc;AAClH,QAAMK,IAAYJ,GACZK,IAAW,IAAIC,EAAAA;AAErB,SAAO,CAAC7B,GAAWM,GAAWwB,GAAWC,GAAW7B,MAAmD;AACnG,eAAW,CAAC8B,GAAWC,CAAS,KAAKZ;AAGjC,UAFAT,EAAkBZ,GAAGM,GAAGwB,GAAGC,GAAG7B,GAAS+B,GAAWD,GAAWnB,GAASC,GAASa,CAAS,GAEpFX,EAASW,GAAWF,GAAQC,CAAM,KAAK,CAACE,EAAS,SAASD,CAAS;AACnE,eAAAC,EAAS,OAAO,EAAC,GAAGD,GAAU,GACvB,CAACM,GAAWD,CAAS;AAIpC,WAAO;AAAA,EACX;AACJ;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function f(n, c, m, v) {
|
|
2
|
+
const a = m.reduce((o, { columnName: l, order: e }) => (e && (o[l.value] = e.reduce((r, u, d) => (r[u] = e.length - d, r), {})), o), {});
|
|
3
|
+
c.sort((o, l) => {
|
|
4
|
+
var e, r;
|
|
5
|
+
if (v && l.dimmed !== o.dimmed)
|
|
6
|
+
return l.dimmed ? 1 : -1;
|
|
7
|
+
for (const { columnName: u } of m) {
|
|
8
|
+
const d = n.getColumnValue(u.value, o.idx), s = n.getColumnValue(u.value, l.idx), t = (e = a[u.value]) == null ? void 0 : e[d], i = (r = a[u.value]) == null ? void 0 : r[s];
|
|
9
|
+
if (t !== i)
|
|
10
|
+
return t - i;
|
|
11
|
+
}
|
|
12
|
+
return 0;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
f as sortDotsByGrouping
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=sortDotsByGrouping.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortDotsByGrouping.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/utils/sortDotsByGrouping.ts"],"sourcesContent":["import type {DataFrame} from '../../DataFrame';\nimport type {ColumnName, DataValue} from '../../types';\nimport type {Dot} from '../dots';\n\nexport function sortDotsByGrouping(\n dataFrame: DataFrame,\n dots:Dot[],\n grouping: {columnName: ColumnName; order?: DataValue[];}[],\n highlight: ColumnName | null\n) {\n const weightsByColumnByOrder = grouping.reduce((res, {columnName, order}) => {\n if (order) {\n res[columnName.value] = order.reduce((weights, orderEl, idx) => {\n weights[orderEl as string] = order.length - idx;\n return weights;\n }, {} as Record<string, number>);\n }\n return res;\n }, {} as Record<string, Record<string, number>>);\n\n dots.sort((d1, d2) => {\n if (highlight && d2.dimmed !== d1.dimmed) {\n return d2.dimmed ? 1 : -1;\n }\n for (const {columnName} of grouping) {\n const aValue = dataFrame.getColumnValue(columnName.value, d1.idx);\n const bValue = dataFrame.getColumnValue(columnName.value, d2.idx);\n const aWeight = weightsByColumnByOrder[columnName.value]?.[aValue as string];\n const bWeight = weightsByColumnByOrder[columnName.value]?.[bValue as string];\n if (aWeight !== bWeight) {\n return aWeight - bWeight;\n }\n }\n return 0;\n });\n}"],"names":["sortDotsByGrouping","dataFrame","dots","grouping","highlight","weightsByColumnByOrder","res","columnName","order","weights","orderEl","idx","d1","d2","_a","_b","aValue","bValue","aWeight","bWeight"],"mappings":"AAIO,SAASA,EACZC,GACAC,GACAC,GACAC,GACF;AACE,QAAMC,IAAyBF,EAAS,OAAO,CAACG,GAAK,EAAC,YAAAC,GAAY,OAAAC,EAAAA,OAC1DA,MACAF,EAAIC,EAAW,KAAK,IAAIC,EAAM,OAAO,CAACC,GAASC,GAASC,OACpDF,EAAQC,CAAiB,IAAIF,EAAM,SAASG,GACrCF,IACR,CAAA,CAA4B,IAE5BH,IACR,EAA4C;AAE/CJ,EAAAA,EAAK,KAAK,CAACU,GAAIC,MAAO;AAhBnB,QAAAC,GAAAC;AAiBC,QAAIX,KAAaS,EAAG,WAAWD,EAAG;AAC9B,aAAOC,EAAG,SAAS,IAAI;AAE3B,eAAW,EAAC,YAAAN,EAAAA,KAAeJ,GAAU;AACjC,YAAMa,IAASf,EAAU,eAAeM,EAAW,OAAOK,EAAG,GAAG,GAC1DK,IAAShB,EAAU,eAAeM,EAAW,OAAOM,EAAG,GAAG,GAC1DK,KAAUJ,IAAAT,EAAuBE,EAAW,KAAK,MAAvC,gBAAAO,EAA2CE,CAAAA,GACrDG,KAAUJ,IAAAV,EAAuBE,EAAW,KAAK,MAAvC,gBAAAQ,EAA2CE,CAAAA;AAC3D,UAAIC,MAAYC;AACZ,eAAOD,IAAUC;AAAAA,IAEzB;AACA,WAAO;AAAA,EACX,CAAC;AACL;","x_google_ignoreList":[0]}
|