@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,72 +1,73 @@
1
- import { j as L } from "../node_modules/react/jsx-runtime.js";
2
- import { Error as K } from "../common/Error.js";
3
- import { DEFAULT_HEIGHT as $, DEFAULT_WIDTH as R, TITLE_LINE_HEIGHT as q, MAX_SHOWN_UNIQUE_VALUES_IN_LABELS as J, BLACK as B, TITLE_MARGIN as Q } from "../constants.js";
4
- import { FACET_TITLE_LINE as Z } from "../discrete/constants.js";
1
+ import { j as b } from "../node_modules/react/jsx-runtime.js";
2
+ import { createRoot as K } from "../node_modules/react-dom/client.js";
3
+ import { Error as Z } from "../common/Error.js";
4
+ import { DataFrameProvider as q } from "../common/useDataFrame.js";
5
+ import { DEFAULT_HEIGHT as $, DEFAULT_WIDTH as R, TITLE_LINE_HEIGHT as J, MAX_SHOWN_UNIQUE_VALUES_IN_LABELS as Q, BLACK as B, TITLE_MARGIN as tt } from "../constants.js";
6
+ import { FACET_TITLE_LINE as et } from "../discrete/constants.js";
5
7
  import { splitTextByWidth as O } from "../discrete/utils/splitTextByWidth.js";
6
- import { PADDINGS as X, MIN_MARGIN as D, DEFAULT_DOT_AES as _, LEGEND_OFFSET as tt, TICK_OFFSET as G, DEFAULT_TICKS_SIZE as V, MIN_PADDING as H, FACET_TITLE_OFFSET as et, FACET_AXIS_OFFSET as k, TITLE_LINE as P } from "./constants.js";
7
- import { createAesGetter as Y } from "./utils/createAesGetter.js";
8
- import { getTicksAndFormat as it } from "./utils/getTicksAndFormat.js";
9
- import { isContinuousAes as j } from "../types/common.js";
8
+ import { isContinuousAes as V } from "../types/common.js";
10
9
  import "../types/discrete.js";
11
10
  import "../types/scatterplot.js";
12
11
  import "../types/heatmap.js";
13
12
  import "../types/dendro.js";
14
13
  import "../types/histogram.js";
15
14
  import "../types/bubble.js";
15
+ import { arrangeLegendParts as it } from "../utils/arrangeLegendParts.js";
16
16
  import { getContinuousColorScale as st } from "../utils/getContinuousColorScale.js";
17
17
  import { getContinuousLegendTicks as at } from "../utils/getContinuousLegendTicks.js";
18
- import { TextMeasurer as ot } from "../utils/TextMeasurer.js";
19
- import { createRoot as nt } from "../node_modules/react-dom/client.js";
20
- import { ChartsGroup as rt } from "./components/ChartsGroup.js";
21
- import { arrangeLegendParts as ht } from "../utils/arrangeLegendParts.js";
22
- import W from "../node_modules/d3-scale/src/linear.js";
18
+ import { TextMeasurer as ot } from "../utils/TextMeasurer/TextMeasurer.js";
19
+ import { ChartsGroup as nt } from "./components/ChartsGroup.js";
20
+ import { PADDINGS as X, MIN_MARGIN as D, DEFAULT_DOT_AES as W, LEGEND_OFFSET as rt, TICK_OFFSET as G, DEFAULT_TICKS_SIZE as k, MIN_PADDING as H, FACET_TITLE_OFFSET as ht, FACET_AXIS_OFFSET as P, TITLE_LINE as j } from "./constants.js";
21
+ import { createAesGetter as Y } from "./utils/createAesGetter.js";
22
+ import { getTicksAndFormat as lt } from "./utils/getTicksAndFormat.js";
23
+ import L from "../node_modules/d3-scale/src/linear.js";
23
24
  import U from "../node_modules/d3-scale/src/log.js";
24
- import lt from "../node_modules/d3-scale/src/ordinal.js";
25
- import ct from "../node_modules/d3-scale/src/symlog.js";
26
- import { sqrt as mt } from "../node_modules/d3-scale/src/pow.js";
27
- var dt = Object.defineProperty, ut = (r, t, e) => t in r ? dt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, v = (r, t, e) => ut(r, typeof t != "symbol" ? t + "" : t, e);
28
- function pt(r, t, e, i) {
29
- const s = [];
30
- return r % e === e - 1 && s.push("right"), r % e === 0 && s.push("left"), r < e && s.push("top"), (Math.ceil((r + 1) / e) === i || Math.ceil((r + 1) / e) === i - 1 && r % e > (t - 1) % e) && s.push("bottom"), s;
25
+ import ct from "../node_modules/d3-scale/src/ordinal.js";
26
+ import mt from "../node_modules/d3-scale/src/symlog.js";
27
+ import { sqrt as dt } from "../node_modules/d3-scale/src/pow.js";
28
+ var ut = Object.defineProperty, pt = (h, t, e) => t in h ? ut(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e, E = (h, t, e) => pt(h, typeof t != "symbol" ? t + "" : t, e);
29
+ function gt(h, t, e, s) {
30
+ const i = [];
31
+ return h % e === e - 1 && i.push("right"), h % e === 0 && i.push("left"), h < e && i.push("top"), (Math.ceil((h + 1) / e) === s || Math.ceil((h + 1) / e) === s - 1 && h % e > (t - 1) % e) && i.push("bottom"), i;
31
32
  }
32
- function gt(r, t, e, i, s, o, u) {
33
- const p = o.includes("left") || !(u != null && u.sharedY), y = o.includes("left") && t.title !== "", F = o.includes("bottom") || !(u != null && u.sharedX), N = o.includes("bottom") && r.title !== "", h = e.yAxisCaptionsWidth + 2 * G, a = (t.showTicks ? V : 0) + G, d = y ? P + H : 0, T = e.xAxisCaptionsWidth + 2 * G, z = r.showTicks ? V : 0, l = N ? P + H : 0, c = h + a + d + k, f = T + z + l + k, x = Math.max(...i.map((m) => s[m].length));
33
+ function ft(h, t, e, s, i, a, m) {
34
+ const g = a.includes("left") || !(m != null && m.sharedY), M = a.includes("left") && t.title !== "", F = a.includes("bottom") || !(m != null && m.sharedX), N = a.includes("bottom") && h.title !== "", n = e.yAxisCaptionsWidth + 2 * G, o = (t.showTicks ? k : 0) + G, d = M ? j + H : 0, T = e.xAxisCaptionsWidth + 2 * G, z = h.showTicks ? k : 0, c = N ? j + H : 0, l = n + o + d + P, f = T + z + c + P, C = Math.max(...s.map((u) => i[u].length));
34
35
  return {
35
- left: p ? c : H,
36
- top: x === 0 ? 0 : et * 2 + x * Z,
36
+ left: g ? l : H,
37
+ top: C === 0 ? 0 : ht * 2 + C * et,
37
38
  bottom: F ? f + 8 : H,
38
39
  right: H
39
40
  };
40
41
  }
41
- function ft(r, t, e) {
42
- const i = [];
43
- for (let s = 0; s < t; s++)
44
- i.push(r.slice(s * e, s * e + e));
45
- return i;
42
+ function St(h, t, e) {
43
+ const s = [];
44
+ for (let i = 0; i < t; i++)
45
+ s.push(h.slice(i * e, i * e + e));
46
+ return s;
46
47
  }
47
- function St(r, t) {
48
- const e = Math.floor(r / t), i = r - e * t;
49
- return [e, i];
48
+ function Tt(h, t) {
49
+ const e = Math.floor(h / t), s = h - e * t;
50
+ return [e, s];
50
51
  }
51
- function xt(r, t, e) {
52
- const i = t.find((o) => o.type === "dots"), s = t.find((o) => o.type === "curve");
52
+ function xt(h, t, e, s) {
53
+ const i = e.find((m) => m.type === "dots"), a = e.find((m) => m.type === "curve");
53
54
  return {
54
- dotShape: Y(r, (i == null ? void 0 : i.aes.dotShape) ?? _.shape, "dotShape"),
55
- dotColor: Y(r, (i == null ? void 0 : i.aes.dotFill) ?? _.color, "dotFill"),
56
- dotSize: Y(r, (i == null ? void 0 : i.aes.dotSize) ?? _.size, "dotSize"),
57
- lineShape: Y(r, (s == null ? void 0 : s.aes.lineShape) ?? "solid", "lineShape"),
58
- lineColor: Y(r, (s == null ? void 0 : s.aes.lineColor) ?? B, "lineColor"),
59
- trendColor: Y(r, (e == null ? void 0 : e.color) ?? _.color, "fillColor")
55
+ dotShape: Y(h, t, (i == null ? void 0 : i.aes.dotShape) ?? W.shape, "dotShape"),
56
+ dotColor: Y(h, t, (i == null ? void 0 : i.aes.dotFill) ?? W.color, "dotFill"),
57
+ dotSize: Y(h, t, (i == null ? void 0 : i.aes.dotSize) ?? W.size, "dotSize"),
58
+ lineShape: Y(h, t, (a == null ? void 0 : a.aes.lineShape) ?? "solid", "lineShape"),
59
+ lineColor: Y(h, t, (a == null ? void 0 : a.aes.lineColor) ?? B, "lineColor"),
60
+ trendColor: Y(h, t, (s == null ? void 0 : s.color) ?? W.color, "fillColor")
60
61
  };
61
62
  }
62
- class Pt {
63
+ class Ut {
63
64
  constructor() {
64
- v(this, "reactRoot", null), v(this, "parentNode", null), v(this, "rootNode", null), v(this, "component", /* @__PURE__ */ L.jsx(L.Fragment, {})), v(this, "margins", {
65
+ E(this, "reactRoot", null), E(this, "parentNode", null), E(this, "rootNode", null), E(this, "component", /* @__PURE__ */ b.jsx(b.Fragment, {})), E(this, "margins", {
65
66
  top: D,
66
67
  bottom: D,
67
68
  left: D,
68
69
  right: D
69
- }), v(this, "chartsDimensions", {}), v(this, "chartSizes", {
70
+ }), E(this, "chartsDimensions", {}), E(this, "chartSizes", {
70
71
  chartWidth: R,
71
72
  // width of single chart
72
73
  chartHeight: $,
@@ -79,13 +80,13 @@ class Pt {
79
80
  // width of all charts in charts row, plus left axis, plus legend
80
81
  totalHeight: $
81
82
  // width of all charts in charts height, plus bottom axis, plus top title
82
- }), v(this, "columnsCount", 1), v(this, "rowsCount", 1), v(this, "scales", {
83
- x: { null: W().domain([0, 10]).range([0, R]) },
84
- y: { null: W().domain([0, 10]).range([$, 0]) }
85
- }), v(this, "captionsSizes", {
83
+ }), E(this, "columnsCount", 1), E(this, "rowsCount", 1), E(this, "scales", {
84
+ x: { null: L().domain([0, 10]).range([0, R]) },
85
+ y: { null: L().domain([0, 10]).range([$, 0]) }
86
+ }), E(this, "captionsSizes", {
86
87
  xAxisCaptionsWidth: 30,
87
88
  yAxisCaptionsWidth: 100
88
- }), v(this, "facetTitles", {}), v(this, "mainTitle", []), v(this, "legend", { width: 0, height: 0, items: [] });
89
+ }), E(this, "facetTitles", {}), E(this, "mainTitle", []), E(this, "legend", { width: 0, height: 0, items: [] });
89
90
  }
90
91
  clear() {
91
92
  var t;
@@ -95,125 +96,129 @@ class Pt {
95
96
  });
96
97
  }
97
98
  init(t) {
98
- this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot = nt(this.rootNode));
99
+ this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot = K(this.rootNode));
99
100
  }
100
101
  updateChartSizes(t) {
101
102
  this.chartSizes.chartWidth = t.width, this.chartSizes.chartHeight = t.height;
102
103
  }
103
- updateChartDimensions(t, e, i, s) {
104
- const { chartWidth: o, chartHeight: u } = this.chartSizes;
105
- let p = 0, y = 0;
106
- this.chartsDimensions = t.reduce((h, a, d) => {
107
- const [T, z] = St(d, this.columnsCount), l = pt(d, t.length, this.columnsCount, this.rowsCount), c = gt(
108
- i,
104
+ updateChartDimensions(t, e, s, i) {
105
+ const { chartWidth: a, chartHeight: m } = this.chartSizes;
106
+ let g = 0, M = 0;
107
+ this.chartsDimensions = t.reduce((n, o, d) => {
108
+ const [T, z] = Tt(d, this.columnsCount), c = gt(d, t.length, this.columnsCount, this.rowsCount), l = ft(
109
109
  s,
110
+ i,
110
111
  this.captionsSizes,
111
- ft(t, this.rowsCount, this.columnsCount)[T],
112
+ St(t, this.rowsCount, this.columnsCount)[T],
112
113
  this.facetTitles,
113
- l,
114
+ c,
114
115
  e
115
- ), f = o + c.left + c.right, x = u + c.top + c.bottom;
116
- return h[a] = {
117
- left: p,
118
- top: y,
119
- chartEdgeSides: l,
120
- padding: c,
121
- inner: { width: o, height: u },
122
- outer: { width: f, height: x }
123
- }, p += f, z === this.columnsCount - 1 && (p = 0, y += x), h;
116
+ ), f = a + l.left + l.right, C = m + l.top + l.bottom;
117
+ return n[o] = {
118
+ left: g,
119
+ top: M,
120
+ chartEdgeSides: c,
121
+ padding: l,
122
+ inner: { width: a, height: m },
123
+ outer: { width: f, height: C }
124
+ }, g += f, z === this.columnsCount - 1 && (g = 0, M += C), n;
124
125
  }, {});
125
126
  const F = Math.max(
126
- ...t.map((h) => this.chartsDimensions[h].outer.width + this.chartsDimensions[h].left)
127
+ ...t.map((n) => this.chartsDimensions[n].outer.width + this.chartsDimensions[n].left)
127
128
  ), N = Math.max(
128
- ...t.map((h) => this.chartsDimensions[h].outer.height + this.chartsDimensions[h].top)
129
+ ...t.map((n) => this.chartsDimensions[n].outer.height + this.chartsDimensions[n].top)
129
130
  );
130
131
  this.chartSizes.chartsWidth = F, this.chartSizes.chartsHeight = N;
131
132
  }
132
- updateViewport(t, e, i, s, o, u) {
133
- const p = t.length, y = Math.min(e.nRows ?? p, p), F = Math.min(e.nCols ?? p, p);
134
- this.columnsCount = e.nRows ? Math.ceil(p / y) : F, this.rowsCount = Math.ceil(p / this.columnsCount);
135
- let [N, h] = [1 / 0, -1 / 0], [a, d] = [1 / 0, -1 / 0];
136
- const T = t.reduce((m, n) => {
137
- const E = o[n], { minX: g, minY: S, maxX: A, maxY: w } = E;
138
- return N = Math.min(N, g), a = Math.min(a, S), h = Math.max(h, A), d = Math.max(d, w), m[n] = { minX: g, maxX: A, minY: S, maxY: w }, m;
139
- }, {}), z = {}, l = {};
140
- let c = !1, f = !1;
141
- t.forEach((m) => {
142
- const n = i.scale === "log" ? U() : W(), E = T[m];
143
- let g = i.lowerValue ? Number(i.lowerValue) : e.sharedX ? N : E.minX, S = i.upperValue ? Number(i.upperValue) : e.sharedX ? h : E.maxX;
144
- if (typeof i.symmetricRange < "u") {
145
- const M = i.symmetricRange;
146
- if (M >= g && M <= S) {
147
- const C = Math.max(M - g, S - M);
148
- g = M - C, S = M + C;
133
+ updateViewport(t, e, s, i, a, m) {
134
+ const g = t.length, M = Math.min(e.nRows ?? g, g), F = Math.min(e.nCols ?? g, g);
135
+ this.columnsCount = e.nRows ? Math.ceil(g / M) : F, this.rowsCount = Math.ceil(g / this.columnsCount);
136
+ let [N, n] = [1 / 0, -1 / 0], [o, d] = [1 / 0, -1 / 0];
137
+ const T = t.reduce((u, r) => {
138
+ const w = a[r], { minX: p, minY: S, maxX: A, maxY: y } = w;
139
+ return N = Math.min(N, p), o = Math.min(o, S), n = Math.max(n, A), d = Math.max(d, y), u[r] = { minX: p, maxX: A, minY: S, maxY: y }, u;
140
+ }, {}), z = {}, c = {};
141
+ let l = !1, f = !1;
142
+ t.forEach((u) => {
143
+ const r = s.scale === "log" ? U() : L(), w = T[u];
144
+ let p = s.lowerValue ? Number(s.lowerValue) : e.sharedX ? N : w.minX, S = s.upperValue ? Number(s.upperValue) : e.sharedX ? n : w.maxX;
145
+ if (typeof s.symmetricRange < "u") {
146
+ const v = s.symmetricRange;
147
+ if (v >= p && v <= S) {
148
+ const x = Math.max(v - p, S - v);
149
+ p = v - x, S = v + x;
149
150
  }
150
151
  }
151
- const A = [0, this.chartSizes.chartWidth], w = n.copy().domain([g, S]).range([X.LEFT, this.chartSizes.chartWidth - X.RIGHT]);
152
- n.domain([w.invert(0), w.invert(this.chartSizes.chartWidth)]).range(A).nice();
153
- const I = this.scales.x[m];
154
- if (I && !c) {
155
- const M = I.domain(), C = I.domain();
156
- (M[0] !== n.domain()[0] || M[1] !== n.domain()[1] || C[0] !== n.range()[0] || C[1] !== n.range()[1]) && (c = !0);
152
+ const A = [0, this.chartSizes.chartWidth], y = r.copy().domain([p, S]).range([X.LEFT, this.chartSizes.chartWidth - X.RIGHT]);
153
+ r.domain([y.invert(0), y.invert(this.chartSizes.chartWidth)]).range(A).nice();
154
+ const I = this.scales.x[u];
155
+ if (I === void 0)
156
+ l = !0;
157
+ else if (!l) {
158
+ const v = I.domain(), x = I.range();
159
+ (v[0] !== r.domain()[0] || v[1] !== r.domain()[1] || x[0] !== r.range()[0] || x[1] !== r.range()[1]) && (l = !0);
157
160
  }
158
- z[m] = n;
161
+ z[u] = r;
159
162
  });
160
- const x = t.reduce((m, n) => {
161
- const E = u ? u[n] : [];
162
- return m[n] = E.reduce(
163
- (g, S) => {
164
- const A = S.bounded ? S.xBounds : this.scales.x[n].domain(), w = S.getInterval(A[0]), I = S.getInterval(A[1]);
165
- return g.minY = Math.min(g.minY, isNaN(w.left) ? g.minY : w.left, isNaN(I.left) ? g.minY : I.left), g.maxY = Math.max(g.maxY, isNaN(w.right) ? g.maxY : w.right, isNaN(I.right) ? g.maxY : I.right), g;
163
+ const C = t.reduce((u, r) => {
164
+ const w = m ? m[r] : [];
165
+ return u[r] = w.reduce(
166
+ (p, S) => {
167
+ const A = S.bounded ? S.xBounds : this.scales.x[r].domain(), y = S.getInterval(A[0]), I = S.getInterval(A[1]);
168
+ return p.minY = Math.min(p.minY, isNaN(y.left) ? p.minY : y.left, isNaN(I.left) ? p.minY : I.left), p.maxY = Math.max(p.maxY, isNaN(y.right) ? p.maxY : y.right, isNaN(I.right) ? p.maxY : I.right), p;
166
169
  },
167
170
  { minY: 1 / 0, maxY: -1 / 0 }
168
- ), a = Math.min(a, m[n].minY), d = Math.max(d, m[n].maxY), m;
171
+ ), o = Math.min(o, u[r].minY), d = Math.max(d, u[r].maxY), u;
169
172
  }, {});
170
- t.forEach((m) => {
171
- const n = s.scale === "log" ? U() : W(), E = T[m], g = x[m];
172
- let S = s.lowerValue ? Number(s.lowerValue) : e.sharedY ? a : Math.min(E.minY, g.minY), A = s.upperValue ? Number(s.upperValue) : e.sharedY ? d : Math.max(E.maxY, g.maxY);
173
- if (typeof s.symmetricRange < "u") {
174
- const C = s.symmetricRange;
175
- if (C >= S && C <= A) {
176
- const b = Math.max(C - S, A - C);
177
- S = C - b, A = C + b;
173
+ t.forEach((u) => {
174
+ const r = i.scale === "log" ? U() : L(), w = T[u], p = C[u];
175
+ let S = i.lowerValue ? Number(i.lowerValue) : e.sharedY ? o : Math.min(w.minY, p.minY), A = i.upperValue ? Number(i.upperValue) : e.sharedY ? d : Math.max(w.maxY, p.maxY);
176
+ if (typeof i.symmetricRange < "u") {
177
+ const x = i.symmetricRange;
178
+ if (x >= S && x <= A) {
179
+ const _ = Math.max(x - S, A - x);
180
+ S = x - _, A = x + _;
178
181
  }
179
182
  }
180
- const w = [this.chartSizes.chartHeight, 0], I = n.copy().domain([S, A]).range([this.chartSizes.chartHeight - X.BOTTOM, X.TOP]);
181
- n.domain([I.invert(this.chartSizes.chartHeight), I.invert(0)]).range(w).nice();
182
- const M = this.scales.y[m];
183
- if (M && !f) {
184
- const C = M.domain(), b = M.domain();
185
- (C[0] !== n.domain()[0] || C[1] !== n.domain()[1] || b[0] !== n.range()[0] || b[1] !== n.range()[1]) && (f = !0);
183
+ const y = [this.chartSizes.chartHeight, 0], I = r.copy().domain([S, A]).range([this.chartSizes.chartHeight - X.BOTTOM, X.TOP]);
184
+ r.domain([I.invert(this.chartSizes.chartHeight), I.invert(0)]).range(y).nice();
185
+ const v = this.scales.y[u];
186
+ if (v === void 0)
187
+ f = !0;
188
+ else if (!f) {
189
+ const x = v.domain(), _ = v.range();
190
+ (x[0] !== r.domain()[0] || x[1] !== r.domain()[1] || _[0] !== r.range()[0] || _[1] !== r.range()[1]) && (f = !0);
186
191
  }
187
- l[m] = n;
188
- }), c && (this.scales.x = z), f && (this.scales.y = l);
192
+ c[u] = r;
193
+ }), l && (this.scales.x = z), f && (this.scales.y = c);
189
194
  }
190
195
  updateCaptionsSize(t) {
191
196
  const e = new ot("600 14px Arial");
192
- let i = 0;
193
- function s(o) {
194
- return Math.max(...o.map((u) => e.getTextWidth(u)));
197
+ let s = 0;
198
+ function i(a) {
199
+ return Math.max(...a.map((m) => e.getTextWidth(m)));
195
200
  }
196
- Object.values(this.scales.y).forEach((o) => {
197
- const { ticks: u, format: p } = it(o, t);
198
- i = Math.max(i, s(u.map(p)));
201
+ Object.values(this.scales.y).forEach((a) => {
202
+ const { ticks: m, format: g } = lt(a, t);
203
+ s = Math.max(s, i(m.map(g)));
199
204
  }), this.captionsSizes = {
200
205
  xAxisCaptionsWidth: 20,
201
- yAxisCaptionsWidth: i
206
+ yAxisCaptionsWidth: s
202
207
  };
203
208
  }
204
209
  createMainTitle(t, e) {
205
- const i = this.chartsDimensions[t[0]], s = this.chartsDimensions[t[t.length - 1]];
210
+ const s = this.chartsDimensions[t[0]], i = this.chartsDimensions[t[t.length - 1]];
206
211
  this.mainTitle = O(
207
212
  e.name,
208
- this.chartSizes.chartsWidth - i.padding.left - s.padding.right,
213
+ this.chartSizes.chartsWidth - s.padding.left - i.padding.right,
209
214
  20
210
215
  );
211
216
  }
212
217
  createFacetTitles(t, e) {
213
- this.facetTitles = t.reduce((i, s, o) => (e[o].length === 1 && e[o][0] === "null" ? i[s] = [] : i[s] = O(e[o].join(", "), this.chartSizes.chartWidth, 14), i), {});
218
+ this.facetTitles = t.reduce((s, i, a) => (e[a].length === 1 && e[a][0] === "null" ? s[i] = [] : s[i] = O(e[a].join(", "), this.chartSizes.chartWidth, 14), s), {});
214
219
  }
215
220
  updateMargins() {
216
- const t = q * this.mainTitle.length, e = t > 0 ? t + Q * 2 : 0;
221
+ const t = J * this.mainTitle.length, e = t > 0 ? t + tt * 2 : 0;
217
222
  this.margins = {
218
223
  top: Math.max(e, D),
219
224
  bottom: D,
@@ -221,86 +226,85 @@ class Pt {
221
226
  right: this.legend.width + D
222
227
  }, this.chartSizes.totalWidth = this.margins.left + this.chartSizes.chartsWidth + this.margins.right, this.chartSizes.totalHeight = this.margins.top + Math.max(this.chartSizes.chartsHeight, this.legend.height) + this.margins.bottom;
223
228
  }
224
- updateLegendSize(t, e, i, s) {
229
+ updateLegendSize(t, e, s, i) {
225
230
  if (!t.show) {
226
231
  this.legend = { width: 0, height: 0, items: [] };
227
232
  return;
228
233
  }
229
- const o = [], u = { width: 0, height: 0, left: 0, top: 0 };
230
- if (i.forEach((h) => {
231
- const a = e[h.value];
232
- if (a.usedAes.length === 0 || !a.aesMap)
234
+ const a = [], m = { width: 0, height: 0, left: 0, top: 0 };
235
+ if (s.forEach((n) => {
236
+ const o = e[n.value];
237
+ if (o.usedAes.length === 0 || !o.aesMap)
233
238
  return;
234
- if (a.values.length > J) {
235
- console.warn(`Too many values for discrete legend (${a.values.length})`);
239
+ if (o.values.length > Q) {
240
+ console.warn(`Too many values for discrete legend (${o.values.length})`);
236
241
  return;
237
242
  }
238
243
  const d = {};
239
- a.values.forEach((l) => {
240
- d[l] || (d[l] = { ..._ }), a.usedAes.forEach((c) => {
241
- var f, x, m;
242
- (c === "dotFill" || c === "lineColor") && (d[l].color = ((f = a.aesMap[l]) == null ? void 0 : f[c]) ?? B), c === "dotShape" && (d[l].shape = ((x = a.aesMap[l]) == null ? void 0 : x[c]) ?? "21"), c === "dotSize" && (d[l].size = ((m = a.aesMap[l]) == null ? void 0 : m[c]) ?? 3);
244
+ o.values.forEach((c) => {
245
+ d[c] || (d[c] = { ...W }), o.usedAes.forEach((l) => {
246
+ (l === "dotFill" || l === "lineColor") && (d[c].color = o.aesMap(c, l) ?? B), l === "dotShape" && (d[c].shape = o.aesMap(c, l) ?? "21"), l === "dotSize" && (d[c].size = o.aesMap(c, l) ?? 3);
243
247
  });
244
248
  });
245
- const T = h.label ?? h.value, z = lt().domain(a.values).range(a.values.map((l) => d[l])).unknown(_);
246
- o.push({ ...u, id: h.value, type: "dots", title: T, scale: z, values: a.values, labels: a.labels });
247
- }), s.forEach((h) => {
248
- if (h.type === "dots" && j(h.aes.dotFill)) {
249
- const { domain: a, range: d, columnName: T, type: z = "linear" } = h.aes.dotFill, l = T.label ?? T.value, c = st(d, a, "linear"), f = (z === "log" ? ct() : W()).domain(a).range([this.chartSizes.chartHeight, 0]), x = at(f, a);
250
- o.push({ ...u, id: "dotFill", type: "continuous", title: l, scale: c, tickPositionScale: f, values: x });
249
+ const T = n.label ?? n.value, z = ct().domain(o.values).range(o.values.map((c) => d[c])).unknown(W);
250
+ a.push({ ...m, id: n.value, type: "dots", title: T, scale: z, values: o.values, labels: o.labels });
251
+ }), i.forEach((n) => {
252
+ if (n.type === "dots" && V(n.aes.dotFill)) {
253
+ const { domain: o, range: d, columnName: T, type: z = "linear" } = n.aes.dotFill, c = T.label ?? T.value, l = st(d, o, "linear"), f = (z === "log" ? mt() : L()).domain(o).range([this.chartSizes.chartHeight, 0]), C = at(f, o);
254
+ a.push({ ...m, id: "dotFill", type: "continuous", title: c, scale: l, tickPositionScale: f, values: C });
251
255
  }
252
- if (h.type === "dots" && j(h.aes.dotSize)) {
253
- const { columnName: a, domain: d, range: T } = h.aes.dotSize, z = a.label ?? a.value, l = mt(d, T), c = l.ticks(3), f = l.tickFormat(3), x = c.reduce((m, n) => (m[String(n)] = f(n), m), {});
254
- o.push({ ...u, id: a.value, type: "size", title: z, scale: l, values: c, labels: x });
256
+ if (n.type === "dots" && V(n.aes.dotSize)) {
257
+ const { columnName: o, domain: d, range: T } = n.aes.dotSize, z = o.label ?? o.value, c = dt(d, T), l = c.ticks(3), f = c.tickFormat(3), C = l.reduce((u, r) => (u[String(r)] = f(r), u), {});
258
+ a.push({ ...m, id: o.value, type: "size", title: z, scale: c, values: l, labels: C });
255
259
  }
256
- }), !o.length) {
260
+ }), !a.length) {
257
261
  this.legend = { width: 0, height: 0, items: [] };
258
262
  return;
259
263
  }
260
- const p = ht(o, this.chartSizes.chartHeight), y = p[p.length - 1], F = y.left + y.width + tt, N = this.chartSizes.chartHeight;
264
+ const g = it(a, this.chartSizes.chartHeight), M = g[g.length - 1], F = M.left + M.width + rt, N = this.chartSizes.chartHeight;
261
265
  this.legend = {
262
266
  width: F,
263
267
  height: N,
264
- items: p
268
+ items: g
265
269
  };
266
270
  }
267
- render(t, e, i, s, o, u, p, y, F, N, h, a, d, T, z) {
271
+ render(t, e, s, i, a, m, g, M, F, N, n, o, d, T, z, c) {
268
272
  var l;
269
- const { xAxis: c, yAxis: f, size: x, title: m, legend: n } = e;
270
- this.updateChartSizes(x), this.updateViewport(s, i, c, f, u, p), this.updateCaptionsSize(F.y), this.createFacetTitles(s, o), this.updateChartDimensions(s, i, c, f), this.updateLegendSize(n, N, a, d), this.createMainTitle(s, m), this.updateMargins();
271
- const E = /* @__PURE__ */ L.jsx(
272
- rt,
273
+ const { xAxis: f, yAxis: C, size: u, title: r, legend: w } = s;
274
+ this.updateChartSizes(u), this.updateViewport(a, i, f, C, g, M), this.updateCaptionsSize(N.y), this.createFacetTitles(a, m), this.updateChartDimensions(a, i, f, C), this.updateLegendSize(w, n, d, T), this.createMainTitle(a, r), this.updateMargins();
275
+ const p = /* @__PURE__ */ b.jsx(q, { dataFrame: t, children: /* @__PURE__ */ b.jsx(
276
+ nt,
273
277
  {
274
- settingsId: t,
275
- chartSettings: e,
276
- facetKeys: s,
278
+ settingsId: e,
279
+ chartSettings: s,
280
+ facetKeys: a,
277
281
  facetSettings: i,
278
282
  chartSizes: this.chartSizes,
279
283
  chartsDimensions: this.chartsDimensions,
280
284
  scales: this.scales,
281
- groupedDots: u,
282
- trendsData: p,
285
+ groupedDots: g,
286
+ trendsData: M,
283
287
  legendData: this.legend,
284
288
  columnsCount: this.columnsCount,
285
289
  margins: this.margins,
286
- keyColumn: y,
290
+ keyColumn: F,
287
291
  mainTitle: this.mainTitle,
288
292
  facetTitles: this.facetTitles,
289
293
  captionsSizes: this.captionsSizes,
290
- onlyPositive: F,
291
- layersData: h,
292
- aesGetters: xt(N, d, T),
293
- onTooltipHintSwitch: z
294
+ onlyPositive: N,
295
+ layersData: o,
296
+ aesGetters: xt(t, n, T, z),
297
+ onTooltipHintSwitch: c
294
298
  }
295
- );
296
- this.component = E, (l = this.reactRoot) == null || l.render(E);
299
+ ) });
300
+ this.component = p, (l = this.reactRoot) == null || l.render(p);
297
301
  }
298
302
  renderError(t) {
299
303
  var e;
300
- (e = this.reactRoot) == null || e.render(/* @__PURE__ */ L.jsx(K, { message: t }));
304
+ (e = this.reactRoot) == null || e.render(/* @__PURE__ */ b.jsx(Z, { message: t }));
301
305
  }
302
306
  }
303
307
  export {
304
- Pt as default
308
+ Ut as default
305
309
  };
306
310
  //# sourceMappingURL=ChartRenderer.js.map