You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai-chart): respect metric direction and missing values / 修复 AI 图表的指标方向与缺失值处理 #797
fix(ai-chart): respect metric direction and missing values / 修复 AI 图表的指标方向与缺失值处理
Problem
AI-generated charts currently treat missing metric values as zero, invert only a hard-coded subset of lower-is-better radar metrics, and always select Top-N values by maximum. This produces misleading lines, radar shapes, and rankings for cost, power, energy, and other lower-is-better metrics.
Expected behavior
Missing values remain missing; real zero remains valid.
Line charts show gaps instead of connecting through synthetic zeroes.
Radar polarity follows the selected metric's canonical roofline direction.
Top-N selects minima for lower-is-better metrics and maxima for higher-is-better metrics.
Missing values never win lower-is-better rankings.
Validation
Pure transformation tests for missing values, metric direction, radar normalization, and Top-N selection.
Focused Cypress coverage for a cost Top-N chart, measured-power radar, and a line with a missing middle point.
中文说明
AI 生成图表目前会把缺失指标当作 0,只对少量硬编码的“越低越好”指标反转雷达图方向,并且 Top-N 始终取最大值。这会导致成本、功耗、能耗等指标的折线、雷达图和排名出现误导性结果。
Activity