@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 +1 @@
1
- {"version":3,"file":"ChartRenderer.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot-umap/ChartRenderer.tsx"],"sourcesContent":["import {Error} from '../common/Error';\nimport {\n BLACK,\n DEFAULT_HEIGHT,\n DEFAULT_WIDTH,\n MAX_SHOWN_UNIQUE_VALUES_IN_LABELS,\n TITLE_LINE_HEIGHT,\n TITLE_MARGIN,\n} from '../constants';\nimport {splitTextByWidth} from '../discrete/utils';\nimport {SVGLayer} from './components/SVGLayer';\nimport type {\n AesGetters,\n CaptionsSizes,\n Dot,\n DotsExtents,\n LassoControlsState,\n Polygon,\n SVGLayerProps,\n} from './types';\nimport type {ChartScales, ChartSizes, Margins} from './types';\nimport type {DotAesItem} from '../common/types';\nimport type {LegendData, LegendItem} from '../common/types';\nimport {DEFAULT_DOT_AES, MIN_MARGIN} from '../scatterplot/constants';\nimport {LEGEND_OFFSET} from './constants';\nimport type {CurveLayer, DotsLayer, ScatterplotUmapLayer, ScatterplotUmapSettingsImpl} from './SettingsImpl';\nimport {createAesGetter} from '../scatterplot/utils/createAesGetter';\nimport {getTicksAndFormat} from '../scatterplot/utils/getTicksAndFormat';\nimport {getFilteredLabels, updateLabelsBBoxes} from '../scatterplot/utils/getVisibleLabels';\nimport type {Label} from '../scatterplot/utils/getVisibleLabels';\nimport {isContinuousAes} from '../types';\nimport type {ColumnName, ScatterplotEventHandlers} from '../types';\nimport type {ScatterplotUmapLegendInfo} from '../types/scatterplot-umap';\nimport {getContinuousColorScale} from '../utils/getContinuousColorScale';\nimport {getContinuousLegendTicks} from '../utils/getContinuousLegendTicks';\nimport {TextMeasurer} from '../utils/TextMeasurer';\nimport type {CartesianChart} from '@d3fc/d3fc-chart/src/cartesian';\nimport type {Quadtree} from 'd3-quadtree';\nimport {quadtree} from 'd3-quadtree';\nimport type {ScaleLinear} from 'd3-scale';\nimport {scaleLinear, scaleLog, scaleOrdinal, scaleSqrt, scaleSymlog} from 'd3-scale';\nimport {select} from 'd3-selection';\nimport {PADDINGS, TITLE_LINE} from './constants';\nimport type {ReactElement} from 'react';\nimport React from 'react';\nimport type {Root} from 'react-dom/client';\nimport {createRoot} from 'react-dom/client';\nimport type {D3ZoomEvent, ZoomBehavior, ZoomTransform} from 'd3-zoom';\nimport {zoom} from 'd3-zoom';\nimport type { RGBColor} from 'd3-color';\nimport {rgb} from 'd3-color';\nimport {chartCartesian} from '@d3fc/d3fc-chart';\n// @ts-ignore\nimport {seriesSvgMulti, seriesWebglMulti, seriesWebglPoint} from '@d3fc/d3fc-series';\n// @ts-ignore\nimport {webglFillColor} from '@d3fc/d3fc-webgl';\n// @ts-ignore\nimport {pointer} from '@d3fc/d3fc-pointer';\nimport {polygonContains} from 'd3-polygon';\nimport { arrangeLegendParts } from '../utils/arrangeLegendParts';\n\nfunction convertDotRToSymbolSize(r:number) {\n return (r / 2.35) * (r / 2.35) * 64;\n}\nfunction getPercentToWhite(v:number, opacity:number) {\n return v + (1 - v) * (1 - opacity);\n}\nfunction getColorWithOpacity (c: RGBColor, opacity: number) {\n return [\n getPercentToWhite(c.r / 255, opacity),\n getPercentToWhite(c.g / 255, opacity),\n getPercentToWhite(c.b / 255, opacity),\n 1\n ];\n}\n\nfunction isDotInsidePolygons(x:number, y:number, polygons: Polygon[]) {\n if (polygons.length === 0) {\n return true;\n }\n return polygons.some((p) => p.closed && p.points.length > 2 && polygonContains(p.points, [x, y]));\n}\n\nfunction getGettersFromLayers(\n legendInfo: ScatterplotUmapLegendInfo,\n layers: ScatterplotUmapSettingsImpl['layers'],\n): AesGetters {\n const dotLayer = layers.find(l => l.type === 'dots') as DotsLayer | undefined;\n const curveLayer = layers.find(l => l.type === 'curve') as CurveLayer | undefined;\n return {\n dotFill: createAesGetter(legendInfo, dotLayer?.aes.dotFill ?? DEFAULT_DOT_AES.color, 'dotFill'),\n dotSize: createAesGetter(legendInfo, dotLayer?.aes.dotSize ?? DEFAULT_DOT_AES.size, 'dotSize'),\n lineType: createAesGetter(legendInfo, curveLayer?.aes.lineShape ?? 'solid', 'lineShape')\n };\n}\n\nclass ChartRenderer {\n reactRoot: Root | null = null;\n parentNode: HTMLElement | null = null;\n rootNode: HTMLElement | null = null;\n canvasNode: HTMLElement | null = null;\n\n svgLayerElement: SVGElement | null = null;\n svgLayerComponent: ReactElement = (<></>);\n\n aesGetters: AesGetters = {\n dotSize: () => 2,\n dotFill: () => BLACK,\n lineType: () => 'solid'\n };\n\n tools: {\n webglChart: CartesianChart<any, any>;\n qt: Quadtree<Dot>;\n fillColor: () => {\n value: (setter: (d: Dot) => [number, number, number, number]) => void;\n data: (setter: () => Dot[]) => void;\n };\n pointSeries: () => any;\n zoom: ZoomBehavior<any, any>;\n } | null = null;\n\n margins: Margins = {\n top: MIN_MARGIN,\n bottom: MIN_MARGIN,\n left: MIN_MARGIN,\n right: MIN_MARGIN,\n };\n chartSizes: ChartSizes = {\n chartWidth: DEFAULT_WIDTH, // width of single chart\n chartHeight: DEFAULT_HEIGHT, // height of single chart\n totalWidth: DEFAULT_WIDTH, // width of all charts in charts row, plus left axis, plus legend\n totalHeight: DEFAULT_HEIGHT, // width of all charts in charts height, plus bottom axis, plus top title\n };\n scales: ChartScales = {\n x: scaleLinear().domain([0, 10]).range([0, DEFAULT_WIDTH]),\n y: scaleLinear().domain([0, 10]).range([DEFAULT_HEIGHT, 0]),\n xOriginal: scaleLinear().domain([0, 10]).range([0, DEFAULT_WIDTH]),\n yOriginal: scaleLinear().domain([0, 10]).range([DEFAULT_HEIGHT, 0]),\n };\n\n polygons:Polygon[] = [];\n onPolygonUpdateOutside: ScatterplotEventHandlers['onPolygonUpdate'] = () => undefined;\n onTooltipHintSwitch: ScatterplotEventHandlers['onTooltipHintSwitch'] = () => undefined;\n onLassoControlsStateUpdate: ScatterplotEventHandlers['onLassoControlsStateUpdate'] = () => undefined;\n\n zoomTransform: ZoomTransform | null = null;\n zoomStateKey = '';\n selectedDot: Dot | null = null;\n captionsSizes: CaptionsSizes = {\n xAxisCaptionsWidth: 30,\n yAxisCaptionsWidth: 100,\n };\n mainTitle: string[] = []; // can be multiline\n legend: LegendData = {width: 0, height: 0, items: []};\n\n notCalculatedProps: Partial<SVGLayerProps> = {};\n\n allDots: Dot[] = [];\n allPossibleLabels: Label[] = [];\n visibleLabels: Label[] = [];\n clear() {\n if (this.parentNode && this.rootNode && this.canvasNode) {\n this.parentNode?.removeChild(this.rootNode);\n this.parentNode?.removeChild(this.canvasNode);\n this.parentNode = null;\n this.rootNode = null;\n this.canvasNode = null;\n this.svgLayerElement = null;\n this.tools = null;\n }\n // timeout to avoid trying to unmount during rendering\n setTimeout(() => {\n this.reactRoot?.unmount();\n this.reactRoot = null;\n });\n }\n\n init(node: HTMLElement) {\n if (this.parentNode === null) {\n this.parentNode = node;\n this.rootNode = document.createElement('div');\n this.canvasNode = document.createElement('div');\n this.parentNode.appendChild(this.rootNode);\n this.parentNode.appendChild(this.canvasNode);\n this.reactRoot = createRoot(this.rootNode);\n }\n }\n\n updateChartSizes(size: ScatterplotUmapSettingsImpl['chartSettings']['size']) {\n if (size.width !== this.chartSizes.chartWidth || size.height !== this.chartSizes.chartHeight) {\n // NB: now chart sizes always change with one multiplier for width/height so qt stays without changes\n this.chartSizes.chartWidth = size.width;\n this.chartSizes.chartHeight = size.height;\n this.scales.x.range([0, this.chartSizes.chartWidth]);\n this.scales.y.range([this.chartSizes.chartHeight, 0]);\n }\n \n }\n\n updateViewport(\n xAxis: ScatterplotUmapSettingsImpl['chartSettings']['xAxis'],\n yAxis: ScatterplotUmapSettingsImpl['chartSettings']['yAxis'],\n dotsExtents: DotsExtents\n ) {\n const scaleX = xAxis.scale === 'log' ? scaleLog() : scaleLinear();\n\n let {minX, minY, maxX, maxY} = dotsExtents;\n if (xAxis.lowerValue !== undefined) {\n minX = Math.max(minX, xAxis.lowerValue);\n }\n if (xAxis.upperValue !== undefined) {\n maxX = Math.min(maxX, xAxis.upperValue);\n }\n if (yAxis.lowerValue !== undefined) {\n minY = Math.max(minY, yAxis.lowerValue);\n }\n if (yAxis.upperValue !== undefined) {\n maxY = Math.min(maxY, yAxis.upperValue);\n }\n if (xAxis.symmetricRange !== undefined) {\n const middle = xAxis.symmetricRange;\n if (middle >= minX && middle <= maxX) {\n const halfRange = Math.max(middle - minX, maxX - middle);\n minX = middle - halfRange;\n maxX = middle + halfRange;\n }\n }\n if (typeof yAxis.symmetricRange !== 'undefined') {\n const middle = yAxis.symmetricRange;\n if (middle >= minY && middle <= maxY) {\n const halfRange = Math.max(middle - minY, maxY - middle);\n minY = middle - halfRange;\n maxY = middle + halfRange;\n }\n }\n\n const rangeH = [0, this.chartSizes.chartWidth];\n // supporting scale, it needs to add offsets of fixed size in pixels to general scale Y\n const tempX = scaleX\n .copy()\n .domain([minX, maxX])\n .range([PADDINGS.LEFT, this.chartSizes.chartWidth - PADDINGS.RIGHT]);\n scaleX\n .domain([tempX.invert(0), tempX.invert(this.chartSizes.chartWidth)])\n .range(rangeH)\n .nice();\n this.scales.x = scaleX;\n this.scales.xOriginal = scaleX.copy();\n\n const scaleY = yAxis.scale === 'log' ? scaleLog() : scaleLinear();\n const rangeV = [this.chartSizes.chartHeight, 0];\n // supporting scale, it needs to add offsets of fixed size in pixels to general scale Y\n const tempY = scaleY\n .copy()\n .domain([minY, maxY])\n .range([this.chartSizes.chartHeight - PADDINGS.BOTTOM, PADDINGS.TOP]);\n scaleY\n .domain([tempY.invert(this.chartSizes.chartHeight), tempY.invert(0)])\n .range(rangeV)\n .nice();\n this.scales.y = scaleY;\n this.scales.yOriginal = scaleY.copy();\n }\n\n updateCaptionsSize() {\n const textMeasurer = new TextMeasurer('600 14px Arial');\n\n function getMaxTickWidth(ticks: string[]) {\n return Math.max(...ticks.map(key => textMeasurer.getTextWidth(key)));\n }\n\n const {ticks, format} = getTicksAndFormat(this.scales.y, false);\n const maxYTick = getMaxTickWidth(ticks.map(format));\n\n this.captionsSizes = {\n xAxisCaptionsWidth: 20,\n yAxisCaptionsWidth: maxYTick,\n };\n }\n\n createMainTitle(title: ScatterplotUmapSettingsImpl['chartSettings']['title']) {\n this.mainTitle = splitTextByWidth(\n title.name,\n this.chartSizes.totalWidth - this.margins.left - this.margins.right,\n 20\n );\n }\n\n updateMargins() {\n const titleTextHeight = TITLE_LINE_HEIGHT * this.mainTitle.length;\n const titleHeight = titleTextHeight > 0 ? titleTextHeight + TITLE_MARGIN * 2 : 0;\n this.margins = {\n top: Math.max(titleHeight, MIN_MARGIN),\n bottom: MIN_MARGIN + this.captionsSizes.xAxisCaptionsWidth + TITLE_LINE,\n left: MIN_MARGIN + this.captionsSizes.yAxisCaptionsWidth + TITLE_LINE,\n right: this.legend.width + MIN_MARGIN,\n };\n this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartWidth + this.margins.right;\n this.chartSizes.totalHeight =\n this.margins.top + Math.max(this.chartSizes.chartHeight, this.legend.height) + this.margins.bottom;\n\n select(this.canvasNode)\n .style('width', this.chartSizes.chartWidth + 'px')\n .style('height', this.chartSizes.chartHeight + 'px')\n .style('top', this.margins.top + 'px')\n .style('left', this.margins.left + 'px');\n }\n\n updateLegendSize(\n legend: ScatterplotUmapSettingsImpl['chartSettings']['legend'],\n legendLabels: ScatterplotUmapLegendInfo,\n grouping: ColumnName[],\n layers: ScatterplotUmapLayer[]\n ) {\n if (!legend.show) {\n this.legend = {width: 0, height: 0, items: []};\n return;\n }\n\n const legendItems: LegendItem[] = [];\n const emptySizes = {width:0, height:0, left:0, top: 0};\n \n grouping.forEach(column => {\n const info = legendLabels[column.value];\n if (info.usedAes.length === 0 || !info.aesMap) {\n return;\n }\n if (info.values.length > MAX_SHOWN_UNIQUE_VALUES_IN_LABELS) {\n console.warn(`Too many values for discrete legend (${info.values.length})`);\n return;\n }\n const aesData: Record<string, DotAesItem> = {};\n info.values.forEach(columnValue => {\n if (!aesData[columnValue]) {\n aesData[columnValue] = {...DEFAULT_DOT_AES} as DotAesItem;\n }\n info.usedAes.forEach(key => {\n if (key === 'dotFill') {\n aesData[columnValue].color = info.aesMap[columnValue]?.[key] ?? BLACK;\n }\n if (key === 'dotSize') {\n aesData[columnValue].size = info.aesMap[columnValue]?.[key] ?? 3;\n }\n });\n });\n\n const title = column.label ?? column.value;\n const scale = scaleOrdinal<DotAesItem>()\n .domain(info.values)\n .range(info.values.map(value => aesData[value]));\n legendItems.push({...emptySizes, id: column.value, type: 'dots', title, scale, values:info.values, labels:info.labels});\n });\n\n layers.forEach(layer => {\n if (layer.type === 'dots' && isContinuousAes(layer.aes.dotFill)) {\n const {domain, range, columnName, type = 'linear'} = layer.aes.dotFill;\n const title = columnName.label ?? columnName.value;\n const colorScale = getContinuousColorScale(range, domain, 'linear') as ScaleLinear<string, string>; // always linear for legend - scale to render gradient, not for dots\n const tickPositionScale = (type === 'log' ? scaleSymlog<string, string>() : scaleLinear<string, string>())\n .domain(domain)\n // @ts-ignore\n .range([this.chartSizes.chartHeight, 0]);\n const values = getContinuousLegendTicks(tickPositionScale, domain as [number, number]);\n legendItems.push({...emptySizes, id: 'dotFill', type: 'continuous', title, scale: colorScale, tickPositionScale, values});\n }\n if (layer.type === 'dots' && isContinuousAes(layer.aes.dotSize)) {\n const {columnName, domain, range} = layer.aes.dotSize;\n const title = columnName.label ?? columnName.value;\n const scale = scaleSqrt(domain, range);\n const values = scale.ticks(3);\n const format = scale.tickFormat(3);\n const labels = values.reduce((res: Record<string, string>, v) => {\n res[String(v)] = format(v);\n return res;\n }, {});\n legendItems.push({...emptySizes, id: columnName.value, type: 'size', title, scale, values, labels});\n }\n });\n\n if (!legendItems.length) {\n this.legend = {width: 0, height: 0, items: []};\n return;\n }\n\n const items = arrangeLegendParts(legendItems, this.chartSizes.chartHeight);\n const lastItem = items[items.length - 1];\n const legendWidth = lastItem.left + lastItem.width + LEGEND_OFFSET;\n const legendHeight = this.chartSizes.chartHeight;\n\n this.legend = {\n width: legendWidth,\n height: legendHeight,\n items,\n };\n }\n\n initSettings(\n dots: Dot[],\n chartSettings: ScatterplotUmapSettingsImpl['chartSettings'],\n dotExtents: DotsExtents,\n legendInfo: ScatterplotUmapLegendInfo,\n layers: ScatterplotUmapSettingsImpl['layers'],\n grouping: ColumnName[]\n ) {\n const {xAxis, yAxis, size, title, legend} = chartSettings;\n this.updateChartSizes(size);\n this.updateViewport(xAxis, yAxis, dotExtents);\n this.updateCaptionsSize();\n this.updateLegendSize(legend, legendInfo, grouping, layers);\n this.createMainTitle(title);\n this.updateMargins();\n\n this.aesGetters = getGettersFromLayers(legendInfo, layers);\n\n const fillColor = webglFillColor()\n .data(dots)\n .value((d: Dot) => {\n const c = rgb(this.aesGetters.dotFill(d.data));\n const opacity = !d.dimmed && isDotInsidePolygons(d.x, d.y, this.polygons) ? 1 : 0.4;\n return getColorWithOpacity(c, opacity);\n });\n\n const pointSeries = seriesWebglPoint()\n .equals((a: Dot[], b: Dot[]) => a === b)\n .size((d: Dot) => convertDotRToSymbolSize(this.aesGetters.dotSize(d.data)))\n .crossValue((d: Dot) => d.x)\n .mainValue((d: Dot) => d.y)\n .decorate((program: any) => fillColor(program));\n\n const z = zoom()\n .scaleExtent([0.1, 1000])\n .filter((e:MouseEvent) => {\n return e.type === 'wheel' || e.metaKey || e.ctrlKey;\n })\n .on('start', () => {\n this.selectedDot = null;\n })\n .on('zoom', (e: D3ZoomEvent<SVGElement, unknown>) => {\n const transform = e.transform;\n const x = transform.rescaleX(this.scales.xOriginal);\n const y = transform.rescaleY(this.scales.yOriginal);\n this.scales.x.domain(x.domain());\n this.scales.y.domain(y.domain());\n\n this.zoomTransform = transform;\n this.zoomStateKey = `${transform.x}_${transform.y}_${transform.k}`; // need it to update axes\n\n this.renderSvgLayer();\n this.renderWebglLayer();\n }).on('end', () => {\n this.allPossibleLabels.forEach((l) => {\n l.x = this.scales.x(l.dot.x);\n l.y = this.scales.y(l.dot.y);\n });\n this.visibleLabels = getFilteredLabels(this.allPossibleLabels, this.chartSizes.chartWidth, this.chartSizes.chartHeight);\n this.renderSvgLayer();\n });\n\n const qt = this.createQuadtree(dots);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const p = pointer().on('point', ([coord]) => {\n let closestDatum;\n if (coord) {\n // find the closes datapoint to the pointer\n const x = this.scales.x.invert(coord.x);\n const y = this.scales.y.invert(coord.y);\n const xOriginal = this.scales.xOriginal(x);\n const yOriginal = this.scales.yOriginal(y);\n const radius = 20 / (this.zoomTransform?.k || 1);\n closestDatum = this.tools?.qt.find(xOriginal, yOriginal, radius);\n }\n \n const needRedraw =\n (this.selectedDot && !closestDatum) ||\n (!this.selectedDot && closestDatum) ||\n this.selectedDot?.id !== closestDatum?.id;\n\n this.selectedDot = closestDatum ?? null;\n\n if (needRedraw) {\n this.renderSvgLayer();\n }\n });\n\n const webglChart = chartCartesian({\n xScale: this.scales.x,\n yScale: this.scales.y,\n })\n .xAxisHeight(() => '0') // removing build-in axes from chartCartesian\n .yAxisWidth(() => '0') // removing build-in axes from chartCartesian\n .svgPlotArea(seriesSvgMulti())\n .webglPlotArea(\n // only render the point series on the WebGL layer\n seriesWebglMulti()\n .series([pointSeries])\n .mapping((d: any) => d)\n )\n .decorate(selection => {\n const s = selection.enter();\n if (s && !this.svgLayerElement) {\n s.style('grid-template-columns', '0 auto 1fr auto 0'); // removing build-in axes from chartCartesian\n s.style('grid-template-rows', '0 auto 1fr auto 0'); // removing build-in axes from chartCartesian\n this.svgLayerElement = s.select('.svg-plot-area.plot-area svg').node() as SVGElement;\n }\n s.select('.svg-plot-area.plot-area').attr('class', 'svg-plot-area plot-area miplots-scatterplot-plot-area')\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .call(z)\n .call(p);\n });\n\n this.tools = {\n webglChart,\n zoom: z,\n qt,\n fillColor,\n pointSeries,\n };\n\n select(this.canvasNode)\n .datum(dots)\n .style('position', 'absolute')\n .style('width', this.chartSizes.chartWidth + 'px')\n .style('height', this.chartSizes.chartHeight + 'px')\n .style('top', this.margins.top + 'px')\n .style('left', this.margins.left + 'px');\n }\n\n updateAes(\n legendInfo: ScatterplotUmapLegendInfo,\n layers: ScatterplotUmapSettingsImpl['layers']\n ) {\n if (this.tools === null) {\n return;\n }\n this.aesGetters = getGettersFromLayers(legendInfo, layers);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools.fillColor.value((d: Dot) => {\n const colorGetter = this.aesGetters.dotFill ?? (() => BLACK);\n const c = rgb(colorGetter(d.data));\n const opacity = !d.dimmed && isDotInsidePolygons(d.x, d.y, this.polygons) ? 1 : 0.4;\n return getColorWithOpacity(c, opacity);\n });\n }\n\n updatePointSize() {\n if (this.tools === null) {\n return;\n }\n select(this.canvasNode).datum([...this.allDots]);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools.pointSeries.size((d: Dot) => convertDotRToSymbolSize(this.aesGetters.dotSize(d.data)));\n }\n\n updateByLasso() {\n if (this.tools === null) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools?.fillColor.value((d: Dot) => {\n const aesGetter = this.aesGetters.dotFill ?? (() => BLACK);\n const c = rgb(aesGetter(d.data));\n const opacity = !d.dimmed && isDotInsidePolygons(d.x, d.y, this.polygons) ? 1 : 0.4;\n return getColorWithOpacity(c, opacity);\n });\n this.renderWebglLayer();\n }\n\n createQuadtree(dots:Dot[]) {\n return quadtree<Dot>()\n .x((d: Dot) => this.scales.xOriginal(d.x))\n .y((d: Dot) => this.scales.yOriginal(d.y))\n .addAll(dots);\n }\n\n updateData(dots: Dot[]) {\n if (this.tools === null) {\n return;\n }\n select(this.canvasNode).datum(dots);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools.fillColor.data(dots);\n this.tools.qt = this.createQuadtree(dots);\n }\n\n render(\n settingsId: string,\n chartSettings: ScatterplotUmapSettingsImpl['chartSettings'],\n keyColumn: ColumnName | null,\n dots: Dot[],\n dotExtents: DotsExtents,\n dotsByGrouping: Record<string, Dot[]>,\n layers: ScatterplotUmapSettingsImpl['layers'],\n legendInfo: ScatterplotUmapLegendInfo,\n grouping: ColumnName[],\n allPossibleLabels: Label[],\n onPolygonUpdateOutside: ScatterplotEventHandlers['onPolygonUpdate'],\n onTooltipHintSwitch: (v:boolean) => void,\n onLassoControlsStateUpdate: (v:LassoControlsState) => void,\n ) { \n if (this.tools === null) {\n this.initSettings(\n dots,\n chartSettings,\n dotExtents,\n legendInfo,\n layers,\n grouping\n );\n this.onPolygonUpdateOutside = onPolygonUpdateOutside;\n this.onTooltipHintSwitch = onTooltipHintSwitch;\n this.onLassoControlsStateUpdate = onLassoControlsStateUpdate;\n } else {\n const {title, legend, size} = chartSettings;\n this.updateChartSizes(size);\n this.updateLegendSize(legend, legendInfo, grouping, layers);\n this.createMainTitle(title);\n this.updateMargins();\n this.updateAes(legendInfo, layers);\n }\n this.allDots = dots;\n this.allPossibleLabels = allPossibleLabels;\n this.allPossibleLabels.forEach((l) => {\n l.x = this.scales.x(l.dot.x);\n l.y = this.scales.y(l.dot.y);\n });\n this.visibleLabels = getFilteredLabels(this.allPossibleLabels, this.chartSizes.chartWidth, this.chartSizes.chartHeight);\n\n this.notCalculatedProps = {\n settingsId,\n chartSettings,\n keyColumn,\n dotsByGrouping,\n layers\n };\n\n this.renderWebglLayer();\n this.renderSvgLayer();\n }\n\n renderWebglLayer() {\n if (this.tools?.webglChart) {\n select(this.canvasNode).call(this.tools?.webglChart);\n }\n }\n\n onPolygonUpdate = (p:Polygon[]) => {\n this.polygons = p;\n this.updateByLasso();\n const filteredDotsIndexes = this.allDots\n .filter(d => isDotInsidePolygons(d.x, d.y, this.polygons))\n .map(d => d.idx);\n this.onPolygonUpdateOutside(filteredDotsIndexes, p);\n };\n\n renderSvgLayer() {\n this.visibleLabels.forEach((l) => {\n l.x = this.scales.x(l.dot.x);\n l.y = this.scales.y(l.dot.y);\n });\n updateLabelsBBoxes(this.visibleLabels);\n const props = {\n settingsId: this.notCalculatedProps.settingsId,\n chartSettings: this.notCalculatedProps.chartSettings,\n keyColumn: this.notCalculatedProps.keyColumn,\n dotsByGrouping: this.notCalculatedProps.dotsByGrouping,\n layers: this.notCalculatedProps.layers,\n chartSizes: this.chartSizes,\n scales: this.scales,\n margins: this.margins,\n mainTitle: this.mainTitle,\n captionsSizes: this.captionsSizes,\n container: this.svgLayerElement,\n zoomStateKey: this.zoomStateKey,\n selectedDot: this.selectedDot,\n aesGetters: this.aesGetters,\n legendData: this.legend,\n labels: this.visibleLabels,\n defaultPolygons: this.polygons,\n onPolygonUpdate: this.onPolygonUpdate,\n onTooltipHintSwitch: this.onTooltipHintSwitch,\n onLassoControlsStateUpdate: this.onLassoControlsStateUpdate,\n } as SVGLayerProps;\n this.svgLayerComponent = <SVGLayer {...props} />;\n this.reactRoot?.render(this.svgLayerComponent);\n }\n\n renderError(message: string) {\n this.reactRoot?.render(<Error message={message} />);\n }\n}\n\nexport default ChartRenderer;\n"],"names":["convertDotRToSymbolSize","r","getPercentToWhite","v","opacity","getColorWithOpacity","c","isDotInsidePolygons","x","y","polygons","p","polygonContains","getGettersFromLayers","legendInfo","layers","dotLayer","l","curveLayer","createAesGetter","DEFAULT_DOT_AES","ChartRenderer","__publicField","jsx","Fragment","BLACK","MIN_MARGIN","DEFAULT_WIDTH","DEFAULT_HEIGHT","scaleLinear","filteredDotsIndexes","d","_a","_b","node","createRoot","size","xAxis","yAxis","dotsExtents","scaleX","scaleLog","minX","minY","maxX","maxY","middle","halfRange","rangeH","tempX","PADDINGS","scaleY","rangeV","tempY","textMeasurer","TextMeasurer","getMaxTickWidth","ticks","key","format","getTicksAndFormat","maxYTick","title","splitTextByWidth","titleTextHeight","TITLE_LINE_HEIGHT","titleHeight","TITLE_MARGIN","TITLE_LINE","select","legend","legendLabels","grouping","legendItems","emptySizes","column","info","MAX_SHOWN_UNIQUE_VALUES_IN_LABELS","aesData","columnValue","scale","scaleOrdinal","value","layer","isContinuousAes","domain","range","columnName","type","colorScale","getContinuousColorScale","tickPositionScale","scaleSymlog","values","getContinuousLegendTicks","scaleSqrt","labels","res","items","arrangeLegendParts","lastItem","legendWidth","LEGEND_OFFSET","legendHeight","dots","chartSettings","dotExtents","fillColor","webglFillColor","rgb","pointSeries","seriesWebglPoint","a","b","program","z","zoom","e","transform","getFilteredLabels","qt","pointer","coord","closestDatum","xOriginal","yOriginal","radius","needRedraw","_c","webglChart","chartCartesian","seriesSvgMulti","seriesWebglMulti","selection","s","colorGetter","aesGetter","quadtree","settingsId","keyColumn","dotsByGrouping","allPossibleLabels","onPolygonUpdateOutside","onTooltipHintSwitch","onLassoControlsStateUpdate","updateLabelsBBoxes","props","SVGLayer","message","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,SAASA,EAAwBC,GAAU;AACvC,SAAQA,IAAI,QAASA,IAAI,QAAQ;AACrC;AACA,SAASC,EAAkBC,GAAUC,GAAgB;AACjD,SAAOD,KAAK,IAAIA,MAAM,IAAIC;AAC9B;AACA,SAASC,EAAqBC,GAAaF,GAAiB;AACxD,SAAO;AAAA,IACHF,EAAkBI,EAAE,IAAI,KAAKF,CAAO;AAAA,IACpCF,EAAkBI,EAAE,IAAI,KAAKF,CAAO;AAAA,IACpCF,EAAkBI,EAAE,IAAI,KAAKF,CAAO;AAAA,IACpC;AAAA,EAAA;AAER;AAEA,SAASG,EAAoBC,GAAUC,GAAUC,GAAqB;AAClE,SAAIA,EAAS,WAAW,IACb,KAEJA,EAAS,KAAK,CAACC,MAAMA,EAAE,UAAUA,EAAE,OAAO,SAAS,KAAKC,GAAgBD,EAAE,QAAQ,CAACH,GAAGC,CAAC,CAAC,CAAC;AACpG;AAEA,SAASI,EACLC,GACAC,GACU;AACV,QAAMC,IAAWD,EAAO,KAAK,CAAAE,MAAKA,EAAE,SAAS,MAAM,GAC7CC,IAAaH,EAAO,KAAK,CAAAE,MAAKA,EAAE,SAAS,OAAO;AACtD,SAAO;AAAA,IACH,SAASE,EAAgBL,IAAYE,KAAA,OAAA,SAAAA,EAAU,IAAI,YAAWI,EAAgB,OAAO,SAAS;AAAA,IAC9F,SAASD,EAAgBL,IAAYE,KAAA,OAAA,SAAAA,EAAU,IAAI,YAAWI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AAA,EAAgB,OAAOT,gBAAAA,EAAAA,IAAC8H,GAAA,EAAM,SAAAD,EAAAA,CAAkB,CAAA;AAAA,EACpD;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ChartRenderer.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot-umap/ChartRenderer.tsx"],"sourcesContent":["import { chartCartesian } from '@d3fc/d3fc-chart';\nimport type { CartesianChart } from '@d3fc/d3fc-chart/src/cartesian';\nimport type { ScaleLinear } from 'd3-scale';\nimport { scaleLinear, scaleLog, scaleOrdinal, scaleSqrt, scaleSymlog } from 'd3-scale';\nimport { select } from 'd3-selection';\nimport type { D3ZoomEvent, ZoomBehavior, ZoomTransform } from 'd3-zoom';\nimport { zoom } from 'd3-zoom';\nimport type { ReactElement } from 'react';\nimport type { Root } from 'react-dom/client';\nimport { createRoot } from 'react-dom/client';\nimport { Error } from '../common/Error';\nimport type { DotAesItem, LegendData, LegendItem } from '../common/types';\nimport {\n BLACK,\n DEFAULT_HEIGHT,\n DEFAULT_WIDTH,\n TITLE_LINE_HEIGHT,\n TITLE_MARGIN\n} from '../constants';\nimport { splitTextByWidth } from '../discrete/utils';\nimport { DEFAULT_DOT_AES, MIN_MARGIN } from '../scatterplot/constants';\nimport { createAesGetter } from '../scatterplot/utils/createAesGetter';\nimport { getTicksAndFormat } from '../scatterplot/utils/getTicksAndFormat';\nimport type { Label } from '../scatterplot/utils/getVisibleLabels';\nimport { createLabelPositioner } from '../scatterplot/utils/getVisibleLabels';\nimport type { ColumnName, ScatterplotEventHandlers } from '../types';\nimport { isContinuousAes } from '../types';\nimport type { ScatterplotUmapLegendInfo } from '../types/scatterplot-umap';\nimport { getContinuousColorScale } from '../utils/getContinuousColorScale';\nimport { getContinuousLegendTicks } from '../utils/getContinuousLegendTicks';\nimport { TextMeasurer } from '../utils/TextMeasurer/TextMeasurer';\nimport { SVGLayer } from './components/SVGLayer';\nimport { LEGEND_OFFSET, PADDINGS, TITLE_LINE } from './constants';\nimport type { CurveLayer, DotsLayer, ScatterplotUmapLayer, ScatterplotUmapSettingsImpl } from './SettingsImpl';\nimport type {\n AesGetters,\n CaptionsSizes,\n ChartScales, ChartSizes,\n Dot,\n DotsExtents,\n LassoControlsState,\n Margins,\n Polygon,\n SVGLayerProps,\n} from './types';\n// @ts-ignore\nimport { seriesSvgMulti, seriesWebglMulti, seriesWebglPoint } from '@d3fc/d3fc-series';\n// @ts-ignore\nimport { webglFillColor } from '@d3fc/d3fc-webgl';\n// @ts-ignore\nimport { pointer } from '@d3fc/d3fc-pointer';\nimport { polygonContains } from 'd3-polygon';\nimport KDBush from 'kdbush';\nimport { DataFrameProvider } from '../common/useDataFrame';\nimport type { DataFrame } from '../DataFrame';\nimport { arrangeLegendParts } from '../utils/arrangeLegendParts';\nimport { GET_BLACK, getColorWithFakeOpacity, stringToNumberRgba } from './colors';\n\nfunction convertDotRToSymbolSize(r:number) {\n return (r / 2.35) * (r / 2.35) * 64;\n}\n\nfunction isDotInsidePolygons(x:number, y:number, polygons: Polygon[]) {\n if (polygons.length === 0) {\n return true;\n }\n return polygons.some((p) => p.closed && p.points.length > 2 && polygonContains(p.points, [x, y]));\n}\n\nfunction getGettersFromLayers(\n dataFrame: DataFrame,\n legendInfo: ScatterplotUmapLegendInfo,\n layers: ScatterplotUmapSettingsImpl['layers'],\n): AesGetters {\n const dotLayer = layers.find(l => l.type === 'dots') as DotsLayer | undefined;\n const curveLayer = layers.find(l => l.type === 'curve') as CurveLayer | undefined;\n return {\n dotFill: createAesGetter(dataFrame, legendInfo, dotLayer?.aes.dotFill ?? DEFAULT_DOT_AES.color, 'dotFill'),\n dotSize: createAesGetter(dataFrame, legendInfo, dotLayer?.aes.dotSize ?? DEFAULT_DOT_AES.size, 'dotSize'),\n lineType: createAesGetter(dataFrame, legendInfo, curveLayer?.aes.lineShape ?? 'solid', 'lineShape')\n };\n}\n\nclass ChartRenderer {\n reactRoot: Root | null = null;\n parentNode: HTMLElement | null = null;\n rootNode: HTMLElement | null = null;\n canvasNode: HTMLElement | null = null;\n\n svgLayerElement: SVGElement | null = null;\n svgLayerComponent: ReactElement = (<></>);\n\n aesGetters: AesGetters = {\n dotSize: () => 2,\n dotFill: () => BLACK,\n lineType: () => 'solid'\n };\n\n tools: {\n webglChart: CartesianChart<any, any>;\n qt?: KDBush;\n fillColor: () => {\n value: (setter: (d: Dot) => [number, number, number, number]) => void;\n data: (setter: () => Dot[]) => void;\n };\n pointSeries: () => any;\n zoom: ZoomBehavior<any, any>;\n } | null = null;\n\n margins: Margins = {\n top: MIN_MARGIN,\n bottom: MIN_MARGIN,\n left: MIN_MARGIN,\n right: MIN_MARGIN,\n };\n chartSizes: ChartSizes = {\n chartWidth: DEFAULT_WIDTH, // width of single chart\n chartHeight: DEFAULT_HEIGHT, // height of single chart\n totalWidth: DEFAULT_WIDTH, // width of all charts in charts row, plus left axis, plus legend\n totalHeight: DEFAULT_HEIGHT, // width of all charts in charts height, plus bottom axis, plus top title\n };\n scales: ChartScales = {\n x: scaleLinear().domain([0, 10]).range([0, DEFAULT_WIDTH]),\n y: scaleLinear().domain([0, 10]).range([DEFAULT_HEIGHT, 0]),\n xOriginal: scaleLinear().domain([0, 10]).range([0, DEFAULT_WIDTH]),\n yOriginal: scaleLinear().domain([0, 10]).range([DEFAULT_HEIGHT, 0]),\n };\n\n polygons:Polygon[] = [];\n onPolygonUpdateOutside: ScatterplotEventHandlers['onPolygonUpdate'] = () => undefined;\n onTooltipHintSwitch: ScatterplotEventHandlers['onTooltipHintSwitch'] = () => undefined;\n onLassoControlsStateUpdate: ScatterplotEventHandlers['onLassoControlsStateUpdate'] = () => undefined;\n\n zoomTransform: ZoomTransform | null = null;\n zoomStateKey = '';\n selectedDot: Dot | null = null;\n captionsSizes: CaptionsSizes = {\n xAxisCaptionsWidth: 30,\n yAxisCaptionsWidth: 100,\n };\n mainTitle: string[] = []; // can be multiline\n legend: LegendData = {width: 0, height: 0, items: []};\n\n notCalculatedProps: Partial<SVGLayerProps> = {};\n\n allDots: Dot[] = [];\n visibleLabels: Label[] = [];\n clear() {\n if (this.parentNode && this.rootNode && this.canvasNode) {\n this.parentNode?.removeChild(this.rootNode);\n this.parentNode?.removeChild(this.canvasNode);\n this.parentNode = null;\n this.rootNode = null;\n this.canvasNode = null;\n this.svgLayerElement = null;\n this.tools = null;\n }\n // timeout to avoid trying to unmount during rendering\n setTimeout(() => {\n this.reactRoot?.unmount();\n this.reactRoot = null;\n });\n }\n\n init(node: HTMLElement) {\n if (this.parentNode === null) {\n this.parentNode = node;\n this.rootNode = document.createElement('div');\n this.canvasNode = document.createElement('div');\n this.parentNode.appendChild(this.rootNode);\n this.parentNode.appendChild(this.canvasNode);\n this.reactRoot = createRoot(this.rootNode);\n }\n }\n\n updateChartSizes(size: ScatterplotUmapSettingsImpl['chartSettings']['size']) {\n if (size.width !== this.chartSizes.chartWidth || size.height !== this.chartSizes.chartHeight) {\n // NB: now chart sizes always change with one multiplier for width/height so qt stays without changes\n this.chartSizes.chartWidth = size.width;\n this.chartSizes.chartHeight = size.height;\n this.scales.x.range([0, this.chartSizes.chartWidth]);\n this.scales.y.range([this.chartSizes.chartHeight, 0]);\n }\n \n }\n\n updateViewport(\n xAxis: ScatterplotUmapSettingsImpl['chartSettings']['xAxis'],\n yAxis: ScatterplotUmapSettingsImpl['chartSettings']['yAxis'],\n dotsExtents: DotsExtents\n ) {\n const scaleX = xAxis.scale === 'log' ? scaleLog() : scaleLinear();\n\n let {minX, minY, maxX, maxY} = dotsExtents;\n if (xAxis.lowerValue !== undefined) {\n minX = Math.max(minX, xAxis.lowerValue);\n }\n if (xAxis.upperValue !== undefined) {\n maxX = Math.min(maxX, xAxis.upperValue);\n }\n if (yAxis.lowerValue !== undefined) {\n minY = Math.max(minY, yAxis.lowerValue);\n }\n if (yAxis.upperValue !== undefined) {\n maxY = Math.min(maxY, yAxis.upperValue);\n }\n if (xAxis.symmetricRange !== undefined) {\n const middle = xAxis.symmetricRange;\n if (middle >= minX && middle <= maxX) {\n const halfRange = Math.max(middle - minX, maxX - middle);\n minX = middle - halfRange;\n maxX = middle + halfRange;\n }\n }\n if (typeof yAxis.symmetricRange !== 'undefined') {\n const middle = yAxis.symmetricRange;\n if (middle >= minY && middle <= maxY) {\n const halfRange = Math.max(middle - minY, maxY - middle);\n minY = middle - halfRange;\n maxY = middle + halfRange;\n }\n }\n\n const rangeH = [0, this.chartSizes.chartWidth];\n // supporting scale, it needs to add offsets of fixed size in pixels to general scale Y\n const tempX = scaleX\n .copy()\n .domain([minX, maxX])\n .range([PADDINGS.LEFT, this.chartSizes.chartWidth - PADDINGS.RIGHT]);\n scaleX\n .domain([tempX.invert(0), tempX.invert(this.chartSizes.chartWidth)])\n .range(rangeH)\n .nice();\n this.scales.x = scaleX;\n this.scales.xOriginal = scaleX.copy();\n\n const scaleY = yAxis.scale === 'log' ? scaleLog() : scaleLinear();\n const rangeV = [this.chartSizes.chartHeight, 0];\n // supporting scale, it needs to add offsets of fixed size in pixels to general scale Y\n const tempY = scaleY\n .copy()\n .domain([minY, maxY])\n .range([this.chartSizes.chartHeight - PADDINGS.BOTTOM, PADDINGS.TOP]);\n scaleY\n .domain([tempY.invert(this.chartSizes.chartHeight), tempY.invert(0)])\n .range(rangeV)\n .nice();\n this.scales.y = scaleY;\n this.scales.yOriginal = scaleY.copy();\n }\n\n updateCaptionsSize() {\n const textMeasurer = new TextMeasurer('600 14px Arial');\n\n function getMaxTickWidth(ticks: string[]) {\n return Math.max(...ticks.map(key => textMeasurer.getTextWidth(key)));\n }\n\n const {ticks, format} = getTicksAndFormat(this.scales.y, false);\n const maxYTick = getMaxTickWidth(ticks.map(format));\n\n this.captionsSizes = {\n xAxisCaptionsWidth: 20,\n yAxisCaptionsWidth: maxYTick,\n };\n }\n\n createMainTitle(title: ScatterplotUmapSettingsImpl['chartSettings']['title']) {\n this.mainTitle = splitTextByWidth(\n title.name,\n this.chartSizes.totalWidth - this.margins.left - this.margins.right,\n 20\n );\n }\n\n updateMargins() {\n const titleTextHeight = TITLE_LINE_HEIGHT * this.mainTitle.length;\n const titleHeight = titleTextHeight > 0 ? titleTextHeight + TITLE_MARGIN * 2 : 0;\n this.margins = {\n top: Math.max(titleHeight, MIN_MARGIN),\n bottom: MIN_MARGIN + this.captionsSizes.xAxisCaptionsWidth + TITLE_LINE,\n left: MIN_MARGIN + this.captionsSizes.yAxisCaptionsWidth + TITLE_LINE,\n right: this.legend.width + MIN_MARGIN,\n };\n this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartWidth + this.margins.right;\n this.chartSizes.totalHeight =\n this.margins.top + Math.max(this.chartSizes.chartHeight, this.legend.height) + this.margins.bottom;\n\n select(this.canvasNode)\n .style('width', this.chartSizes.chartWidth + 'px')\n .style('height', this.chartSizes.chartHeight + 'px')\n .style('top', this.margins.top + 'px')\n .style('left', this.margins.left + 'px');\n }\n\n updateLegendSize(\n legend: ScatterplotUmapSettingsImpl['chartSettings']['legend'],\n legendLabels: ScatterplotUmapLegendInfo,\n grouping: ColumnName[],\n layers: ScatterplotUmapLayer[]\n ) {\n if (!legend.show) {\n this.legend = {width: 0, height: 0, items: []};\n return;\n }\n\n const legendItems: LegendItem[] = [];\n const emptySizes = {width:0, height:0, left:0, top: 0};\n \n grouping.forEach(column => {\n const info = legendLabels[column.value];\n if (info.usedAes.length === 0 || !info.aesMap) {\n return;\n }\n const aesData: Record<string, DotAesItem> = {};\n info.values.forEach(category => {\n if (!aesData[category]) {\n aesData[category] = {...DEFAULT_DOT_AES} as DotAesItem;\n }\n info.usedAes.forEach(key => {\n if (key === 'dotFill') {\n aesData[category].color = (info.aesMap(category, key) ?? BLACK) as string;\n }\n if (key === 'dotSize') {\n aesData[category].size = Number(info.aesMap(category, key) ?? 3);\n }\n });\n });\n\n const title = column.label ?? column.value;\n const scale = scaleOrdinal<DotAesItem>()\n .domain(info.values)\n .range(info.values.map(value => aesData[value]));\n legendItems.push({...emptySizes, id: column.value, type: 'dots', title, scale, values:info.values, labels:info.labels});\n });\n\n layers.forEach(layer => {\n if (layer.type === 'dots' && isContinuousAes(layer.aes.dotFill)) {\n const {domain, range, columnName, type = 'linear'} = layer.aes.dotFill;\n const title = columnName.label ?? columnName.value;\n const colorScale = getContinuousColorScale(range, domain, 'linear') as ScaleLinear<string, string>; // always linear for legend - scale to render gradient, not for dots\n const tickPositionScale = (type === 'log' ? scaleSymlog<string, string>() : scaleLinear<string, string>())\n .domain(domain)\n // @ts-ignore\n .range([this.chartSizes.chartHeight, 0]);\n const values = getContinuousLegendTicks(tickPositionScale, domain as [number, number]);\n legendItems.push({...emptySizes, id: 'dotFill', type: 'continuous', title, scale: colorScale, tickPositionScale, values});\n }\n if (layer.type === 'dots' && isContinuousAes(layer.aes.dotSize)) {\n const {columnName, domain, range} = layer.aes.dotSize;\n const title = columnName.label ?? columnName.value;\n const scale = scaleSqrt(domain, range);\n const values = scale.ticks(3);\n const format = scale.tickFormat(3);\n const labels = values.reduce((res: Record<string, string>, v) => {\n res[String(v)] = format(v);\n return res;\n }, {});\n legendItems.push({...emptySizes, id: columnName.value, type: 'size', title, scale, values, labels});\n }\n });\n\n if (!legendItems.length) {\n this.legend = {width: 0, height: 0, items: []};\n return;\n }\n\n const items = arrangeLegendParts(legendItems, this.chartSizes.chartHeight);\n const lastItem = items[items.length - 1];\n const legendWidth = lastItem.left + lastItem.width + LEGEND_OFFSET;\n const legendHeight = this.chartSizes.chartHeight;\n\n this.legend = {\n width: legendWidth,\n height: legendHeight,\n items,\n };\n }\n\n initSettings(\n dataFrame: DataFrame,\n dots: Dot[],\n chartSettings: ScatterplotUmapSettingsImpl['chartSettings'],\n dotExtents: DotsExtents,\n legendInfo: ScatterplotUmapLegendInfo,\n layers: ScatterplotUmapSettingsImpl['layers'],\n grouping: ColumnName[]\n ) {\n const {xAxis, yAxis, size, title, legend} = chartSettings;\n this.updateChartSizes(size);\n this.updateViewport(xAxis, yAxis, dotExtents);\n this.updateCaptionsSize();\n this.updateLegendSize(legend, legendInfo, grouping, layers);\n this.createMainTitle(title);\n this.updateMargins();\n\n this.aesGetters = getGettersFromLayers(dataFrame, legendInfo, layers);\n\n const fillColor = webglFillColor()\n .data(dots)\n .value((d: Dot) => {\n const rgba = stringToNumberRgba(this.aesGetters.dotFill(d.idx));\n rgba[3] = !d.dimmed && isDotInsidePolygons(d.x, d.y, this.polygons) ? 1 : 0.4;\n return getColorWithFakeOpacity(rgba, rgba);\n });\n\n const pointSeries = seriesWebglPoint()\n .equals((a: Dot[], b: Dot[]) => a === b)\n .size((d: Dot) => convertDotRToSymbolSize(this.aesGetters.dotSize(d.idx)))\n .crossValue((d: Dot) => d.x)\n .mainValue((d: Dot) => d.y)\n .decorate((program: unknown) => fillColor(program));\n\n const z = zoom()\n .scaleExtent([0.1, 1000])\n .filter((e:MouseEvent) => {\n return e.type === 'wheel' || e.metaKey || e.ctrlKey;\n })\n .on('start', () => {\n this.selectedDot = null;\n })\n .on('zoom', (e: D3ZoomEvent<SVGElement, unknown>) => {\n const transform = e.transform;\n const x = transform.rescaleX(this.scales.xOriginal);\n const y = transform.rescaleY(this.scales.yOriginal);\n this.scales.x.domain(x.domain());\n this.scales.y.domain(y.domain());\n\n this.zoomTransform = transform;\n this.zoomStateKey = `${transform.x}_${transform.y}_${transform.k}`; // need it to update axes\n\n this.updateLabelsPosition(this.visibleLabels);\n this.renderSvgLayer(dataFrame);\n this.renderWebglLayer();\n }).on('end', () => {\n this.visibleLabels = this.computeLabels(this.allDots);\n this.renderSvgLayer(dataFrame);\n });\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const p = pointer().on('point', ([coord]) => {\n let closestDatum;\n if (coord) {\n closestDatum = this.getClosestDot(coord.x, coord.y);\n }\n \n const needRedraw =\n (this.selectedDot && !closestDatum) ||\n (!this.selectedDot && closestDatum) ||\n this.selectedDot?.idx !== closestDatum?.idx;\n\n this.selectedDot = closestDatum ?? null;\n\n if (needRedraw) {\n this.renderSvgLayer(dataFrame);\n }\n });\n\n const webglChart = chartCartesian({\n xScale: this.scales.x,\n yScale: this.scales.y,\n })\n .xAxisHeight(() => '0') // removing build-in axes from chartCartesian\n .yAxisWidth(() => '0') // removing build-in axes from chartCartesian\n .svgPlotArea(seriesSvgMulti())\n .webglPlotArea(\n // only render the point series on the WebGL layer\n seriesWebglMulti()\n .series([pointSeries])\n .mapping((d: unknown) => d)\n )\n .decorate(selection => {\n const s = selection.enter();\n if (s && !this.svgLayerElement) {\n s.style('grid-template-columns', '0 auto 1fr auto 0'); // removing build-in axes from chartCartesian\n s.style('grid-template-rows', '0 auto 1fr auto 0'); // removing build-in axes from chartCartesian\n this.svgLayerElement = s.select('.svg-plot-area.plot-area svg').node() as SVGElement;\n }\n s.select('.svg-plot-area.plot-area').attr('class', 'svg-plot-area plot-area miplots-scatterplot-plot-area')\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .call(z)\n .call(p);\n });\n\n this.tools = {\n webglChart,\n zoom: z,\n fillColor,\n pointSeries,\n };\n\n select(this.canvasNode)\n .datum(dots)\n .style('position', 'absolute')\n .style('width', this.chartSizes.chartWidth + 'px')\n .style('height', this.chartSizes.chartHeight + 'px')\n .style('top', this.margins.top + 'px')\n .style('left', this.margins.left + 'px');\n }\n\n updateAes(\n dataFrame: DataFrame,\n legendInfo: ScatterplotUmapLegendInfo,\n layers: ScatterplotUmapSettingsImpl['layers']\n ) {\n if (this.tools === null) {\n return;\n }\n this.aesGetters = getGettersFromLayers(dataFrame, legendInfo, layers);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools.fillColor.value((d: Dot) => {\n const colorGetter = this.aesGetters.dotFill ?? GET_BLACK;\n const rgba = stringToNumberRgba(colorGetter(d.idx));\n rgba[3] = !d.dimmed && isDotInsidePolygons(d.x, d.y, this.polygons) ? 1 : 0.4;\n return getColorWithFakeOpacity(rgba, rgba);\n });\n }\n\n updatePointSize() {\n if (this.tools === null) {\n return;\n }\n // TODO: try remove array copy\n select(this.canvasNode).datum([...this.allDots]);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools.pointSeries.size((d: Dot) => convertDotRToSymbolSize(this.aesGetters.dotSize(d.data)));\n }\n\n updateByLasso() {\n if (this.tools === null) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools?.fillColor.value((d: Dot) => {\n const colorGetter = this.aesGetters.dotFill ?? GET_BLACK;\n const rgba = stringToNumberRgba(colorGetter(d.idx));\n rgba[3] = !d.dimmed && isDotInsidePolygons(d.x, d.y, this.polygons) ? 1 : 0.4;\n return getColorWithFakeOpacity(rgba, rgba);\n });\n this.renderWebglLayer();\n }\n\n createQuadtree(dots: Dot[]): KDBush {\n const tree = new KDBush(dots.length, 512);\n\n for (let i = 0; i < dots.length; i++) {\n tree.add(dots[i].x, dots[i].y);\n } \n\n return tree.finish();\n }\n\n getClosestDot(_x: number, _y: number): Dot | null {\n const tree = this.tools?.qt;\n if (!tree) return null;\n const dots = this.allDots;\n const x = this.scales.x.invert(_x);\n const y = this.scales.y.invert(_y);\n const radius = 1 / (this.zoomTransform?.k || 1);\n const minX = x - radius;\n const maxX = x + radius;\n const minY = y - radius;\n const maxY = y + radius;\n\n const indexes = tree.range(minX, minY, maxX, maxY);\n const closest = indexes.reduce((closest, idx: number) => {\n const dot = dots[idx];\n const dX = this.scales.x(dot.x) - _x;\n const dY = this.scales.y(dot.y) - _y;\n const distance = Math.hypot(dX, dY);\n if (closest === null || distance < closest.distance) {\n closest.index = idx;\n closest.distance = distance;\n }\n return closest;\n }, {\n index: -1,\n distance: Infinity\n });\n return indexes.length === 0 || closest.index === -1 ? null : dots[closest.index];\n }\n\n updateDots(dots: Dot[]) {\n if (this.tools === null) {\n return;\n }\n select(this.canvasNode).datum(dots);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.tools.fillColor.data(dots);\n this.tools.qt = this.createQuadtree(dots);\n this.allDots = dots;\n }\n\n render(\n dataFrame: DataFrame,\n settingsId: string,\n chartSettings: ScatterplotUmapSettingsImpl['chartSettings'],\n keyColumn: ColumnName | null,\n dots: Dot[],\n dotExtents: DotsExtents,\n dotsByGrouping: Record<string, Dot[]>,\n layers: ScatterplotUmapSettingsImpl['layers'],\n legendInfo: ScatterplotUmapLegendInfo,\n grouping: ColumnName[],\n onPolygonUpdateOutside: ScatterplotEventHandlers['onPolygonUpdate'],\n onTooltipHintSwitch: (v:boolean) => void,\n onLassoControlsStateUpdate: (v:LassoControlsState) => void,\n ) { \n if (this.tools === null) {\n this.initSettings(\n dataFrame,\n dots,\n chartSettings,\n dotExtents,\n legendInfo,\n layers,\n grouping\n ); \n } else {\n const {title, legend, size} = chartSettings;\n this.updateChartSizes(size);\n this.updateLegendSize(legend, legendInfo, grouping, layers);\n this.createMainTitle(title);\n this.updateMargins();\n this.updateAes(dataFrame, legendInfo, layers);\n }\n\n this.onPolygonUpdateOutside = onPolygonUpdateOutside;\n this.onTooltipHintSwitch = onTooltipHintSwitch;\n this.onLassoControlsStateUpdate = onLassoControlsStateUpdate;\n\n if (this.allDots !== dots) {\n this.updateDots(dots);\n this.visibleLabels = this.computeLabels(dots);\n }\n\n this.notCalculatedProps = {\n settingsId,\n chartSettings,\n keyColumn,\n dotsByGrouping,\n layers\n };\n\n this.renderWebglLayer();\n this.renderSvgLayer(dataFrame);\n }\n\n renderWebglLayer() {\n if (this.tools?.webglChart) {\n select(this.canvasNode).call(this.tools?.webglChart);\n }\n }\n\n onPolygonUpdate = (p:Polygon[]) => {\n this.polygons = p;\n this.updateByLasso();\n const filteredDotsIndexes = this.allDots\n .filter(d => isDotInsidePolygons(d.x, d.y, this.polygons))\n .map(d => d.idx);\n this.onPolygonUpdateOutside(filteredDotsIndexes, p);\n };\n\n renderSvgLayer(dataFrame: DataFrame) {\n const props = {\n settingsId: this.notCalculatedProps.settingsId,\n chartSettings: this.notCalculatedProps.chartSettings,\n keyColumn: this.notCalculatedProps.keyColumn,\n dotsByGrouping: this.notCalculatedProps.dotsByGrouping,\n layers: this.notCalculatedProps.layers,\n chartSizes: this.chartSizes,\n scales: this.scales,\n margins: this.margins,\n mainTitle: this.mainTitle,\n captionsSizes: this.captionsSizes,\n container: this.svgLayerElement,\n zoomStateKey: this.zoomStateKey,\n selectedDot: this.selectedDot,\n aesGetters: this.aesGetters,\n legendData: this.legend,\n labels: this.visibleLabels,\n defaultPolygons: this.polygons,\n onPolygonUpdate: this.onPolygonUpdate,\n onTooltipHintSwitch: this.onTooltipHintSwitch,\n onLassoControlsStateUpdate: this.onLassoControlsStateUpdate,\n } as SVGLayerProps;\n this.svgLayerComponent = (\n <DataFrameProvider dataFrame={dataFrame}>\n <SVGLayer {...props} />\n </DataFrameProvider>\n );\n this.reactRoot?.render(this.svgLayerComponent);\n }\n\n renderError(message: string) {\n this.reactRoot?.render(<Error message={message} />);\n }\n\n private computeLabels(dots: Dot[]) {\n const textMeasurer = new TextMeasurer('16px Manrope');\n const getPosition = createLabelPositioner(this.chartSizes.chartWidth, this.chartSizes.chartHeight);\n const labels = [];\n\n for (let i = 0; i < dots.length; i++) {\n const dot = dots[i];\n if (dot.label == null) {\n continue;\n }\n const name = String(dot.label);\n const metrics = textMeasurer.getTextMetrics(name);\n const x = this.scales.x(dot.x);\n const y = this.scales.y(dot.y);\n const w = metrics.width;\n const h = (metrics.actualBoundingBoxAscent) + (metrics.actualBoundingBoxDescent);\n const p = 10;\n const position = getPosition(x, y, w, h, p);\n if (!position) {\n continue;\n }\n\n labels.push({\n x,\n y,\n dot,\n name,\n width: w,\n height: h,\n padding: p,\n xPosition: position[0],\n yPosition: position[1],\n } satisfies Label);\n }\n\n return labels;\n }\n\n private updateLabelsPosition(labels: Label[]) {\n for (let i = 0; i < labels.length; i++) {\n const label = labels[i];\n label.x = this.scales.x(label.dot.x);\n label.y = this.scales.y(label.dot.y);\n }\n }\n}\n\nexport default ChartRenderer;\n"],"names":["convertDotRToSymbolSize","r","isDotInsidePolygons","x","y","polygons","p","polygonContains","getGettersFromLayers","dataFrame","legendInfo","layers","dotLayer","l","curveLayer","createAesGetter","DEFAULT_DOT_AES","ChartRenderer","__publicField","jsx","Fragment","BLACK","MIN_MARGIN","DEFAULT_WIDTH","DEFAULT_HEIGHT","scaleLinear","filteredDotsIndexes","d","_a","_b","node","createRoot","size","xAxis","yAxis","dotsExtents","scaleX","scaleLog","minX","minY","maxX","maxY","middle","halfRange","rangeH","tempX","PADDINGS","scaleY","rangeV","tempY","textMeasurer","TextMeasurer","getMaxTickWidth","ticks","key","format","getTicksAndFormat","maxYTick","title","splitTextByWidth","titleTextHeight","TITLE_LINE_HEIGHT","titleHeight","TITLE_MARGIN","TITLE_LINE","select","legend","legendLabels","grouping","legendItems","emptySizes","column","info","aesData","category","scale","scaleOrdinal","value","layer","isContinuousAes","domain","range","columnName","type","colorScale","getContinuousColorScale","tickPositionScale","scaleSymlog","values","getContinuousLegendTicks","scaleSqrt","labels","res","v","items","arrangeLegendParts","lastItem","legendWidth","LEGEND_OFFSET","legendHeight","dots","chartSettings","dotExtents","fillColor","webglFillColor","rgba","stringToNumberRgba","getColorWithFakeOpacity","pointSeries","seriesWebglPoint","a","b","program","z","zoom","e","transform","pointer","coord","closestDatum","needRedraw","webglChart","chartCartesian","seriesSvgMulti","seriesWebglMulti","selection","s","colorGetter","GET_BLACK","tree","KDBush","i","_x","_y","radius","indexes","closest","idx","dot","dX","dY","distance","settingsId","keyColumn","dotsByGrouping","onPolygonUpdateOutside","onTooltipHintSwitch","onLassoControlsStateUpdate","props","DataFrameProvider","SVGLayer","message","Error","getPosition","createLabelPositioner","name","metrics","w","h","position","label"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,SAASA,EAAwBC,GAAU;AACvC,SAAQA,IAAI,QAASA,IAAI,QAAQ;AACrC;AAEA,SAASC,EAAoBC,GAAUC,GAAUC,GAAqB;AAClE,SAAIA,EAAS,WAAW,IACb,KAEJA,EAAS,KAAK,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MAAAiB;AAAAA,QACA,OAAOE;AAAAA,QACP,QAAQC;AAAA,QACR,SAASxJ;AAAAA,QACT,WAAWyJ,EAAS,CAAC;AAAA,QACrB,WAAWA,EAAS,CAAC;AAAA,MAAA,CACR;AAAA,IACrB;AAEA,WAAOpE;AAAAA,EACX;AAAA,EAEQ,qBAAqBA,GAAiB;AAC1C,aAASwC,IAAI,GAAGA,IAAIxC,EAAO,QAAQwC,KAAK;AACpC,YAAM6B,IAAQrE,EAAOwC,CAAC;AACtB6B,MAAAA,EAAM,IAAI,KAAK,OAAO,EAAEA,EAAM,IAAI,CAAC,GACnCA,EAAM,IAAI,KAAK,OAAO,EAAEA,EAAM,IAAI,CAAC;AAAA,IACvC;AAAA,EACJ;AACJ;","x_google_ignoreList":[0]}
@@ -1,11 +1,11 @@
1
- import { DEFAULT_HEIGHT as n, DEFAULT_WIDTH as u, BLACK as a } from "../constants.js";
2
- import { ScatterplotUmapSettingsSchema as p } from "../types/scatterplot-umap.js";
3
- import y from "../node_modules/lodash/lodash.js";
4
- var c = Object.defineProperty, g = (s, t, e) => t in s ? c(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, i = (s, t, e) => g(s, typeof t != "symbol" ? t + "" : t, e);
5
- class d {
1
+ import p from "../node_modules/lodash/lodash.js";
2
+ import { DEFAULT_HEIGHT as y, DEFAULT_WIDTH as c, BLACK as u } from "../constants.js";
3
+ import { ScatterplotUmapSettingsSchema as g } from "../types/scatterplot-umap.js";
4
+ var d = Object.defineProperty, m = (i, t, s) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : i[t] = s, e = (i, t, s) => m(i, typeof t != "symbol" ? t + "" : t, s);
5
+ class v {
6
6
  constructor(t) {
7
- i(this, "type", "dots"), i(this, "aes", {
8
- dotFill: a,
7
+ e(this, "type", "dots"), e(this, "aes", {
8
+ dotFill: u,
9
9
  dotShape: "21",
10
10
  dotSize: 3,
11
11
  opacity: 1
@@ -15,10 +15,10 @@ class d {
15
15
  };
16
16
  }
17
17
  }
18
- class m {
18
+ class w {
19
19
  constructor(t) {
20
- i(this, "type", "curve"), i(this, "smoothing"), i(this, "aes", {
21
- lineColor: a,
20
+ e(this, "type", "curve"), e(this, "smoothing"), e(this, "aes", {
21
+ lineColor: u,
22
22
  lineWidth: 1,
23
23
  lineShape: "solid",
24
24
  opacity: 1
@@ -28,20 +28,20 @@ class m {
28
28
  };
29
29
  }
30
30
  }
31
- class x {
31
+ class S {
32
32
  constructor(t) {
33
- i(this, "id"), i(this, "type", "scatterplot-umap"), i(this, "keyColumn"), i(this, "x"), i(this, "y"), i(this, "grouping"), i(this, "label"), i(this, "highlight"), i(this, "chartSettings"), i(this, "inheritedAes"), i(this, "layers");
34
- var e, o, h, r;
35
- p.parse(t), this.id = y.uniqueId("settings"), this.keyColumn = t.keyColumn ?? null, this.x = t.x, this.y = t.y, this.grouping = t.grouping ?? [], this.label = t.label ?? null, this.highlight = t.highlight ?? null, this.chartSettings = {
33
+ e(this, "id"), e(this, "type", "scatterplot-umap"), e(this, "keyColumn"), e(this, "x"), e(this, "y"), e(this, "grouping"), e(this, "label"), e(this, "highlight"), e(this, "chartSettings"), e(this, "layers");
34
+ var s, r, a, h, n, o;
35
+ g.parse(t), this.id = p.uniqueId("settings"), this.keyColumn = t.keyColumn ?? null, this.x = t.x, this.y = t.y, this.grouping = t.grouping ?? [], this.label = t.label ?? null, this.highlight = t.highlight ?? null, this.chartSettings = {
36
36
  size: {
37
- width: ((e = t == null ? void 0 : t.size) == null ? void 0 : e.width) ?? u,
38
- height: ((o = t == null ? void 0 : t.size) == null ? void 0 : o.height) ?? n
37
+ width: ((s = t == null ? void 0 : t.size) == null ? void 0 : s.width) ?? c,
38
+ height: ((r = t == null ? void 0 : t.size) == null ? void 0 : r.height) ?? y
39
39
  },
40
40
  title: {
41
41
  position: "center",
42
42
  show: !0,
43
43
  ...t.title,
44
- name: ((h = t.title) == null ? void 0 : h.name) ?? "Chart"
44
+ name: ((a = t.title) == null ? void 0 : a.name) ?? "Chart"
45
45
  },
46
46
  yAxis: {
47
47
  title: t.y.label ?? t.y.value,
@@ -57,28 +57,28 @@ class x {
57
57
  showTicks: !0,
58
58
  ...t.xAxis
59
59
  },
60
- frame: { type: ((r = t.frame) == null ? void 0 : r.type) ?? "full" },
60
+ frame: { type: ((h = t.frame) == null ? void 0 : h.type) ?? "full" },
61
61
  legend: {
62
62
  show: !0,
63
63
  position: "right",
64
64
  ...t.legend
65
65
  },
66
66
  tooltips: {
67
- show: !0,
68
- ...t.tooltips
67
+ ...t.tooltips,
68
+ show: ((n = t.tooltips) == null ? void 0 : n.show) !== !1 && (((o = t.tooltips) == null ? void 0 : o.content) ?? []).length > 0
69
69
  }
70
- }, this.inheritedAes = t.inheritedAes ?? {}, this.layers = t.layers.map((l) => {
70
+ }, this.layers = t.layers.map((l) => {
71
71
  if (l.type === "dots")
72
- return new d(l);
72
+ return new v(l);
73
73
  if (l.type === "curve")
74
- return new m(l);
74
+ return new w(l);
75
75
  throw new Error("Unknown layer type");
76
76
  }).filter(Boolean);
77
77
  }
78
78
  }
79
79
  export {
80
- m as CurveLayer,
81
- d as DotsLayer,
82
- x as ScatterplotUmapSettingsImpl
80
+ w as CurveLayer,
81
+ v as DotsLayer,
82
+ S as ScatterplotUmapSettingsImpl
83
83
  };
84
84
  //# sourceMappingURL=SettingsImpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsImpl.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot-umap/SettingsImpl.ts"],"sourcesContent":["import {BLACK, DEFAULT_HEIGHT, DEFAULT_WIDTH} from '../constants';\nimport type {ScatterplotAxisSettings} from '../scatterplot/ScatterplotSettingsImpl';\nimport {type AesMap, type InheritAesScatterplot, type PointShape} from '../types';\nimport type {\n ColumnName,\n ContinuousAesFromColumn,\n FrameType,\n LegendPosition,\n LineShape,\n SettingsInterface,\n TitlePosition,\n} from '../types';\nimport type {\n CurveUmapLayer as OuterCurveLayer,\n DotsUmapLayer as OuterDotsLayer,\n ScatterplotUmapSettings\n} from '../types/scatterplot-umap';\nimport {ScatterplotUmapSettingsSchema} from '../types/scatterplot-umap';\nimport lodash from 'lodash';\n\nexport class DotsLayer {\n readonly type = 'dots';\n readonly aes: {\n dotFill: string | InheritAesScatterplot | ContinuousAesFromColumn<string>;\n dotShape: PointShape | InheritAesScatterplot;\n dotSize: number | ContinuousAesFromColumn<number>;\n opacity: number;\n } = {\n dotFill: BLACK,\n dotShape: '21',\n dotSize: 3,\n opacity: 1,\n };\n constructor(layer: OuterDotsLayer) {\n this.aes = {\n ...this.aes,\n ...layer.aes,\n };\n }\n}\nexport class CurveLayer {\n readonly type = 'curve';\n readonly smoothing: boolean;\n readonly aes: {\n lineColor: string | InheritAesScatterplot | ContinuousAesFromColumn<string>;\n lineWidth: number;\n lineShape: LineShape;\n opacity: number;\n } = {\n lineColor: BLACK,\n lineWidth: 1,\n lineShape: 'solid',\n opacity: 1,\n };\n\n constructor(layer: OuterCurveLayer) {\n this.smoothing = layer.smoothing ?? false;\n this.aes = {\n ...this.aes,\n ...layer.aes,\n };\n }\n}\n\nexport type ScatterplotUmapLayer = DotsLayer | CurveLayer;\n\nexport class ScatterplotUmapSettingsImpl implements SettingsInterface {\n readonly id: string;\n readonly type = 'scatterplot-umap';\n readonly keyColumn: ColumnName | null;\n readonly x: ColumnName;\n readonly y: ColumnName;\n readonly grouping: ColumnName[];\n readonly label: ColumnName | null;\n readonly highlight: ColumnName | null;\n readonly chartSettings: {\n readonly size: {width: number; height: number};\n readonly title: {name: string; show: boolean; position: TitlePosition};\n readonly yAxis: ScatterplotAxisSettings;\n readonly xAxis: ScatterplotAxisSettings;\n readonly frame: {type: FrameType};\n readonly legend: {show: boolean; position: LegendPosition};\n readonly tooltips: {show: boolean; content?: ColumnName[]};\n };\n readonly inheritedAes: Record<string, AesMap>;\n readonly layers: ScatterplotUmapLayer[];\n\n constructor(settings: ScatterplotUmapSettings) {\n ScatterplotUmapSettingsSchema.parse(settings);\n this.id = lodash.uniqueId('settings');\n this.keyColumn = settings.keyColumn ?? null;\n this.x = settings.x;\n this.y = settings.y;\n this.grouping = settings.grouping ?? [];\n this.label = settings.label ?? null;\n this.highlight = settings.highlight ?? null;\n this.chartSettings = {\n size: {\n width: settings?.size?.width ?? DEFAULT_WIDTH,\n height: settings?.size?.height ?? DEFAULT_HEIGHT,\n },\n title: {\n position: 'center',\n show: true,\n ...settings.title,\n name: settings.title?.name ?? 'Chart',\n },\n yAxis: {\n title: settings.y.label ?? settings.y.value,\n scale: 'linear',\n showGrid: true,\n showTicks: true,\n ...settings.yAxis,\n },\n xAxis: {\n title: settings.x.label ?? settings.x.value,\n scale: 'linear',\n showGrid: true,\n showTicks: true,\n ...settings.xAxis,\n },\n frame: {type: settings.frame?.type ?? 'full'},\n legend: {\n show: true,\n position: 'right',\n ...settings.legend,\n },\n tooltips: {\n show: true,\n ...settings.tooltips,\n },\n };\n\n this.inheritedAes = settings.inheritedAes ?? {};\n\n this.layers = settings.layers\n .map(layer => {\n if (layer.type === 'dots') {\n return new DotsLayer(layer);\n } else if (layer.type === 'curve') {\n return new CurveLayer(layer);\n } else {\n throw new Error('Unknown layer type');\n }\n })\n .filter(Boolean) as ScatterplotUmapLayer[];\n }\n}\n"],"names":["DotsLayer","layer","__publicField","BLACK","CurveLayer","ScatterplotUmapSettingsImpl","settings","ScatterplotUmapSettingsSchema","lodash","_a","DEFAULT_WIDTH","_b","DEFAULT_HEIGHT","_c","_d"],"mappings":";;;;AAoBO,MAAMA,EAAU;AAAA,EAanB,YAAYC,GAAuB;AAZ1BC,IAAAA,EAAA,MAAA,QAAO,MAAA,GACPA,EAAA,MAAA,OAKL;AAAA,MACA,SAASC;AAAAA,MACT,UAAU;AAAA,MACV,SAAS;AAAA,MACT,SAAS;AAAA,IAAA,CAAA,GAGT,KAAK,MAAM;AAAA,MACP,GAAG,KAAK;AAAA,MACR,GAAGF,EAAM;AAAA,IAAA;AAAA,EAEjB;AACJ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,EAAS;AAAA,QACZ,QAAMO,IAAAP,EAAS,UAAT,OAAA,SAAAO,EAAgB,SAAQ;AAAA,MAAA;AAAA,MAElC,OAAO;AAAA,QACH,OAAOP,EAAS,EAAE,SAASA,EAAS,EAAE;AAAA,QACtC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,QACX,GAAGA,EAAS;AAAA,MAAA;AAAA,MAEhB,OAAO;AAAA,QACH,OAAOA,EAAS,EAAE,SAASA,EAAS,EAAE;AAAA,QACtC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,QACX,GAAGA,EAAS;AAAA,MAAA;AAAA,MAEhB,OAAO,EAAC,QAAMQ,IAAAR,EAAS,UAAT,OAAA,SAAAQ,EAAgB,SAAQ,OAAA;AAAA,MACtC,QAAQ;AAAA,QACJ,MAAM;AAAA,QACN,UAAU;AAAA,QACV,GAAGR,EAAS;AAAA,MAAA;AAAA,MAEhB,UAAU;AAAA,QACN,MAAM;AAAA,QACN,GAAGA,EAAS;AAAA,MAAA;AAAA,IAAA,GAIpB,KAAK,eAAeA,EAAS,gBAAgB,CAAA,GAE7C,KAAK,SAASA,EAAS,OAClB,IAAI,CAAAL,MAAS;AACV,UAAIA,EAAM,SAAS;AACf,eAAO,IAAID,EAAUC,CAAK;AAC9B,UAAWA,EAAM,SAAS;AACtB,eAAO,IAAIG,EAAWH,CAAK;AAE3B,YAAM,IAAI,MAAM,oBAAoB;AAAA,IAE5C,CAAC,EACA,OAAO,OAAO;AAAA,EACvB;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"SettingsImpl.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot-umap/SettingsImpl.ts"],"sourcesContent":["import lodash from 'lodash';\nimport { BLACK, DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../constants';\nimport type { ScatterplotAxisSettings } from '../scatterplot/ScatterplotSettingsImpl';\nimport type {\n ColumnName,\n ContinuousAesFromColumn,\n DataValue,\n FrameType,\n LegendPosition,\n LineShape,\n SettingsInterface,\n TitlePosition\n} from '../types';\nimport {type AesRecord, type InheritAesScatterplot, type PointShape} from '../types';\nimport type {\n CurveUmapLayer as OuterCurveLayer,\n DotsUmapLayer as OuterDotsLayer,\n ScatterplotUmapSettings\n} from '../types/scatterplot-umap';\nimport { ScatterplotUmapSettingsSchema } from '../types/scatterplot-umap';\n\nexport class DotsLayer {\n readonly type = 'dots';\n readonly aes: {\n dotFill: string | InheritAesScatterplot | ContinuousAesFromColumn<string>;\n dotShape: PointShape | InheritAesScatterplot;\n dotSize: number | ContinuousAesFromColumn<number>;\n opacity: number;\n } = {\n dotFill: BLACK,\n dotShape: '21',\n dotSize: 3,\n opacity: 1,\n };\n constructor(layer: OuterDotsLayer) {\n this.aes = {\n ...this.aes,\n ...layer.aes,\n };\n }\n}\nexport class CurveLayer {\n readonly type = 'curve';\n readonly smoothing: boolean;\n readonly aes: {\n lineColor: string | InheritAesScatterplot | ContinuousAesFromColumn<string>;\n lineWidth: number;\n lineShape: LineShape;\n opacity: number;\n } = {\n lineColor: BLACK,\n lineWidth: 1,\n lineShape: 'solid',\n opacity: 1,\n };\n\n constructor(layer: OuterCurveLayer) {\n this.smoothing = layer.smoothing ?? false;\n this.aes = {\n ...this.aes,\n ...layer.aes,\n };\n }\n}\n\nexport type ScatterplotUmapLayer = DotsLayer | CurveLayer;\n\nexport class ScatterplotUmapSettingsImpl implements SettingsInterface {\n readonly id: string;\n readonly type = 'scatterplot-umap';\n readonly keyColumn: ColumnName | null;\n readonly x: ColumnName;\n readonly y: ColumnName;\n readonly grouping: {\n columnName: ColumnName;\n order?: DataValue[];\n inheritedAes?: AesRecord;\n }[];\n readonly label: ColumnName | null;\n readonly highlight: ColumnName | null;\n readonly chartSettings: {\n readonly size: {width: number; height: number};\n readonly title: {name: string; show: boolean; position: TitlePosition};\n readonly yAxis: ScatterplotAxisSettings;\n readonly xAxis: ScatterplotAxisSettings;\n readonly frame: {type: FrameType};\n readonly legend: {show: boolean; position: LegendPosition};\n readonly tooltips: {show: boolean; content?: ColumnName[]};\n };\n readonly layers: ScatterplotUmapLayer[];\n\n constructor(settings: ScatterplotUmapSettings) {\n ScatterplotUmapSettingsSchema.parse(settings);\n this.id = lodash.uniqueId('settings');\n this.keyColumn = settings.keyColumn ?? null;\n this.x = settings.x;\n this.y = settings.y;\n this.grouping = settings.grouping ?? [];\n this.label = settings.label ?? null;\n this.highlight = settings.highlight ?? null;\n this.chartSettings = {\n size: {\n width: settings?.size?.width ?? DEFAULT_WIDTH,\n height: settings?.size?.height ?? DEFAULT_HEIGHT,\n },\n title: {\n position: 'center',\n show: true,\n ...settings.title,\n name: settings.title?.name ?? 'Chart',\n },\n yAxis: {\n title: settings.y.label ?? settings.y.value,\n scale: 'linear',\n showGrid: true,\n showTicks: true,\n ...settings.yAxis,\n },\n xAxis: {\n title: settings.x.label ?? settings.x.value,\n scale: 'linear',\n showGrid: true,\n showTicks: true,\n ...settings.xAxis,\n },\n frame: {type: settings.frame?.type ?? 'full'},\n legend: {\n show: true,\n position: 'right',\n ...settings.legend,\n },\n tooltips: {\n ...settings.tooltips,\n show: !(settings.tooltips?.show === false) && (settings.tooltips?.content ?? []).length > 0,\n },\n };\n\n this.layers = settings.layers\n .map(layer => {\n if (layer.type === 'dots') {\n return new DotsLayer(layer);\n } else if (layer.type === 'curve') {\n return new CurveLayer(layer);\n } else {\n throw new Error('Unknown layer type');\n }\n })\n .filter(Boolean) as ScatterplotUmapLayer[];\n }\n}\n"],"names":["DotsLayer","layer","__publicField","BLACK","CurveLayer","ScatterplotUmapSettingsImpl","settings","ScatterplotUmapSettingsSchema","lodash","_a","DEFAULT_WIDTH","_b","DEFAULT_HEIGHT","_c","_d","_e","_f"],"mappings":";;;;AAqBO,MAAMA,EAAU;AAAA,EAanB,YAAYC,GAAuB;AAZ1BC,MAAA,MAAA,QAAO,MAAA,GACPA,EAAA,MAAA,OAKL;AAAA,MACA,SAASC;AAAAA,MACT,UAAU;AAAA,MAC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t = [0, 0, 0, 1]) {
6
+ if (e[0] === "#")
7
+ return u(e, t);
8
+ if (e[0] === "r")
9
+ return c(e, t);
10
+ throw new Error(`Unsupported color format: ${e}`);
11
+ }
12
+ function u(e, t = [0, 0, 0, 1]) {
13
+ e = e.replace(/^#/, "");
14
+ let a = 255;
15
+ e.length === 8 && (a = Number.parseInt(e.slice(6, 8), 16), e = e.slice(0, 6)), e.length === 4 && (a = Number.parseInt(e.slice(3, 4).repeat(2), 16), e = e.slice(0, 3)), e.length === 3 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]);
16
+ const n = Number.parseInt(e, 16);
17
+ return t[0] = (n >> 16) / 255, t[1] = (n >> 8 & 255) / 255, t[2] = (n & 255) / 255, t[3] = a / 255, t;
18
+ }
19
+ function c(e, t = [0, 0, 0, 1]) {
20
+ const a = e.indexOf("("), n = e.lastIndexOf(")");
21
+ if (a === -1 || n === -1)
22
+ throw new Error(`Invalid rgba format: ${e}`);
23
+ const o = e.slice(a + 1, n).split(",").map((s) => s.trim());
24
+ if (o.length < 3)
25
+ throw new Error(`Invalid rgba format: ${e}`);
26
+ return t[0] = Number.parseInt(o[0], 10) / 255, t[1] = Number.parseInt(o[1], 10) / 255, t[2] = Number.parseInt(o[2], 10) / 255, t[3] = o.length === 4 ? Number.parseInt(o[3], 10) / 255 : 1, t;
27
+ }
28
+ function f(e, t = [0, 0, 0, 1]) {
29
+ const a = e[3];
30
+ return t[0] = r(e[0], a), t[1] = r(e[1], a), t[2] = r(e[2], a), t[3] = 1, t;
31
+ }
32
+ function r(e, t) {
33
+ return e + (1 - e) * (1 - t);
34
+ }
35
+ export {
36
+ l as GET_BLACK,
37
+ f as getColorWithFakeOpacity,
38
+ u as hexRgbaToNumberRgba,
39
+ c as stringRgbaToNumberRgba,
40
+ m as stringToNumberRgba
41
+ };
42
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sources":["../../../../../../node_modules/@milaboratories/miplots4/src/scatterplot-umap/colors.ts"],"sourcesContent":["import { BLACK } from '../constants';\n\nexport function GET_BLACK() {\n\treturn BLACK;\n}\n\nexport function stringToNumberRgba(str: string, out = [0, 0, 0, 1]): [number, number, number, number]/*0...1*/ {\n\tif (str[0] === '#') {\n\t\treturn hexRgbaToNumberRgba(str, out);\n\t}\n\tif (str[0] === 'r') { // rgba or rgb\n\t\treturn stringRgbaToNumberRgba(str, out);\n\t}\n\tthrow new Error(`Unsupported color format: ${str}`);\n}\n\nexport function hexRgbaToNumberRgba(hex: string, out = [0, 0, 0, 1]): [number, number, number, number]/*0...1*/ {\n\thex = hex.replace(/^#/, '');\n\t\n let alpha = 255;\n\n\tif (hex.length === 8) {\n\t\talpha = Number.parseInt(hex.slice(6, 8), 16);\n\t\thex = hex.slice(0, 6);\n\t}\n\n\tif (hex.length === 4) {\n\t\talpha = Number.parseInt(hex.slice(3, 4).repeat(2), 16);\n\t\thex = hex.slice(0, 3);\n\t}\n\n\tif (hex.length === 3) {\n\t\thex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n\t}\n\n\tconst number = Number.parseInt(hex, 16);\n\tout[0] = (number >> 16) / 255;\n\tout[1] = ((number >> 8) & 255) / 255;\n\tout[2] = (number & 255) / 255;\n\tout[3] = alpha / 255;\n\n\treturn out as [number, number, number, number];\n}\n\nexport function stringRgbaToNumberRgba(rgba: string, out = [0, 0, 0, 1]): [number, number, number, number]/*0...1*/ {\n\tconst open = rgba.indexOf('(');\n\tconst close = rgba.lastIndexOf(')');\n\tif (open === -1 || close === -1) {\n\t\tthrow new Error(`Invalid rgba format: ${rgba}`);\n\t}\n\n\tconst parts = rgba.slice(open + 1, close).split(',').map(p => p.trim());\n\tif (parts.length < 3) {\n\t\tthrow new Error(`Invalid rgba format: ${rgba}`);\n\t}\n\n\tout[0] = Number.parseInt(parts[0], 10) / 255;\n\tout[1] = Number.parseInt(parts[1], 10) / 255;\n\tout[2] = Number.parseInt(parts[2], 10) / 255;\n\tout[3] = parts.length === 4 ? (Number.parseInt(parts[3], 10) / 255) : 1;\n\treturn out as [number, number, number, number];\n}\n\nexport function getColorWithFakeOpacity(source: [number, number, number, number], out = [0,0,0,1]): [number, number, number, number]/*0...1*/ {\n const opacity = source[3];\n out[0] = getPercentToWhite(source[0], opacity);\n out[1] = getPercentToWhite(source[1], opacity);\n out[2] = getPercentToWhite(source[2], opacity);\n out[3] = 1;\n return out as [number, number, number, number];\n}\n\nfunction getPercentToWhite(v:number, opacity:number) {\n return v + (1 - v) * (1 - opacity);\n}\n"],"names":["GET_BLACK","BLACK","stringToNumberRgba","str","out","hexRgbaToNumberRgba","stringRgbaToNumberRgba","hex","alpha","number","rgba","open","close","parts","p","getColorWithFakeOpacity","source","opacity","getPercentToWhite","v"],"mappings":";AAEO,SAASA,IAAY;AAC3B,SAAOC;AACR;AAEO,SAASC,EAAmBC,GAAaC,IAAM,CAAC,GAAG,GAAG,GAAG,CAAC,GAA8C;AAC9G,MAAID,EAAI,CAAC,MAAM;AACd,WAAOE,EAAoBF,GAAKC,CAAG;AAEpC,MAAID,EAAI,CAAC,MAAM;AACd,WAAOG,EAAuBH,GAAKC,CAAG;AAEvC,QAAM,IAAI,MAAM,6BAA6BD,CAAG,EAAE;AACnD;AAEO,SAASE,EAAoBE,GAAaH,IAAM,CAAC,GAAG,GAAG,GAAG,CAAC,GAA8C;AAC/GG,EAAAA,IAAMA,EAAI,QAAQ,MAAM,EAAE;AAEvB,MAAIC,IAAQ;AAEXD,EAAAA,EAAI,WAAW,MAClBC,IAAQ,OAAO,SAASD,EAAI,MAAM,GAAG,CAAC,GAAG,EAAE,GAC3CA,IAAMA,EAAI,MAAM,GAAG,CAAC,IAGjBA,EAAI,WAAW,MAClBC,IAAQ,OAAO,SAASD,EAAI,MAAM,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,GACrDA,IAAMA,EAAI,MAAM,GAAG,CAAC,IAGjBA,EAAI,WAAW,MAClBA,IAAMA,EAAI,CAAC,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