Skip to content

Commit 8a217d1

Browse files
committed
fix(plot-builder): auto-smart groups by polar condition, not per-alpha
Alpha is the sweep variable for polars—it should never be a grouping key in Auto (Smart) mode. Removes autoGroupInvariant from alpha and excludes it from label generation so CD-vs-CL plots group by (airfoil, Re, Mach, …) instead of exploding into one series per point. Made-with: Cursor
1 parent fd1c2ef commit 8a217d1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

flexfoil-ui/src/lib/plotFields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const PLOT_FIELDS: PlotFieldMeta[] = [
1313
{ key: 'id', label: 'ID', kind: 'numeric' },
1414
{ key: 'airfoil_name', label: 'Airfoil', kind: 'categorical', autoGroupInvariant: true },
1515
{ key: 'airfoil_hash', label: 'Airfoil Hash', kind: 'categorical', autoGroupInvariant: true },
16-
{ key: 'alpha', label: 'Alpha', kind: 'numeric', autoGroupInvariant: true },
16+
{ key: 'alpha', label: 'Alpha', kind: 'numeric' },
1717
{ key: 'reynolds', label: 'Re', kind: 'numeric', autoGroupInvariant: true },
1818
{ key: 'mach', label: 'Mach', kind: 'numeric', autoGroupInvariant: true },
1919
{ key: 'ncrit', label: 'Ncrit', kind: 'numeric', autoGroupInvariant: true },

flexfoil-ui/src/lib/polarDetection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export function detectSmartRunGroups(
257257

258258
const labels = buildSmartLabels(
259259
allSegments.map(s => s.meta),
260-
new Set(plottedFields as string[]),
260+
new Set([...(plottedFields as string[]), 'alpha']),
261261
);
262262

263263
return allSegments.map((seg, i) => {

0 commit comments

Comments
 (0)