修复LineChart在数据过于密集时折线绘制异常的问题 #99

This commit is contained in:
monitor1394
2020-11-22 15:10:56 +08:00
parent f7761d7a00
commit 250f01f2e7
3 changed files with 13 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.11.22) Fixed an issue where `LineChart` draws an exception when the data is too dense #99
* (2020.11.21) Fixed an issue where the scale position of `LineChart` could be abnormal if `alignWithLabel` was `true`
* (2020.11.21) Fixed `Unity5` compatibility error reporting problem
* (2020.11.13) Improved `RadarChart` `Indicator` support for `\n` line feed

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2020.11.22) 修复`LineChart`在数据过于密集时折线绘制异常的问题 #99
* (2020.11.21) 修复`LineChart`的刻度位置在`alignWithLabel``true`时可能异常的问题
* (2020.11.21) 修复`Unity5`兼容报错的问题
* (2020.11.13) 完善`RadarChart``Indicator``\n`换行的支持

View File

@@ -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)
{