@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
|
@@ -1,257 +1,236 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { j as b } from "../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import B from "../node_modules/@d3fc/d3fc-chart/src/cartesian.js";
|
|
3
|
+
import "../node_modules/@d3fc/d3fc-webgl/src/scale/scaleMapper.js";
|
|
4
|
+
import U from "../node_modules/@d3fc/d3fc-webgl/src/style/fillColor.js";
|
|
5
|
+
import V from "../node_modules/@d3fc/d3fc-series/src/webgl/point.js";
|
|
6
|
+
import K from "../node_modules/@d3fc/d3fc-series/src/svg/multi.js";
|
|
7
|
+
import j from "../node_modules/@d3fc/d3fc-series/src/webgl/multi.js";
|
|
8
|
+
import q from "../node_modules/d3-zoom/src/zoom.js";
|
|
9
|
+
import "../node_modules/d3-zoom/src/transform.js";
|
|
10
|
+
import { createRoot as X } from "../node_modules/react-dom/client.js";
|
|
11
|
+
import { Error as Y } from "../common/Error.js";
|
|
12
|
+
import { DEFAULT_HEIGHT as w, DEFAULT_WIDTH as E, TITLE_LINE_HEIGHT as Q, BLACK as F, TITLE_MARGIN as J } from "../constants.js";
|
|
13
|
+
import { splitTextByWidth as Z } from "../discrete/utils/splitTextByWidth.js";
|
|
14
|
+
import { MIN_MARGIN as C, DEFAULT_DOT_AES as M } from "../scatterplot/constants.js";
|
|
15
|
+
import { createAesGetter as P } from "../scatterplot/utils/createAesGetter.js";
|
|
16
|
+
import { getTicksAndFormat as tt } from "../scatterplot/utils/getTicksAndFormat.js";
|
|
17
|
+
import { createLabelPositioner as et } from "../scatterplot/utils/getVisibleLabels.js";
|
|
18
|
+
import { isContinuousAes as G } from "../types/common.js";
|
|
12
19
|
import "../types/discrete.js";
|
|
13
20
|
import "../types/scatterplot.js";
|
|
14
21
|
import "../types/heatmap.js";
|
|
15
22
|
import "../types/dendro.js";
|
|
16
23
|
import "../types/histogram.js";
|
|
17
24
|
import "../types/bubble.js";
|
|
18
|
-
import { getContinuousColorScale as
|
|
19
|
-
import { getContinuousLegendTicks as
|
|
20
|
-
import { TextMeasurer as
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import "../node_modules/
|
|
24
|
-
import
|
|
25
|
-
import "../
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import gt from "../node_modules/@d3fc/d3fc-pointer/src/pointer.js";
|
|
31
|
-
import { arrangeLegendParts as yt } from "../utils/arrangeLegendParts.js";
|
|
32
|
-
import C from "../node_modules/d3-scale/src/linear.js";
|
|
33
|
-
import U from "../node_modules/d3-scale/src/log.js";
|
|
25
|
+
import { getContinuousColorScale as st } from "../utils/getContinuousColorScale.js";
|
|
26
|
+
import { getContinuousLegendTicks as it } from "../utils/getContinuousLegendTicks.js";
|
|
27
|
+
import { TextMeasurer as $ } from "../utils/TextMeasurer/TextMeasurer.js";
|
|
28
|
+
import { SVGLayer as at } from "./components/SVGLayer.js";
|
|
29
|
+
import { PADDINGS as D, TITLE_LINE as I, LEGEND_OFFSET as ot } from "./constants.js";
|
|
30
|
+
import lt from "../node_modules/@d3fc/d3fc-pointer/src/pointer.js";
|
|
31
|
+
import rt from "../node_modules/kdbush/index.js";
|
|
32
|
+
import { DataFrameProvider as nt } from "../common/useDataFrame.js";
|
|
33
|
+
import { arrangeLegendParts as ht } from "../utils/arrangeLegendParts.js";
|
|
34
|
+
import { stringToNumberRgba as W, getColorWithFakeOpacity as H, GET_BLACK as O } from "./colors.js";
|
|
35
|
+
import T from "../node_modules/d3-scale/src/linear.js";
|
|
36
|
+
import _ from "../node_modules/d3-scale/src/log.js";
|
|
34
37
|
import N from "../node_modules/d3-selection/src/select.js";
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import { sqrt as
|
|
38
|
-
import
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
function R(n) {
|
|
43
|
-
return n / 2.35 * (n / 2.35) * 64;
|
|
44
|
-
}
|
|
45
|
-
function G(n, t) {
|
|
46
|
-
return n + (1 - n) * (1 - t);
|
|
38
|
+
import dt from "../node_modules/d3-scale/src/ordinal.js";
|
|
39
|
+
import ct from "../node_modules/d3-scale/src/symlog.js";
|
|
40
|
+
import { sqrt as mt } from "../node_modules/d3-scale/src/pow.js";
|
|
41
|
+
import pt from "../node_modules/d3-polygon/src/contains.js";
|
|
42
|
+
var ut = Object.defineProperty, gt = (S, t, e) => t in S ? ut(S, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : S[t] = e, c = (S, t, e) => gt(S, typeof t != "symbol" ? t + "" : t, e);
|
|
43
|
+
function R(S) {
|
|
44
|
+
return S / 2.35 * (S / 2.35) * 64;
|
|
47
45
|
}
|
|
48
|
-
function
|
|
49
|
-
return [
|
|
50
|
-
G(n.r / 255, t),
|
|
51
|
-
G(n.g / 255, t),
|
|
52
|
-
G(n.b / 255, t),
|
|
53
|
-
1
|
|
54
|
-
];
|
|
46
|
+
function A(S, t, e) {
|
|
47
|
+
return e.length === 0 ? !0 : e.some((s) => s.closed && s.points.length > 2 && pt(s.points, [S, t]));
|
|
55
48
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
function V(n, t) {
|
|
60
|
-
const e = t.find((d) => d.type === "dots"), i = t.find((d) => d.type === "curve");
|
|
49
|
+
function k(S, t, e) {
|
|
50
|
+
const s = e.find((a) => a.type === "dots"), l = e.find((a) => a.type === "curve");
|
|
61
51
|
return {
|
|
62
|
-
dotFill:
|
|
63
|
-
dotSize:
|
|
64
|
-
lineType:
|
|
52
|
+
dotFill: P(S, t, (s == null ? void 0 : s.aes.dotFill) ?? M.color, "dotFill"),
|
|
53
|
+
dotSize: P(S, t, (s == null ? void 0 : s.aes.dotSize) ?? M.size, "dotSize"),
|
|
54
|
+
lineType: P(S, t, (l == null ? void 0 : l.aes.lineShape) ?? "solid", "lineShape")
|
|
65
55
|
};
|
|
66
56
|
}
|
|
67
|
-
class
|
|
57
|
+
class ie {
|
|
68
58
|
constructor() {
|
|
69
|
-
|
|
59
|
+
c(this, "reactRoot", null), c(this, "parentNode", null), c(this, "rootNode", null), c(this, "canvasNode", null), c(this, "svgLayerElement", null), c(this, "svgLayerComponent", /* @__PURE__ */ b.jsx(b.Fragment, {})), c(this, "aesGetters", {
|
|
70
60
|
dotSize: () => 2,
|
|
71
|
-
dotFill: () =>
|
|
61
|
+
dotFill: () => F,
|
|
72
62
|
lineType: () => "solid"
|
|
73
|
-
}),
|
|
74
|
-
top:
|
|
75
|
-
bottom:
|
|
76
|
-
left:
|
|
77
|
-
right:
|
|
78
|
-
}),
|
|
79
|
-
chartWidth:
|
|
63
|
+
}), c(this, "tools", null), c(this, "margins", {
|
|
64
|
+
top: C,
|
|
65
|
+
bottom: C,
|
|
66
|
+
left: C,
|
|
67
|
+
right: C
|
|
68
|
+
}), c(this, "chartSizes", {
|
|
69
|
+
chartWidth: E,
|
|
80
70
|
// width of single chart
|
|
81
|
-
chartHeight:
|
|
71
|
+
chartHeight: w,
|
|
82
72
|
// height of single chart
|
|
83
|
-
totalWidth:
|
|
73
|
+
totalWidth: E,
|
|
84
74
|
// width of all charts in charts row, plus left axis, plus legend
|
|
85
|
-
totalHeight:
|
|
75
|
+
totalHeight: w
|
|
86
76
|
// width of all charts in charts height, plus bottom axis, plus top title
|
|
87
|
-
}),
|
|
88
|
-
x:
|
|
89
|
-
y:
|
|
90
|
-
xOriginal:
|
|
91
|
-
yOriginal:
|
|
92
|
-
}),
|
|
93
|
-
}),
|
|
94
|
-
}),
|
|
95
|
-
}),
|
|
77
|
+
}), c(this, "scales", {
|
|
78
|
+
x: T().domain([0, 10]).range([0, E]),
|
|
79
|
+
y: T().domain([0, 10]).range([w, 0]),
|
|
80
|
+
xOriginal: T().domain([0, 10]).range([0, E]),
|
|
81
|
+
yOriginal: T().domain([0, 10]).range([w, 0])
|
|
82
|
+
}), c(this, "polygons", []), c(this, "onPolygonUpdateOutside", () => {
|
|
83
|
+
}), c(this, "onTooltipHintSwitch", () => {
|
|
84
|
+
}), c(this, "onLassoControlsStateUpdate", () => {
|
|
85
|
+
}), c(this, "zoomTransform", null), c(this, "zoomStateKey", ""), c(this, "selectedDot", null), c(this, "captionsSizes", {
|
|
96
86
|
xAxisCaptionsWidth: 30,
|
|
97
87
|
yAxisCaptionsWidth: 100
|
|
98
|
-
}),
|
|
88
|
+
}), c(this, "mainTitle", []), c(this, "legend", { width: 0, height: 0, items: [] }), c(this, "notCalculatedProps", {}), c(this, "allDots", []), c(this, "visibleLabels", []), c(this, "onPolygonUpdate", (t) => {
|
|
99
89
|
this.polygons = t, this.updateByLasso();
|
|
100
|
-
const e = this.allDots.filter((
|
|
90
|
+
const e = this.allDots.filter((s) => A(s.x, s.y, this.polygons)).map((s) => s.idx);
|
|
101
91
|
this.onPolygonUpdateOutside(e, t);
|
|
102
92
|
});
|
|
103
93
|
}
|
|
104
94
|
clear() {
|
|
105
95
|
var t, e;
|
|
106
96
|
this.parentNode && this.rootNode && this.canvasNode && ((t = this.parentNode) == null || t.removeChild(this.rootNode), (e = this.parentNode) == null || e.removeChild(this.canvasNode), this.parentNode = null, this.rootNode = null, this.canvasNode = null, this.svgLayerElement = null, this.tools = null), setTimeout(() => {
|
|
107
|
-
var
|
|
108
|
-
(
|
|
97
|
+
var s;
|
|
98
|
+
(s = this.reactRoot) == null || s.unmount(), this.reactRoot = null;
|
|
109
99
|
});
|
|
110
100
|
}
|
|
111
101
|
init(t) {
|
|
112
|
-
this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.canvasNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.parentNode.appendChild(this.canvasNode), this.reactRoot =
|
|
102
|
+
this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.canvasNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.parentNode.appendChild(this.canvasNode), this.reactRoot = X(this.rootNode));
|
|
113
103
|
}
|
|
114
104
|
updateChartSizes(t) {
|
|
115
105
|
(t.width !== this.chartSizes.chartWidth || t.height !== this.chartSizes.chartHeight) && (this.chartSizes.chartWidth = t.width, this.chartSizes.chartHeight = t.height, this.scales.x.range([0, this.chartSizes.chartWidth]), this.scales.y.range([this.chartSizes.chartHeight, 0]));
|
|
116
106
|
}
|
|
117
|
-
updateViewport(t, e,
|
|
118
|
-
const
|
|
119
|
-
let { minX:
|
|
120
|
-
if (t.lowerValue !== void 0 && (
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
|
|
107
|
+
updateViewport(t, e, s) {
|
|
108
|
+
const l = t.scale === "log" ? _() : T();
|
|
109
|
+
let { minX: a, minY: r, maxX: u, maxY: p } = s;
|
|
110
|
+
if (t.lowerValue !== void 0 && (a = Math.max(a, t.lowerValue)), t.upperValue !== void 0 && (u = Math.min(u, t.upperValue)), e.lowerValue !== void 0 && (r = Math.max(r, e.lowerValue)), e.upperValue !== void 0 && (p = Math.min(p, e.upperValue)), t.symmetricRange !== void 0) {
|
|
111
|
+
const o = t.symmetricRange;
|
|
112
|
+
if (o >= a && o <= u) {
|
|
113
|
+
const y = Math.max(o - a, u - o);
|
|
114
|
+
a = o - y, u = o + y;
|
|
125
115
|
}
|
|
126
116
|
}
|
|
127
117
|
if (typeof e.symmetricRange < "u") {
|
|
128
|
-
const
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
|
|
118
|
+
const o = e.symmetricRange;
|
|
119
|
+
if (o >= r && o <= p) {
|
|
120
|
+
const y = Math.max(o - r, p - o);
|
|
121
|
+
r = o - y, p = o + y;
|
|
132
122
|
}
|
|
133
123
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
124
|
+
const f = [0, this.chartSizes.chartWidth], x = l.copy().domain([a, u]).range([D.LEFT, this.chartSizes.chartWidth - D.RIGHT]);
|
|
125
|
+
l.domain([x.invert(0), x.invert(this.chartSizes.chartWidth)]).range(f).nice(), this.scales.x = l, this.scales.xOriginal = l.copy();
|
|
126
|
+
const d = e.scale === "log" ? _() : T(), n = [this.chartSizes.chartHeight, 0], g = d.copy().domain([r, p]).range([this.chartSizes.chartHeight - D.BOTTOM, D.TOP]);
|
|
127
|
+
d.domain([g.invert(this.chartSizes.chartHeight), g.invert(0)]).range(n).nice(), this.scales.y = d, this.scales.yOriginal = d.copy();
|
|
138
128
|
}
|
|
139
129
|
updateCaptionsSize() {
|
|
140
|
-
const t = new
|
|
141
|
-
function e(
|
|
142
|
-
return Math.max(...
|
|
130
|
+
const t = new $("600 14px Arial");
|
|
131
|
+
function e(r) {
|
|
132
|
+
return Math.max(...r.map((u) => t.getTextWidth(u)));
|
|
143
133
|
}
|
|
144
|
-
const { ticks:
|
|
134
|
+
const { ticks: s, format: l } = tt(this.scales.y, !1), a = e(s.map(l));
|
|
145
135
|
this.captionsSizes = {
|
|
146
136
|
xAxisCaptionsWidth: 20,
|
|
147
|
-
yAxisCaptionsWidth:
|
|
137
|
+
yAxisCaptionsWidth: a
|
|
148
138
|
};
|
|
149
139
|
}
|
|
150
140
|
createMainTitle(t) {
|
|
151
|
-
this.mainTitle =
|
|
141
|
+
this.mainTitle = Z(
|
|
152
142
|
t.name,
|
|
153
143
|
this.chartSizes.totalWidth - this.margins.left - this.margins.right,
|
|
154
144
|
20
|
|
155
145
|
);
|
|
156
146
|
}
|
|
157
147
|
updateMargins() {
|
|
158
|
-
const t =
|
|
148
|
+
const t = Q * this.mainTitle.length, e = t > 0 ? t + J * 2 : 0;
|
|
159
149
|
this.margins = {
|
|
160
|
-
top: Math.max(e,
|
|
161
|
-
bottom:
|
|
162
|
-
left:
|
|
163
|
-
right: this.legend.width +
|
|
150
|
+
top: Math.max(e, C),
|
|
151
|
+
bottom: C + this.captionsSizes.xAxisCaptionsWidth + I,
|
|
152
|
+
left: C + this.captionsSizes.yAxisCaptionsWidth + I,
|
|
153
|
+
right: this.legend.width + C
|
|
164
154
|
}, this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartWidth + this.margins.right, this.chartSizes.totalHeight = this.margins.top + Math.max(this.chartSizes.chartHeight, this.legend.height) + this.margins.bottom, N(this.canvasNode).style("width", this.chartSizes.chartWidth + "px").style("height", this.chartSizes.chartHeight + "px").style("top", this.margins.top + "px").style("left", this.margins.left + "px");
|
|
165
155
|
}
|
|
166
|
-
updateLegendSize(t, e,
|
|
156
|
+
updateLegendSize(t, e, s, l) {
|
|
167
157
|
if (!t.show) {
|
|
168
158
|
this.legend = { width: 0, height: 0, items: [] };
|
|
169
159
|
return;
|
|
170
160
|
}
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
return;
|
|
176
|
-
if (o.values.length > J) {
|
|
177
|
-
console.warn(`Too many values for discrete legend (${o.values.length})`);
|
|
161
|
+
const a = [], r = { width: 0, height: 0, left: 0, top: 0 };
|
|
162
|
+
if (s.forEach((d) => {
|
|
163
|
+
const n = e[d.value];
|
|
164
|
+
if (n.usedAes.length === 0 || !n.aesMap)
|
|
178
165
|
return;
|
|
179
|
-
}
|
|
180
166
|
const g = {};
|
|
181
|
-
|
|
182
|
-
g[
|
|
183
|
-
|
|
184
|
-
S === "dotFill" && (g[u].color = ((s = o.aesMap[u]) == null ? void 0 : s[S]) ?? P), S === "dotSize" && (g[u].size = ((l = o.aesMap[u]) == null ? void 0 : l[S]) ?? 3);
|
|
167
|
+
n.values.forEach((m) => {
|
|
168
|
+
g[m] || (g[m] = { ...M }), n.usedAes.forEach((v) => {
|
|
169
|
+
v === "dotFill" && (g[m].color = n.aesMap(m, v) ?? F), v === "dotSize" && (g[m].size = Number(n.aesMap(m, v) ?? 3));
|
|
185
170
|
});
|
|
186
171
|
});
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
}),
|
|
190
|
-
if (
|
|
191
|
-
const { domain:
|
|
192
|
-
|
|
172
|
+
const o = d.label ?? d.value, y = dt().domain(n.values).range(n.values.map((m) => g[m]));
|
|
173
|
+
a.push({ ...r, id: d.value, type: "dots", title: o, scale: y, values: n.values, labels: n.labels });
|
|
174
|
+
}), l.forEach((d) => {
|
|
175
|
+
if (d.type === "dots" && G(d.aes.dotFill)) {
|
|
176
|
+
const { domain: n, range: g, columnName: o, type: y = "linear" } = d.aes.dotFill, m = o.label ?? o.value, v = st(g, n, "linear"), i = (y === "log" ? ct() : T()).domain(n).range([this.chartSizes.chartHeight, 0]), h = it(i, n);
|
|
177
|
+
a.push({ ...r, id: "dotFill", type: "continuous", title: m, scale: v, tickPositionScale: i, values: h });
|
|
193
178
|
}
|
|
194
|
-
if (
|
|
195
|
-
const { columnName:
|
|
196
|
-
|
|
179
|
+
if (d.type === "dots" && G(d.aes.dotSize)) {
|
|
180
|
+
const { columnName: n, domain: g, range: o } = d.aes.dotSize, y = n.label ?? n.value, m = mt(g, o), v = m.ticks(3), i = m.tickFormat(3), h = v.reduce((z, L) => (z[String(L)] = i(L), z), {});
|
|
181
|
+
a.push({ ...r, id: n.value, type: "size", title: y, scale: m, values: v, labels: h });
|
|
197
182
|
}
|
|
198
|
-
}), !
|
|
183
|
+
}), !a.length) {
|
|
199
184
|
this.legend = { width: 0, height: 0, items: [] };
|
|
200
185
|
return;
|
|
201
186
|
}
|
|
202
|
-
const
|
|
187
|
+
const u = ht(a, this.chartSizes.chartHeight), p = u[u.length - 1], f = p.left + p.width + ot, x = this.chartSizes.chartHeight;
|
|
203
188
|
this.legend = {
|
|
204
|
-
width:
|
|
205
|
-
height:
|
|
206
|
-
items:
|
|
189
|
+
width: f,
|
|
190
|
+
height: x,
|
|
191
|
+
items: u
|
|
207
192
|
};
|
|
208
193
|
}
|
|
209
|
-
initSettings(t, e,
|
|
210
|
-
const { xAxis:
|
|
211
|
-
this.updateChartSizes(x), this.updateViewport(
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
return
|
|
215
|
-
}),
|
|
194
|
+
initSettings(t, e, s, l, a, r, u) {
|
|
195
|
+
const { xAxis: p, yAxis: f, size: x, title: d, legend: n } = s;
|
|
196
|
+
this.updateChartSizes(x), this.updateViewport(p, f, l), this.updateCaptionsSize(), this.updateLegendSize(n, a, u, r), this.createMainTitle(d), this.updateMargins(), this.aesGetters = k(t, a, r);
|
|
197
|
+
const g = U().data(e).value((i) => {
|
|
198
|
+
const h = W(this.aesGetters.dotFill(i.idx));
|
|
199
|
+
return h[3] = !i.dimmed && A(i.x, i.y, this.polygons) ? 1 : 0.4, H(h, h);
|
|
200
|
+
}), o = V().equals((i, h) => i === h).size((i) => R(this.aesGetters.dotSize(i.idx))).crossValue((i) => i.x).mainValue((i) => i.y).decorate((i) => g(i)), y = q().scaleExtent([0.1, 1e3]).filter((i) => i.type === "wheel" || i.metaKey || i.ctrlKey).on("start", () => {
|
|
216
201
|
this.selectedDot = null;
|
|
217
|
-
}).on("zoom", (
|
|
218
|
-
const
|
|
219
|
-
this.scales.x.domain(
|
|
202
|
+
}).on("zoom", (i) => {
|
|
203
|
+
const h = i.transform, z = h.rescaleX(this.scales.xOriginal), L = h.rescaleY(this.scales.yOriginal);
|
|
204
|
+
this.scales.x.domain(z.domain()), this.scales.y.domain(L.domain()), this.zoomTransform = h, this.zoomStateKey = `${h.x}_${h.y}_${h.k}`, this.updateLabelsPosition(this.visibleLabels), this.renderSvgLayer(t), this.renderWebglLayer();
|
|
220
205
|
}).on("end", () => {
|
|
221
|
-
this.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
T = (f = this.tools) == null ? void 0 : f.qt.find(q, j, X);
|
|
230
|
-
}
|
|
231
|
-
const k = this.selectedDot && !T || !this.selectedDot && T || ((b = this.selectedDot) == null ? void 0 : b.id) !== (T == null ? void 0 : T.id);
|
|
232
|
-
this.selectedDot = T ?? null, k && this.renderSvgLayer();
|
|
233
|
-
}), S = dt({
|
|
206
|
+
this.visibleLabels = this.computeLabels(this.allDots), this.renderSvgLayer(t);
|
|
207
|
+
}), m = lt().on("point", ([i]) => {
|
|
208
|
+
var h;
|
|
209
|
+
let z;
|
|
210
|
+
i && (z = this.getClosestDot(i.x, i.y));
|
|
211
|
+
const L = this.selectedDot && !z || !this.selectedDot && z || ((h = this.selectedDot) == null ? void 0 : h.idx) !== (z == null ? void 0 : z.idx);
|
|
212
|
+
this.selectedDot = z ?? null, L && this.renderSvgLayer(t);
|
|
213
|
+
}), v = B({
|
|
234
214
|
xScale: this.scales.x,
|
|
235
215
|
yScale: this.scales.y
|
|
236
|
-
}).xAxisHeight(() => "0").yAxisWidth(() => "0").svgPlotArea(
|
|
216
|
+
}).xAxisHeight(() => "0").yAxisWidth(() => "0").svgPlotArea(K()).webglPlotArea(
|
|
237
217
|
// only render the point series on the WebGL layer
|
|
238
|
-
|
|
239
|
-
).decorate((
|
|
240
|
-
const
|
|
241
|
-
|
|
218
|
+
j().series([o]).mapping((i) => i)
|
|
219
|
+
).decorate((i) => {
|
|
220
|
+
const h = i.enter();
|
|
221
|
+
h && !this.svgLayerElement && (h.style("grid-template-columns", "0 auto 1fr auto 0"), h.style("grid-template-rows", "0 auto 1fr auto 0"), this.svgLayerElement = h.select(".svg-plot-area.plot-area svg").node()), h.select(".svg-plot-area.plot-area").attr("class", "svg-plot-area plot-area miplots-scatterplot-plot-area").call(y).call(m);
|
|
242
222
|
});
|
|
243
223
|
this.tools = {
|
|
244
|
-
webglChart:
|
|
245
|
-
zoom:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}, N(this.canvasNode).datum(t).style("position", "absolute").style("width", this.chartSizes.chartWidth + "px").style("height", this.chartSizes.chartHeight + "px").style("top", this.margins.top + "px").style("left", this.margins.left + "px");
|
|
224
|
+
webglChart: v,
|
|
225
|
+
zoom: y,
|
|
226
|
+
fillColor: g,
|
|
227
|
+
pointSeries: o
|
|
228
|
+
}, N(this.canvasNode).datum(e).style("position", "absolute").style("width", this.chartSizes.chartWidth + "px").style("height", this.chartSizes.chartHeight + "px").style("top", this.margins.top + "px").style("left", this.margins.left + "px");
|
|
250
229
|
}
|
|
251
|
-
updateAes(t, e) {
|
|
252
|
-
this.tools !== null && (this.aesGetters =
|
|
253
|
-
const
|
|
254
|
-
return
|
|
230
|
+
updateAes(t, e, s) {
|
|
231
|
+
this.tools !== null && (this.aesGetters = k(t, e, s), this.tools.fillColor.value((l) => {
|
|
232
|
+
const a = this.aesGetters.dotFill ?? O, r = W(a(l.idx));
|
|
233
|
+
return r[3] = !l.dimmed && A(l.x, l.y, this.polygons) ? 1 : 0.4, H(r, r);
|
|
255
234
|
}));
|
|
256
235
|
}
|
|
257
236
|
updatePointSize() {
|
|
@@ -260,50 +239,62 @@ class de {
|
|
|
260
239
|
updateByLasso() {
|
|
261
240
|
var t;
|
|
262
241
|
this.tools !== null && ((t = this.tools) == null || t.fillColor.value((e) => {
|
|
263
|
-
const
|
|
264
|
-
return
|
|
242
|
+
const s = this.aesGetters.dotFill ?? O, l = W(s(e.idx));
|
|
243
|
+
return l[3] = !e.dimmed && A(e.x, e.y, this.polygons) ? 1 : 0.4, H(l, l);
|
|
265
244
|
}), this.renderWebglLayer());
|
|
266
245
|
}
|
|
267
246
|
createQuadtree(t) {
|
|
268
|
-
|
|
247
|
+
const e = new rt(t.length, 512);
|
|
248
|
+
for (let s = 0; s < t.length; s++)
|
|
249
|
+
e.add(t[s].x, t[s].y);
|
|
250
|
+
return e.finish();
|
|
269
251
|
}
|
|
270
|
-
|
|
271
|
-
|
|
252
|
+
getClosestDot(t, e) {
|
|
253
|
+
var s, l;
|
|
254
|
+
const a = (s = this.tools) == null ? void 0 : s.qt;
|
|
255
|
+
if (!a) return null;
|
|
256
|
+
const r = this.allDots, u = this.scales.x.invert(t), p = this.scales.y.invert(e), f = 1 / (((l = this.zoomTransform) == null ? void 0 : l.k) || 1), x = u - f, d = u + f, n = p - f, g = p + f, o = a.range(x, n, d, g), y = o.reduce((m, v) => {
|
|
257
|
+
const i = r[v], h = this.scales.x(i.x) - t, z = this.scales.y(i.y) - e, L = Math.hypot(h, z);
|
|
258
|
+
return (m === null || L < m.distance) && (m.index = v, m.distance = L), m;
|
|
259
|
+
}, {
|
|
260
|
+
index: -1,
|
|
261
|
+
distance: 1 / 0
|
|
262
|
+
});
|
|
263
|
+
return o.length === 0 || y.index === -1 ? null : r[y.index];
|
|
264
|
+
}
|
|
265
|
+
updateDots(t) {
|
|
266
|
+
this.tools !== null && (N(this.canvasNode).datum(t), this.tools.fillColor.data(t), this.tools.qt = this.createQuadtree(t), this.allDots = t);
|
|
272
267
|
}
|
|
273
|
-
render(t, e,
|
|
268
|
+
render(t, e, s, l, a, r, u, p, f, x, d, n, g) {
|
|
274
269
|
if (this.tools === null)
|
|
275
270
|
this.initSettings(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
271
|
+
t,
|
|
272
|
+
a,
|
|
273
|
+
s,
|
|
274
|
+
r,
|
|
275
|
+
f,
|
|
276
|
+
p,
|
|
281
277
|
x
|
|
282
|
-
)
|
|
278
|
+
);
|
|
283
279
|
else {
|
|
284
|
-
const { title:
|
|
285
|
-
this.updateChartSizes(
|
|
280
|
+
const { title: o, legend: y, size: m } = s;
|
|
281
|
+
this.updateChartSizes(m), this.updateLegendSize(y, f, x, p), this.createMainTitle(o), this.updateMargins(), this.updateAes(t, f, p);
|
|
286
282
|
}
|
|
287
|
-
this.
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
layers: m
|
|
295
|
-
}, this.renderWebglLayer(), this.renderSvgLayer();
|
|
283
|
+
this.onPolygonUpdateOutside = d, this.onTooltipHintSwitch = n, this.onLassoControlsStateUpdate = g, this.allDots !== a && (this.updateDots(a), this.visibleLabels = this.computeLabels(a)), this.notCalculatedProps = {
|
|
284
|
+
settingsId: e,
|
|
285
|
+
chartSettings: s,
|
|
286
|
+
keyColumn: l,
|
|
287
|
+
dotsByGrouping: u,
|
|
288
|
+
layers: p
|
|
289
|
+
}, this.renderWebglLayer(), this.renderSvgLayer(t);
|
|
296
290
|
}
|
|
297
291
|
renderWebglLayer() {
|
|
298
292
|
var t, e;
|
|
299
293
|
(t = this.tools) != null && t.webglChart && N(this.canvasNode).call((e = this.tools) == null ? void 0 : e.webglChart);
|
|
300
294
|
}
|
|
301
|
-
renderSvgLayer() {
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
i.x = this.scales.x(i.dot.x), i.y = this.scales.y(i.dot.y);
|
|
305
|
-
}), at(this.visibleLabels);
|
|
306
|
-
const e = {
|
|
295
|
+
renderSvgLayer(t) {
|
|
296
|
+
var e;
|
|
297
|
+
const s = {
|
|
307
298
|
settingsId: this.notCalculatedProps.settingsId,
|
|
308
299
|
chartSettings: this.notCalculatedProps.chartSettings,
|
|
309
300
|
keyColumn: this.notCalculatedProps.keyColumn,
|
|
@@ -325,14 +316,41 @@ class de {
|
|
|
325
316
|
onTooltipHintSwitch: this.onTooltipHintSwitch,
|
|
326
317
|
onLassoControlsStateUpdate: this.onLassoControlsStateUpdate
|
|
327
318
|
};
|
|
328
|
-
this.svgLayerComponent = /* @__PURE__ */
|
|
319
|
+
this.svgLayerComponent = /* @__PURE__ */ b.jsx(nt, { dataFrame: t, children: /* @__PURE__ */ b.jsx(at, { ...s }) }), (e = this.reactRoot) == null || e.render(this.svgLayerComponent);
|
|
329
320
|
}
|
|
330
321
|
renderError(t) {
|
|
331
322
|
var e;
|
|
332
|
-
(e = this.reactRoot) == null || e.render(/* @__PURE__ */
|
|
323
|
+
(e = this.reactRoot) == null || e.render(/* @__PURE__ */ b.jsx(Y, { message: t }));
|
|
324
|
+
}
|
|
325
|
+
computeLabels(t) {
|
|
326
|
+
const e = new $("16px Manrope"), s = et(this.chartSizes.chartWidth, this.chartSizes.chartHeight), l = [];
|
|
327
|
+
for (let a = 0; a < t.length; a++) {
|
|
328
|
+
const r = t[a];
|
|
329
|
+
if (r.label == null)
|
|
330
|
+
continue;
|
|
331
|
+
const u = String(r.label), p = e.getTextMetrics(u), f = this.scales.x(r.x), x = this.scales.y(r.y), d = p.width, n = p.actualBoundingBoxAscent + p.actualBoundingBoxDescent, g = 10, o = s(f, x, d, n, g);
|
|
332
|
+
o && l.push({
|
|
333
|
+
x: f,
|
|
334
|
+
y: x,
|
|
335
|
+
dot: r,
|
|
336
|
+
name: u,
|
|
337
|
+
width: d,
|
|
338
|
+
height: n,
|
|
339
|
+
padding: g,
|
|
340
|
+
xPosition: o[0],
|
|
341
|
+
yPosition: o[1]
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
return l;
|
|
345
|
+
}
|
|
346
|
+
updateLabelsPosition(t) {
|
|
347
|
+
for (let e = 0; e < t.length; e++) {
|
|
348
|
+
const s = t[e];
|
|
349
|
+
s.x = this.scales.x(s.dot.x), s.y = this.scales.y(s.dot.y);
|
|
350
|
+
}
|
|
333
351
|
}
|
|
334
352
|
}
|
|
335
353
|
export {
|
|
336
|
-
|
|
354
|
+
ie as default
|
|
337
355
|
};
|
|
338
356
|
//# sourceMappingURL=ChartRenderer.js.map
|