@milaboratories/miplots4 1.0.134 → 1.0.135
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.
- package/dist/{discrete/components → common}/BandAxis.d.ts +2 -2
- package/dist/common/BandAxis.d.ts.map +1 -0
- package/dist/{discrete/components → common}/BandAxis.js +3 -3
- package/dist/common/BandAxis.js.map +1 -0
- package/dist/common/ContinuousGrid.d.ts +3 -3
- package/dist/common/ContinuousGrid.d.ts.map +1 -1
- package/dist/common/ContinuousGrid.js.map +1 -1
- package/dist/discrete/ChartRenderer.d.ts.map +1 -1
- package/dist/discrete/ChartRenderer.js +192 -265
- package/dist/discrete/ChartRenderer.js.map +1 -1
- package/dist/discrete/components/Chart.js +1 -1
- package/dist/discrete/components/Chart.js.map +1 -1
- package/dist/discrete/components/Grid.d.ts +3 -3
- package/dist/discrete/components/Grid.d.ts.map +1 -1
- package/dist/discrete/components/Grid.js.map +1 -1
- package/dist/discrete/components/types.d.ts +5 -3
- package/dist/discrete/components/types.d.ts.map +1 -1
- package/dist/discrete/utils/index.d.ts +1 -1
- package/dist/discrete/utils/index.d.ts.map +1 -1
- package/dist/histogram/ChartRenderer.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/node_modules/d3-scale/src/band.js +45 -35
- package/dist/node_modules/d3-scale/src/band.js.map +1 -1
- package/dist/scatterplot/ChartRenderer.d.ts +10 -5
- package/dist/scatterplot/ChartRenderer.d.ts.map +1 -1
- package/dist/scatterplot/ChartRenderer.js +276 -197
- package/dist/scatterplot/ChartRenderer.js.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts +5 -3
- package/dist/scatterplot/ScatterplotSettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot/ScatterplotSettingsImpl.js +53 -53
- package/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
- package/dist/scatterplot/components/Chart.d.ts +3 -1
- package/dist/scatterplot/components/Chart.d.ts.map +1 -1
- package/dist/scatterplot/components/Chart.js +23 -19
- package/dist/scatterplot/components/Chart.js.map +1 -1
- package/dist/scatterplot/components/ChartAxis.d.ts +3 -1
- package/dist/scatterplot/components/ChartAxis.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartAxis.js +31 -27
- package/dist/scatterplot/components/ChartAxis.js.map +1 -1
- package/dist/scatterplot/components/ChartLayersData.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartLayersData.js.map +1 -1
- package/dist/scatterplot/components/ChartTooltip.js.map +1 -1
- package/dist/scatterplot/components/ChartTrendsData.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartTrendsData.js +20 -17
- package/dist/scatterplot/components/ChartTrendsData.js.map +1 -1
- package/dist/scatterplot/components/ChartsGroup.d.ts +5 -1
- package/dist/scatterplot/components/ChartsGroup.d.ts.map +1 -1
- package/dist/scatterplot/components/ChartsGroup.js +49 -46
- package/dist/scatterplot/components/ChartsGroup.js.map +1 -1
- package/dist/scatterplot/components/Grid.d.ts +3 -3
- package/dist/scatterplot/components/Grid.d.ts.map +1 -1
- package/dist/scatterplot/components/Grid.js +31 -27
- package/dist/scatterplot/components/Grid.js.map +1 -1
- package/dist/scatterplot/components/types.d.ts +15 -5
- package/dist/scatterplot/components/types.d.ts.map +1 -1
- package/dist/scatterplot/dots.d.ts +2 -2
- package/dist/scatterplot/dots.d.ts.map +1 -1
- package/dist/scatterplot/dots.js.map +1 -1
- package/dist/scatterplot/getLayersData.d.ts +3 -2
- package/dist/scatterplot/getLayersData.d.ts.map +1 -1
- package/dist/scatterplot/getLayersData.js +29 -18
- package/dist/scatterplot/getLayersData.js.map +1 -1
- package/dist/scatterplot/index.d.ts +3 -0
- package/dist/scatterplot/index.d.ts.map +1 -1
- package/dist/scatterplot/index.js +73 -59
- package/dist/scatterplot/index.js.map +1 -1
- package/dist/scatterplot/linearRegression.d.ts +4 -6
- package/dist/scatterplot/linearRegression.d.ts.map +1 -1
- package/dist/scatterplot/linearRegression.js.map +1 -1
- package/dist/scatterplot/utils/isNumericScale.d.ts +6 -0
- package/dist/scatterplot/utils/isNumericScale.d.ts.map +1 -0
- package/dist/scatterplot/utils/isNumericScale.js +11 -0
- package/dist/scatterplot/utils/isNumericScale.js.map +1 -0
- package/dist/scatterplot-umap/ChartRenderer.js +1 -1
- package/dist/scatterplot-umap/ChartRenderer.js.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.d.ts +7 -4
- package/dist/scatterplot-umap/SettingsImpl.d.ts.map +1 -1
- package/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
- package/dist/scatterplot-umap/components/LowerSVG.js +7 -7
- package/dist/scatterplot-umap/components/LowerSVG.js.map +1 -1
- package/dist/types/bubble.d.ts +12 -12
- package/dist/types/common.d.ts +186 -21
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +36 -26
- package/dist/types/common.js.map +1 -1
- package/dist/types/dendro.d.ts +22 -22
- package/dist/types/discrete.d.ts +23 -53
- package/dist/types/discrete.d.ts.map +1 -1
- package/dist/types/discrete.js +35 -35
- package/dist/types/discrete.js.map +1 -1
- package/dist/types/heatmap.d.ts +12 -12
- package/dist/types/histogram.d.ts +4 -4
- package/dist/types/scatterplot-umap.d.ts +4 -34
- package/dist/types/scatterplot-umap.d.ts.map +1 -1
- package/dist/types/scatterplot-umap.js +1 -1
- package/dist/types/scatterplot-umap.js.map +1 -1
- package/dist/types/scatterplot.d.ts +186 -32
- package/dist/types/scatterplot.d.ts.map +1 -1
- package/dist/utils/createMultilineDiscreteLabels.d.ts +4 -0
- package/dist/utils/createMultilineDiscreteLabels.d.ts.map +1 -0
- package/dist/utils/createMultilineDiscreteLabels.js +32 -0
- package/dist/utils/createMultilineDiscreteLabels.js.map +1 -0
- package/dist/utils/getFacetRowsColumns.d.ts +3 -0
- package/dist/utils/getFacetRowsColumns.d.ts.map +1 -0
- package/dist/utils/getFacetRowsColumns.js +18 -0
- package/dist/utils/getFacetRowsColumns.js.map +1 -0
- package/dist/utils/measureMultilineDiscreteLabels.d.ts +9 -0
- package/dist/utils/measureMultilineDiscreteLabels.d.ts.map +1 -0
- package/dist/utils/measureMultilineDiscreteLabels.js +63 -0
- package/dist/utils/measureMultilineDiscreteLabels.js.map +1 -0
- package/dist/utils/splitTextByWidth.d.ts.map +1 -0
- package/dist/{discrete/utils → utils}/splitTextByWidth.js +1 -1
- package/dist/utils/splitTextByWidth.js.map +1 -0
- package/package.json +1 -1
- package/dist/discrete/components/BandAxis.d.ts.map +0 -1
- package/dist/discrete/components/BandAxis.js.map +0 -1
- package/dist/discrete/utils/splitTextByWidth.d.ts.map +0 -1
- package/dist/discrete/utils/splitTextByWidth.js.map +0 -1
- package/dist/scatterplot/components/Axis.d.ts +0 -13
- package/dist/scatterplot/components/Axis.d.ts.map +0 -1
- package/dist/scatterplot/components/Axis.js +0 -59
- package/dist/scatterplot/components/Axis.js.map +0 -1
- /package/dist/{discrete/utils → utils}/splitTextByWidth.d.ts +0 -0
|
@@ -867,11 +867,11 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
867
867
|
}, "strip", z.ZodTypeAny, {
|
|
868
868
|
name: string;
|
|
869
869
|
show?: boolean | undefined;
|
|
870
|
-
position?: "
|
|
870
|
+
position?: "center" | "left" | "right" | undefined;
|
|
871
871
|
}, {
|
|
872
872
|
name: string;
|
|
873
873
|
show?: boolean | undefined;
|
|
874
|
-
position?: "
|
|
874
|
+
position?: "center" | "left" | "right" | undefined;
|
|
875
875
|
}>;
|
|
876
876
|
size: z.ZodOptional<z.ZodObject<{
|
|
877
877
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1013,7 +1013,7 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1013
1013
|
label?: string | undefined;
|
|
1014
1014
|
valueLabels?: string | undefined;
|
|
1015
1015
|
}>;
|
|
1016
|
-
xAxis: z.ZodOptional<z.ZodObject<{
|
|
1016
|
+
xAxis: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
1017
1017
|
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1018
1018
|
type: z.ZodLiteral<"column">;
|
|
1019
1019
|
value: z.ZodString;
|
|
@@ -1033,17 +1033,74 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1033
1033
|
label?: string | undefined;
|
|
1034
1034
|
valueLabels?: string | undefined;
|
|
1035
1035
|
}>]>>;
|
|
1036
|
-
scale: z.ZodOptional<z.
|
|
1036
|
+
scale: z.ZodOptional<z.ZodLiteral<"discrete">>;
|
|
1037
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
1038
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1037
1039
|
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
1038
1040
|
linesBetweenCategories: z.ZodOptional<z.ZodBoolean>;
|
|
1039
1041
|
showTicks: z.ZodOptional<z.ZodBoolean>;
|
|
1040
1042
|
labelsPosition: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"center">, z.ZodLiteral<"45deg">, z.ZodLiteral<"90deg">]>>;
|
|
1043
|
+
hiddenLabels: z.ZodOptional<z.ZodBoolean>;
|
|
1044
|
+
}, "strip", z.ZodTypeAny, {
|
|
1045
|
+
keys?: (string | number)[] | undefined;
|
|
1046
|
+
title?: string | {
|
|
1047
|
+
type: "column";
|
|
1048
|
+
value: string;
|
|
1049
|
+
format?: string | undefined;
|
|
1050
|
+
label?: string | undefined;
|
|
1051
|
+
valueLabels?: string | undefined;
|
|
1052
|
+
} | undefined;
|
|
1053
|
+
scale?: "discrete" | undefined;
|
|
1054
|
+
labels?: Record<string, string> | undefined;
|
|
1055
|
+
showGrid?: boolean | undefined;
|
|
1056
|
+
linesBetweenCategories?: boolean | undefined;
|
|
1057
|
+
showTicks?: boolean | undefined;
|
|
1058
|
+
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1059
|
+
hiddenLabels?: boolean | undefined;
|
|
1060
|
+
}, {
|
|
1061
|
+
keys?: (string | number)[] | undefined;
|
|
1062
|
+
title?: string | {
|
|
1063
|
+
type: "column";
|
|
1064
|
+
value: string;
|
|
1065
|
+
format?: string | undefined;
|
|
1066
|
+
label?: string | undefined;
|
|
1067
|
+
valueLabels?: string | undefined;
|
|
1068
|
+
} | undefined;
|
|
1069
|
+
scale?: "discrete" | undefined;
|
|
1070
|
+
labels?: Record<string, string> | undefined;
|
|
1071
|
+
showGrid?: boolean | undefined;
|
|
1072
|
+
linesBetweenCategories?: boolean | undefined;
|
|
1073
|
+
showTicks?: boolean | undefined;
|
|
1074
|
+
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1075
|
+
hiddenLabels?: boolean | undefined;
|
|
1076
|
+
}>, z.ZodObject<{
|
|
1077
|
+
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1078
|
+
type: z.ZodLiteral<"column">;
|
|
1079
|
+
value: z.ZodString;
|
|
1080
|
+
format: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
valueLabels: z.ZodOptional<z.ZodString>;
|
|
1083
|
+
}, "strip", z.ZodTypeAny, {
|
|
1084
|
+
type: "column";
|
|
1085
|
+
value: string;
|
|
1086
|
+
format?: string | undefined;
|
|
1087
|
+
label?: string | undefined;
|
|
1088
|
+
valueLabels?: string | undefined;
|
|
1089
|
+
}, {
|
|
1090
|
+
type: "column";
|
|
1091
|
+
value: string;
|
|
1092
|
+
format?: string | undefined;
|
|
1093
|
+
label?: string | undefined;
|
|
1094
|
+
valueLabels?: string | undefined;
|
|
1095
|
+
}>]>>;
|
|
1096
|
+
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"linear">, z.ZodLiteral<"log">]>>;
|
|
1097
|
+
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
1098
|
+
showTicks: z.ZodOptional<z.ZodBoolean>;
|
|
1041
1099
|
significantLines: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1042
1100
|
significantLinesStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
|
|
1043
1101
|
symmetricRange: z.ZodOptional<z.ZodNumber>;
|
|
1044
1102
|
upperValue: z.ZodOptional<z.ZodNumber>;
|
|
1045
1103
|
lowerValue: z.ZodOptional<z.ZodNumber>;
|
|
1046
|
-
hiddenLabels: z.ZodOptional<z.ZodBoolean>;
|
|
1047
1104
|
}, "strip", z.ZodTypeAny, {
|
|
1048
1105
|
title?: string | {
|
|
1049
1106
|
type: "column";
|
|
@@ -1054,15 +1111,12 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1054
1111
|
} | undefined;
|
|
1055
1112
|
scale?: "linear" | "log" | undefined;
|
|
1056
1113
|
showGrid?: boolean | undefined;
|
|
1057
|
-
linesBetweenCategories?: boolean | undefined;
|
|
1058
1114
|
showTicks?: boolean | undefined;
|
|
1059
|
-
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1060
1115
|
significantLines?: number[] | undefined;
|
|
1061
1116
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
1062
1117
|
symmetricRange?: number | undefined;
|
|
1063
1118
|
upperValue?: number | undefined;
|
|
1064
1119
|
lowerValue?: number | undefined;
|
|
1065
|
-
hiddenLabels?: boolean | undefined;
|
|
1066
1120
|
}, {
|
|
1067
1121
|
title?: string | {
|
|
1068
1122
|
type: "column";
|
|
@@ -1073,17 +1127,14 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1073
1127
|
} | undefined;
|
|
1074
1128
|
scale?: "linear" | "log" | undefined;
|
|
1075
1129
|
showGrid?: boolean | undefined;
|
|
1076
|
-
linesBetweenCategories?: boolean | undefined;
|
|
1077
1130
|
showTicks?: boolean | undefined;
|
|
1078
|
-
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1079
1131
|
significantLines?: number[] | undefined;
|
|
1080
1132
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
1081
1133
|
symmetricRange?: number | undefined;
|
|
1082
1134
|
upperValue?: number | undefined;
|
|
1083
1135
|
lowerValue?: number | undefined;
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
yAxis: z.ZodOptional<z.ZodObject<{
|
|
1136
|
+
}>]>>;
|
|
1137
|
+
yAxis: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
1087
1138
|
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1088
1139
|
type: z.ZodLiteral<"column">;
|
|
1089
1140
|
value: z.ZodString;
|
|
@@ -1103,17 +1154,74 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1103
1154
|
label?: string | undefined;
|
|
1104
1155
|
valueLabels?: string | undefined;
|
|
1105
1156
|
}>]>>;
|
|
1106
|
-
scale: z.ZodOptional<z.
|
|
1157
|
+
scale: z.ZodOptional<z.ZodLiteral<"discrete">>;
|
|
1158
|
+
keys: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
1159
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1107
1160
|
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
1108
1161
|
linesBetweenCategories: z.ZodOptional<z.ZodBoolean>;
|
|
1109
1162
|
showTicks: z.ZodOptional<z.ZodBoolean>;
|
|
1110
1163
|
labelsPosition: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"center">, z.ZodLiteral<"45deg">, z.ZodLiteral<"90deg">]>>;
|
|
1164
|
+
hiddenLabels: z.ZodOptional<z.ZodBoolean>;
|
|
1165
|
+
}, "strip", z.ZodTypeAny, {
|
|
1166
|
+
keys?: (string | number)[] | undefined;
|
|
1167
|
+
title?: string | {
|
|
1168
|
+
type: "column";
|
|
1169
|
+
value: string;
|
|
1170
|
+
format?: string | undefined;
|
|
1171
|
+
label?: string | undefined;
|
|
1172
|
+
valueLabels?: string | undefined;
|
|
1173
|
+
} | undefined;
|
|
1174
|
+
scale?: "discrete" | undefined;
|
|
1175
|
+
labels?: Record<string, string> | undefined;
|
|
1176
|
+
showGrid?: boolean | undefined;
|
|
1177
|
+
linesBetweenCategories?: boolean | undefined;
|
|
1178
|
+
showTicks?: boolean | undefined;
|
|
1179
|
+
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1180
|
+
hiddenLabels?: boolean | undefined;
|
|
1181
|
+
}, {
|
|
1182
|
+
keys?: (string | number)[] | undefined;
|
|
1183
|
+
title?: string | {
|
|
1184
|
+
type: "column";
|
|
1185
|
+
value: string;
|
|
1186
|
+
format?: string | undefined;
|
|
1187
|
+
label?: string | undefined;
|
|
1188
|
+
valueLabels?: string | undefined;
|
|
1189
|
+
} | undefined;
|
|
1190
|
+
scale?: "discrete" | undefined;
|
|
1191
|
+
labels?: Record<string, string> | undefined;
|
|
1192
|
+
showGrid?: boolean | undefined;
|
|
1193
|
+
linesBetweenCategories?: boolean | undefined;
|
|
1194
|
+
showTicks?: boolean | undefined;
|
|
1195
|
+
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1196
|
+
hiddenLabels?: boolean | undefined;
|
|
1197
|
+
}>, z.ZodObject<{
|
|
1198
|
+
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1199
|
+
type: z.ZodLiteral<"column">;
|
|
1200
|
+
value: z.ZodString;
|
|
1201
|
+
format: z.ZodOptional<z.ZodString>;
|
|
1202
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1203
|
+
valueLabels: z.ZodOptional<z.ZodString>;
|
|
1204
|
+
}, "strip", z.ZodTypeAny, {
|
|
1205
|
+
type: "column";
|
|
1206
|
+
value: string;
|
|
1207
|
+
format?: string | undefined;
|
|
1208
|
+
label?: string | undefined;
|
|
1209
|
+
valueLabels?: string | undefined;
|
|
1210
|
+
}, {
|
|
1211
|
+
type: "column";
|
|
1212
|
+
value: string;
|
|
1213
|
+
format?: string | undefined;
|
|
1214
|
+
label?: string | undefined;
|
|
1215
|
+
valueLabels?: string | undefined;
|
|
1216
|
+
}>]>>;
|
|
1217
|
+
scale: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"linear">, z.ZodLiteral<"log">]>>;
|
|
1218
|
+
showGrid: z.ZodOptional<z.ZodBoolean>;
|
|
1219
|
+
showTicks: z.ZodOptional<z.ZodBoolean>;
|
|
1111
1220
|
significantLines: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1112
1221
|
significantLinesStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
|
|
1113
1222
|
symmetricRange: z.ZodOptional<z.ZodNumber>;
|
|
1114
1223
|
upperValue: z.ZodOptional<z.ZodNumber>;
|
|
1115
1224
|
lowerValue: z.ZodOptional<z.ZodNumber>;
|
|
1116
|
-
hiddenLabels: z.ZodOptional<z.ZodBoolean>;
|
|
1117
1225
|
}, "strip", z.ZodTypeAny, {
|
|
1118
1226
|
title?: string | {
|
|
1119
1227
|
type: "column";
|
|
@@ -1124,15 +1232,12 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1124
1232
|
} | undefined;
|
|
1125
1233
|
scale?: "linear" | "log" | undefined;
|
|
1126
1234
|
showGrid?: boolean | undefined;
|
|
1127
|
-
linesBetweenCategories?: boolean | undefined;
|
|
1128
1235
|
showTicks?: boolean | undefined;
|
|
1129
|
-
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1130
1236
|
significantLines?: number[] | undefined;
|
|
1131
1237
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
1132
1238
|
symmetricRange?: number | undefined;
|
|
1133
1239
|
upperValue?: number | undefined;
|
|
1134
1240
|
lowerValue?: number | undefined;
|
|
1135
|
-
hiddenLabels?: boolean | undefined;
|
|
1136
1241
|
}, {
|
|
1137
1242
|
title?: string | {
|
|
1138
1243
|
type: "column";
|
|
@@ -1143,16 +1248,13 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1143
1248
|
} | undefined;
|
|
1144
1249
|
scale?: "linear" | "log" | undefined;
|
|
1145
1250
|
showGrid?: boolean | undefined;
|
|
1146
|
-
linesBetweenCategories?: boolean | undefined;
|
|
1147
1251
|
showTicks?: boolean | undefined;
|
|
1148
|
-
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
1149
1252
|
significantLines?: number[] | undefined;
|
|
1150
1253
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
1151
1254
|
symmetricRange?: number | undefined;
|
|
1152
1255
|
upperValue?: number | undefined;
|
|
1153
1256
|
lowerValue?: number | undefined;
|
|
1154
|
-
|
|
1155
|
-
}>>;
|
|
1257
|
+
}>]>>;
|
|
1156
1258
|
grouping: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1157
1259
|
columnName: z.ZodObject<{
|
|
1158
1260
|
type: z.ZodLiteral<"column">;
|
|
@@ -1816,7 +1918,7 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1816
1918
|
title: {
|
|
1817
1919
|
name: string;
|
|
1818
1920
|
show?: boolean | undefined;
|
|
1819
|
-
position?: "
|
|
1921
|
+
position?: "center" | "left" | "right" | undefined;
|
|
1820
1922
|
};
|
|
1821
1923
|
keyColumn: {
|
|
1822
1924
|
type: "column";
|
|
@@ -1956,6 +2058,7 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1956
2058
|
nCols?: number | undefined;
|
|
1957
2059
|
} | undefined;
|
|
1958
2060
|
xAxis?: {
|
|
2061
|
+
keys?: (string | number)[] | undefined;
|
|
1959
2062
|
title?: string | {
|
|
1960
2063
|
type: "column";
|
|
1961
2064
|
value: string;
|
|
@@ -1963,19 +2066,32 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1963
2066
|
label?: string | undefined;
|
|
1964
2067
|
valueLabels?: string | undefined;
|
|
1965
2068
|
} | undefined;
|
|
1966
|
-
scale?: "
|
|
2069
|
+
scale?: "discrete" | undefined;
|
|
2070
|
+
labels?: Record<string, string> | undefined;
|
|
1967
2071
|
showGrid?: boolean | undefined;
|
|
1968
2072
|
linesBetweenCategories?: boolean | undefined;
|
|
1969
2073
|
showTicks?: boolean | undefined;
|
|
1970
2074
|
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
2075
|
+
hiddenLabels?: boolean | undefined;
|
|
2076
|
+
} | {
|
|
2077
|
+
title?: string | {
|
|
2078
|
+
type: "column";
|
|
2079
|
+
value: string;
|
|
2080
|
+
format?: string | undefined;
|
|
2081
|
+
label?: string | undefined;
|
|
2082
|
+
valueLabels?: string | undefined;
|
|
2083
|
+
} | undefined;
|
|
2084
|
+
scale?: "linear" | "log" | undefined;
|
|
2085
|
+
showGrid?: boolean | undefined;
|
|
2086
|
+
showTicks?: boolean | undefined;
|
|
1971
2087
|
significantLines?: number[] | undefined;
|
|
1972
2088
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
1973
2089
|
symmetricRange?: number | undefined;
|
|
1974
2090
|
upperValue?: number | undefined;
|
|
1975
2091
|
lowerValue?: number | undefined;
|
|
1976
|
-
hiddenLabels?: boolean | undefined;
|
|
1977
2092
|
} | undefined;
|
|
1978
2093
|
yAxis?: {
|
|
2094
|
+
keys?: (string | number)[] | undefined;
|
|
1979
2095
|
title?: string | {
|
|
1980
2096
|
type: "column";
|
|
1981
2097
|
value: string;
|
|
@@ -1983,17 +2099,29 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
1983
2099
|
label?: string | undefined;
|
|
1984
2100
|
valueLabels?: string | undefined;
|
|
1985
2101
|
} | undefined;
|
|
1986
|
-
scale?: "
|
|
2102
|
+
scale?: "discrete" | undefined;
|
|
2103
|
+
labels?: Record<string, string> | undefined;
|
|
1987
2104
|
showGrid?: boolean | undefined;
|
|
1988
2105
|
linesBetweenCategories?: boolean | undefined;
|
|
1989
2106
|
showTicks?: boolean | undefined;
|
|
1990
2107
|
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
2108
|
+
hiddenLabels?: boolean | undefined;
|
|
2109
|
+
} | {
|
|
2110
|
+
title?: string | {
|
|
2111
|
+
type: "column";
|
|
2112
|
+
value: string;
|
|
2113
|
+
format?: string | undefined;
|
|
2114
|
+
label?: string | undefined;
|
|
2115
|
+
valueLabels?: string | undefined;
|
|
2116
|
+
} | undefined;
|
|
2117
|
+
scale?: "linear" | "log" | undefined;
|
|
2118
|
+
showGrid?: boolean | undefined;
|
|
2119
|
+
showTicks?: boolean | undefined;
|
|
1991
2120
|
significantLines?: number[] | undefined;
|
|
1992
2121
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
1993
2122
|
symmetricRange?: number | undefined;
|
|
1994
2123
|
upperValue?: number | undefined;
|
|
1995
2124
|
lowerValue?: number | undefined;
|
|
1996
|
-
hiddenLabels?: boolean | undefined;
|
|
1997
2125
|
} | undefined;
|
|
1998
2126
|
facetBy?: {
|
|
1999
2127
|
type: "column";
|
|
@@ -2033,7 +2161,7 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
2033
2161
|
title: {
|
|
2034
2162
|
name: string;
|
|
2035
2163
|
show?: boolean | undefined;
|
|
2036
|
-
position?: "
|
|
2164
|
+
position?: "center" | "left" | "right" | undefined;
|
|
2037
2165
|
};
|
|
2038
2166
|
keyColumn: {
|
|
2039
2167
|
type: "column";
|
|
@@ -2173,6 +2301,7 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
2173
2301
|
nCols?: number | undefined;
|
|
2174
2302
|
} | undefined;
|
|
2175
2303
|
xAxis?: {
|
|
2304
|
+
keys?: (string | number)[] | undefined;
|
|
2176
2305
|
title?: string | {
|
|
2177
2306
|
type: "column";
|
|
2178
2307
|
value: string;
|
|
@@ -2180,19 +2309,32 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
2180
2309
|
label?: string | undefined;
|
|
2181
2310
|
valueLabels?: string | undefined;
|
|
2182
2311
|
} | undefined;
|
|
2183
|
-
scale?: "
|
|
2312
|
+
scale?: "discrete" | undefined;
|
|
2313
|
+
labels?: Record<string, string> | undefined;
|
|
2184
2314
|
showGrid?: boolean | undefined;
|
|
2185
2315
|
linesBetweenCategories?: boolean | undefined;
|
|
2186
2316
|
showTicks?: boolean | undefined;
|
|
2187
2317
|
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
2318
|
+
hiddenLabels?: boolean | undefined;
|
|
2319
|
+
} | {
|
|
2320
|
+
title?: string | {
|
|
2321
|
+
type: "column";
|
|
2322
|
+
value: string;
|
|
2323
|
+
format?: string | undefined;
|
|
2324
|
+
label?: string | undefined;
|
|
2325
|
+
valueLabels?: string | undefined;
|
|
2326
|
+
} | undefined;
|
|
2327
|
+
scale?: "linear" | "log" | undefined;
|
|
2328
|
+
showGrid?: boolean | undefined;
|
|
2329
|
+
showTicks?: boolean | undefined;
|
|
2188
2330
|
significantLines?: number[] | undefined;
|
|
2189
2331
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
2190
2332
|
symmetricRange?: number | undefined;
|
|
2191
2333
|
upperValue?: number | undefined;
|
|
2192
2334
|
lowerValue?: number | undefined;
|
|
2193
|
-
hiddenLabels?: boolean | undefined;
|
|
2194
2335
|
} | undefined;
|
|
2195
2336
|
yAxis?: {
|
|
2337
|
+
keys?: (string | number)[] | undefined;
|
|
2196
2338
|
title?: string | {
|
|
2197
2339
|
type: "column";
|
|
2198
2340
|
value: string;
|
|
@@ -2200,17 +2342,29 @@ export declare const ScatterplotSettingsSchema: z.ZodObject<{
|
|
|
2200
2342
|
label?: string | undefined;
|
|
2201
2343
|
valueLabels?: string | undefined;
|
|
2202
2344
|
} | undefined;
|
|
2203
|
-
scale?: "
|
|
2345
|
+
scale?: "discrete" | undefined;
|
|
2346
|
+
labels?: Record<string, string> | undefined;
|
|
2204
2347
|
showGrid?: boolean | undefined;
|
|
2205
2348
|
linesBetweenCategories?: boolean | undefined;
|
|
2206
2349
|
showTicks?: boolean | undefined;
|
|
2207
2350
|
labelsPosition?: "center" | "45deg" | "90deg" | undefined;
|
|
2351
|
+
hiddenLabels?: boolean | undefined;
|
|
2352
|
+
} | {
|
|
2353
|
+
title?: string | {
|
|
2354
|
+
type: "column";
|
|
2355
|
+
value: string;
|
|
2356
|
+
format?: string | undefined;
|
|
2357
|
+
label?: string | undefined;
|
|
2358
|
+
valueLabels?: string | undefined;
|
|
2359
|
+
} | undefined;
|
|
2360
|
+
scale?: "linear" | "log" | undefined;
|
|
2361
|
+
showGrid?: boolean | undefined;
|
|
2362
|
+
showTicks?: boolean | undefined;
|
|
2208
2363
|
significantLines?: number[] | undefined;
|
|
2209
2364
|
significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
|
|
2210
2365
|
symmetricRange?: number | undefined;
|
|
2211
2366
|
upperValue?: number | undefined;
|
|
2212
2367
|
lowerValue?: number | undefined;
|
|
2213
|
-
hiddenLabels?: boolean | undefined;
|
|
2214
2368
|
} | undefined;
|
|
2215
2369
|
facetBy?: {
|
|
2216
2370
|
type: "column";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scatterplot.d.ts","sourceRoot":"","sources":["../../src/types/scatterplot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,oCAAoC,EAAE,QAAQ,EAAE,SAAS,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyDpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,MAAM,qBAAqB,GAAG,MAAM,CACtC,MAAM,EACN;IACI,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,OAAO,EAAE,CAAC,MAAM,OAAO,CAAC,EAAE,CAAC;IAC3B,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,KAAK,SAAS,GAAG,SAAS,CAAC;IACzE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;CACpC,CACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ScaleBand, ScalePoint } from 'd3-scale';
|
|
2
|
+
import { DiscreteLabelsPosition, Orientation } from '../types';
|
|
3
|
+
export declare function createMultilineDiscreteLabels(facetKeys: string[], labelsPosition: DiscreteLabelsPosition, labelsMap: Record<string, string>, hiddenLabels: boolean, orientation: Orientation, scalesByFacet: Record<string, ScaleBand<string> | ScalePoint<string | number>>): Record<string, Record<string, string[]>>;
|
|
4
|
+
//# sourceMappingURL=createMultilineDiscreteLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMultilineDiscreteLabels.d.ts","sourceRoot":"","sources":["../../src/utils/createMultilineDiscreteLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMpE,wBAAgB,6BAA6B,CACzC,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE,sBAAsB,EACtC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,YAAY,EAAE,OAAO,EACrB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,4CAyCjF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CAPTION_LINE_HEIGHT as l } from "../discrete/constants.js";
|
|
2
|
+
import { splitTextByWidth as T } from "./splitTextByWidth.js";
|
|
3
|
+
const A = Math.sin(Math.PI / 4);
|
|
4
|
+
function E(h, c, a, m, I, M) {
|
|
5
|
+
const s = {
|
|
6
|
+
center: 120,
|
|
7
|
+
"45deg": 256,
|
|
8
|
+
"90deg": 320
|
|
9
|
+
}, _ = I === "vertical";
|
|
10
|
+
function g(t, n) {
|
|
11
|
+
return t === "center" ? 1 / 0 : Math.floor(t === "45deg" ? n * A / l : n / l);
|
|
12
|
+
}
|
|
13
|
+
return h.reduce((t, n) => {
|
|
14
|
+
const o = M[n], u = o.step(), f = s[c], p = c === "center" ? Math.min(f, u) : f;
|
|
15
|
+
return t[n] = o.domain().reduce((e, r) => {
|
|
16
|
+
if (m)
|
|
17
|
+
return e[r] = [], e;
|
|
18
|
+
const i = a[r];
|
|
19
|
+
if (!_)
|
|
20
|
+
e[r] = [i];
|
|
21
|
+
else {
|
|
22
|
+
const L = g(c, u), d = T(i, p, 14);
|
|
23
|
+
e[r] = d.length > L ? [i] : d;
|
|
24
|
+
}
|
|
25
|
+
return e;
|
|
26
|
+
}, {}), t;
|
|
27
|
+
}, {});
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
E as createMultilineDiscreteLabels
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=createMultilineDiscreteLabels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMultilineDiscreteLabels.js","sources":["../../src/utils/createMultilineDiscreteLabels.ts"],"sourcesContent":["import type { ScaleBand, ScalePoint } from 'd3-scale';\nimport type { DiscreteLabelsPosition, Orientation } from '../types';\nimport { CAPTION_LINE_HEIGHT } from '../discrete/constants';\nimport { splitTextByWidth } from './splitTextByWidth';\n\nconst SIN_PI_4 = Math.sin(Math.PI / 4);\n\nexport function createMultilineDiscreteLabels(\n facetKeys: string[],\n labelsPosition: DiscreteLabelsPosition,\n labelsMap: Record<string, string>,\n hiddenLabels: boolean,\n orientation: Orientation,\n scalesByFacet: Record<string, ScaleBand<string> | ScalePoint<string | number>>\n) {\n const DEFAULT_MAX_WIDTH = {\n 'center': 120,\n '45deg': 256,\n '90deg': 320,\n };\n const isVertical = orientation === 'vertical';\n\n function getMaxLinesCount(labelsPosition: 'center' | '45deg' | '90deg', bandwidth: number) {\n if (labelsPosition === 'center') {\n return Infinity;\n }\n if (labelsPosition === '45deg') {\n return Math.floor((bandwidth * SIN_PI_4) / CAPTION_LINE_HEIGHT);\n }\n return Math.floor(bandwidth / CAPTION_LINE_HEIGHT);\n }\n\n return facetKeys.reduce((res: Record<string, Record<string, string[]>>, facetKey) => {\n const scale = scalesByFacet[facetKey];\n const bandwidth = scale.step();\n const defaultWidth = DEFAULT_MAX_WIDTH[labelsPosition];\n const width = labelsPosition === 'center' ? Math.min(defaultWidth, bandwidth) : defaultWidth;\n res[facetKey] = scale.domain().reduce((res2: Record<string, string[]>, axisKey) => {\n if (hiddenLabels) {\n res2[axisKey] = [];\n return res2;\n }\n const label = labelsMap[axisKey];\n if (!isVertical) {\n res2[axisKey] = [label];\n } else {\n const maxLinesCount = getMaxLinesCount(labelsPosition, bandwidth);\n const multilineKey = splitTextByWidth(label, width, 14);\n res2[axisKey] = multilineKey.length > maxLinesCount ? [label] : multilineKey;\n }\n return res2;\n }, {});\n return res;\n }, {});\n}"],"names":["SIN_PI_4","createMultilineDiscreteLabels","facetKeys","labelsPosition","labelsMap","hiddenLabels","orientation","scalesByFacet","DEFAULT_MAX_WIDTH","isVertical","getMaxLinesCount","bandwidth","CAPTION_LINE_HEIGHT","res","facetKey","scale","defaultWidth","width","res2","axisKey","label","maxLinesCount","multilineKey","splitTextByWidth"],"mappings":";;AAKA,MAAMA,IAAW,KAAK,IAAI,KAAK,KAAK,CAAC;AAE9B,SAASC,EACZC,GACAC,GACAC,GACAC,GACAC,GACAC,GACF;AACG,QAAMC,IAAoB;AAAA,IACvB,QAAU;AAAA,IACV,SAAS;AAAA,IACT,SAAS;AAAA,EAAA,GAEPC,IAAaH,MAAgB;AAEnC,WAASI,EAAiBP,GAA8CQ,GAAmB;AACvF,WAAIR,MAAmB,WACZ,QAGA,KAAK,MADZA,MAAmB,UACAQ,IAAYX,IAAYY,IAE7BD,IAAYC,CAFoC;AAAA,EAGtE;AAEA,SAAOV,EAAU,OAAO,CAACW,GAA+CC,MAAa;AACjF,UAAMC,IAAQR,EAAcO,CAAQ,GAC9BH,IAAYI,EAAM,KAAA,GAClBC,IAAeR,EAAkBL,CAAc,GAC/Cc,IAAQd,MAAmB,WAAW,KAAK,IAAIa,GAAcL,CAAS,IAAIK;AAChF,WAAAH,EAAIC,CAAQ,IAAIC,EAAM,OAAA,EAAS,OAAO,CAACG,GAAgCC,MAAY;AAC/E,UAAId;AACA,eAAAa,EAAKC,CAAO,IAAI,CAAA,GACTD;AAEX,YAAME,IAAQhB,EAAUe,CAAO;AAC/B,UAAI,CAACV;AACD,QAAAS,EAAKC,CAAO,IAAI,CAACC,CAAK;AAAA,WACnB;AACH,cAAMC,IAAgBX,EAAiBP,GAAgBQ,CAAS,GAC1DW,IAAeC,EAAiBH,GAAOH,GAAO,EAAE;AACtD,QAAAC,EAAKC,CAAO,IAAIG,EAAa,SAASD,IAAgB,CAACD,CAAK,IAAIE;AAAA,MACpE;AACA,aAAOJ;AAAA,IACX,GAAG,CAAA,CAAE,GACEL;AAAA,EACX,GAAG,CAAA,CAAE;AACT;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFacetRowsColumns.d.ts","sourceRoot":"","sources":["../../src/utils/getFacetRowsColumns.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAWhG;AAGD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAM7F"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function o(c, i, e) {
|
|
2
|
+
const r = new Array(e).fill(null).map(() => []);
|
|
3
|
+
for (let t = 0; t < e; t++)
|
|
4
|
+
for (let f = 0; f < i; f++)
|
|
5
|
+
f * e + t < c.length && r[t].push(c[f * e + t]);
|
|
6
|
+
return r;
|
|
7
|
+
}
|
|
8
|
+
function a(c, i, e) {
|
|
9
|
+
const r = [];
|
|
10
|
+
for (let t = 0; t < i; t++)
|
|
11
|
+
r.push(c.slice(t * e, t * e + e));
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
o as getFacetColumns,
|
|
16
|
+
a as getFacetRows
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=getFacetRowsColumns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFacetRowsColumns.js","sources":["../../src/utils/getFacetRowsColumns.ts"],"sourcesContent":["\n// facet keys grouped by columns\nexport function getFacetColumns(facetKeys: string[], nRows: number, nColumns: number): string[][] {\n const result: string[][] = new Array(nColumns).fill(null).map(() => []);\n for (let i = 0; i < nColumns; i++) {\n for (let j = 0; j < nRows; j++) {\n const facetIdx = j * nColumns + i;\n if (facetIdx < facetKeys.length) {\n result[i].push(facetKeys[j * nColumns + i]);\n }\n }\n }\n return result;\n}\n\n// facet keys grouped by rows\nexport function getFacetRows(facetKeys: string[], nRows: number, nColumns: number): string[][] {\n const result: string[][] = [];\n for (let i = 0; i < nRows; i++) {\n result.push(facetKeys.slice(i * nColumns, i * nColumns + nColumns));\n }\n return result;\n}"],"names":["getFacetColumns","facetKeys","nRows","nColumns","result","i","j","getFacetRows"],"mappings":"AAEO,SAASA,EAAgBC,GAAqBC,GAAeC,GAA8B;AAC9F,QAAMC,IAAqB,IAAI,MAAMD,CAAQ,EAAE,KAAK,IAAI,EAAE,IAAI,MAAM,EAAE;AACtE,WAASE,IAAI,GAAGA,IAAIF,GAAUE;AAC1B,aAASC,IAAI,GAAGA,IAAIJ,GAAOI;AAEvB,MADiBA,IAAIH,IAAWE,IACjBJ,EAAU,UACrBG,EAAOC,CAAC,EAAE,KAAKJ,EAAUK,IAAIH,IAAWE,CAAC,CAAC;AAItD,SAAOD;AACX;AAGO,SAASG,EAAaN,GAAqBC,GAAeC,GAA8B;AAC3F,QAAMC,IAAqB,CAAA;AAC3B,WAASC,IAAI,GAAGA,IAAIH,GAAOG;AACvB,IAAAD,EAAO,KAAKH,EAAU,MAAMI,IAAIF,GAAUE,IAAIF,IAAWA,CAAQ,CAAC;AAEtE,SAAOC;AACX;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ScaleBand, ScalePoint } from 'd3-scale';
|
|
2
|
+
import { DiscreteLabelsPosition, Orientation } from '../types';
|
|
3
|
+
export declare function measureMultilineDiscreteLabels(facetKeys: string[], rowsCount: number, columnsCount: number, labelsPosition: DiscreteLabelsPosition, axisLabels: Record<string, Record<string, string[]>>, orientation: Orientation, scalesByFacet: Record<string, ScaleBand<string> | ScalePoint<string | number>>): {
|
|
4
|
+
axisCaptionsWidthByRows: number[];
|
|
5
|
+
axisCaptionsWidthByColumns: number[];
|
|
6
|
+
xTail: number;
|
|
7
|
+
yTail: number;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=measureMultilineDiscreteLabels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureMultilineDiscreteLabels.d.ts","sourceRoot":"","sources":["../../src/utils/measureMultilineDiscreteLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOpE,wBAAgB,8BAA8B,CACtC,SAAS,EAAE,MAAM,EAAE,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,sBAAsB,EACtC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EACpD,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;;;;;EA+GjF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CAPTION_LINE_HEIGHT as B } from "../discrete/constants.js";
|
|
2
|
+
import { TextMeasurer as F } from "./TextMeasurer/TextMeasurer.js";
|
|
3
|
+
import { getFacetRows as O, getFacetColumns as k } from "./getFacetRowsColumns.js";
|
|
4
|
+
const W = Math.sin(Math.PI / 4);
|
|
5
|
+
function D(d, f, l, m, o, L, h) {
|
|
6
|
+
const N = new F("600 14px Manrope"), A = L === "vertical";
|
|
7
|
+
function x(t) {
|
|
8
|
+
return t.length ? Math.max(...t.map((n) => N.getTextWidth(n))) : 0;
|
|
9
|
+
}
|
|
10
|
+
function s(t) {
|
|
11
|
+
return t.length ? Math.max(...t.map(x)) : 0;
|
|
12
|
+
}
|
|
13
|
+
let u = [], c = [], T = 0, _ = 0;
|
|
14
|
+
const p = O(d, f, l), M = k(d, f, l);
|
|
15
|
+
function C(t) {
|
|
16
|
+
return t.map(
|
|
17
|
+
(n) => Math.max(
|
|
18
|
+
...n.map(
|
|
19
|
+
(e) => Math.max(
|
|
20
|
+
...h[e].domain().map(
|
|
21
|
+
(i) => i ? o[e][i].length * B : 0
|
|
22
|
+
)
|
|
23
|
+
)
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function E(t) {
|
|
29
|
+
return t.map((n) => Math.max(
|
|
30
|
+
...n.map((e) => {
|
|
31
|
+
const i = h[e].domain().map((a) => o[e][a]), r = s(i);
|
|
32
|
+
return r > 0 ? r * W + 14 : 0;
|
|
33
|
+
})
|
|
34
|
+
));
|
|
35
|
+
}
|
|
36
|
+
function S(t) {
|
|
37
|
+
return t.map(
|
|
38
|
+
(n) => Math.max(
|
|
39
|
+
...n.map(
|
|
40
|
+
(e) => s(
|
|
41
|
+
h[e].domain().map((i) => o[e][i])
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function I(t, n = !0) {
|
|
48
|
+
const e = n ? t[0] : t[t.length - 1];
|
|
49
|
+
return Math.max(
|
|
50
|
+
...e.map((i) => {
|
|
51
|
+
const r = h[i], a = r.domain(), Z = (g) => r(a[n ? g : a.length - g - 1]) + r.bandwidth() / 2;
|
|
52
|
+
return Math.max(
|
|
53
|
+
...a.map((g, z) => x(o[i][g]) * W - Z(z) + 14)
|
|
54
|
+
);
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
return A ? (m === "center" && (u = C(p)), m === "45deg" && (u = E(p), T = I(p, !0)), m === "90deg" && (u = S(p))) : m === "45deg" ? (c = E(M), _ = I(M, !1)) : c = S(M), { axisCaptionsWidthByRows: u, axisCaptionsWidthByColumns: c, xTail: T, yTail: _ };
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
D as measureMultilineDiscreteLabels
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=measureMultilineDiscreteLabels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measureMultilineDiscreteLabels.js","sources":["../../src/utils/measureMultilineDiscreteLabels.ts"],"sourcesContent":["import type { ScaleBand, ScalePoint } from 'd3-scale';\nimport { CAPTION_LINE_HEIGHT } from '../discrete/constants';\nimport type { DiscreteLabelsPosition, Orientation } from '../types';\nimport { TextMeasurer } from './TextMeasurer/TextMeasurer';\nimport { getFacetColumns, getFacetRows } from './getFacetRowsColumns';\nimport { ZodNumber } from 'zod';\n\nconst SIN_45 = Math.sin(Math.PI / 4);\n\nexport function measureMultilineDiscreteLabels (\n facetKeys: string[],\n rowsCount: number,\n columnsCount: number,\n labelsPosition: DiscreteLabelsPosition,\n axisLabels: Record<string, Record<string, string[]>>,\n orientation: Orientation,\n scalesByFacet: Record<string, ScaleBand<string> | ScalePoint<string | number>>\n ) {\n const LABEL_FONT_SIZE = 14;\n const textMeasurer = new TextMeasurer(`600 ${LABEL_FONT_SIZE}px Manrope`);\n const isVertical = orientation === 'vertical';\n\n function getMaxStrWidth(strs: string[]) {\n if (!strs.length) {\n return 0;\n }\n return Math.max(...strs.map(str => textMeasurer.getTextWidth(str)));\n }\n\n function getMultilineMaxStrWidth(strs: string[][]) {\n if (!strs.length) {\n return 0;\n }\n return Math.max(...strs.map(getMaxStrWidth));\n }\n\n // x ticks are always strings and can have variable width in different facets, and can be rotated;\n // for x we consider the widest tick caption in row (column for horizontal orientation);\n // y ticks are always numbers, and we consider only the widest number of all facets\n // because numbers sizes are closer to each other, and it makes more equal facets grid without superwide empty offsets\n let axisCaptionsWidthByRows: number[] = [];\n let axisCaptionsWidthByColumns: number[] = [];\n let xTail = 0;\n let yTail = 0;\n\n const facetRows = getFacetRows(facetKeys, rowsCount, columnsCount);\n const facetColumns = getFacetColumns(facetKeys, rowsCount, columnsCount);\n\n function getSizeWithPositionCenter(columnOrRowKeys:string[][]) {\n return columnOrRowKeys.map(keys =>\n Math.max(\n ...keys.map(facetKey =>\n Math.max(\n ...scalesByFacet[facetKey]\n .domain()\n // do not consider empty ticks captions, for example - single group\n .map(axisKey =>\n axisKey ? axisLabels[facetKey][axisKey].length * CAPTION_LINE_HEIGHT : 0\n )\n )\n )\n )\n );\n }\n function getSizeWithPosition45deg(columnOrRowKeys:string[][]) {\n return columnOrRowKeys.map(keys => {\n return Math.max(\n ...keys.map(key => {\n const labels = scalesByFacet[key]\n .domain()\n .map(axisKey => axisLabels[key][axisKey]);\n const ticksWidth = getMultilineMaxStrWidth(labels);\n return ticksWidth > 0 ? ticksWidth * SIN_45 + LABEL_FONT_SIZE : 0;\n })\n );\n });\n }\n function getSizeWithPosition90deg(columnOrRowKeys:string[][]) {\n return columnOrRowKeys\n // max of ticks width in every facet's column\n .map(keys =>\n Math.max(\n ...keys.map(facetKey =>\n getMultilineMaxStrWidth(\n scalesByFacet[facetKey]\n .domain()\n .map(axisKey => axisLabels[facetKey][axisKey])\n )\n )\n )\n );\n }\n function getTail(columnOrRowKeys:string[][], first = true) {\n const keys = first ? columnOrRowKeys[0] : columnOrRowKeys[columnOrRowKeys.length - 1];\n return Math.max(\n ...keys.map(facetKey => {\n const scale = scalesByFacet[facetKey];\n const ticks = scale.domain();\n const pos = (idx:number) => (scale(ticks[first ? idx : ticks.length - idx - 1] as string) as number) + scale.bandwidth() / 2;\n return Math.max(\n ...ticks.map((tick, idx) => getMaxStrWidth(axisLabels[facetKey][tick]) * SIN_45 - pos(idx) + LABEL_FONT_SIZE)\n );\n })\n );\n }\n if (!isVertical) {\n if (labelsPosition === '45deg') {\n axisCaptionsWidthByColumns = getSizeWithPosition45deg(facetColumns);\n yTail = getTail(facetColumns, false);\n } else {\n // with horizontal chart orientation X ticks are always in horizontal position\n axisCaptionsWidthByColumns = getSizeWithPosition90deg(facetColumns);\n }\n } else {\n if (labelsPosition === 'center') {\n axisCaptionsWidthByRows = getSizeWithPositionCenter(facetRows);\n }\n if (labelsPosition === '45deg') {\n axisCaptionsWidthByRows = getSizeWithPosition45deg(facetRows);\n xTail = getTail(facetRows, true);\n }\n if (labelsPosition === '90deg') {\n axisCaptionsWidthByRows = getSizeWithPosition90deg(facetRows);\n }\n }\n\n return {axisCaptionsWidthByRows, axisCaptionsWidthByColumns, xTail, yTail};\n }"],"names":["SIN_45","measureMultilineDiscreteLabels","facetKeys","rowsCount","columnsCount","labelsPosition","axisLabels","orientation","scalesByFacet","textMeasurer","TextMeasurer","isVertical","getMaxStrWidth","strs","str","getMultilineMaxStrWidth","axisCaptionsWidthByRows","axisCaptionsWidthByColumns","xTail","yTail","facetRows","getFacetRows","facetColumns","getFacetColumns","getSizeWithPositionCenter","columnOrRowKeys","keys","facetKey","axisKey","CAPTION_LINE_HEIGHT","getSizeWithPosition45deg","key","labels","ticksWidth","getSizeWithPosition90deg","getTail","first","scale","ticks","pos","idx","tick"],"mappings":";;;AAOA,MAAMA,IAAS,KAAK,IAAI,KAAK,KAAK,CAAC;AAE5B,SAASC,EACRC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACF;AAEE,QAAMC,IAAe,IAAIC,EAAa,kBAAkC,GAClEC,IAAaJ,MAAgB;AAEnC,WAASK,EAAeC,GAAgB;AACpC,WAAKA,EAAK,SAGH,KAAK,IAAI,GAAGA,EAAK,IAAI,OAAOJ,EAAa,aAAaK,CAAG,CAAC,CAAC,IAFvD;AAAA,EAGf;AAEA,WAASC,EAAwBF,GAAkB;AAC/C,WAAKA,EAAK,SAGH,KAAK,IAAI,GAAGA,EAAK,IAAID,CAAc,CAAC,IAFhC;AAAA,EAGf;AAMA,MAAII,IAAoC,CAAA,GACpCC,IAAuC,CAAA,GACvCC,IAAQ,GACRC,IAAQ;AAEZ,QAAMC,IAAYC,EAAanB,GAAWC,GAAWC,CAAY,GAC3DkB,IAAeC,EAAgBrB,GAAWC,GAAWC,CAAY;AAEvE,WAASoB,EAA0BC,GAA4B;AAC3D,WAAOA,EAAgB;AAAA,MAAI,OACnB,KAAK;AAAA,QACD,GAAGC,EAAK;AAAA,UAAI,OACR,KAAK;AAAA,YACD,GAAGlB,EAAcmB,CAAQ,EACpB,S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Ec,CAAI,CAAC,IAAIzC,IAASuC,EAAIC,CAAG,IAAI,EAAe;AAAA,QAAA;AAAA,MAEpH,CAAC;AAAA,IAAA;AAAA,EAEb;AACA,SAAK7B,KASGN,MAAmB,aACnBW,IAA0BQ,EAA0BJ,CAAS,IAE7Df,MAAmB,YACnBW,IAA0Bc,EAAyBV,CAAS,GAC5DF,IAAQiB,EAAQf,GAAW,EAAI,IAE/Bf,MAAmB,YACnBW,IAA0BkB,EAAyBd,CAAS,MAhB5Df,MAAmB,WACnBY,IAA6Ba,EAAyBR,CAAY,GAClEH,IAAQgB,EAAQb,GAAc,EAAK,KAGnCL,IAA6BiB,EAAyBZ,CAAY,GAenE,EAAC,yBAAAN,GAAyB,4BAAAC,GAA4B,OAAAC,GAAO,OAAAC,EAAA;AACxE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitTextByWidth.d.ts","sourceRoot":"","sources":["../../src/utils/splitTextByWidth.ts"],"names":[],"mappings":"AAmDA,wBAAgB,gBAAgB,CAAE,IAAI,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,YA0ChF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextMeasurer as f } from "
|
|
1
|
+
import { TextMeasurer as f } from "./TextMeasurer/TextMeasurer.js";
|
|
2
2
|
function x(o, l, h, u = 14) {
|
|
3
3
|
const i = new f(`600 ${u}px Manrope`), n = [];
|
|
4
4
|
o.split(new RegExp("(?=[_-])|(?<=[_-])")).forEach((r) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitTextByWidth.js","sources":["../../src/utils/splitTextByWidth.ts"],"sourcesContent":["import { TextMeasurer } from './TextMeasurer/TextMeasurer';\n\nfunction splitWord(word:string, startLineLength:number, maxLength:number, fontSize = 14) {\n const textMeasurer = new TextMeasurer(`600 ${fontSize}px Manrope`);\n // \"_\" and \"-\" symbols have priority as separation bounds, if this is not enough split by single symbols\n const parts:string[] = [];\n word\n .split(/(?=[_-])|(?<=[_-])/)\n .forEach((part) => {\n const length = textMeasurer.getTextWidth(part);\n if (length > maxLength) {\n parts.push(...part.split(''));\n } else {\n parts.push(part);\n }\n });\n let currentLine = '';\n let currentLineLength = 0;\n let i = 0;\n let firstPart = '';\n while (currentLineLength <= startLineLength) {\n const nextLength = textMeasurer.getTextWidth(currentLine + parts[i]);\n if (nextLength < startLineLength) {\n currentLine += parts[i];\n firstPart = currentLine;\n i++;\n }\n currentLineLength = nextLength;\n }\n currentLine = '';\n currentLineLength = 0;\n const lines:string[] = [];\n for (i; i < parts.length; i++) {\n const nextLength = textMeasurer.getTextWidth(currentLine + parts[i]);\n if (nextLength < maxLength) {\n currentLine += parts[i];\n currentLineLength = nextLength;\n } else {\n lines.push(currentLine);\n currentLine = parts[i];\n currentLineLength = textMeasurer.getTextWidth(parts[i]);\n }\n }\n return {\n firstPart,\n lines,\n lastPart: currentLine,\n lastPartLength: currentLineLength\n };\n}\n\nexport function splitTextByWidth (text:string, maxWidth: number, fontSize: number) {\n const textMeasurer = new TextMeasurer(`600 ${fontSize}px Manrope`);\n if (text.trim() === '') {\n return [];\n }\n if (textMeasurer.getTextWidth(text) <= maxWidth) {\n return [text];\n }\n const words = text.split(/\\s+/);\n const result:string[] = [];\n let currentLine = '';\n let currentLineLength = 0;\n for (let i = 0; i < words.length; i++) {\n const tempLine = `${currentLine} ${words[i]}`;\n const tempLineLength = textMeasurer.getTextWidth(tempLine);\n if (tempLineLength <= maxWidth) {\n currentLine = tempLine;\n currentLineLength = tempLineLength;\n } else {\n const wordLength = textMeasurer.getTextWidth(words[i]);\n if (wordLength > maxWidth) {\n const {\n firstPart,\n lines,\n lastPart,\n lastPartLength\n } = splitWord(words[i], maxWidth - currentLineLength, maxWidth, fontSize);\n result.push(`${currentLine} ${firstPart}`);\n result.push(...lines);\n currentLine = lastPart;\n currentLineLength = lastPartLength;\n } else {\n result.push(currentLine);\n currentLine = words[i];\n currentLineLength = wordLength;\n }\n }\n }\n result.push(currentLine);\n return result.filter((line) => {\n return line.length > 0;\n });\n}\n"],"names":["splitWord","word","startLineLength","maxLength","fontSize","textMeasurer","TextMeasurer","parts","part","currentLine","currentLineLength","i","firstPart","nextLength","lines","splitTextByWidth","text","maxWidth","words","result","tempLine","tempLineLength","wordLength","lastPart","lastPartLength","line"],"mappings":";AAEA,SAASA,EAAUC,GAAaC,GAAwBC,GAAkBC,IAAW,IAAI;AACrF,QAAMC,IAAe,IAAIC,EAAa,OAAOF,CAAQ,YAAY,GAE3DG,IAAiB,CAAA;AACvB,EAAAN,EACK,MAAM,WAAA,oBAAoB,GAC1B,QAAQ,CAACO,MAAS;AAEf,IADeH,EAAa,aAAaG,CAAI,IAChCL,IACTI,EAAM,KAAK,GAAGC,EAAK,MAAM,EAAE,CAAC,IAE5BD,EAAM,KAAKC,CAAI;AAAA,EAEvB,CAAC;AACL,MAAIC,IAAc,IACdC,IAAoB,GACpBC,IAAI,GACJC,IAAY;AAChB,SAAOF,KAAqBR,KAAiB;AACzC,UAAMW,IAAaR,EAAa,aAAaI,IAAcF,EAAMI,CAAC,CAAC;AACnE,IAAIE,IAAaX,MACbO,KAAeF,EAAMI,CAAC,GACtBC,IAAYH,GACZE,MAEJD,IAAoBG;AAAA,EACxB;AACA,EAAAJ,IAAc,IACdC,IAAoB;AACpB,QAAMI,IAAiB,CAAA;AACvB,OAAKH,GAAGA,IAAIJ,EAAM,QAAQI,KAAK;AAC3B,UAAME,IAAaR,EAAa,aAAaI,IAAcF,EAAMI,CAAC,CAAC;AACnE,IAAIE,IAAaV,KACbM,KAAeF,EAAMI,CAAC,GACtBD,IAAoBG,MAEpBC,EAAM,KAAKL,CAAW,GACtBA,IAAcF,EAAMI,CAAC,GACrBD,IAAoBL,EAAa,aAAaE,EAAMI,CAAC,CAAC;AAAA,EAE9D;AACA,SAAO;AAAA,IACH,WAAAC;AAAA,IACA,OAAAE;AAAA,IACA,UAAUL;AAAA,IACV,gBA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