@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,83 +1,82 @@
|
|
|
1
1
|
import M from "../node_modules/d3-array/src/extent.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
8
|
-
return [
|
|
9
|
-
if (
|
|
10
|
-
return [(
|
|
11
|
-
const
|
|
12
|
-
for (let
|
|
13
|
-
|
|
14
|
-
return
|
|
2
|
+
import K from "../node_modules/d3-array/src/bin.js";
|
|
3
|
+
import G from "../node_modules/d3-array/src/max.js";
|
|
4
|
+
import V from "../node_modules/d3-scale/src/symlog.js";
|
|
5
|
+
const b = (o, u) => {
|
|
6
|
+
const a = Math.min(...u), n = Math.max(...u);
|
|
7
|
+
if (a === n)
|
|
8
|
+
return [a];
|
|
9
|
+
if (o < 2)
|
|
10
|
+
return [(a + n) / 2];
|
|
11
|
+
const e = (n - a) / o, s = [];
|
|
12
|
+
for (let r = 1; r < o; r++)
|
|
13
|
+
s.push(a + e * r);
|
|
14
|
+
return s;
|
|
15
15
|
};
|
|
16
|
-
function
|
|
17
|
-
return
|
|
18
|
-
|
|
16
|
+
function E(o, u, a) {
|
|
17
|
+
return o.map((n) => ({
|
|
18
|
+
indexes: n,
|
|
19
|
+
x: n.x0 ?? 0,
|
|
19
20
|
y: {
|
|
20
21
|
straight: n.length,
|
|
21
22
|
reverse: n.length
|
|
22
23
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
groupingKeyIdx: t,
|
|
24
|
+
count: n.length,
|
|
25
|
+
groupingKey: u,
|
|
26
|
+
groupingKeyIdx: a,
|
|
27
27
|
width: (n.x1 ?? 0) - (n.x0 ?? 0)
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
30
|
+
function L(o, u, a, n, e, s, r) {
|
|
31
|
+
const g = b(n, e), t = K().domain(e).thresholds(g).value((i) => o.getColumnValue(a.value, i))(u);
|
|
32
32
|
return {
|
|
33
|
-
bins:
|
|
34
|
-
maxCount:
|
|
33
|
+
bins: E(t, s, r),
|
|
34
|
+
maxCount: G(t, (i) => i.length) ?? 0
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const
|
|
37
|
+
function X(o, u, a, n, e, s, r) {
|
|
38
|
+
const g = b(n, e), t = V().domain(e).range(e), i = g.map((m) => t.invert(m)), c = K().domain(e).thresholds(i).value((m) => o.getColumnValue(a.value, m))(u);
|
|
39
39
|
return {
|
|
40
|
-
bins:
|
|
41
|
-
maxCount:
|
|
40
|
+
bins: E(c, s, r),
|
|
41
|
+
maxCount: G(c, (m) => m.length) ?? 0
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
groupingKeys: t,
|
|
44
|
+
function A(o, u, a, n, e, s) {
|
|
45
|
+
const r = {};
|
|
46
|
+
return u.forEach((g) => {
|
|
47
|
+
const t = g.join("_");
|
|
48
|
+
r[t] = {
|
|
49
|
+
groupingKeys: a,
|
|
51
50
|
histogramByGroupingKey: {},
|
|
52
51
|
minX: 1 / 0,
|
|
53
52
|
maxX: -1 / 0,
|
|
54
53
|
maxCount: 0,
|
|
55
54
|
maxCountFromGroups: 0
|
|
56
55
|
};
|
|
57
|
-
const
|
|
58
|
-
let [
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
const y =
|
|
65
|
-
x.bins.forEach((
|
|
66
|
-
|
|
56
|
+
const i = o.getRowsByGrouping([...g]);
|
|
57
|
+
let [c, m] = M(i, (l) => o.getColumnValue(n.value, l));
|
|
58
|
+
c ?? (c = o.getColumnValue(n.value, i[0]) ?? 0), m ?? (m = o.getColumnValue(n.value, i[0]) ?? 0);
|
|
59
|
+
const C = [c, m], d = [...a].reverse();
|
|
60
|
+
d.forEach((l, h) => {
|
|
61
|
+
const p = Array.from(o.getRowsByGrouping([...g, l])), x = s === "linear" ? L(o, p, n, e, C, l, h) : X(o, p, n, e, C, l, h);
|
|
62
|
+
r[t].histogramByGroupingKey[l] = x, r[t].minX = C[0], r[t].maxX = C[1], r[t].maxCountFromGroups = Math.max(r[t].maxCountFromGroups, x.maxCount);
|
|
63
|
+
const y = h > 0 ? d[h - 1] : null, f = y !== null ? r[t].histogramByGroupingKey[y] : null;
|
|
64
|
+
x.bins.forEach((v, F) => {
|
|
65
|
+
v.y.straight = ((f == null ? void 0 : f.bins[F].y.straight) ?? 0) + v.count, r[t].maxCount = Math.max(r[t].maxCount, v.y.straight);
|
|
67
66
|
});
|
|
68
67
|
});
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
x.bins.forEach((f,
|
|
73
|
-
f.y.reverse = ((y == null ? void 0 : y.bins[
|
|
68
|
+
const B = a;
|
|
69
|
+
B.forEach((l, h) => {
|
|
70
|
+
const p = h > 0 ? B[h - 1] : null, x = r[t].histogramByGroupingKey[l], y = p !== null ? r[t].histogramByGroupingKey[p] : null;
|
|
71
|
+
x.bins.forEach((f, v) => {
|
|
72
|
+
f.y.reverse = ((y == null ? void 0 : y.bins[v].y.reverse) ?? 0) + f.count;
|
|
74
73
|
});
|
|
75
74
|
});
|
|
76
|
-
}),
|
|
75
|
+
}), r;
|
|
77
76
|
}
|
|
78
77
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
A as createHistogramDataByFacets,
|
|
79
|
+
L as createHistogramDataLinear,
|
|
80
|
+
X as createHistogramDataLog
|
|
82
81
|
};
|
|
83
82
|
//# sourceMappingURL=getHistogramData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHistogramData.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/histogram/getHistogramData.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"getHistogramData.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/histogram/getHistogramData.ts"],"sourcesContent":["import type { Bin } from 'd3-array';\nimport { bin, extent, max } from 'd3-array';\nimport { scaleSymlog } from 'd3-scale';\nimport type { DataFrame, RowIndex } from '../DataFrame';\nimport type { ColumnName } from '../types';\n\nexport type BinData = {\n indexes: RowIndex[];\n x: number,\n y: {\n straight: number,\n reverse: number\n },\n count: number,\n groupingKey: string,\n groupingKeyIdx: number,\n width: number\n}\nexport type HistogramData = {\n bins: BinData[];\n maxCount: number;\n};\n\nexport type GroupedHistogramData = {\n groupingKeys: string[],\n histogramByGroupingKey: Record<string, HistogramData>\n minX: number;\n maxX: number;\n maxCount: number;\n maxCountFromGroups: number;\n}\n\nconst getSteps = (count: number, valueExtent: number[]) => {\n const min = Math.min(...valueExtent);\n const max = Math.max(...valueExtent);\n if (min === max) {\n return [min];\n }\n if (count < 2) {\n return [(min + max) / 2];\n }\n const step = (max - min) / count;\n const steps = [];\n for (let i = 1; i < count; i++) {\n steps.push(min + step * i);\n }\n return steps;\n};\n\nfunction createBinData (bins:Bin<RowIndex, number>[], key:string, keyIdx:number):BinData[] {\n return bins.map((b) => ({\n indexes: b,\n x: b.x0 ?? 0,\n y: {\n straight: b.length,\n reverse: b.length\n },\n count: b.length,\n groupingKey: key,\n groupingKeyIdx: keyIdx,\n width: (b.x1 ?? 0) - (b.x0 ?? 0)\n }));\n}\nexport function createHistogramDataLinear(dataFrame: DataFrame, indexes: RowIndex[], column: ColumnName, binsCount:number, domain:[number, number], key:string, keyIdx:number):HistogramData {\n const ticks= getSteps(binsCount, domain);\n const bins = bin<RowIndex, number>()\n .domain(domain)\n .thresholds(ticks)\n .value((idx: RowIndex) => dataFrame.getColumnValue(column.value, idx) as number)(indexes);\n return {\n bins: createBinData(bins, key, keyIdx),\n maxCount: max(bins, (bin) => bin.length) ?? 0\n };\n}\nexport function createHistogramDataLog(dataFrame: DataFrame, indexes: RowIndex[], column: ColumnName, binsCount:number, domain:[number, number], key:string, keyIdx:number):HistogramData {\n const ticks= getSteps(binsCount, domain);\n const convertLog = scaleSymlog().domain(domain).range(domain);\n const ticksLog = ticks.map(t => convertLog.invert(t));\n const bins = bin<RowIndex, number>()\n .domain(domain)\n .thresholds(ticksLog)\n .value((idx: RowIndex) => dataFrame.getColumnValue(column.value, idx) as number)(indexes);\n\n return {\n bins: createBinData(bins, key, keyIdx),\n maxCount: max(bins, (bin) => bin.length) ?? 0\n };\n}\n\nexport function createHistogramDataByFacets(\n data:DataFrame,\n facetKeysCombinations:string[][],\n groupingKeys: string[],\n valueColumn:ColumnName,\n binsCount:number,\n scale: 'linear' | 'log'\n) {\n const result:Record<string, GroupedHistogramData> = {};\n facetKeysCombinations.forEach((facetKeys) => {\n const facetKey = facetKeys.join('_');\n result[facetKey] = {\n groupingKeys,\n histogramByGroupingKey: {},\n minX: Infinity,\n maxX: -Infinity,\n maxCount: 0,\n maxCountFromGroups: 0\n };\n const allFacetRowsIndexes = data.getRowsByGrouping([...facetKeys]);\n let [minV, maxV] = extent(allFacetRowsIndexes, idx => data.getColumnValue(valueColumn.value, idx) as number);\n minV ??= (data.getColumnValue(valueColumn.value, allFacetRowsIndexes[0]) ?? 0) as number;\n maxV ??= (data.getColumnValue(valueColumn.value, allFacetRowsIndexes[0]) ?? 0) as number;\n const domain:[number, number] = [minV, maxV];\n const forwardKeys = [...groupingKeys].reverse();\n forwardKeys.forEach((groupingKey, idx) => {\n const indexes = Array.from(data.getRowsByGrouping([...facetKeys, groupingKey]));\n const histogram = scale === 'linear'\n ? createHistogramDataLinear(data, indexes, valueColumn, binsCount, domain, groupingKey, idx)\n : createHistogramDataLog(data, indexes, valueColumn, binsCount, domain, groupingKey, idx);\n result[facetKey].histogramByGroupingKey[groupingKey] = histogram;\n result[facetKey].minX = domain[0];\n result[facetKey].maxX = domain[1];\n result[facetKey].maxCountFromGroups = Math.max(result[facetKey].maxCountFromGroups, histogram.maxCount);\n\n const previousKey = idx > 0 ? forwardKeys[idx - 1] : null;\n const previousHistogram = previousKey !== null ? result[facetKey].histogramByGroupingKey[previousKey] : null;\n\n histogram.bins.forEach((bin, idx) => {\n bin.y.straight = (previousHistogram?.bins[idx].y.straight ?? 0) + bin.count;\n result[facetKey].maxCount = Math.max(result[facetKey].maxCount, bin.y.straight);\n });\n });\n\n const reversedKeys = groupingKeys;\n reversedKeys.forEach((groupingKey, idx) => {\n const previousKey = idx > 0 ? reversedKeys[idx - 1] : null;\n const histogram = result[facetKey].histogramByGroupingKey[groupingKey];\n const previousHistogram = previousKey !== null ? result[facetKey].histogramByGroupingKey[previousKey] : null;\n\n histogram.bins.forEach((bin, idx) => {\n bin.y.reverse = (previousHistogram?.bins[idx].y.reverse ?? 0) + bin.count;\n });\n });\n });\n return result;\n}"],"names":["getSteps","count","valueExtent","min","max","step","steps","i","createBinData","bins","key","keyIdx","b","createHistogramDataLinear","dataFrame","indexes","column","binsCount","domain","ticks","bin","idx","createHistogramDataLog","convertLog","scaleSymlog","ticksLog","c","t","createHistogramDataByFacets","data","facetKeysCombinations","groupingKeys","valueColumn","scale","result","facetKeys","facetKey","allFacetRowsIndexes","minV","maxV","extent","forwardKeys","groupingKey","histogram","previousKey","previousHistogram","reversedKeys"],"mappings":";;;;AAgCA,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AA,OAAA,SAAAA,EAAmB,KAAKxB,CAAAA,EAAK,EAAE,YAAW,KAAKD,EAAI;AAAA,MACxE,CAAC;AAAA,IACL,CAAC;AAAA,EACL,CAAC,GACMc;AACX;","x_google_ignoreList":[0]}
|
|
@@ -1,80 +1,83 @@
|
|
|
1
|
+
import { l as y } from "../node_modules/lodash/lodash.js";
|
|
2
|
+
import { renderToString as C } from "../node_modules/react-dom/server.browser.js";
|
|
1
3
|
import { AbstractChart as f } from "../AbstractChart.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
import { getKeysCombinations as D } from "../utils/getKeysCombination.js";
|
|
5
|
+
import b from "./ChartRenderer.js";
|
|
6
|
+
import { createHistogramDataByFacets as S } from "./getHistogramData.js";
|
|
7
|
+
import { HistogramSettingsImpl as g } from "./HistogramSettingsImpl.js";
|
|
8
|
+
var _ = Object.defineProperty, w = (u, e, t) => e in u ? _(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t, d = (u, e, t) => w(u, typeof e != "symbol" ? e + "" : e, t);
|
|
9
|
+
function x(u, e, t) {
|
|
10
|
+
return e.reduce((a, s) => {
|
|
11
|
+
const o = u.getColumnCategories(s.value, !1), l = (r) => s.valueLabels ? String(u.getColumnValue(
|
|
12
|
+
s.valueLabels,
|
|
13
|
+
u.getColumnCategoryRowIndex(s.value, r)
|
|
14
|
+
)) : r, i = o.reduce((r, n) => (r[n] = l(n), r), {});
|
|
15
|
+
return a[s.value] = {
|
|
16
|
+
values: o.sort((r, n) => i[r].localeCompare(i[n], "en", { numeric: !0 })),
|
|
17
|
+
aesMap: t[s.value],
|
|
18
|
+
labels: i
|
|
19
|
+
}, a;
|
|
17
20
|
}, {});
|
|
18
21
|
}
|
|
19
|
-
class
|
|
20
|
-
constructor(t, a
|
|
21
|
-
super(
|
|
22
|
-
}),
|
|
22
|
+
class K extends f {
|
|
23
|
+
constructor(e, t, a) {
|
|
24
|
+
super(e, t), d(this, "settings"), d(this, "chartRenderer", new b()), d(this, "onTooltipHintSwitch", () => {
|
|
25
|
+
}), d(this, "calculatedData", null), this.settings = new g(t), a && (this.onTooltipHintSwitch = a[0]);
|
|
23
26
|
}
|
|
24
|
-
mount(
|
|
27
|
+
mount(e) {
|
|
25
28
|
try {
|
|
26
|
-
this.chartRenderer.init(
|
|
27
|
-
} catch (
|
|
28
|
-
|
|
29
|
+
this.chartRenderer.init(e), this._updateData(), this._updateChart(), this.hasError = !1;
|
|
30
|
+
} catch (t) {
|
|
31
|
+
this.hasError = !0, t instanceof Error && (this.chartRenderer.renderError(t.message), console.error(t));
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
unmount() {
|
|
32
35
|
this.chartRenderer.clear();
|
|
33
36
|
}
|
|
34
|
-
updateSettingsAndData(
|
|
37
|
+
updateSettingsAndData(e, t) {
|
|
35
38
|
try {
|
|
36
|
-
const
|
|
37
|
-
this.settings = new
|
|
38
|
-
} catch (
|
|
39
|
-
|
|
39
|
+
const a = this.settings, s = this.data;
|
|
40
|
+
this.settings = new g(t), this.data = e, this._needUpdateCalculatedDataBySettings(a, this.settings) || this._needUpdateCalculatedDataByData(s, this.data) ? this._updateData() : this._updateAesInData(), this._updateChart(), this.hasError = !1;
|
|
41
|
+
} catch (a) {
|
|
42
|
+
this.hasError = !0, a instanceof Error && (this.chartRenderer.renderError(a.message), console.error(a));
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
|
-
updateChartState(
|
|
45
|
+
updateChartState(e, t) {
|
|
43
46
|
console.warn("no chart state for histogram");
|
|
44
47
|
}
|
|
45
48
|
export() {
|
|
46
|
-
return this._updateChart(),
|
|
49
|
+
return this._updateChart(), C(this.chartRenderer.component);
|
|
47
50
|
}
|
|
48
|
-
_needUpdateCalculatedDataBySettings(
|
|
49
|
-
var
|
|
50
|
-
return
|
|
51
|
-
var
|
|
52
|
-
return i.value !== ((
|
|
53
|
-
}) || ((
|
|
54
|
-
var
|
|
55
|
-
return i !== ((
|
|
56
|
-
})) || ((l =
|
|
57
|
-
var
|
|
58
|
-
return i !== ((
|
|
51
|
+
_needUpdateCalculatedDataBySettings(e, t) {
|
|
52
|
+
var a, s, o, l;
|
|
53
|
+
return e.valueColumn.value !== t.valueColumn.value || e.facetBy.some((i, r) => {
|
|
54
|
+
var n;
|
|
55
|
+
return i.value !== ((n = t.facetBy[r]) == null ? void 0 : n.value);
|
|
56
|
+
}) || ((a = e.grouping) == null ? void 0 : a.value) !== ((s = t.grouping) == null ? void 0 : s.value) || e.layers.length !== t.layers.length || e.layers.some((i, r) => i.type !== t.layers[r].type) || e.binsCount !== t.binsCount || e.chartSettings.xAxis.scale !== t.chartSettings.xAxis.scale || ((o = e.groupingOrder) == null ? void 0 : o.some((i, r) => {
|
|
57
|
+
var n;
|
|
58
|
+
return i !== ((n = t.groupingOrder) == null ? void 0 : n[r]);
|
|
59
|
+
})) || ((l = t.groupingOrder) == null ? void 0 : l.some((i, r) => {
|
|
60
|
+
var n;
|
|
61
|
+
return i !== ((n = e.groupingOrder) == null ? void 0 : n[r]);
|
|
59
62
|
}));
|
|
60
63
|
}
|
|
61
|
-
_needUpdateCalculatedDataByData(
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
+
_needUpdateCalculatedDataByData(e, t) {
|
|
65
|
+
const a = Object.keys(e.data), s = Object.keys(t.data);
|
|
66
|
+
return e.id !== t.id || a.length !== s.length || a.some((o) => {
|
|
64
67
|
var l;
|
|
65
|
-
return
|
|
68
|
+
return e.data[o].length !== ((l = t.data[o]) == null ? void 0 : l.length);
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
_updateData() {
|
|
69
|
-
const { valueColumn:
|
|
70
|
-
let
|
|
71
|
-
i && (
|
|
72
|
-
const
|
|
72
|
+
const { valueColumn: e, facetBy: t, grouping: a, binsCount: s, chartSettings: o, inheritedAes: l, groupingOrder: i } = this.settings, r = t.map((h) => this.data.getColumnCategories(h.value)), n = r.length ? D([...r]) : [["null"]], p = t.map((h) => h.value) ?? null, m = a ? [a.value] : [];
|
|
73
|
+
let c = a ? this.data.getColumnCategories(a.value) : ["null"];
|
|
74
|
+
i && (c = y.intersection(i, c)), this.data.setGrouping([...p, ...m]);
|
|
75
|
+
const v = S(this.data, n, c, e, s, o.xAxis.scale);
|
|
73
76
|
this.calculatedData = {
|
|
74
|
-
facetKeys:
|
|
75
|
-
facetKeysCombinations:
|
|
76
|
-
histogramDataByFacets:
|
|
77
|
-
legendInfo:
|
|
77
|
+
facetKeys: n.map((h) => h.join(", ")),
|
|
78
|
+
facetKeysCombinations: n,
|
|
79
|
+
histogramDataByFacets: v,
|
|
80
|
+
legendInfo: x(this.data, a ? [a] : [], l)
|
|
78
81
|
};
|
|
79
82
|
}
|
|
80
83
|
_updateAesInData() {
|
|
@@ -83,26 +86,27 @@ class T extends f {
|
|
|
83
86
|
_updateChart() {
|
|
84
87
|
if (!this.calculatedData)
|
|
85
88
|
return;
|
|
86
|
-
const { id:
|
|
89
|
+
const { id: e, chartSettings: t, facetSettings: a, inheritedAes: s, layers: o, grouping: l, groupingDirection: i, groupingStack: r } = this.settings;
|
|
87
90
|
this.chartRenderer.render(
|
|
91
|
+
this.data,
|
|
92
|
+
e,
|
|
88
93
|
t,
|
|
89
94
|
a,
|
|
90
|
-
r,
|
|
91
95
|
this.calculatedData.facetKeys,
|
|
92
96
|
this.calculatedData.facetKeysCombinations,
|
|
93
97
|
//for titles, if facet by more than 1 column
|
|
94
98
|
this.calculatedData.histogramDataByFacets,
|
|
95
99
|
this.calculatedData.legendInfo,
|
|
96
100
|
o,
|
|
97
|
-
n,
|
|
98
|
-
l,
|
|
99
101
|
s,
|
|
102
|
+
l,
|
|
103
|
+
r,
|
|
100
104
|
i,
|
|
101
105
|
this.onTooltipHintSwitch
|
|
102
106
|
);
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
export {
|
|
106
|
-
|
|
110
|
+
K as ChartHistogram
|
|
107
111
|
};
|
|
108
112
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/histogram/index.ts"],"sourcesContent":["import {AbstractChart} from '../AbstractChart';\nimport type {HistogramLegendInfo} from './components/types';\nimport type {GroupedHistogramData} from './getHistogramData';\nimport {createHistogramDataByFacets} from './getHistogramData';\nimport type {ColumnName, HistogramEventHandlers, Row} from '../types';\nimport type {HistogramSettings} from '../types';\nimport lodash from 'lodash';\nimport {renderToString} from 'react-dom/server';\nimport ChartRenderer from './ChartRenderer';\nimport {HistogramSettingsImpl} from './HistogramSettingsImpl';\nimport type {DataFrame} from '../DataFrame';\nimport {getKeysCombinations} from '../utils/getKeysCombination';\n\nfunction getLegendInfo(\n data: DataFrame,\n grouping: ColumnName[],\n inheritedAes: HistogramSettingsImpl['inheritedAes']\n): HistogramLegendInfo {\n return grouping.reduce((res: HistogramLegendInfo, column) => {\n const uniqRowsByGrouping = lodash.uniqBy(data.rows, row => row[column.value]);\n const getValue = (row: Row) => String(row[column.value]);\n const getValueLabel = (row: Row) => (column.valueLabels ? String(row[column.valueLabels]) : getValue(row));\n const labels = uniqRowsByGrouping.reduce((res: Record<string, string>, row) => {\n res[getValue(row)] = getValueLabel(row);\n return res;\n }, {});\n res[column.value] = {\n values: uniqRowsByGrouping.map(getValue).filter((v) => v !== 'null').sort((a, b) => labels[a].localeCompare(labels[b], 'en', {numeric: true})),\n aesMap: inheritedAes[column.value],\n labels,\n };\n return res;\n }, {});\n}\nexport class ChartHistogram extends AbstractChart {\n settings: HistogramSettingsImpl;\n chartRenderer = new ChartRenderer();\n\n onTooltipHintSwitch: (v:boolean) => void = () => undefined;\n calculatedData: {\n facetKeys: string[];\n facetKeysCombinations: string[][];\n histogramDataByFacets: Record<string, GroupedHistogramData>\n legendInfo: HistogramLegendInfo\n } | null = null;\n\n constructor(data: DataFrame, settings: HistogramSettings, eventHandlers?: HistogramEventHandlers) {\n super(data, settings);\n\n this.settings = new HistogramSettingsImpl(settings);\n if (eventHandlers) {\n this.onTooltipHintSwitch = eventHandlers[0];\n }\n }\n\n mount(node: HTMLElement) {\n try {\n this.chartRenderer.init(node);\n this._updateData();\n this._updateChart();\n } catch (err) {\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n }\n }\n }\n\n unmount() {\n this.chartRenderer.clear();\n }\n\n updateSettingsAndData(data: DataFrame, settings: HistogramSettings) {\n try {\n const previousSettings = this.settings;\n const previousData = this.data;\n this.settings = new HistogramSettingsImpl(settings);\n this.data = data;\n if (\n this._needUpdateCalculatedDataBySettings(previousSettings, this.settings) ||\n this._needUpdateCalculatedDataByData(previousData, this.data)\n ) {\n this._updateData();\n } else {\n this._updateAesInData();\n }\n this._updateChart();\n } catch (err) {\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n }\n }\n }\n\n updateChartState(_field: string, _value: unknown) {\n console.warn('no chart state for histogram');\n }\n\n export(): string {\n this._updateChart();\n return renderToString(this.chartRenderer.component);\n }\n\n _needUpdateCalculatedDataBySettings(prevSettings: HistogramSettingsImpl, settings: HistogramSettingsImpl) {\n return (\n prevSettings.valueColumn.value !== settings.valueColumn.value ||\n prevSettings.facetBy.some((el, idx) => el.value !== settings.facetBy[idx]?.value) ||\n prevSettings.grouping?.value !== settings.grouping?.value ||\n prevSettings.layers.length !== settings.layers.length ||\n prevSettings.layers.some((l, idx) => l.type !== settings.layers[idx].type) ||\n prevSettings.binsCount !== settings.binsCount ||\n prevSettings.chartSettings.xAxis.scale !== settings.chartSettings.xAxis.scale ||\n prevSettings.groupingOrder?.some((key, idx) => key !== settings.groupingOrder?.[idx]) ||\n settings.groupingOrder?.some((key, idx) => key !== prevSettings.groupingOrder?.[idx])\n );\n }\n\n _needUpdateCalculatedDataByData(prevData: DataFrame, data: DataFrame) {\n const prevKeys = Object.keys(prevData.data);\n const keys = Object.keys(data.data);\n return (\n prevData.id !== data.id ||\n prevKeys.length !== keys.length ||\n prevKeys.some(key => prevData.data[key].length !== data.data[key]?.length)\n );\n }\n\n _updateData() {\n const {valueColumn, facetBy, grouping, binsCount, chartSettings, inheritedAes, groupingOrder} = this.settings;\n\n const facetKeysLists = facetBy.map(column => this.data.getColumnCategories(column.value));\n const facetKeysCombinations = facetKeysLists.length ? getKeysCombinations([...facetKeysLists]) : [['null']];\n const facetGroupingValues = facetBy.map(column => column.value) ?? null;\n const groupingValues = grouping ? [grouping.value] : [];\n let groupingKeys = grouping ? this.data.getColumnCategories(grouping.value) : ['null'];\n if (groupingOrder) {\n groupingKeys = lodash.intersection(groupingOrder, groupingKeys);\n }\n\n this.data.setGrouping([...facetGroupingValues, ...groupingValues]);\n const histogramDataByFacets = createHistogramDataByFacets(this.data, facetKeysCombinations, groupingKeys, valueColumn, binsCount, chartSettings.xAxis.scale);\n\n this.calculatedData = {\n facetKeys: facetKeysCombinations.map(v => v.join(', ')),\n facetKeysCombinations,\n histogramDataByFacets,\n legendInfo: getLegendInfo(this.data, grouping ? [grouping] : [], inheritedAes)\n };\n }\n\n _updateAesInData() {\n const calculated = this.calculatedData;\n if (!calculated) {\n return;\n }\n }\n\n _updateChart() {\n if (!this.calculatedData) {\n return;\n }\n const {id, chartSettings, facetSettings, inheritedAes, layers, grouping, groupingDirection, groupingStack} = this.settings;\n this.chartRenderer.render(\n id,\n chartSettings,\n facetSettings,\n this.calculatedData.facetKeys,\n this.calculatedData.facetKeysCombinations, //for titles, if facet by more than 1 column\n this.calculatedData.histogramDataByFacets,\n this.calculatedData.legendInfo,\n layers,\n inheritedAes,\n grouping,\n groupingStack,\n groupingDirection,\n this.onTooltipHintSwitch\n );\n }\n}\n"],"names":["getLegendInfo","data","grouping","inheritedAes","res","column","uniqRowsByGrouping","lodash","row","getValue","getValueLabel","labels","v","a","b","ChartHistogram","AbstractChart","settings","eventHandlers","__publicField","ChartRenderer","HistogramSettingsImpl","node","err","previousSettings","previousData","_field","_value","renderToString","prevSettings","el","idx","_a","_b","l","_c","key","_d","prevData","prevKeys","keys","valueColumn","facetBy","binsCount","chartSettings","groupingOrder","facetKeysLists","facetKeysCombinations","getKeysCombinations","facetGroupingValues","groupingValues","groupingKeys","histogramDataByFacets","createHistogramDataByFacets","id","facetSettings","layers","groupingDirection","groupingStack"],"mappings":";;;;;;;;AAaA,SAASA,EACLC,GACAC,GACAC,GACmB;AACnB,SAAOD,EAAS,OAAO,CAACE,GAA0BC,MAAW;AACzD,UAAMC,IAAqBC,EAAO,OAAON,EAAK,MAAM,CAAAO,MAAOA,EAAIH,EAAO,KAAK,CAAC,GACtEI,IAAW,CAACD,MAAa,OAAOA,EAAIH,EAAO,KAAK,CAAC,GACjDK,IAAgB,CAACF,MAAcH,EAAO,cAAc,OAAOG,EAAIH,EAAO,WAAW,CAAC,IAAII,EAASD,CAAG,GAClGG,IAASL,EAAmB,OAAO,CAACF,GAA6BI,OACnEJ,EAAIK,EAASD,CAAG,CAAC,IAAIE,EAAcF,CAAG,GAC/BJ,IACR,EAAE;AACL,WAAAA,EAAIC,EAAO,KAAK,IAAI;AAAA,MAChB,QAAQC,EAAmB,IAAIG,CAAQ,EAAE,OAAO,CAACG,MAAMA,MAAM,MAAM,EAAE,KAAK,CAACC,GAAGC,MAAMH,EAAOE,CAAC,EAAE,cAAcF,EAAOG,CAAC,GAAG,MAAM,EAAC,SAAS,GAAA,CAAK,CAAC;AAAA,MAC7I,QAAQX,EAAaE,EAAO,KAAK;AAAA,MACjC,QAAAM;AAAAA,IAAA,GAEGP;AAAAA,EACX,GAAG,CAAA,CAAE;AACT;AACO,MAAMW,UAAuBC,EAAc;AAAA,EAY9C,YAAYf,GAAiBgB,GAA6BC,GAAwC;AAC9F,UAAMjB,GAAMgB,CAAQ,GAZxBE,EAAA,MAAA,UAAA,GACAA,EAAA,MA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;AAAA,IAAA;AAAA,EAEb;AACJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/histogram/index.ts"],"sourcesContent":["import {\n intersection\n} from 'lodash';\nimport { renderToString } from 'react-dom/server';\nimport { AbstractChart } from '../AbstractChart';\nimport type { DataFrame } from '../DataFrame';\nimport type { Category, ColumnName, HistogramEventHandlers, HistogramSettings } from '../types';\nimport { getKeysCombinations } from '../utils/getKeysCombination';\nimport ChartRenderer from './ChartRenderer';\nimport type { HistogramLegendInfo } from './components/types';\nimport type { GroupedHistogramData } from './getHistogramData';\nimport { createHistogramDataByFacets } from './getHistogramData';\nimport { HistogramSettingsImpl } from './HistogramSettingsImpl';\n\nfunction getLegendInfo(\n data: DataFrame,\n grouping: ColumnName[],\n inheritedAes: HistogramSettingsImpl['inheritedAes']\n): HistogramLegendInfo {\n return grouping.reduce((res: HistogramLegendInfo, column) => {\n const categories = data.getColumnCategories(column.value, false);\n const getValueLabel = (category: Category) => (column.valueLabels\n ? String(data.getColumnValue(\n column.valueLabels,\n data.getColumnCategoryRowIndex(column.value, category)\n ))\n : category\n );\n const labels = categories.reduce((res: Record<string, string>, category) => {\n res[category] = getValueLabel(category);\n return res;\n }, {});\n res[column.value] = {\n values: categories.sort((a, b) => labels[a].localeCompare(labels[b], 'en', {numeric: true})),\n aesMap: inheritedAes[column.value],\n labels,\n };\n return res;\n }, {});\n}\n\nexport class ChartHistogram extends AbstractChart {\n settings: HistogramSettingsImpl;\n chartRenderer = new ChartRenderer();\n\n onTooltipHintSwitch: (v:boolean) => void = () => undefined;\n calculatedData: {\n facetKeys: string[];\n facetKeysCombinations: string[][];\n histogramDataByFacets: Record<string, GroupedHistogramData>\n legendInfo: HistogramLegendInfo\n } | null = null;\n\n constructor(data: DataFrame, settings: HistogramSettings, eventHandlers?: HistogramEventHandlers) {\n super(data, settings);\n\n this.settings = new HistogramSettingsImpl(settings);\n if (eventHandlers) {\n this.onTooltipHintSwitch = eventHandlers[0];\n }\n }\n\n mount(node: HTMLElement) {\n try {\n this.chartRenderer.init(node);\n this._updateData();\n this._updateChart();\n this.hasError = false;\n } catch (err) {\n this.hasError = true;\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n console.error(err);\n }\n }\n }\n\n unmount() {\n this.chartRenderer.clear();\n }\n\n updateSettingsAndData(data: DataFrame, settings: HistogramSettings) {\n try {\n const previousSettings = this.settings;\n const previousData = this.data;\n this.settings = new HistogramSettingsImpl(settings);\n this.data = data;\n if (\n this._needUpdateCalculatedDataBySettings(previousSettings, this.settings) ||\n this._needUpdateCalculatedDataByData(previousData, this.data)\n ) {\n this._updateData();\n } else {\n this._updateAesInData();\n }\n this._updateChart();\n this.hasError = false;\n } catch (err) {\n this.hasError = true;\n if (err instanceof Error) {\n this.chartRenderer.renderError(err.message as string);\n console.error(err);\n }\n }\n }\n\n updateChartState(_field: string, _value: unknown) {\n console.warn('no chart state for histogram');\n }\n\n export(): string {\n this._updateChart();\n return renderToString(this.chartRenderer.component);\n }\n\n _needUpdateCalculatedDataBySettings(prevSettings: HistogramSettingsImpl, settings: HistogramSettingsImpl) {\n return (\n prevSettings.valueColumn.value !== settings.valueColumn.value ||\n prevSettings.facetBy.some((el, idx) => el.value !== settings.facetBy[idx]?.value) ||\n prevSettings.grouping?.value !== settings.grouping?.value ||\n prevSettings.layers.length !== settings.layers.length ||\n prevSettings.layers.some((l, idx) => l.type !== settings.layers[idx].type) ||\n prevSettings.binsCount !== settings.binsCount ||\n prevSettings.chartSettings.xAxis.scale !== settings.chartSettings.xAxis.scale ||\n prevSettings.groupingOrder?.some((key, idx) => key !== settings.groupingOrder?.[idx]) ||\n settings.groupingOrder?.some((key, idx) => key !== prevSettings.groupingOrder?.[idx])\n );\n }\n\n _needUpdateCalculatedDataByData(prevData: DataFrame, data: DataFrame) {\n const prevKeys = Object.keys(prevData.data);\n const keys = Object.keys(data.data);\n return (\n prevData.id !== data.id ||\n prevKeys.length !== keys.length ||\n prevKeys.some(key => prevData.data[key].length !== data.data[key]?.length)\n );\n }\n\n _updateData() {\n const {valueColumn, facetBy, grouping, binsCount, chartSettings, inheritedAes, groupingOrder} = this.settings;\n\n const facetKeysLists = facetBy.map(column => this.data.getColumnCategories(column.value));\n const facetKeysCombinations = facetKeysLists.length ? getKeysCombinations([...facetKeysLists]) : [['null']];\n const facetGroupingValues = facetBy.map(column => column.value) ?? null;\n const groupingValues = grouping ? [grouping.value] : [];\n let groupingKeys = grouping ? this.data.getColumnCategories(grouping.value) : ['null'];\n if (groupingOrder) {\n groupingKeys = intersection(groupingOrder, groupingKeys);\n }\n\n this.data.setGrouping([...facetGroupingValues, ...groupingValues]);\n const histogramDataByFacets = createHistogramDataByFacets(this.data, facetKeysCombinations, groupingKeys, valueColumn, binsCount, chartSettings.xAxis.scale);\n\n this.calculatedData = {\n facetKeys: facetKeysCombinations.map(v => v.join(', ')),\n facetKeysCombinations,\n histogramDataByFacets,\n legendInfo: getLegendInfo(this.data, grouping ? [grouping] : [], inheritedAes)\n };\n }\n\n _updateAesInData() {\n const calculated = this.calculatedData;\n if (!calculated) {\n return;\n }\n }\n\n _updateChart() {\n if (!this.calculatedData) {\n return;\n }\n const {id, chartSettings, facetSettings, inheritedAes, layers, grouping, groupingDirection, groupingStack} = this.settings;\n this.chartRenderer.render(\n this.data,\n id,\n chartSettings,\n facetSettings,\n this.calculatedData.facetKeys,\n this.calculatedData.facetKeysCombinations, //for titles, if facet by more than 1 column\n this.calculatedData.histogramDataByFacets,\n this.calculatedData.legendInfo,\n layers,\n inheritedAes,\n grouping,\n groupingStack,\n groupingDirection,\n this.onTooltipHintSwitch\n );\n }\n}\n"],"names":["getLegendInfo","data","grouping","inheritedAes","res","column","categories","getValueLabel","category","labels","a","b","ChartHistogram","AbstractChart","settings","eventHandlers","__publicField","ChartRenderer","HistogramSettingsImpl","node","err","previousSettings","previousData","_field","_value","renderToString","prevSettings","el","idx","_a","_b","l","_c","key","_d","prevData","prevKeys","keys","valueColumn","facetBy","binsCount","chartSettings","groupingOrder","facetKeysLists","facetKeysCombinations","getKeysCombinations","facetGroupingValues","groupingValues","groupingKeys","intersection","histogramDataByFacets","createHistogramDataByFacets","v","id","facetSettings","layers","groupingDirection","groupingStack"],"mappings":";;;;;;;;AAcA,SAASA,EACLC,GACAC,GACAC,GACmB;AACnB,SAAOD,EAAS,OAAO,CAACE,GAA0BC,MAAW;AACzD,UAAMC,IAAaL,EAAK,oBAAoBI,EAAO,OAAO,EAAK,GACzDE,IAAgB,CAACC,MAAwBH,EAAO,cAChD,OAAOJ,EAAK;AAAA,MACVI,EAAO;AAAA,MACPJ,EAAK,0BAA0BI,EAAO,OAAOG,CAAQ;AAAA,IAAA,CACxD,IACCA,GAEAC,IAASH,EAAW,OAAO,CAACF,GAA6BI,OAC3DJ,EAAII,CAAQ,IAAID,EAAcC,CAAQ,GAC/BJ,IACR,EAAE;AACL,WAAAA,EAAIC,EAAO,KAAK,IAAI;AAAA,MAChB,QAAQC,EAAW,KAAK,CAACI,GAAGC,MAAMF,EAAOC,CAAC,EAAE,cAAcD,EAAOE,CAAC,GAAG,MAAM,EAAC,SAAS,GAAA,CAAK,CAAC;AAAA,MAC3F,QAAQR,EAAaE,EAAO,KAAK;AAAA,MACjC,QAAAI;AAAAA,IAAA,GAEGL;AAAAA,EACX,GAAG,CAAA,CAAE;AACT;AAEO,MAAMQ,UAAuBC,EAAc;AAAA,EAY9C,YAAYZ,GAAiBa,GAA6BC,GAAwC;AAC9F,UAAMd,GAAMa,CAAQ,GAZxBE,EAAA,MAAA,UAAA,GACAA,EAAA,MAAA,iBAAgB,IAAIC,EAAAA,CAAA,GAEpBD,EAAA,6BAA2C,MAAA;AAAA,IAAA,CAAA,GAC3CA,EAAA,MAAA,kBAKW,IAAA,GAKP,KAAK,WAAW,IAAIE,EAAsBJ,CAAQ,GAC9CC,MACA,KAAK,sBAAsBA,EAAc,CAAC;AAAA,EAElD;AAAA,EAEA,MAAMI,GA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-axis/src/axisBase.js
CHANGED
|
@@ -5,27 +5,27 @@ import H from "../../../d3-selection/src/select.js";
|
|
|
5
5
|
const K = (a) => a, X = (a, i, N = {}) => {
|
|
6
6
|
let f = [10], g = null, k = () => {
|
|
7
7
|
}, S = null, c = 6, m = 6, _ = 3;
|
|
8
|
-
const w = G(),
|
|
8
|
+
const w = G(), F = I("g", "tick").key(K), O = I("path", "domain"), M = () => ({ offset: [0, m + _] }), T = () => ({ path: [[0, 0], [0, m]] }), V = N.labelOffset || M, q = N.tickPath || T, b = (t, l) => {
|
|
9
9
|
let s = 0;
|
|
10
10
|
return t.bandwidth && (s = t.bandwidth() / 2, t.round() && (s = Math.round(s))), (y) => l(t(y) + s, 0);
|
|
11
11
|
}, h = (t, l) => x() ? `translate(${l}, ${t})` : `translate(${t}, ${l})`, P = (t) => x() ? t.map((l) => [l[1], l[0]]) : t, x = () => a === "left" || a === "right", r = (t) => {
|
|
12
|
-
Y(t) && (
|
|
12
|
+
Y(t) && (F.transition(t), O.transition(t)), t.each((l, s, y) => {
|
|
13
13
|
const p = y[s], $ = H(p);
|
|
14
14
|
p.__scale__ || $.attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", a === "right" ? "start" : a === "left" ? "end" : "middle");
|
|
15
15
|
const D = p.__scale__ || i;
|
|
16
16
|
p.__scale__ = i.copy();
|
|
17
|
-
const d = C(r), J = E(r), z = a === "bottom" || a === "right" ? 1 : -1,
|
|
17
|
+
const d = C(r), J = E(r), z = a === "bottom" || a === "right" ? 1 : -1, A = ([n, e]) => [n, z * e], u = i.range(), Q = P([
|
|
18
18
|
[u[0], z * c],
|
|
19
19
|
[u[0], 0],
|
|
20
20
|
[u[1], 0],
|
|
21
21
|
[u[1], z * c]
|
|
22
22
|
]), j = O($, [l]);
|
|
23
23
|
j.enter().attr("stroke", "#000"), j.attr("d", w(Q));
|
|
24
|
-
const o =
|
|
25
|
-
o.enter().attr("transform", b(D, h)).append("path").attr("stroke", "#000"), o.enter().append("text").attr("transform", (n, e) => h(...
|
|
24
|
+
const o = F($, d), v = d.map((n, e) => V(n, e, d)), B = d.map((n, e) => q(n, e, d));
|
|
25
|
+
o.enter().attr("transform", b(D, h)).append("path").attr("stroke", "#000"), o.enter().append("text").attr("transform", (n, e) => h(...A(v[e].offset))).attr("fill", "#000"), o.exit().attr("transform", b(i, h)), o.select("path").attr("visibility", (n, e) => B[e].hidden && "hidden").attr(
|
|
26
26
|
"d",
|
|
27
|
-
(n, e) => w(P(B[e].path.map(
|
|
28
|
-
), o.select("text").attr("visibility", (n, e) => v[e].hidden && "hidden").attr("transform", (n, e) => h(...
|
|
27
|
+
(n, e) => w(P(B[e].path.map(A)))
|
|
28
|
+
), o.select("text").attr("visibility", (n, e) => v[e].hidden && "hidden").attr("transform", (n, e) => h(...A(v[e].offset))).attr("dy", () => {
|
|
29
29
|
let n = "0em";
|
|
30
30
|
return x() ? n = "0.32em" : a === "bottom" && (n = "0.71em"), n;
|
|
31
31
|
}).text(J), o.attr("transform", b(i, h)), k(o, l, s);
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
function
|
|
2
|
-
let
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
else {
|
|
7
|
-
let l = -1;
|
|
8
|
-
for (let o of f)
|
|
9
|
-
(o = t(o, ++l, f)) != null && (e > o || e === void 0 && o >= o) && (e = o);
|
|
10
|
-
}
|
|
11
|
-
return e;
|
|
1
|
+
function l(t, e) {
|
|
2
|
+
let o;
|
|
3
|
+
for (const n of t)
|
|
4
|
+
n != null && (o > n || o === void 0 && n >= n) && (o = n);
|
|
5
|
+
return o;
|
|
12
6
|
}
|
|
13
7
|
export {
|
|
14
|
-
|
|
8
|
+
l as default
|
|
15
9
|
};
|
|
16
10
|
//# sourceMappingURL=min.js.map
|
package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-array/src/min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"min.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-array/src/min.js"],"sourcesContent":["export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n"],"names":["min","values","valueof","value"
|
|
1
|
+
{"version":3,"file":"min.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-array/src/min.js"],"sourcesContent":["export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n"],"names":["min","values","valueof","value"],"mappings":"AAAe,SAASA,EAAIC,GAAQC,GAAS;AAC3C,MAAIF;AAEF,aAAWG,KAASF;AACdE,SAAS,SACLH,IAAMG,KAAUH,MAAQ,UAAaG,KAASA,OACpDH,IAAMG;AAYZ,SAAOH;AACT;","x_google_ignoreList":[0]}
|
package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-shape/src/line.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-shape/src/line.js"],"sourcesContent":["import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"line.js","sources":["../../../../../../../../node_modules/@milaboratories/miplots4/node_modules/d3-shape/src/line.js"],"sourcesContent":["import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n"],"names":["line","x","y","defined","constant","context","curve","curveLinear","output","path","withPath","pointX","pointY","data","i","n","array","d","defined0","buffer","_"],"mappings":";;;;;AAMe,SAAAA,EAASC,GAAGC,GAAG;AAC5B,MAAIC,IAAUC,EAAS,EAAI,GACvBC,IAAU,MACVC,IAAQC,GACRC,IAAS,MACTC,IAAOC,EAASV,CAAI;AAExBC,EAAAA,IAAI,OAAOA,KAAM,aAAaA,IAAKA,MAAM,SAAaU,IAASP,EAASH,CAAC,GACzEC,IAAI,OAAOA,KAAM,aAAaA,IAAKA,MAAM,SAAaU,IAASR,EAASF,CAAC;AAEzE,WAASF,EAAKa,GAAM;AAClB,QAAIC,GACAC,KAAKF,IAAOG,EAAMH,CAAI,GAAG,QACzBI,GACAC,IAAW,IACXC;AAIJ,SAFId,KAAW,SAAMG,IAASF,EAAMa,IAASV,GAAM,IAE9CK,IAAI,GAAGA,KAAKC,GAAG,EAAED;AAChB,QAAEA,IAAIC,KAAKZ,EAAQc,IAAIJ,EAAKC,CAAC,GAAGA,GAAGD,CAAI,OAAOK,OAC5CA,IAAW,CAACA,KAAUV,EAAO,UAAA,IAC5BA,EAAO,YAEVU,KAAUV,EAAO,MAAM,CAACP,EAAEgB,GAAGH,GAAGD,CAAI,GAAG,CAACX,EAAEe,GAAGH,GAAGD,CAAI,CAAC;AAG3D,QAAIM,EAAQ,QAAOX,IAAS,MAAM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