mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 21:40:41 +00:00
修复LineChart在数据过于密集时折线绘制异常的问题 #99
This commit is contained in:
@@ -674,6 +674,16 @@ namespace XCharts
|
||||
upPos1 = np + (isDown ? -dir1v : dir1v) * serie.lineStyle.width;
|
||||
upPos2 = np + (isDown ? -dir2v : dir2v) * serie.lineStyle.width;
|
||||
lastDir = dir1;
|
||||
if (isDown)
|
||||
{
|
||||
if (isYAxis && dnPos.x < lp.x && dnPos.x < nnp.x) dnPos.x = lp.x;
|
||||
if (!isYAxis && dnPos.y < lp.y && dnPos.y < nnp.y) dnPos.y = lp.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isYAxis && dnPos.x > lp.x && dnPos.x > nnp.x) dnPos.x = lp.x;
|
||||
if (!isYAxis && dnPos.y > lp.y && dnPos.y > nnp.y) dnPos.y = lp.y;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -683,6 +693,7 @@ namespace XCharts
|
||||
upPos1 = np - dir1v * serie.lineStyle.width;
|
||||
upPos2 = np + dir1v * serie.lineStyle.width;
|
||||
dnPos = isDown ? upPos2 : upPos1;
|
||||
|
||||
}
|
||||
if (isSecond)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user