@milaboratories/graph-maker 1.1.141 → 1.1.143

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 (132) hide show
  1. package/dist/GraphMaker/components/LassoControls/index.vue.js +1 -1
  2. package/dist/GraphMaker/components/ReorderForm.vue.d.ts +15 -0
  3. package/dist/GraphMaker/components/ReorderForm.vue.d.ts.map +1 -0
  4. package/dist/GraphMaker/components/ReorderForm.vue.js +43 -0
  5. package/dist/GraphMaker/components/ReorderForm.vue.js.map +1 -0
  6. package/dist/GraphMaker/components/ReorderForm.vue2.js +5 -0
  7. package/dist/GraphMaker/components/ReorderForm.vue2.js.map +1 -0
  8. package/dist/GraphMaker/constantsCommon.d.ts +23 -0
  9. package/dist/GraphMaker/constantsCommon.d.ts.map +1 -1
  10. package/dist/GraphMaker/constantsCommon.js +97 -83
  11. package/dist/GraphMaker/constantsCommon.js.map +1 -1
  12. package/dist/GraphMaker/forms/AxesSettingsForm/DiscreteAxesSettingsForm.vue.js.map +1 -1
  13. package/dist/GraphMaker/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.d.ts.map +1 -1
  14. package/dist/GraphMaker/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js +305 -172
  15. package/dist/GraphMaker/forms/AxesSettingsForm/ScatterplotAxesSettingsForm.vue.js.map +1 -1
  16. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts +3 -0
  17. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.d.ts.map +1 -0
  18. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js +90 -0
  19. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue.js.map +1 -0
  20. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue2.js +5 -0
  21. package/dist/GraphMaker/forms/LayersForm/Layer/discrete/StackedArea.vue2.js.map +1 -0
  22. package/dist/GraphMaker/forms/LayersForm/index.vue.d.ts.map +1 -1
  23. package/dist/GraphMaker/forms/LayersForm/index.vue.js +45 -43
  24. package/dist/GraphMaker/forms/LayersForm/index.vue.js.map +1 -1
  25. package/dist/GraphMaker/index.vue.d.ts.map +1 -1
  26. package/dist/GraphMaker/index.vue.js +33 -34
  27. package/dist/GraphMaker/index.vue.js.map +1 -1
  28. package/dist/GraphMaker/types.d.ts +1 -1
  29. package/dist/GraphMaker/types.d.ts.map +1 -1
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +3 -3
  31. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts.map +1 -1
  32. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +9 -9
  33. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts.map +1 -1
  34. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +21 -11
  35. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  36. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +3 -3
  37. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts.map +1 -1
  38. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +1 -1
  39. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +31 -5
  40. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  41. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +56 -53
  42. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
  43. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +1 -7
  44. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
  45. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +13 -13
  46. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
  47. package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.d.ts +6 -4
  48. package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.d.ts.map +1 -1
  49. package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.js +42 -13
  50. package/dist/GraphMaker/utils/createChartSettingsForRender/getAxesDataFromForms.js.map +1 -1
  51. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.d.ts.map +1 -1
  52. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js +84 -70
  53. package/dist/GraphMaker/utils/createChartSettingsForRender/getLayersDataFromForms.js.map +1 -1
  54. package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
  55. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +48 -44
  56. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
  57. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +1 -1
  58. package/dist/node_modules/@milaboratories/miplots4/dist/{discrete/components → common}/BandAxis.js +3 -3
  59. package/dist/node_modules/@milaboratories/miplots4/dist/common/BandAxis.js.map +1 -0
  60. package/dist/node_modules/@milaboratories/miplots4/dist/common/ContinuousGrid.js.map +1 -1
  61. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/ChartRenderer.js +14 -14
  62. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +197 -270
  63. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js.map +1 -1
  64. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js +182 -161
  65. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/DiscreteSettingsImpl.js.map +1 -1
  66. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/Chart.js +121 -104
  67. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/Chart.js.map +1 -1
  68. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/ChartsGroup.js +4 -4
  69. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/Grid.js.map +1 -1
  70. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedAreaElement.js +105 -0
  71. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedAreaElement.js.map +1 -0
  72. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedBarElement.js +66 -59
  73. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/layers/StackedBarElement.js.map +1 -1
  74. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +61 -58
  75. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
  76. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedArea.js +17 -0
  77. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/layers/stackedArea.js.map +1 -0
  78. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/ChartRenderer.js +1 -1
  79. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-scale/src/band.js +44 -34
  80. package/dist/node_modules/@milaboratories/miplots4/dist/node_modules/d3-scale/src/band.js.map +1 -1
  81. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js +272 -195
  82. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ChartRenderer.js.map +1 -1
  83. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +23 -23
  84. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
  85. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js +54 -50
  86. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Chart.js.map +1 -1
  87. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxis.js +32 -28
  88. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartAxis.js.map +1 -1
  89. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartLayersData.js.map +1 -1
  90. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTooltip.js.map +1 -1
  91. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js +29 -26
  92. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
  93. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js +44 -41
  94. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/ChartsGroup.js.map +1 -1
  95. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Grid.js +31 -27
  96. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Grid.js.map +1 -1
  97. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
  98. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +29 -18
  99. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
  100. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +71 -57
  101. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
  102. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/linearRegression.js.map +1 -1
  103. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/isNumericScale.js +11 -0
  104. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/isNumericScale.js.map +1 -0
  105. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js +10 -10
  106. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
  107. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
  108. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js +6 -6
  109. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
  110. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js +35 -25
  111. package/dist/node_modules/@milaboratories/miplots4/dist/types/common.js.map +1 -1
  112. package/dist/node_modules/@milaboratories/miplots4/dist/types/dendro.js +3 -3
  113. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js +51 -36
  114. package/dist/node_modules/@milaboratories/miplots4/dist/types/discrete.js.map +1 -1
  115. package/dist/node_modules/@milaboratories/miplots4/dist/types/heatmap.js +6 -6
  116. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +7 -7
  117. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
  118. package/dist/node_modules/@milaboratories/miplots4/dist/utils/createMultilineDiscreteLabels.js +32 -0
  119. package/dist/node_modules/@milaboratories/miplots4/dist/utils/createMultilineDiscreteLabels.js.map +1 -0
  120. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetRowsColumns.js +18 -0
  121. package/dist/node_modules/@milaboratories/miplots4/dist/utils/getFacetRowsColumns.js.map +1 -0
  122. package/dist/node_modules/@milaboratories/miplots4/dist/utils/measureMultilineDiscreteLabels.js +63 -0
  123. package/dist/node_modules/@milaboratories/miplots4/dist/utils/measureMultilineDiscreteLabels.js.map +1 -0
  124. package/dist/node_modules/@milaboratories/miplots4/dist/{discrete/utils → utils}/splitTextByWidth.js +1 -1
  125. package/dist/node_modules/@milaboratories/miplots4/dist/utils/splitTextByWidth.js.map +1 -0
  126. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +2 -2
  127. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -1
  128. package/package.json +3 -3
  129. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/components/BandAxis.js.map +0 -1
  130. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/utils/splitTextByWidth.js.map +0 -1
  131. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Axis.js +0 -59
  132. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/components/Axis.js.map +0 -1
@@ -1,92 +1,114 @@
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";
7
- import { splitTextByWidth as O } from "../discrete/utils/splitTextByWidth.js";
8
- import { isContinuousAes as V } from "../types/common.js";
1
+ import { j as Y } from "../node_modules/react/jsx-runtime.js";
2
+ import { createRoot as it } from "../node_modules/react-dom/client.js";
3
+ import { Error as at } from "../common/Error.js";
4
+ import { DataFrameProvider as ot } from "../common/useDataFrame.js";
5
+ import { DEFAULT_HEIGHT as P, DEFAULT_WIDTH as k, TITLE_LINE_HEIGHT as nt, MAX_SHOWN_UNIQUE_VALUES_IN_LABELS as rt, BLACK as st, TITLE_MARGIN as ht } from "../constants.js";
6
+ import { FACET_TITLE_LINE as lt } from "../discrete/constants.js";
7
+ import { splitTextByWidth as V } from "../utils/splitTextByWidth.js";
8
+ import { isContinuousAes as j } from "../types/common.js";
9
9
  import "../types/discrete.js";
10
10
  import "../types/scatterplot.js";
11
11
  import "../types/heatmap.js";
12
12
  import "../types/dendro.js";
13
13
  import "../types/histogram.js";
14
14
  import "../types/bubble.js";
15
- import { arrangeLegendParts as it } from "../utils/arrangeLegendParts.js";
16
- import { getContinuousColorScale as st } from "../utils/getContinuousColorScale.js";
17
- import { getContinuousLegendTicks as at } from "../utils/getContinuousLegendTicks.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";
24
- import U from "../node_modules/d3-scale/src/log.js";
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;
15
+ import { arrangeLegendParts as ct } from "../utils/arrangeLegendParts.js";
16
+ import { getContinuousColorScale as mt } from "../utils/getContinuousColorScale.js";
17
+ import { getContinuousLegendTicks as dt } from "../utils/getContinuousLegendTicks.js";
18
+ import { TextMeasurer as ut } from "../utils/TextMeasurer/TextMeasurer.js";
19
+ import { ChartsGroup as pt } from "./components/ChartsGroup.js";
20
+ import { PADDINGS as B, MIN_MARGIN as D, DEFAULT_DOT_AES as _, LEGEND_OFFSET as gt, TICK_OFFSET as X, DEFAULT_TICKS_SIZE as U, MIN_PADDING as H, FACET_TITLE_OFFSET as ft, TITLE_LINE as G, FACET_AXIS_OFFSET as $ } from "./constants.js";
21
+ import { createAesGetter as F } from "./utils/createAesGetter.js";
22
+ import { getTicksAndFormat as xt } from "./utils/getTicksAndFormat.js";
23
+ import { isContinuousAxis as K } from "./utils/isNumericScale.js";
24
+ import { createMultilineDiscreteLabels as q } from "../utils/createMultilineDiscreteLabels.js";
25
+ import { measureMultilineDiscreteLabels as Q } from "../utils/measureMultilineDiscreteLabels.js";
26
+ import R from "../node_modules/d3-scale/src/linear.js";
27
+ import { point as Z } from "../node_modules/d3-scale/src/band.js";
28
+ import J from "../node_modules/d3-scale/src/log.js";
29
+ import St from "../node_modules/d3-scale/src/ordinal.js";
30
+ import Tt from "../node_modules/d3-scale/src/symlog.js";
31
+ import { sqrt as Ct } from "../node_modules/d3-scale/src/pow.js";
32
+ var zt = Object.defineProperty, bt = (n, t, e) => t in n ? zt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, M = (n, t, e) => bt(n, typeof t != "symbol" ? t + "" : t, e);
33
+ function tt(n, t) {
34
+ if (n === void 0)
35
+ return !0;
36
+ {
37
+ const e = n.domain(), i = n.range(), s = t.domain(), a = t.range();
38
+ if (e.length !== s.length || e.some((p, S) => p !== s[S]) || i[0] !== a[0] || i[1] !== a[1])
39
+ return !0;
40
+ }
41
+ return !1;
42
+ }
43
+ function yt(n, t, e, i) {
44
+ const s = [];
45
+ return n % e === e - 1 && s.push("right"), n % e === 0 && s.push("left"), n < e && s.push("top"), (Math.ceil((n + 1) / e) === i || Math.ceil((n + 1) / e) === i - 1 && n % e > (t - 1) % e) && s.push("bottom"), s;
32
46
  }
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));
47
+ function At(n, t, e, i, s, a, p, S, C, g) {
48
+ const N = n.scale === "discrete", m = t.scale === "discrete", o = a.includes("left") || !(g != null && g.sharedY), r = a.includes("left") && t.title !== "", c = a.includes("bottom") || !(g != null && g.sharedX), f = a.includes("bottom") && n.title !== "", h = m ? e.leftAxisCaptionsWidthByColumns[S] : e.yAxisCaptionsWidth + 2 * X, d = (t.showTicks ? U : 0) + X, T = r ? G + H : 0, b = N ? e.bottomAxisCaptionsWidthByRows[p] : e.xAxisCaptionsWidth + 2 * X, z = n.showTicks ? U : 0, w = f ? G + H : 0, x = h + d + T + $, l = b + z + w + $, E = Math.max(...i.map((u) => s[u].length));
35
49
  return {
36
- left: g ? l : H,
37
- top: C === 0 ? 0 : ht * 2 + C * et,
38
- bottom: F ? f + 8 : H,
39
- right: H
50
+ left: o ? x : H,
51
+ top: E === 0 ? 0 : ft * 2 + E * lt,
52
+ bottom: c ? l + 8 : H,
53
+ right: C ? 0 : H
40
54
  };
41
55
  }
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;
56
+ function Mt(n, t, e) {
57
+ const i = [];
58
+ for (let s = 0; s < t; s++)
59
+ i.push(n.slice(s * e, s * e + e));
60
+ return i;
47
61
  }
48
- function Tt(h, t) {
49
- const e = Math.floor(h / t), s = h - e * t;
50
- return [e, s];
62
+ function vt(n, t) {
63
+ const e = Math.floor(n / t), i = n - e * t;
64
+ return [e, i];
51
65
  }
52
- function xt(h, t, e, s) {
53
- const i = e.find((m) => m.type === "dots"), a = e.find((m) => m.type === "curve");
66
+ function Nt(n, t, e, i) {
67
+ const s = e.find((p) => p.type === "dots"), a = e.find((p) => p.type === "curve");
54
68
  return {
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")
69
+ dotShape: F(n, t, (s == null ? void 0 : s.aes.dotShape) ?? _.shape, "dotShape"),
70
+ dotColor: F(n, t, (s == null ? void 0 : s.aes.dotFill) ?? _.color, "dotFill"),
71
+ dotSize: F(n, t, (s == null ? void 0 : s.aes.dotSize) ?? _.size, "dotSize"),
72
+ lineShape: F(n, t, (a == null ? void 0 : a.aes.lineShape) ?? "solid", "lineShape"),
73
+ lineColor: F(n, t, (a == null ? void 0 : a.aes.lineColor) ?? st, "lineColor"),
74
+ trendColor: F(n, t, (i == null ? void 0 : i.color) ?? _.color, "fillColor")
61
75
  };
62
76
  }
63
- class Ut {
77
+ const Et = Math.cos(Math.PI / 4), wt = 5;
78
+ function et(n, t) {
79
+ return t.scale === "discrete" ? t.labelsPosition === "90deg" ? n : t.labelsPosition === "45deg" ? n * Et + (n > 0 ? 2 * wt : 0) : G : n;
80
+ }
81
+ class re {
64
82
  constructor() {
65
- E(this, "reactRoot", null), E(this, "parentNode", null), E(this, "rootNode", null), E(this, "component", /* @__PURE__ */ b.jsx(b.Fragment, {})), E(this, "margins", {
83
+ M(this, "reactRoot", null), M(this, "parentNode", null), M(this, "rootNode", null), M(this, "component", /* @__PURE__ */ Y.jsx(Y.Fragment, {})), M(this, "margins", {
66
84
  top: D,
67
85
  bottom: D,
68
86
  left: D,
69
87
  right: D
70
- }), E(this, "chartsDimensions", {}), E(this, "chartSizes", {
71
- chartWidth: R,
88
+ }), M(this, "chartsDimensions", {}), M(this, "chartSizes", {
89
+ chartWidth: k,
72
90
  // width of single chart
73
- chartHeight: $,
91
+ chartHeight: P,
74
92
  // height of single chart
75
- chartsWidth: R,
93
+ chartsWidth: k,
76
94
  // width of all charts in charts row
77
- chartsHeight: $,
95
+ chartsHeight: P,
78
96
  // width of all charts in charts column, without axes
79
- totalWidth: R,
97
+ totalWidth: k,
80
98
  // width of all charts in charts row, plus left axis, plus legend
81
- totalHeight: $
99
+ totalHeight: P
82
100
  // width of all charts in charts height, plus bottom axis, plus top title
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", {
101
+ }), M(this, "columnsCount", 1), M(this, "rowsCount", 1), M(this, "scales", {
102
+ x: { null: R().domain([0, 1]).range([0, k]) },
103
+ y: { null: R().domain([0, 1]).range([P, 0]) }
104
+ }), M(this, "captionsSizes", {
87
105
  xAxisCaptionsWidth: 30,
88
- yAxisCaptionsWidth: 100
89
- }), E(this, "facetTitles", {}), E(this, "mainTitle", []), E(this, "legend", { width: 0, height: 0, items: [] });
106
+ yAxisCaptionsWidth: 100,
107
+ bottomAxisCaptionsWidthByRows: [],
108
+ leftAxisCaptionsWidthByColumns: [],
109
+ bottomCaptionsTail: 0,
110
+ leftCaptionsTail: 0
111
+ }), M(this, "facetTitles", {}), M(this, "mainTitle", []), M(this, "discreteAxesLabels", { x: {}, y: {} }), M(this, "legend", { width: 0, height: 0, items: [] });
90
112
  }
91
113
  clear() {
92
114
  var t;
@@ -96,215 +118,270 @@ class Ut {
96
118
  });
97
119
  }
98
120
  init(t) {
99
- this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot = K(this.rootNode));
121
+ this.parentNode === null && (this.parentNode = t, this.rootNode = document.createElement("div"), this.parentNode.appendChild(this.rootNode), this.reactRoot = it(this.rootNode));
100
122
  }
101
123
  updateChartSizes(t) {
102
124
  this.chartSizes.chartWidth = t.width, this.chartSizes.chartHeight = t.height;
103
125
  }
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
- s,
126
+ updateChartDimensions(t, e, i, s) {
127
+ const { chartWidth: a, chartHeight: p } = this.chartSizes;
128
+ let S = 0, C = 0;
129
+ const g = Mt(t, this.rowsCount, this.columnsCount);
130
+ this.chartsDimensions = t.reduce((o, r, c) => {
131
+ const [f, h] = vt(c, this.columnsCount), d = yt(c, t.length, this.columnsCount, this.rowsCount), T = At(
110
132
  i,
133
+ s,
111
134
  this.captionsSizes,
112
- St(t, this.rowsCount, this.columnsCount)[T],
135
+ g[f],
113
136
  this.facetTitles,
114
- c,
137
+ d,
138
+ f,
139
+ h,
140
+ h === this.columnsCount - 1,
115
141
  e
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;
142
+ ), b = a + T.left + T.right, z = p + T.top + T.bottom;
143
+ return o[r] = {
144
+ left: S,
145
+ top: C,
146
+ chartEdgeSides: d,
147
+ padding: T,
148
+ inner: { width: a, height: p },
149
+ outer: { width: b, height: z }
150
+ }, S += b, h === this.columnsCount - 1 && (S = 0, C += z), o;
125
151
  }, {});
126
- const F = Math.max(
127
- ...t.map((n) => this.chartsDimensions[n].outer.width + this.chartsDimensions[n].left)
128
- ), N = Math.max(
129
- ...t.map((n) => this.chartsDimensions[n].outer.height + this.chartsDimensions[n].top)
152
+ const N = Math.max(
153
+ ...t.map((o) => this.chartsDimensions[o].outer.width + this.chartsDimensions[o].left)
154
+ ), m = Math.max(
155
+ ...t.map((o) => this.chartsDimensions[o].outer.height + this.chartsDimensions[o].top)
130
156
  );
131
- this.chartSizes.chartsWidth = F, this.chartSizes.chartsHeight = N;
157
+ this.chartSizes.chartsWidth = N, this.chartSizes.chartsHeight = m;
132
158
  }
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;
159
+ updateViewport(t, e, i, s, a, p, S, C) {
160
+ const g = t.length, N = Math.min(e.nRows ?? g, g), m = Math.min(e.nCols ?? g, g);
161
+ this.columnsCount = e.nRows ? Math.ceil(g / N) : m, this.rowsCount = Math.ceil(g / this.columnsCount);
162
+ let [o, r] = [1 / 0, -1 / 0], [c, f] = [1 / 0, -1 / 0];
163
+ const h = t.reduce((x, l) => {
164
+ const E = S[l], { minX: u, minY: y, maxX: A, maxY: v } = E;
165
+ return o = Math.min(o, u), c = Math.min(c, y), r = Math.max(r, A), f = Math.max(f, v), x[l] = { minX: u, maxX: A, minY: y, maxY: v }, x;
166
+ }, {}), d = {}, T = {};
167
+ let b = !1, z = !1;
168
+ t.forEach((x) => {
169
+ let l;
170
+ if (!K(i))
171
+ l = Z().range([0, this.chartSizes.chartWidth]).domain(a.keys ?? []).padding(0.5);
172
+ else {
173
+ l = i.scale === "log" ? J() : R();
174
+ const u = h[x];
175
+ let y = i.lowerValue ? Number(i.lowerValue) : e.sharedX ? o : u.minX, A = i.upperValue ? Number(i.upperValue) : e.sharedX ? r : u.maxX;
176
+ if (typeof i.symmetricRange < "u") {
177
+ const W = i.symmetricRange;
178
+ if (W >= y && W <= A) {
179
+ const L = Math.max(W - y, A - W);
180
+ y = W - L, A = W + L;
181
+ }
150
182
  }
183
+ const v = [0, this.chartSizes.chartWidth], I = l.copy().domain([y, A]).range([B.LEFT, this.chartSizes.chartWidth - B.RIGHT]);
184
+ l.domain([I.invert(0), I.invert(this.chartSizes.chartWidth)]).range(v).nice();
151
185
  }
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);
160
- }
161
- z[u] = r;
186
+ const E = this.scales.x[x];
187
+ d[x] = l, b = b || tt(E, l);
162
188
  });
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;
189
+ const w = t.reduce((x, l) => {
190
+ const E = C ? C[l] : [];
191
+ return x[l] = E.reduce(
192
+ (u, y) => {
193
+ const A = y.bounded ? y.xBounds : this.scales.x[l].domain(), v = y.getInterval(A[0]), I = y.getInterval(A[1]);
194
+ return u.minY = Math.min(u.minY, isNaN(v.left) ? u.minY : v.left, isNaN(I.left) ? u.minY : I.left), u.maxY = Math.max(u.maxY, isNaN(v.right) ? u.maxY : v.right, isNaN(I.right) ? u.maxY : I.right), u;
169
195
  },
170
196
  { minY: 1 / 0, maxY: -1 / 0 }
171
- ), o = Math.min(o, u[r].minY), d = Math.max(d, u[r].maxY), u;
197
+ ), c = Math.min(c, x[l].minY), f = Math.max(f, x[l].maxY), x;
172
198
  }, {});
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 + _;
199
+ t.forEach((x) => {
200
+ let l;
201
+ if (!K(s))
202
+ l = Z().range([this.chartSizes.chartHeight, 0]).domain(p.keys ?? []).padding(0.5);
203
+ else {
204
+ l = s.scale === "log" ? J() : R();
205
+ const u = h[x], y = w[x];
206
+ let A = s.lowerValue ? Number(s.lowerValue) : e.sharedY ? c : Math.min(u.minY, y.minY), v = s.upperValue ? Number(s.upperValue) : e.sharedY ? f : Math.max(u.maxY, y.maxY);
207
+ if (typeof s.symmetricRange < "u") {
208
+ const L = s.symmetricRange;
209
+ if (L >= A && L <= v) {
210
+ const O = Math.max(L - A, v - L);
211
+ A = L - O, v = L + O;
212
+ }
181
213
  }
214
+ const I = [this.chartSizes.chartHeight, 0], W = l.copy().domain([A, v]).range([this.chartSizes.chartHeight - B.BOTTOM, B.TOP]);
215
+ l.domain([W.invert(this.chartSizes.chartHeight), W.invert(0)]).range(I).nice();
182
216
  }
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);
191
- }
192
- c[u] = r;
193
- }), l && (this.scales.x = z), f && (this.scales.y = c);
217
+ const E = this.scales.y[x];
218
+ T[x] = l, z = z || tt(E, l);
219
+ }), b && (this.scales.x = d), z && (this.scales.y = T);
194
220
  }
195
- updateCaptionsSize(t) {
196
- const e = new ot("600 14px Arial");
197
- let s = 0;
198
- function i(a) {
199
- return Math.max(...a.map((m) => e.getTextWidth(m)));
221
+ updateCaptionsSize(t, e, i, s) {
222
+ const a = new ut("600 14px Manrope");
223
+ function p(r) {
224
+ return Math.max(...r.map((c) => a.getTextWidth(c)));
200
225
  }
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)));
204
- }), this.captionsSizes = {
205
- xAxisCaptionsWidth: 20,
206
- yAxisCaptionsWidth: s
226
+ let S = 0, C = 0, g = [], N = [], m = 0, o = 0;
227
+ if (e.scale === "discrete") {
228
+ const r = Q(
229
+ t,
230
+ this.rowsCount,
231
+ this.columnsCount,
232
+ e.labelsPosition ?? "center",
233
+ this.discreteAxesLabels.x,
234
+ "vertical",
235
+ this.scales.x
236
+ );
237
+ S = r.xTail, g = r.axisCaptionsWidthByRows;
238
+ } else
239
+ m = 20;
240
+ if (i.scale === "discrete") {
241
+ const r = Q(
242
+ t,
243
+ this.rowsCount,
244
+ this.columnsCount,
245
+ i.labelsPosition ?? "center",
246
+ this.discreteAxesLabels.y,
247
+ "horizontal",
248
+ this.scales.y
249
+ );
250
+ C = r.yTail, N = r.axisCaptionsWidthByColumns;
251
+ } else
252
+ Object.values(this.scales.y).forEach((r) => {
253
+ const { ticks: c, format: f } = xt(r, s);
254
+ o = Math.max(o, p(c.map(f)));
255
+ });
256
+ this.captionsSizes = {
257
+ xAxisCaptionsWidth: et(m, e),
258
+ yAxisCaptionsWidth: et(o, i),
259
+ bottomAxisCaptionsWidthByRows: g,
260
+ leftAxisCaptionsWidthByColumns: N,
261
+ bottomCaptionsTail: S,
262
+ leftCaptionsTail: C
207
263
  };
208
264
  }
209
265
  createMainTitle(t, e) {
210
- const s = this.chartsDimensions[t[0]], i = this.chartsDimensions[t[t.length - 1]];
211
- this.mainTitle = O(
266
+ const i = this.chartsDimensions[t[0]], s = this.chartsDimensions[t[t.length - 1]];
267
+ this.mainTitle = V(
212
268
  e.name,
213
- this.chartSizes.chartsWidth - s.padding.left - i.padding.right,
269
+ this.chartSizes.chartsWidth - i.padding.left - s.padding.right,
214
270
  20
215
271
  );
216
272
  }
217
273
  createFacetTitles(t, e) {
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), {});
274
+ this.facetTitles = t.reduce((i, s, a) => (e[a].length === 1 && e[a][0] === "null" ? i[s] = [] : i[s] = V(e[a].join(", "), this.chartSizes.chartWidth, 14), i), {});
219
275
  }
220
- updateMargins() {
221
- const t = J * this.mainTitle.length, e = t > 0 ? t + tt * 2 : 0;
276
+ createAxisLabels(t, e, i, s, a) {
277
+ this.discreteAxesLabels = {
278
+ x: e.scale !== "discrete" ? {} : q(
279
+ t,
280
+ (e == null ? void 0 : e.labelsPosition) ?? "center",
281
+ s.labels,
282
+ !1,
283
+ "vertical",
284
+ this.scales.x
285
+ ),
286
+ y: i.scale !== "discrete" ? {} : q(
287
+ t,
288
+ i.labelsPosition ?? "center",
289
+ a.labels,
290
+ !1,
291
+ "horizontal",
292
+ this.scales.y
293
+ )
294
+ };
295
+ }
296
+ updateMargins(t) {
297
+ const e = nt * this.mainTitle.length, i = e > 0 ? e + ht * 2 : 0, s = this.chartsDimensions[t[0]], a = this.chartsDimensions[t[t.length - 1]];
222
298
  this.margins = {
223
- top: Math.max(e, D),
224
- bottom: D,
225
- left: D,
299
+ top: Math.max(i, D),
300
+ bottom: Math.max(D, this.captionsSizes.leftCaptionsTail - a.padding.bottom),
301
+ left: Math.max(D, this.captionsSizes.bottomCaptionsTail - s.padding.left),
226
302
  right: this.legend.width + D
227
303
  }, 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;
228
304
  }
229
- updateLegendSize(t, e, s, i) {
305
+ updateLegendSize(t, e, i, s) {
230
306
  if (!t.show) {
231
307
  this.legend = { width: 0, height: 0, items: [] };
232
308
  return;
233
309
  }
234
- const a = [], m = { width: 0, height: 0, left: 0, top: 0 };
235
- if (s.forEach((n) => {
236
- const o = e[n.value];
310
+ const a = [], p = { width: 0, height: 0, left: 0, top: 0 };
311
+ if (i.forEach((m) => {
312
+ const o = e[m.value];
237
313
  if (o.usedAes.length === 0 || !o.aesMap)
238
314
  return;
239
- if (o.values.length > Q) {
315
+ if (o.values.length > rt) {
240
316
  console.warn(`Too many values for discrete legend (${o.values.length})`);
241
317
  return;
242
318
  }
243
- const d = {};
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);
319
+ const r = {};
320
+ o.values.forEach((h) => {
321
+ r[h] || (r[h] = { ..._ }), o.usedAes.forEach((d) => {
322
+ (d === "dotFill" || d === "lineColor") && (r[h].color = o.aesMap(h, d) ?? st), d === "dotShape" && (r[h].shape = o.aesMap(h, d) ?? "21"), d === "dotSize" && (r[h].size = o.aesMap(h, d) ?? 3);
247
323
  });
248
324
  });
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 });
325
+ const c = m.label ?? m.value, f = St().domain(o.values).range(o.values.map((h) => r[h])).unknown(_);
326
+ a.push({ ...p, id: m.value, type: "dots", title: c, scale: f, values: o.values, labels: o.labels });
327
+ }), s.forEach((m) => {
328
+ if (m.type === "dots" && j(m.aes.dotFill)) {
329
+ const { domain: o, range: r, columnName: c, type: f = "linear" } = m.aes.dotFill, h = c.label ?? c.value, d = mt(r, o, "linear"), T = (f === "log" ? Tt() : R()).domain(o).range([this.chartSizes.chartHeight, 0]), b = dt(T, o);
330
+ a.push({ ...p, id: "dotFill", type: "continuous", title: h, scale: d, tickPositionScale: T, values: b });
255
331
  }
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 });
332
+ if (m.type === "dots" && j(m.aes.dotSize)) {
333
+ const { columnName: o, domain: r, range: c } = m.aes.dotSize, f = o.label ?? o.value, h = Ct(r, c), d = h.ticks(3), T = h.tickFormat(3), b = d.reduce((z, w) => (z[String(w)] = T(w), z), {});
334
+ a.push({ ...p, id: o.value, type: "size", title: f, scale: h, values: d, labels: b });
259
335
  }
260
336
  }), !a.length) {
261
337
  this.legend = { width: 0, height: 0, items: [] };
262
338
  return;
263
339
  }
264
- const g = it(a, this.chartSizes.chartHeight), M = g[g.length - 1], F = M.left + M.width + rt, N = this.chartSizes.chartHeight;
340
+ const S = ct(a, this.chartSizes.chartHeight), C = S[S.length - 1], g = C.left + C.width + gt, N = this.chartSizes.chartHeight;
265
341
  this.legend = {
266
- width: F,
342
+ width: g,
267
343
  height: N,
268
- items: g
344
+ items: S
269
345
  };
270
346
  }
271
- render(t, e, s, i, a, m, g, M, F, N, n, o, d, T, z, c) {
272
- var l;
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,
347
+ render(t, e, i, s, a, p, S, C, g, N, m, o, r, c, f, h, d, T) {
348
+ var b;
349
+ const { xAxis: z, yAxis: w, size: x, title: l, legend: E } = i;
350
+ this.updateChartSizes(x), this.updateViewport(a, s, z, w, h, d, S, C), this.createAxisLabels(a, z, w, h, d), this.updateCaptionsSize(a, z, w, N.y), this.createFacetTitles(a, p), this.updateChartDimensions(a, s, z, w), this.updateLegendSize(E, m, r, c), this.createMainTitle(a, l), this.updateMargins(a);
351
+ const u = /* @__PURE__ */ Y.jsx(ot, { dataFrame: t, children: /* @__PURE__ */ Y.jsx(
352
+ pt,
277
353
  {
278
354
  settingsId: e,
279
- chartSettings: s,
355
+ chartSettings: i,
280
356
  facetKeys: a,
281
- facetSettings: i,
357
+ facetSettings: s,
282
358
  chartSizes: this.chartSizes,
283
359
  chartsDimensions: this.chartsDimensions,
284
360
  scales: this.scales,
285
- groupedDots: g,
286
- trendsData: M,
361
+ groupedDots: S,
362
+ trendsData: C,
287
363
  legendData: this.legend,
288
364
  columnsCount: this.columnsCount,
289
365
  margins: this.margins,
290
- keyColumn: F,
366
+ keyColumn: g,
291
367
  mainTitle: this.mainTitle,
292
368
  facetTitles: this.facetTitles,
293
369
  captionsSizes: this.captionsSizes,
294
370
  onlyPositive: N,
295
371
  layersData: o,
296
- aesGetters: xt(t, n, T, z),
297
- onTooltipHintSwitch: c
372
+ aesGetters: Nt(t, m, c, f),
373
+ onTooltipHintSwitch: T,
374
+ discreteAxesLabels: this.discreteAxesLabels
298
375
  }
299
376
  ) });
300
- this.component = p, (l = this.reactRoot) == null || l.render(p);
377
+ this.component = u, (b = this.reactRoot) == null || b.render(u);
301
378
  }
302
379
  renderError(t) {
303
380
  var e;
304
- (e = this.reactRoot) == null || e.render(/* @__PURE__ */ b.jsx(Z, { message: t }));
381
+ (e = this.reactRoot) == null || e.render(/* @__PURE__ */ Y.jsx(at, { message: t }));
305
382
  }
306
383
  }
307
384
  export {
308
- Ut as default
385
+ re as default
309
386
  };
310
387
  //# sourceMappingURL=ChartRenderer.js.map