@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,23 +1,23 @@
1
1
  import { j as n } from "../../node_modules/react/jsx-runtime.js";
2
- import $ from "../../node_modules/lodash/lodash.js";
2
+ import { l as $ } from "../../node_modules/lodash/lodash.js";
3
3
  import { r as g } from "../../_virtual/index.js";
4
4
  import { numberFormat as i } from "../../utils/numberFormat.js";
5
5
  const k = g.memo(({
6
- width: t,
7
- scales: e,
6
+ width: e,
7
+ scales: t,
8
8
  trendsData: r,
9
9
  aesGetters: s
10
- }) => r && r.map(({ predict: o, getArea: f, data: m, bounded: h, xBounds: j, stats: y }, c) => {
11
- const [l, a] = h ? j : e.x.domain(), x = (a - l) / 15, d = o(l), u = o(a);
12
- if (isNaN(d) || isNaN(u))
10
+ }) => r && r.map(({ idx: a, predict: c, getArea: m, bounded: h, xBounds: j, stats: y }, d) => {
11
+ const [l, o] = h ? j : t.x.domain(), u = (o - l) / 15, x = c(l), f = c(o);
12
+ if (isNaN(x) || isNaN(f))
13
13
  return null;
14
- const p = s.trendColor(m);
14
+ const p = s.trendColor(a);
15
15
  return /* @__PURE__ */ n.jsxs("g", { children: [
16
- /* @__PURE__ */ n.jsx("text", { y: c * 20 + 20, fill: p, x: t - 8, textAnchor: "end", children: C(y) }),
16
+ /* @__PURE__ */ n.jsx("text", { y: d * 20 + 20, fill: p, x: e - 8, textAnchor: "end", children: C(y) }),
17
17
  /* @__PURE__ */ n.jsx(
18
18
  "path",
19
19
  {
20
- d: f(e.x, e.y, $.range(l, a + x / 2, x)),
20
+ d: m(t.x, t.y, $.range(l, o + u / 2, u)),
21
21
  fill: p,
22
22
  opacity: 0.2
23
23
  }
@@ -25,38 +25,38 @@ const k = g.memo(({
25
25
  /* @__PURE__ */ n.jsx(
26
26
  "line",
27
27
  {
28
- x1: e.x(l),
29
- x2: e.x(a),
30
- y1: e.y(d),
31
- y2: e.y(u),
28
+ x1: t.x(l),
29
+ x2: t.x(o),
30
+ y1: t.y(x),
31
+ y2: t.y(f),
32
32
  stroke: p
33
33
  }
34
34
  )
35
- ] }, c);
35
+ ] }, d);
36
36
  }));
37
- function N(t) {
38
- return typeof t.r2 > "u" ? null : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
37
+ function N(e) {
38
+ return typeof e.r2 > "u" ? null : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
39
39
  /* @__PURE__ */ n.jsx("tspan", { children: "R" }),
40
40
  /* @__PURE__ */ n.jsx("tspan", { fontSize: "10px", dy: "-8", children: "2" }),
41
- /* @__PURE__ */ n.jsx("tspan", { dy: "8", children: ` = ${i(t.r2)}` })
41
+ /* @__PURE__ */ n.jsx("tspan", { dy: "8", children: ` = ${i(e.r2)}` })
42
42
  ] });
43
43
  }
44
- function F(t) {
45
- return typeof t.pValue > "u" ? null : /* @__PURE__ */ n.jsx("tspan", { children: `p-value = ${i(t.pValue)}` });
44
+ function F(e) {
45
+ return typeof e.pValue > "u" ? null : /* @__PURE__ */ n.jsx("tspan", { children: `p-value = ${i(e.pValue)}` });
46
46
  }
47
- function b(t) {
48
- if (typeof t.coefficients > "u")
47
+ function b(e) {
48
+ if (typeof e.coefficients > "u")
49
49
  return null;
50
- const { slope: e, slopeError: r, intercept: s, interceptError: o } = t.coefficients;
51
- return /* @__PURE__ */ n.jsx("tspan", { children: /* @__PURE__ */ n.jsx("tspan", { children: `slope = ${i(e)} ± ${i(r)}, intercept = ${i(s)} ± ${i(o)}` }) });
50
+ const { slope: t, slopeError: r, intercept: s, interceptError: a } = e.coefficients;
51
+ return /* @__PURE__ */ n.jsx("tspan", { children: /* @__PURE__ */ n.jsx("tspan", { children: `slope = ${i(t)} ± ${i(r)}, intercept = ${i(s)} ± ${i(a)}` }) });
52
52
  }
53
- function C(t) {
54
- const e = [N(t), F(t), b(t)].filter(
53
+ function C(e) {
54
+ const t = [N(e), F(e), b(e)].filter(
55
55
  (r) => r !== null
56
56
  );
57
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: e.map((r, s) => /* @__PURE__ */ n.jsxs("tspan", { children: [
57
+ return /* @__PURE__ */ n.jsx(n.Fragment, { children: t.map((r, s) => /* @__PURE__ */ n.jsxs("tspan", { children: [
58
58
  r,
59
- /* @__PURE__ */ n.jsx("tspan", { children: s < e.length - 1 && ", " })
59
+ /* @__PURE__ */ n.jsx("tspan", { children: s < t.length - 1 && ", " })
60
60
  ] }, s)) });
61
61
  }
62
62
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"ChartTrendsData.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/components/ChartTrendsData.tsx"],"sourcesContent":["import lodash from 'lodash';\nimport { memo, type ReactElement } from 'react';\nimport { numberFormat } from '../../utils/numberFormat';\nimport type { TrendsData } from '../linearRegression';\nimport type {\n AesGetters,\n ChartScales\n} from './types';\n\ninterface Props {\n trendsData: TrendsData[keyof TrendsData] | null;\n width: number;\n scales: ChartScales;\n aesGetters: AesGetters;\n}\n\nexport const ChartTrendsData = memo(({\n width,\n scales,\n trendsData,\n aesGetters,\n}: Props) => {\n return (trendsData &&\n trendsData.map(({predict, getArea, data, bounded, xBounds, stats}, idx) => {\n const [minX, maxX] = bounded ? xBounds : scales.x.domain();\n const step = (maxX - minX) / 15;\n const p1 = predict(minX);\n const p2 = predict(maxX);\n if (isNaN(p1) || isNaN(p2)) {\n return null;\n }\n const fillColor = aesGetters.trendColor(data);\n return (\n <g key={idx}>\n <text y={idx * 20 + 20} fill={fillColor} x={width - 8} textAnchor=\"end\">\n {formatStats(stats)}\n </text>\n <path\n d={getArea(scales.x, scales.y, lodash.range(minX, maxX + step / 2, step))}\n fill={fillColor}\n opacity={0.2}\n />\n <line\n x1={scales.x(minX)}\n x2={scales.x(maxX)}\n y1={scales.y(p1)}\n y2={scales.y(p2)}\n stroke={fillColor}\n />\n </g>\n );\n })\n );\n});\n\nfunction formatR2(stats: TrendsData[keyof TrendsData][number]['stats']) {\n if (typeof stats.r2 === 'undefined') {\n return null;\n }\n return (\n <>\n <tspan>R</tspan>\n <tspan fontSize=\"10px\" dy=\"-8\">\n 2\n </tspan>\n <tspan dy=\"8\">{` = ${numberFormat(stats.r2)}`}</tspan>\n </>\n );\n}\n\nfunction formatPValue(stats: TrendsData[keyof TrendsData][number]['stats']) {\n if (typeof stats.pValue === 'undefined') {\n return null;\n }\n return <tspan>{`p-value = ${numberFormat(stats.pValue)}`}</tspan>;\n}\n\nfunction formatCoefficients(stats: TrendsData[keyof TrendsData][number]['stats']) {\n if (typeof stats.coefficients === 'undefined') {\n return null;\n }\n const {slope, slopeError, intercept, interceptError} = stats.coefficients;\n return (\n <tspan>\n <tspan>\n {`slope = ${numberFormat(slope)} ± ${numberFormat(slopeError)}, intercept = ${numberFormat(intercept)} ± ${numberFormat(interceptError)}`}\n </tspan>\n </tspan>\n );\n}\n\nfunction formatStats(stats: TrendsData[keyof TrendsData][number]['stats']) {\n const items = [formatR2(stats), formatPValue(stats), formatCoefficients(stats)].filter(\n value => value !== null\n ) as unknown as ReactElement[];\n return (\n <>\n {items.map((item, idx) => (\n <tspan key={idx}>\n {item}\n <tspan>{idx < items.length - 1 && ', '}</tspan>\n </tspan>\n ))}\n </>\n );\n}\n\n"],"names":["ChartTrendsData","memo","width","scales","trendsData","aesGetters","predict","getArea","data","bounded","xBounds","stats","idx","minX","maxX","step","p1","p2","fillColor","n","jsx","formatStats","lodash","formatR2","jsxs","Fragment","numberFormat","formatPValue","formatCoefficients","slope","slopeError","intercept","interceptError","items","value","item"],"mappings":"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","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ChartTrendsData.js","sources":["../../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/components/ChartTrendsData.tsx"],"sourcesContent":["import { range } from 'lodash';\nimport { memo, type ReactElement } from 'react';\nimport { numberFormat } from '../../utils/numberFormat';\nimport type { TrendsData } from '../linearRegression';\nimport type {\n AesGetters,\n ChartScales\n} from './types';\n\ninterface Props {\n trendsData: TrendsData[keyof TrendsData] | null;\n width: number;\n scales: ChartScales;\n aesGetters: AesGetters;\n}\n\nexport const ChartTrendsData = memo(({\n width,\n scales,\n trendsData,\n aesGetters,\n}: Props) => {\n return (trendsData &&\n trendsData.map(({ idx, predict, getArea, bounded, xBounds, stats}, i) => {\n const [minX, maxX] = bounded ? xBounds : scales.x.domain();\n const step = (maxX - minX) / 15;\n const p1 = predict(minX);\n const p2 = predict(maxX);\n if (isNaN(p1) || isNaN(p2)) {\n return null;\n }\n const fillColor = aesGetters.trendColor(idx);\n return (\n <g key={i}>\n <text y={i * 20 + 20} fill={fillColor} x={width - 8} textAnchor=\"end\">\n {formatStats(stats)}\n </text>\n <path\n d={getArea(scales.x, scales.y, range(minX, maxX + step / 2, step))}\n fill={fillColor}\n opacity={0.2}\n />\n <line\n x1={scales.x(minX)}\n x2={scales.x(maxX)}\n y1={scales.y(p1)}\n y2={scales.y(p2)}\n stroke={fillColor}\n />\n </g>\n );\n })\n );\n});\n\nfunction formatR2(stats: TrendsData[keyof TrendsData][number]['stats']) {\n if (typeof stats.r2 === 'undefined') {\n return null;\n }\n return (\n <>\n <tspan>R</tspan>\n <tspan fontSize=\"10px\" dy=\"-8\">\n 2\n </tspan>\n <tspan dy=\"8\">{` = ${numberFormat(stats.r2)}`}</tspan>\n </>\n );\n}\n\nfunction formatPValue(stats: TrendsData[keyof TrendsData][number]['stats']) {\n if (typeof stats.pValue === 'undefined') {\n return null;\n }\n return <tspan>{`p-value = ${numberFormat(stats.pValue)}`}</tspan>;\n}\n\nfunction formatCoefficients(stats: TrendsData[keyof TrendsData][number]['stats']) {\n if (typeof stats.coefficients === 'undefined') {\n return null;\n }\n const {slope, slopeError, intercept, interceptError} = stats.coefficients;\n return (\n <tspan>\n <tspan>\n {`slope = ${numberFormat(slope)} ± ${numberFormat(slopeError)}, intercept = ${numberFormat(intercept)} ± ${numberFormat(interceptError)}`}\n </tspan>\n </tspan>\n );\n}\n\nfunction formatStats(stats: TrendsData[keyof TrendsData][number]['stats']) {\n const items = [formatR2(stats), formatPValue(stats), formatCoefficients(stats)].filter(\n value => value !== null\n ) as unknown as ReactElement[];\n return (\n <>\n {items.map((item, idx) => (\n <tspan key={idx}>\n {item}\n <tspan>{idx < items.length - 1 && ', '}</tspan>\n </tspan>\n ))}\n </>\n );\n}\n\n"],"names":["ChartTrendsData","memo","width","scales","trendsData","aesGetters","idx","predict","getArea","bounded","xBounds","stats","i","minX","maxX","step","p1","p2","fillColor","n","jsx","formatStats","range","formatR2","jsxs","Fragment","numberFormat","formatPValue","formatCoefficients","slope","slopeError","intercept","interceptError","items","value","item"],"mappings":"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","x_google_ignoreList":[0]}
@@ -1,8 +1,8 @@
1
1
  import { j as s } from "../../node_modules/react/jsx-runtime.js";
2
2
  import { r as P } from "../../_virtual/index.js";
3
- import { ChartsTitle as b } from "../../common/ChartsTitle.js";
4
- import { ErrorBoundary as A } from "../../common/ErrorBoundary.js";
5
- import $ from "../../common/fonts.js";
3
+ import { ChartsTitle as $ } from "../../common/ChartsTitle.js";
4
+ import { ErrorBoundary as b } from "../../common/ErrorBoundary.js";
5
+ import A from "../../common/fonts.js";
6
6
  import { Legend as B } from "../../common/Legend.js";
7
7
  import { useTooltip as I } from "../../common/Tooltip.js";
8
8
  import { LEGEND_OFFSET as k } from "../constants.js";
@@ -21,19 +21,19 @@ function Z({
21
21
  trendsData: l,
22
22
  columnsCount: y,
23
23
  margins: n,
24
- keyColumn: D,
25
- mainTitle: w,
24
+ keyColumn: w,
25
+ mainTitle: D,
26
26
  facetTitles: j,
27
27
  captionsSizes: S,
28
- onlyPositive: T,
29
- layersData: v,
28
+ onlyPositive: v,
29
+ layersData: T,
30
30
  aesGetters: h,
31
31
  onTooltipHintSwitch: C
32
32
  }) {
33
33
  const i = I(C), { xAxis: E, yAxis: M, title: m, frame: W, legend: H, tooltips: z } = g, d = o[a[0]].padding, F = o[a[y - 1]].padding, G = e.chartsWidth + k, L = d.top, p = P.useMemo(() => Object.fromEntries(
34
34
  a.map((t) => [t, { x: r.x[t], y: r.y[t] }])
35
35
  ), [r.x, r.y, a]);
36
- return /* @__PURE__ */ s.jsx(A, { dataId: c, children: /* @__PURE__ */ s.jsx("div", { style: { position: "relative", width: e.totalWidth, height: e.totalHeight }, children: /* @__PURE__ */ s.jsxs(
36
+ return /* @__PURE__ */ s.jsx(b, { dataId: c, children: /* @__PURE__ */ s.jsx("div", { style: { position: "relative", width: e.totalWidth, height: e.totalHeight }, children: /* @__PURE__ */ s.jsxs(
37
37
  "svg",
38
38
  {
39
39
  xmlns: "http://www.w3.org/2000/svg",
@@ -42,12 +42,12 @@ function Z({
42
42
  height: e.totalHeight,
43
43
  style: { position: "absolute", top: 0, left: 0, zIndex: 0 },
44
44
  children: [
45
- /* @__PURE__ */ s.jsx("defs", { children: $ }),
45
+ /* @__PURE__ */ s.jsx("defs", { children: A }),
46
46
  /* @__PURE__ */ s.jsxs("g", { transform: `translate(${n.left},${n.top})`, fontFamily: "Manrope", children: [
47
47
  /* @__PURE__ */ s.jsx(
48
- b,
48
+ $,
49
49
  {
50
- title: w,
50
+ title: D,
51
51
  show: m.show,
52
52
  position: m.position,
53
53
  leftPadding: d.left,
@@ -71,8 +71,8 @@ function Z({
71
71
  trendsData: l ? l[t] : null,
72
72
  facetTitle: j[t],
73
73
  captionsSizes: S,
74
- layersData: v[t],
75
- onlyPositive: T,
74
+ layersData: T[t],
75
+ onlyPositive: v,
76
76
  aesGetters: h,
77
77
  onMouseEnterDot: i.onMouseEnter,
78
78
  onMouseLeaveDot: i.onMouseLeave
@@ -86,7 +86,7 @@ function Z({
86
86
  tooltipsData: i,
87
87
  dimensions: o[i.currentFacet],
88
88
  scales: p[i.currentFacet],
89
- keyColumn: D,
89
+ keyColumn: w,
90
90
  margins: n,
91
91
  chartSizes: e,
92
92
  tooltips: z,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/constants.ts"],"sourcesContent":["import {BLACK} from '../constants';\nimport type {DotAesItem} from '../common/types';\nimport type {AesItem} from '../types';\n\n// inner paddings in chart area\nexport const PADDINGS = {\n TOP: 30,\n BOTTOM: 30,\n LEFT: 30,\n RIGHT: 30\n};\n\nexport const DEFAULT_COMMON_AES:AesItem = {\n fillColor: 'white',\n lineColor: BLACK,\n lineWidth: 1,\n lineShape: 'solid',\n dotSize: 3,\n dotFill: BLACK,\n dotShape: '21',\n};\nexport const DEFAULT_DOT_AES:DotAesItem = {\n color: '#929BAD',\n size: 6,\n shape: '21',\n};\n\nexport const FACET_TITLE_LINE = 20;\nexport const FACET_TITLE_OFFSET = 6;\nexport const FACET_AXIS_OFFSET = 8;\nexport const MIN_MARGIN = 24;\nexport const MIN_PADDING = 12;\n\nexport const TITLE_LINE = 20;\nexport const DEFAULT_TICKS_SIZE = 4;\nexport const TICK_OFFSET = 6;\n\nexport const LEGEND_OFFSET = 10;\n"],"names":["PADDINGS","DEFAULT_COMMON_AES","BLACK","DEFAULT_DOT_AES","FACET_TITLE_LINE","FACET_TITLE_OFFSET","FACET_AXIS_OFFSET","MIN_MARGIN","MIN_PADDING","TITLE_LINE","DEFAULT_TICKS_SIZE","TICK_OFFSET","LEGEND_OFFSET"],"mappings":";AAKO,MAAMA,IAAW;AAAA,EACpB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACX,GAEaC,IAA6B;AAAA,EACtC,WAAW;AAAA,EACX,WAAWC;AAAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAASA;AAAAA,EACT,UAAU;AACd,GACaC,IAA6B;AAAA,EACtC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACX,GAEaC,IAAmB,IACnBC,IAAqB,GACrBC,IAAoB,GACpBC,IAAa,IACbC,IAAc,IAEdC,IAAa,IACbC,IAAqB,GACrBC,IAAc,GAEdC,IAAgB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/constants.ts"],"sourcesContent":["import type { DotAesItem } from '../common/types';\nimport { BLACK } from '../constants';\nimport type { AesItem } from '../types';\n\n// inner paddings in chart area\nexport const PADDINGS = {\n TOP: 30,\n BOTTOM: 30,\n LEFT: 30,\n RIGHT: 30\n};\n\nexport const DEFAULT_COMMON_AES: Required<AesItem> = {\n fillColor: 'white',\n lineColor: BLACK,\n lineWidth: 1,\n lineShape: 'solid',\n dotSize: 3,\n dotFill: BLACK,\n dotShape: '21',\n};\nexport const DEFAULT_DOT_AES:DotAesItem = {\n color: '#929BAD',\n size: 6,\n shape: '21',\n};\n\nexport const FACET_TITLE_LINE = 20;\nexport const FACET_TITLE_OFFSET = 6;\nexport const FACET_AXIS_OFFSET = 8;\nexport const MIN_MARGIN = 24;\nexport const MIN_PADDING = 12;\n\nexport const TITLE_LINE = 20;\nexport const DEFAULT_TICKS_SIZE = 4;\nexport const TICK_OFFSET = 6;\n\nexport const LEGEND_OFFSET = 10;\n"],"names":["PADDINGS","DEFAULT_COMMON_AES","BLACK","DEFAULT_DOT_AES","FACET_TITLE_LINE","FACET_TITLE_OFFSET","FACET_AXIS_OFFSET","MIN_MARGIN","MIN_PADDING","TITLE_LINE","DEFAULT_TICKS_SIZE","TICK_OFFSET","LEGEND_OFFSET"],"mappings":";AAKO,MAAMA,IAAW;AAAA,EACpB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACX,GAEaC,IAAwC;AAAA,EACjD,WAAW;AAAA,EACX,WAAWC;AAAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAASA;AAAAA,EACT,UAAU;AACd,GACaC,IAA6B;AAAA,EACtC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACX,GAEaC,IAAmB,IACnBC,IAAqB,GACrBC,IAAoB,GACpBC,IAAa,IACbC,IAAc,IAEdC,IAAa,IACbC,IAAqB,GACrBC,IAAc,GAEdC,IAAgB;","x_google_ignoreList":[0]}
@@ -1,34 +1,33 @@
1
- function X(v, d, M, p, a, f, b) {
2
- const h = {};
3
- for (const g of d) {
1
+ import { formatColumnValue as V } from "./utils/formatColumnValue.js";
2
+ import { sortDotsByGrouping as y } from "./utils/sortDotsByGrouping.js";
3
+ import { format as D } from "../node_modules/d3-format/src/defaultLocale.js";
4
+ function Y(o, x, h, d, a, l, v) {
5
+ const c = {}, C = a != null && a.format ? D(a.format) : void 0;
6
+ for (const g of x) {
4
7
  const e = [];
5
- let s = 1 / 0, u = 1 / 0, c = -1 / 0, m = -1 / 0;
6
- const i = g.concat([""]);
7
- for (const r of b) {
8
- i[i.length - 1] = r;
9
- const n = v.getRowsByGrouping(i);
10
- for (let x = 0; x < n.length; x++) {
11
- const t = n[x], o = t[M.value], l = t[p.value];
12
- o === null && l === null || (s = Math.min(s, o), u = Math.min(u, l), c = Math.max(c, o), m = Math.max(m, l), e.push({
13
- x: o,
14
- y: l,
15
- label: a ? t[a.valueLabels ?? a.value] : null,
16
- dimmed: f ? !t[f.value] : !1,
17
- data: t
18
- }));
19
- }
8
+ let u = 1 / 0, s = 1 / 0, r = -1 / 0, i = -1 / 0;
9
+ const M = g.concat([""]), p = o.getRowsByGrouping(M);
10
+ for (let f = 0; f < p.length; f++) {
11
+ const t = p[f], m = o.getColumnValue(h.value, t), n = o.getColumnValue(d.value, t);
12
+ m === null && n === null || (u = Math.min(u, m), s = Math.min(s, n), r = Math.max(r, m), i = Math.max(i, n), e.push({
13
+ x: m,
14
+ y: n,
15
+ label: V(o, t, a, C),
16
+ dimmed: l ? !o.getColumnValue(l.value, t) : !1,
17
+ idx: t
18
+ }));
20
19
  }
21
- e.sort((r, n) => r.x - n.x), h[g.join("_")] = {
22
- minX: s,
23
- maxX: c,
24
- minY: u,
25
- maxY: m,
20
+ y(o, e, v, l), c[g.join("_")] = {
21
+ minX: u,
22
+ maxX: r,
23
+ minY: s,
24
+ maxY: i,
26
25
  dots: e
27
26
  };
28
27
  }
29
- return h;
28
+ return c;
30
29
  }
31
30
  export {
32
- X as getDots
31
+ Y as getDots
33
32
  };
34
33
  //# sourceMappingURL=dots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dots.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/dots.ts"],"sourcesContent":["import type { DataFrame } from '../DataFrame';\nimport type { ColumnName, DataValue, Row } from '../types';\n\nexport type Dot = {\n x: number;\n y: number;\n label: DataValue | null;\n dimmed: boolean;\n data: Row\n};\n\nexport type GroupedDots = Record<\n string,\n {\n minX: number;\n maxX: number;\n minY: number;\n maxY: number;\n dots: Dot[];\n }\n>;\n\nexport function getDots(\n data: DataFrame,\n facetKeysCombinations: string[][],\n x: ColumnName,\n y: ColumnName,\n label: ColumnName | null,\n highlight: ColumnName | null,\n keys: string[]\n): GroupedDots {\n const result: GroupedDots = {};\n\n for (const facetKeys of facetKeysCombinations) {\n const dots: Dot[] = [];\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n const templateGroupPath = facetKeys.concat(['']);\n\n for (const primaryKey of keys) {\n templateGroupPath[templateGroupPath.length - 1] = primaryKey;\n const rows = data.getRowsByGrouping(templateGroupPath);\n\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i];\n const valueX = row[x.value] as number;\n const valueY = row[y.value] as number;\n\n if (valueX === null && valueY === null) continue;\n\n minX = Math.min(minX, valueX);\n minY = Math.min(minY, valueY);\n maxX = Math.max(maxX, valueX);\n maxY = Math.max(maxY, valueY);\n \n dots.push({\n x: valueX,\n y: valueY,\n label: label ? row[label.valueLabels ?? label.value] : null,\n dimmed: highlight ? !row[highlight.value] : false,\n data: row\n });\n }\n }\n\n dots.sort((d1, d2) => d1.x - d2.x);\n\n result[facetKeys.join('_')] = {\n minX,\n maxX,\n minY,\n maxY,\n dots,\n };\n }\n\n return result;\n}\n"],"names":["getDots","data","facetKeysCombinations","x","y","label","highlight","keys","result","facetKeys","dots","minX","minY","maxX","maxY","templateGroupPath","primaryKey","rows","i","row","valueX","valueY","d1","d2"],"mappings":"AAsBO,SAASA,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACW;AACX,QAAMC,IAAsB,CAAA;AAE5B,aAAWC,KAAaP,GAAuB;AAC3C,UAAMQ,IAAc,CAAA;AACpB,QAAIC,IAAO,OACPC,IAAO,OACPC,IAAO,QACPC,IAAO;AAEX,UAAMC,IAAoBN,EAAU,OAAO,CAAC,EAAE,CAAC;AAE/C,eAAWO,KAAcT,GAAM;AAC3BQ,MAAAA,EAAkBA,EAAkB,SAAS,CAAC,IAAIC;AAClD,YAAMC,IAAOhB,EAAK,kBAAkBc,CAAiB;AAErD,eAASG,IAAI,GAAGA,IAAID,EAAK,QAAQC,KAAK;AAClC,cAAMC,IAAMF,EAAKC,CAAC,GACZE,IAASD,EAAIhB,EAAE,KAAK,GACpBkB,IAASF,EAAIf,EAAE,KAAK;AAEtBgB,QAAAA,MAAW,QAAQC,MAAW,SAElCV,IAAO,KAAK,IAAIA,GAAMS,CAAM,GAC5BR,IAAO,KAAK,IAAIA,GAAMS,CAAM,GAC5BR,IAAO,KAAK,IAAIA,GAAMO,CAAM,GAC5BN,IAAO,KAAK,IAAIA,GAAMO,CAAM,GAE5BX,EAAK,KAAK;AAAA,UACN,GAAGU;AAAAA,UACH,GAAGC;AAAAA,UACH,OAAOhB,IAAQc,EAAId,EAAM,eAAeA,EAAM,KAAK,IAAI;AAAA,UACvD,QAAQC,IAAY,CAACa,EAAIb,EAAU,KAAK,IAAI;AAAA,UAC5C,MAAMa;AAAAA,QAAA,CACT;AAAA,MACL;AAAA,IACJ;AAEAT,IAAAA,EAAK,KAAK,CAACY,GAAIC,MAAOD,EAAG,IAAIC,EAAG,CAAC,GAEjCf,EAAOC,EAAU,KAAK,GAAG,CAAC,IAAI;AAAA,MAC1B,MAAAE;AAAAA,MACA,MAAAE;AAAAA,MACA,MAAAD;AAAAA,MACA,MAAAE;AAAAA,MACA,MAAAJ;AAAAA,IAAA;AAAA,EAER;AAEA,SAAOF;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"dots.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/dots.ts"],"sourcesContent":["import {format} from 'd3-format';\nimport type { DataFrame } from '../DataFrame';\nimport type { ColumnName, DataValue } from '../types';\nimport type { ScatterplotSettingsImpl } from './ScatterplotSettingsImpl';\nimport {formatColumnValue} from './utils/formatColumnValue';\nimport {sortDotsByGrouping} from './utils/sortDotsByGrouping';\n\nexport type Dot = {\n idx: number;\n x: number;\n y: number;\n label: DataValue | null;\n dimmed: boolean;\n};\n\nexport type GroupedDots = Record<\n string,\n {\n minX: number;\n maxX: number;\n minY: number;\n maxY: number;\n dots: Dot[];\n }\n>;\n\nexport function getDots(\n data: DataFrame,\n facetKeysCombinations: string[][],\n x: ColumnName,\n y: ColumnName,\n label: ColumnName | null,\n highlight: ColumnName | null,\n grouping: ScatterplotSettingsImpl['grouping']\n): GroupedDots {\n const result: GroupedDots = {};\n\n const labelFormatter = label?.format ? format(label.format) : undefined;\n\n for (const facetKeys of facetKeysCombinations) {\n const dots: Dot[] = [];\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n const templateGroupPath = facetKeys.concat(['']);\n const rows = data.getRowsByGrouping(templateGroupPath);\n\n for (let i = 0; i < rows.length; i++) {\n const rowIdx = rows[i];\n const valueX = data.getColumnValue(x.value, rowIdx) as number;\n const valueY = data.getColumnValue(y.value, rowIdx) as number;\n\n if (valueX === null && valueY === null) continue;\n\n minX = Math.min(minX, valueX);\n minY = Math.min(minY, valueY);\n maxX = Math.max(maxX, valueX);\n maxY = Math.max(maxY, valueY);\n\n dots.push({\n x: valueX,\n y: valueY,\n label: formatColumnValue(data, rowIdx, label, labelFormatter),\n dimmed: highlight ? !data.getColumnValue(highlight.value, rowIdx) : false,\n idx: rowIdx\n });\n }\n\n sortDotsByGrouping(data, dots, grouping, highlight);\n\n result[facetKeys.join('_')] = {\n minX,\n maxX,\n minY,\n maxY,\n dots,\n };\n }\n\n return result;\n}\n"],"names":["getDots","data","facetKeysCombinations","x","y","label","highlight","grouping","result","labelFormatter","format","facetKeys","dots","minX","minY","maxX","maxY","templateGroupPath","rows","i","rowIdx","valueX","valueY","formatColumnValue","sortDotsByGrouping"],"mappings":";;;AA0BO,SAASA,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACW;AACX,QAAMC,IAAsB,CAAA,GAEtBC,IAAiBJ,KAAA,QAAAA,EAAO,SAASK,EAAOL,EAAM,MAAM,IAAI;AAE9D,aAAWM,KAAaT,GAAuB;AAC3C,UAAMU,IAAc,CAAA;AACpB,QAAIC,IAAO,OACPC,IAAO,OACPC,IAAO,QACPC,IAAO;AAEX,UAAMC,IAAoBN,EAAU,OAAO,CAAC,EAAE,CAAC,GACzCO,IAAOjB,EAAK,kBAAkBgB,CAAiB;AAErD,aAASE,IAAI,GAAGA,IAAID,EAAK,QAAQC,KAAK;AAClC,YAAMC,IAASF,EAAKC,CAAC,GACfE,IAASpB,EAAK,eAAeE,EAAE,OAAOiB,CAAM,GAC5CE,IAASrB,EAAK,eAAeG,EAAE,OAAOgB,CAAM;AAE9CC,MAAAA,MAAW,QAAQC,MAAW,SAElCT,IAAO,KAAK,IAAIA,GAAMQ,CAAM,GAC5BP,IAAO,KAAK,IAAIA,GAAMQ,CAAM,GAC5BP,IAAO,KAAK,IAAIA,GAAMM,CAAM,GAC5BL,IAAO,KAAK,IAAIA,GAAMM,CAAM,GAE5BV,EAAK,KAAK;AAAA,QACN,GAAGS;AAAAA,QACH,GAAGC;AAAAA,QACH,OAAOC,EAAkBtB,GAAMmB,GAAQf,GAAOI,CAAc;AAAA,QAC5D,QAAQH,IAAY,CAACL,EAAK,eAAeK,EAAU,OAAOc,CAAM,IAAI;AAAA,QACpE,KAAKA;AAAAA,MAAA,CACR;AAAA,IACL;AAEAI,IAAAA,EAAmBvB,GAAMW,GAAML,GAAUD,CAAS,GAElDE,EAAOG,EAAU,KAAK,GAAG,CAAC,IAAI;AAAA,MAC1B,MAAAE;AAAAA,MACA,MAAAE;AAAAA,MACA,MAAAD;AAAAA,MACA,MAAAE;AAAAA,MACA,MAAAJ;AAAAA,IAAA;AAAA,EAER;AAEA,SAAOJ;AACX;","x_google_ignoreList":[0]}
@@ -1,18 +1,18 @@
1
- import { exhaustive as v } from "../utils/index.js";
2
- function g(c, d, i, y, a) {
3
- return d.reduce((n, s) => {
4
- const u = i[s].dots;
5
- return n[s] = c.map((e) => {
1
+ import { exhaustive as m } from "../utils/index.js";
2
+ function v(i, p, l, f, y, c) {
3
+ return l.reduce((n, s) => {
4
+ const u = f[s].dots;
5
+ return n[s] = p.map((e) => {
6
6
  if (e.type === "curve")
7
7
  return {
8
8
  type: "curve",
9
9
  info: e,
10
- geoms: y.map((p) => {
11
- const f = u.filter(
12
- (t) => a.every((r, o) => t.data[r.value] === p[o])
13
- ), m = a.reduce((t, r, o) => (t[r.value] = p[o], t), {});
14
- return { dots: f, data: m };
15
- })
10
+ geoms: y.map((t) => {
11
+ const a = u.filter(
12
+ (r) => c.every((o, d) => String(i.getColumnValue(o.value, r.idx)) === t[d])
13
+ );
14
+ return a.sort((r, o) => r.x - o.x), { dots: a };
15
+ }).filter((t) => t.dots.length > 0)
16
16
  };
17
17
  if (e.type === "dots")
18
18
  return {
@@ -20,11 +20,11 @@ function g(c, d, i, y, a) {
20
20
  info: e,
21
21
  geoms: u
22
22
  };
23
- v(e, "Unknown scatterplot layer type");
23
+ m(e, "Unknown scatterplot layer type");
24
24
  }), n;
25
25
  }, {});
26
26
  }
27
27
  export {
28
- g as getLayersData
28
+ v as getLayersData
29
29
  };
30
30
  //# sourceMappingURL=getLayersData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLayersData.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/getLayersData.ts"],"sourcesContent":["import type {Dot, GroupedDots} from './dots';\nimport type {CurveLayer, DotsLayer} from './ScatterplotSettingsImpl';\nimport type {ColumnName, DataValue, ScatterplotLayer} from '../types';\nimport {exhaustive} from '../utils';\n\nexport type DotsLayerData = {\n type: 'dots',\n info: DotsLayer,\n geoms: Dot[]\n}\n\nexport type CurveData = {\n dots: Dot[],\n data: Record<string, DataValue>\n}\nexport type CurveLayerData = {\n type: 'curve',\n info: CurveLayer,\n geoms: CurveData[]\n}\n\nexport type ScatterplotLayerData = DotsLayerData | CurveLayerData;\n\nexport function getLayersData(\n layers: ScatterplotLayer[],\n facetKeys: string[],\n dotsByFacets: GroupedDots,\n categoryGroupingCombinations: string[][],\n grouping: ColumnName[]\n): Record<string, ScatterplotLayerData[]> {\n return facetKeys.reduce((res:Record<string, ScatterplotLayerData[]>, key) => {\n const facetDots = dotsByFacets[key].dots;\n res[key] = layers.map(layer => {\n if (layer.type === 'curve') {\n return {\n type: 'curve',\n info: layer,\n geoms: categoryGroupingCombinations.map(values => {\n const dots = facetDots.filter(dot =>\n grouping.every((column, idx) => dot.data[column.value] === values[idx])\n );\n const data = grouping.reduce((res:Record<string, DataValue>, column, idx) => {\n res[column.value] = values[idx];\n return res;\n }, {});\n return {dots, data};\n })\n } as CurveLayerData;\n }\n if (layer.type === 'dots') {\n return {\n type: 'dots',\n info: layer,\n geoms: facetDots,\n } as DotsLayerData;\n }\n exhaustive(layer, 'Unknown scatterplot layer type');\n });\n return res;\n }, {});\n}\n"],"names":["getLayersData","layers","facetKeys","dotsByFacets","categoryGroupingCombinations","grouping","res","key","facetDots","layer","values","dots","dot","column","idx","data","exhaustive"],"mappings":";AAuBO,SAASA,EACZC,GACAC,GACAC,GACAC,GACAC,GACsC;AACtC,SAAOH,EAAU,OAAO,CAACI,GAA4CC,MAAQ;AACzE,UAAMC,IAAYL,EAAaI,CAAG,EAAE;AACpC,WAAAD,EAAIC,CAAG,IAAIN,EAAO,IAAI,CAAAQ,MAAS;AAC3B,UAAIA,EAAM,SAAS;AACf,eAAO;AAAA,UACH,MAAM;AAAA,UACN,MAAMA;AAAAA,UACN,OAAOL,EAA6B,IAAI,CAAAM,MAAU;AAC9C,kBAAMC,IAAOH,EAAU;AAAA,cAAO,CAAAI,MAC1BP,EAAS,MAAM,CAACQ,GAAQC,MAAQF,EAAI,KAAKC,EAAO,KAAK,MAAMH,EAAOI,CAAG,CAAC;AAAA,YAAA,GAEpEC,IAAOV,EAAS,OAAO,CAACC,GAA+BO,GAAQC,OACjER,EAAIO,EAAO,KAAK,IAAIH,EAAOI,CAAG,GACvBR,IACR,EAAE;AACL,mBAAO,EAAC,MAAAK,GAAM,MAAAI,EAAAA;AAAAA,UAClB,CAAC;AAAA,QAAA;AAGT,UAAIN,EAAM,SAAS;AACf,eAAO;AAAA,UACH,MAAM;AAAA,UACN,MAAMA;AAAAA,UACN,OAAOD;AAAAA,QAAA;AAGfQ,MAAAA,EAAWP,GAAO,gCAAgC;AAAA,IACtD,CAAC,GACMH;AAAAA,EACX,GAAG,CAAA,CAAE;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"getLayersData.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot/getLayersData.ts"],"sourcesContent":["import type { DataFrame } from '../DataFrame';\nimport type { ColumnName, ScatterplotLayer } from '../types';\nimport { exhaustive } from '../utils';\nimport type { Dot, GroupedDots } from './dots';\nimport type { CurveLayer, DotsLayer } from './ScatterplotSettingsImpl';\n\nexport type DotsLayerData = {\n type: 'dots',\n info: DotsLayer,\n geoms: Dot[]\n}\n\nexport type CurveData = {\n dots: Dot[],\n}\nexport type CurveLayerData = {\n type: 'curve',\n info: CurveLayer,\n geoms: CurveData[]\n}\n\nexport type ScatterplotLayerData = DotsLayerData | CurveLayerData;\n\nexport function getLayersData(\n dataFrame: DataFrame,\n layers: ScatterplotLayer[],\n facetKeys: string[],\n dotsByFacets: GroupedDots,\n categoryGroupingCombinations: string[][],\n grouping: ColumnName[]\n): Record<string, ScatterplotLayerData[]> {\n return facetKeys.reduce((res:Record<string, ScatterplotLayerData[]>, key) => {\n const facetDots = dotsByFacets[key].dots;\n res[key] = layers.map(layer => {\n if (layer.type === 'curve') {\n return {\n type: 'curve',\n info: layer,\n geoms: categoryGroupingCombinations.map(values => {\n const dots = facetDots.filter(dot =>\n grouping.every((column, idx) => String(dataFrame.getColumnValue(column.value, dot.idx)) === values[idx])\n );\n dots.sort((d1, d2) => d1.x - d2.x);\n return {dots};\n }).filter(item => item.dots.length > 0)\n } as CurveLayerData;\n }\n if (layer.type === 'dots') {\n return {\n type: 'dots',\n info: layer,\n geoms: facetDots,\n } as DotsLayerData;\n }\n exhaustive(layer, 'Unknown scatterplot layer type');\n });\n return res;\n }, {});\n}\n"],"names":["getLayersData","dataFrame","layers","facetKeys","dotsByFacets","categoryGroupingCombinations","grouping","res","key","facetDots","layer","values","dots","column","idx","dot","d1","d2","item","exhaustive"],"mappings":";AAuBO,SAASA,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACsC;AACtC,SAAOH,EAAU,OAAO,CAACI,GAA4CC,MAAQ;AACzE,UAAMC,IAAYL,EAAaI,CAAG,EAAE;AACpC,WAAAD,EAAIC,CAAG,IAAIN,EAAO,IAAI,CAAAQ,MAAS;AAC3B,UAAIA,EAAM,SAAS;AACf,eAAO;AAAA,UACH,MAAM;AAAA,UACN,MAAMA;AAAAA,UACN,OAAOL,EAA6B,IAAI,CAAAM,MAAU;AAC9C,kBAAMC,IAAOH,EAAU;AAAA,cAAO,OAC1BH,EAAS,MAAM,CAACO,GAAQC,MAAQ,OAAOb,EAAU,eAAeY,EAAO,OAAOE,EAAI,GAAG,CAAC,MAAMJ,EAAOG,CAAG,CAAC;AAAA,YAAA;AAE3G,mBAAAF,EAAK,KAAK,CAACI,GAAIC,MAAOD,EAAG,IAAIC,EAAG,CAAC,GAC1B,EAAC,MAAAL,EAAAA;AAAAA,UACZ,CAAC,EAAE,OAAO,OAAQM,EAAK,KAAK,SAAS,CAAC;AAAA,QAAA;AAG9C,UAAIR,EAAM,SAAS;AACf,eAAO;AAAA,UACH,MAAM;AAAA,UACN,MAAMA;AAAAA,UACN,OAAOD;AAAAA,QAAA;AAGfU,MAAAA,EAAWT,GAAO,gCAAgC;AAAA,IACtD,CAAC,GACMH;AAAAA,EACX,GAAG,CAAA,CAAE;AACT;","x_google_ignoreList":[0]}
@@ -1,36 +1,27 @@
1
+ import { renderToString as B } from "../node_modules/react-dom/server.browser.js";
1
2
  import { AbstractChart as R } from "../AbstractChart.js";
2
- import { getDots as L } from "./dots.js";
3
+ import { arraysAreDifferent as D } from "../utils/arraysAreDifferent.js";
4
+ import { getKeysCombinations as b } from "../utils/getKeysCombination.js";
5
+ import A from "./ChartRenderer.js";
6
+ import { getDots as N } from "./dots.js";
3
7
  import { getLayersData as j } from "./getLayersData.js";
4
- import { createLegendInfo as k, addPalettesToAesMapping as K } from "./utils/createLegendInfo.js";
5
- import { renderToString as O } from "../node_modules/react-dom/server.browser.js";
6
- import T from "./ChartRenderer.js";
8
+ import { getRegressionData as K } from "./linearRegression.js";
7
9
  import { ScatterplotSettingsImpl as C } from "./ScatterplotSettingsImpl.js";
8
- import { getRegressionData as x } from "./linearRegression.js";
9
- var I = Object.defineProperty, U = (o, t, e) => t in o ? I(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, v = (o, t, e) => U(o, typeof t != "symbol" ? t + "" : t, e);
10
- function S(o) {
11
- if (!o.length)
12
- return [];
13
- let t = [[]];
14
- return o.forEach((e) => {
15
- const a = [];
16
- e.forEach((r) => {
17
- a.push(...t.map((l) => [...l, r]));
18
- }), t = a;
19
- }), t;
10
+ import { createLegendInfo as L, addPalettesToAesMapping as O } from "./utils/createLegendInfo.js";
11
+ var T = Object.defineProperty, k = (u, t, e) => t in u ? T(u, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : u[t] = e, y = (u, t, e) => k(u, typeof t != "symbol" ? t + "" : t, e);
12
+ function x(u) {
13
+ return typeof u == "object" && "type" in u && u.type === "grouping";
20
14
  }
21
- function H(o) {
22
- return typeof o == "object" && "type" in o && o.type === "grouping";
23
- }
24
- class z extends R {
15
+ class q extends R {
25
16
  constructor(t, e, a) {
26
- super(t, e), v(this, "settings"), v(this, "chartRenderer", new T()), v(this, "onTooltipHintSwitch", () => {
27
- }), v(this, "calculatedData", null), this.settings = new C(e), a && (this.onTooltipHintSwitch = a.onTooltipHintSwitch);
17
+ super(t, e), y(this, "settings"), y(this, "chartRenderer"), y(this, "onTooltipHintSwitch", () => {
18
+ }), y(this, "calculatedData", null), this.chartRenderer = new A(), this.settings = new C(e), a && (this.onTooltipHintSwitch = a.onTooltipHintSwitch);
28
19
  }
29
20
  mount(t) {
30
21
  try {
31
- this.chartRenderer.init(t), this._updateData(), this._updateChart();
22
+ this.chartRenderer.init(t), this._updateData(), this._updateChart(), this.hasError = !1;
32
23
  } catch (e) {
33
- e instanceof Error && this.chartRenderer.renderError(e.message);
24
+ this.hasError = !0, console.error(e), e instanceof Error && (this.chartRenderer.renderError(e.message), console.error(e));
34
25
  }
35
26
  }
36
27
  unmount() {
@@ -38,75 +29,76 @@ class z extends R {
38
29
  }
39
30
  updateSettingsAndData(t, e) {
40
31
  try {
41
- const a = this.settings, r = this.data;
42
- this.settings = new C(e), this.data = t, this._needUpdateCalculatedDataBySettings(a, this.settings) || this._needUpdateCalculatedDataByData(r, this.data) ? this._updateData() : this._updateAesInData(), this._updateChart();
32
+ const a = this.settings, n = this.data;
33
+ this.settings = new C(e), this.data = t, this._needUpdateCalculatedDataBySettings(a, this.settings) || this._needUpdateCalculatedDataByData(n, this.data) ? this._updateData() : this._updateAesInData(), this._updateChart(), this.hasError = !1;
43
34
  } catch (a) {
44
- a instanceof Error && this.chartRenderer.renderError(a.message);
35
+ this.hasError = !0, console.error(a), a instanceof Error && (this.chartRenderer.renderError(a.message), console.error(a));
45
36
  }
46
37
  }
47
38
  updateChartState(t, e) {
48
39
  console.warn("no chart state for scatterplot");
49
40
  }
50
41
  export() {
51
- return this._updateChart(), O(this.chartRenderer.component);
42
+ return this._updateChart(), B(this.chartRenderer.component);
52
43
  }
53
44
  _needUpdateCalculatedDataBySettings(t, e) {
54
- var a, r, l, d;
55
- return t.facetBy.some((i, n) => {
56
- var s;
57
- return i.value !== ((s = e.facetBy[n]) == null ? void 0 : s.value);
58
- }) || t.grouping.length !== e.grouping.length || t.grouping.some((i, n) => {
59
- var s;
60
- return i.value !== ((s = e.grouping[n]) == null ? void 0 : s.value);
61
- }) || (((a = t.label) == null ? void 0 : a.value) || ((r = e.label) == null ? void 0 : r.value)) && ((l = t.label) == null ? void 0 : l.value) !== ((d = e.label) == null ? void 0 : d.value) || t.layers.length !== e.layers.length || t.layers.some((i, n) => i.type !== e.layers[n].type) || !!t.trend != !!e.trend;
45
+ var a, n, i, o;
46
+ return t.facetBy.some((r, s) => {
47
+ var c;
48
+ return r.value !== ((c = e.facetBy[s]) == null ? void 0 : c.value);
49
+ }) || t.grouping.length !== e.grouping.length || D(
50
+ t.grouping.map((r) => r.columnName.value),
51
+ e.grouping.map((r) => r.columnName.value)
52
+ ) || t.grouping.some((r, s) => {
53
+ var c;
54
+ return D(r.order, (c = e.grouping) == null ? void 0 : c[s].order);
55
+ }) || (((a = t.label) == null ? void 0 : a.value) || ((n = e.label) == null ? void 0 : n.value)) && ((i = t.label) == null ? void 0 : i.value) !== ((o = e.label) == null ? void 0 : o.value) || t.layers.length !== e.layers.length || t.layers.some((r, s) => r.type !== e.layers[s].type) || !!t.trend != !!e.trend;
62
56
  }
63
57
  _needUpdateCalculatedDataByData(t, e) {
64
- const a = Object.keys(t.data), r = Object.keys(e.data);
65
- return t.id !== e.id || a.length !== r.length || a.some((l) => {
66
- var d;
67
- return t.data[l].length !== ((d = e.data[l]) == null ? void 0 : d.length);
58
+ const a = Object.keys(t.data), n = Object.keys(e.data);
59
+ return t.id !== e.id || a.length !== n.length || a.some((i) => {
60
+ var o;
61
+ return t.data[i].length !== ((o = e.data[i]) == null ? void 0 : o.length);
68
62
  });
69
63
  }
70
64
  _updateData() {
71
- const { x: t, y: e, facetBy: a, grouping: r, keyColumn: l, trend: d, layers: i, inheritedAes: n, label: s, highlight: p } = this.settings, y = this.data.getColumnCategories(l.value), h = a.map((u) => this.data.getColumnCategories(u.value)), c = r.map((u) => this.data.getColumnCategories(u.value)), D = h.length ? S([...h]) : [["null"]], b = c.length ? S([...c]) : [["null"]], w = a.map((u) => u.value) ?? null;
72
- this.data.setGrouping([...w, l.value]);
73
- const E = {
74
- x: this.data.rows.every((u) => {
75
- const g = u[t.value];
76
- return g === null || !(Number(g) < 0);
77
- }),
78
- y: this.data.rows.every((u) => {
79
- const g = u[e.value];
80
- return g === null || !(Number(g) < 0);
81
- })
82
- }, f = L(this.data, D, t, e, s, p, y), m = Object.keys(f), _ = x(f, m, b, r, d), B = k(this.data, r, i, n), A = j(i, m, f, b, r);
65
+ const { x: t, y: e, facetBy: a, grouping: n, trend: i, layers: o, label: r, highlight: s } = this.settings, c = a.map((l) => this.data.getColumnCategories(l.value)).filter((l) => l.length > 0), d = n.map(({ columnName: l }) => this.data.getColumnCategories(l.value)).filter((l) => l.length > 0), g = c.length ? b(c) : [["null"]], p = d.length ? b(d) : [["null"]], h = a.map((l) => l.value) ?? null;
66
+ this.data.setGrouping([...h]);
67
+ const S = {
68
+ x: this.data.getColumn(t.value).every((l) => l === null || !(Number(l) < 0)),
69
+ y: this.data.getColumn(e.value).every((l) => l === null || !(Number(l) < 0))
70
+ }, v = n.map((l) => l.columnName), m = N(this.data, g, t, e, r, s, n), f = Object.keys(m), E = K(this.data, m, f, p, v, i), _ = L(this.data, n, o), w = j(this.data, o, f, m, p, v);
83
71
  this.calculatedData = {
84
- onlyPositive: E,
85
- dotsByFacets: f,
86
- facetKeys: m,
87
- facetKeysCombinations: D,
88
- trendsData: _,
89
- legendLabels: B,
90
- layersData: A
72
+ onlyPositive: S,
73
+ dotsByFacets: m,
74
+ facetKeys: f,
75
+ facetKeysCombinations: g,
76
+ trendsData: E,
77
+ legendLabels: _,
78
+ layersData: w
91
79
  };
92
80
  }
93
81
  _updateAesInData() {
94
82
  const t = this.calculatedData;
95
83
  if (!t)
96
84
  return;
97
- const { grouping: e, trend: a, layers: r, inheritedAes: l } = this.settings, { facetKeys: d, trendsData: i } = t;
98
- d.forEach((n) => {
99
- for (let s = 0; s < r.length; s++)
100
- t.layersData[n][s].info = r[s];
101
- }), e.forEach((n) => {
102
- const s = /* @__PURE__ */ new Set(), p = {};
103
- r.forEach((y) => {
104
- y.aes && Object.entries(y.aes).forEach(([h, c]) => {
105
- H(c) && c.value === n.value && (s.add(h), c.palette && (p[h] = c.palette));
85
+ const { grouping: e, trend: a, layers: n } = this.settings, { facetKeys: i, trendsData: o } = t;
86
+ i.forEach((r) => {
87
+ for (let s = 0; s < n.length; s++)
88
+ t.layersData[r][s].info = n[s];
89
+ }), e.forEach(({ columnName: r, inheritedAes: s }) => {
90
+ const c = /* @__PURE__ */ new Set(), d = {};
91
+ n.forEach((g) => {
92
+ g.aes && Object.entries(g.aes).forEach(([p, h]) => {
93
+ x(h) && h.value === r.value && (c.add(p), h.palette && (d[p] = h.palette));
106
94
  });
107
- }), t.legendLabels[n.value].usedAes = [...s], t.legendLabels[n.value].aesMap = K(t.legendLabels[n.value].values, p, l[n.value]);
108
- }), i && a && Object.keys(i).forEach((n) => {
109
- i[n].forEach((s) => {
95
+ }), t.legendLabels[r.value].usedAes = [...c], t.legendLabels[r.value].aesMap = O(
96
+ r,
97
+ d,
98
+ s
99
+ );
100
+ }), o && a && Object.keys(o).forEach((r) => {
101
+ o[r].forEach((s) => {
110
102
  s.color = a.color, s.bounded = a.bounded;
111
103
  });
112
104
  });
@@ -114,8 +106,9 @@ class z extends R {
114
106
  _updateChart() {
115
107
  if (!this.calculatedData)
116
108
  return;
117
- const { id: t, chartSettings: e, facetSettings: a, grouping: r, keyColumn: l, layers: d, trend: i } = this.settings;
109
+ const { id: t, chartSettings: e, facetSettings: a, grouping: n, keyColumn: i, layers: o, trend: r } = this.settings;
118
110
  this.chartRenderer.render(
111
+ this.data,
119
112
  t,
120
113
  e,
121
114
  a,
@@ -124,18 +117,18 @@ class z extends R {
124
117
  //for titles, if facet by more than 1 column
125
118
  this.calculatedData.dotsByFacets,
126
119
  this.calculatedData.trendsData,
127
- l,
120
+ i,
128
121
  this.calculatedData.onlyPositive,
129
122
  this.calculatedData.legendLabels,
130
123
  this.calculatedData.layersData,
124
+ n.map((s) => s.columnName),
125
+ o,
131
126
  r,
132
- d,
133
- i,
134
127
  this.onTooltipHintSwitch
135
128
  );
136
129
  }
137
130
  }
138
131
  export {
139
- z as ChartScatterplot
132
+ q as ChartScatterplot
140
133
  };
141
134
  //# sourceMappingURL=index.js.map