Repository navigation
fix: 修复 mini 折线图只有一个有效值时绘制异常的问题 - #3312
Merged
Merged
Conversation
Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>
Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #3312 +/- ##
==========================================
+ Coverage 75.77% 78.80% +3.03%
==========================================
Files 257 224 -33
Lines 11994 12435 +441
Branches 2464 2807 +343
==========================================
+ Hits 9088 9799 +711
+ Misses 1398 946 -452
- Partials 1508 1690 +182 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Size Change: +165 B (+0.02%) Total Size: 740 kB
ℹ️ View Unchanged
|
Laffery
pushed a commit
to Laffery/S2
that referenced
this pull request
Jul 17, 2026
* Initial plan * fix: 修复 mini 折线图只有一个有效值时绘制异常的问题 Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com> * chore: 移除对 pnpm-workspace.yaml 的无关修改 Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com> * fix: 在 scale 函数中处理数据点只有 1 个(或少于 1 个)的特殊情况,避免除以零 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Alexzjt <9548248+Alexzjt@users.noreply.github.com> Co-authored-by: zjt <alex_zjt@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solve the issue and close #3311
当 mini 折线图数据中只有一个有效值(其他为 NaN)时,原实现会绘制一条横线,这在数据可视化语义上是错误的。
修改内容
filterValidChartData函数:过滤掉 y 值为 NaN 的数据点drawLine函数逻辑:示例
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.