fix(compare radar): un-mirror axis labels/arcs from the data polygons - #1664
Conversation
echarts' radar has no clockwise mode (its source carries a literal 'TODO clockwise'; the option is silently ignored), so indicators walk counterclockwise from startAngle while every hand-drawn layer here (bottom-mode axis names, family arcs) is laid out clockwise from the top. Result: the ring rendered mirrored - each score's polygon vertex and tooltip sat under the label of the axis reflected across the vertical, e.g. answer_matches_data plotted under 'Tool Call Errored'. Fix: hand echarts the indicators and each series' values in ring-reversed order (top anchor kept, rest reversed), which renders its counterclockwise walk as the intended clockwise reading order, and map the tooltip's echarts axis index back through the same involution. The dead 'clockwise: true' option is removed. Verified via Playwright against live data: vertices, per-axis tooltips and family arcs now agree on every probed axis.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe radar chart now reverses ECharts indicator and series ordering to preserve clockwise display order with the first axis at the top. Tooltip indices map back to the original chart ordering. ChangesRadar axis ordering
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📊 Coverage ReportOverall Coverage: 93% Diff: origin/agi-anyting_goes_into...HEADNo lines with coverage information in this diff.
|
Bug
The Compare V2 Quality Scores radar rendered mirrored: each score's polygon vertex (and its per-axis tooltip data) sat under the label of the axis reflected across the vertical. E.g.
answer_matches_data's data plotted under the Tool Call Errored label, and hovering there popped the Answer Matches Data tooltip.Cause
echarts' radar coordinate system has no clockwise mode — its source carries a literal
// TODO clockwise, and theclockwise: trueoption this chart set is silently ignored. Indicators walk counterclockwise fromstartAngle, while every hand-drawn layer (bottom-mode axis names, family arcs, and the ring's documented reading order) is laid out clockwise from the top.Fix
Hand echarts the indicators and each series' values in ring-reversed order (top anchor kept, rest reversed) so its counterclockwise walk renders as the intended clockwise reading order, and map the tooltip's echarts axis index back through the same involution (
ringReversed— applying it twice is the identity). The deadclockwise: trueoption is removed.Side mode (the older compare page) also benefits: it now reads clockwise as the comments always claimed.
Verification
Playwright against live data on
/evolution/906968569024/110041900355:svelte-check: 0 errors