修复Log轴时绘制异常的问题

This commit is contained in:
monitor1394
2021-04-29 19:17:12 +08:00
parent 83b876e80d
commit c4bc8c06e7
3 changed files with 28 additions and 10 deletions

View File

@@ -440,7 +440,7 @@ namespace XCharts
{
int minIndex = xAxis.runtimeMinLogIndex;
float nowIndex = xAxis.GetLogValue(xValue);
xDataHig = (nowIndex - minIndex) / (xAxis.splitNumber - 1) * grid.runtimeWidth;
xDataHig = (nowIndex - minIndex) / xAxis.splitNumber * grid.runtimeWidth;
}
else
{
@@ -451,7 +451,7 @@ namespace XCharts
{
int minIndex = yAxis.runtimeMinLogIndex;
float nowIndex = yAxis.GetLogValue(yValue);
yDataHig = (nowIndex - minIndex) / (yAxis.splitNumber - 1) * grid.runtimeHeight;
yDataHig = (nowIndex - minIndex) / yAxis.splitNumber * grid.runtimeHeight;
}
else
{
@@ -477,7 +477,7 @@ namespace XCharts
{
int minIndex = yAxis.runtimeMinLogIndex;
float nowIndex = yAxis.GetLogValue(yValue);
yDataHig = (nowIndex - minIndex) / (yAxis.splitNumber - 1) * grid.runtimeHeight;
yDataHig = (nowIndex - minIndex) / yAxis.splitNumber * grid.runtimeHeight;
}
else
{
@@ -577,7 +577,7 @@ namespace XCharts
{
int minIndex = xAxis.runtimeMinLogIndex;
float nowIndex = xAxis.GetLogValue(value);
dataHig = (nowIndex - minIndex) / (xAxis.splitNumber - 1) * grid.runtimeWidth;
dataHig = (nowIndex - minIndex) / xAxis.splitNumber * grid.runtimeWidth;
}
else
{