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