feat: multi-column Y-axis plot for series comparison#15
Conversation
Adds a new PlotPickY mode so users can select multiple Y columns before picking the X axis. Each series is rendered in a distinct Catppuccin Mocha accent color with a legend in the top-right corner. Histogram is disabled when more than one Y column is selected (t cycles Line/Bar only). Esc from PlotPickX now goes back to PlotPickY instead of cancelling entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Removing .name() from datasets prevents ratatui's Chart from rendering its own legend, which was doubling up with our custom render_plot_legend and showing the last character of each series name in the line colour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude review this merge request |
|
Claude finished @SpollaL's task in 2m 45s —— View job PR Review: feat/multi-column Y-axis plot for series comparison
Overall this is a well-structured feature. The state machine changes are clean, the color palette integration is consistent, and the QA script coverage is thorough. A couple of issues to address before merging. Bugs1. // current — wrong if first Y col is non-numeric
let first_len = all_series.first().map(|(d, _)| d.len()).unwrap_or(0);
// fix
let first_len = nonempty.first().map(|(_, d)| d.len()).unwrap_or(0);If the first selected Y column has all-null or non-numeric data its series will be empty, making 2. Y-axis title regresses to // current — always generic
.title("Value")
// fix — restore column name for single-Y, generic for multi
.title(if app.plot.y_cols.len() == 1 {
app.headers[app.plot.y_cols[0]].as_str()
} else {
"Value"
})Previously single-series plots showed the column name on the Y axis. That's now gone even when only one column is selected. The legend only appears for multi-Y, so single-Y users lose the axis label with no replacement. Minor / Nits3. Duplicate The 4. No unit tests for The Space-toggle logic in 5. CLAUDE.md The architecture table in CLAUDE.md still shows What looks good
|
@claude address this issues |
|
Claude finished @SpollaL's task in 5m 14s —— View job Tasks
|
@claude have you committed this changes? |
|
Claude finished @SpollaL's task in 3m 57s —— View job All 5 review issues have been addressed and pushed in commit Tasks
|
- Bug 1: move nonempty before first_len so categorical X labels render correctly when the first Y column has no numeric data - Bug 2: restore column-name Y-axis title for single-Y plots (was regressed to generic "Value") - Minor 3: replace dead Mode::Plot arms in get_bar/shortcut_bar with unreachable!() since ui() returns early for Plot mode - Minor 4: add PlotPickY Space-toggle unit tests to plot_tests module - Minor 5: update CLAUDE.md PlotState table (y_col→y_cols) and add PlotPickY to Mode variants list Co-authored-by: Luca Spolladore <SpollaL@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>


Summary
PlotPickYmode that lets users select multiple Y-axis columns before picking XPlotState.y_colreplaced withy_cols: Vec<usize>to support multi-series renderingqa.sh) updated to cover the new multi-Y selection flowTest plan
pin Normal mode → entersPlotPickY, navigate columns with←/→(orh/l), toggle selection withSpaceEnterto advance toPlotPickX,Escto go back toPlotPickY,Escagain to cancelttcycles only Line ↔ Bar (no Histogram)bash qa.shand verify exit 0cargo test🤖 Generated with Claude Code