mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-26 02:40:13 +00:00
Update LineChart.cs
修复当只有两个数据时区域图绘制异常的问题
This commit is contained in:
@@ -451,11 +451,6 @@ namespace XCharts
|
|||||||
dnPos = np + (isDown ? dirDp : -dirDp) * diff;
|
dnPos = np + (isDown ? dirDp : -dirDp) * diff;
|
||||||
upPos1 = np + (isDown ? -dir1v : dir1v) * serie.lineStyle.width;
|
upPos1 = np + (isDown ? -dir1v : dir1v) * serie.lineStyle.width;
|
||||||
upPos2 = np + (isDown ? -dir2v : dir2v) * serie.lineStyle.width;
|
upPos2 = np + (isDown ? -dir2v : dir2v) * serie.lineStyle.width;
|
||||||
if (dataIndex == 1)
|
|
||||||
{
|
|
||||||
stPos1 = lp - dir1v * serie.lineStyle.width;
|
|
||||||
stPos2 = lp + dir1v * serie.lineStyle.width;
|
|
||||||
}
|
|
||||||
lastDir = dir1;
|
lastDir = dir1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -467,6 +462,11 @@ namespace XCharts
|
|||||||
upPos2 = np + dir1v * serie.lineStyle.width;
|
upPos2 = np + dir1v * serie.lineStyle.width;
|
||||||
dnPos = isDown ? upPos2 : upPos1;
|
dnPos = isDown ? upPos2 : upPos1;
|
||||||
}
|
}
|
||||||
|
if (dataIndex == 1)
|
||||||
|
{
|
||||||
|
stPos1 = lp - dir1v * serie.lineStyle.width;
|
||||||
|
stPos2 = lp + dir1v * serie.lineStyle.width;
|
||||||
|
}
|
||||||
var smoothPoints = serie.GetUpSmoothList(dataIndex);
|
var smoothPoints = serie.GetUpSmoothList(dataIndex);
|
||||||
var smoothDownPoints = serie.GetDownSmoothList(dataIndex);
|
var smoothDownPoints = serie.GetDownSmoothList(dataIndex);
|
||||||
var dist = Vector3.Distance(lp, np);
|
var dist = Vector3.Distance(lp, np);
|
||||||
|
|||||||
Reference in New Issue
Block a user