mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 09:50:15 +00:00
修复Tooltip在对数轴时指示不准确的问题
This commit is contained in:
@@ -727,6 +727,13 @@ namespace XCharts.Runtime
|
||||
var each = axisLength / data.Count;
|
||||
return (float)(each * (value + 0.5f));
|
||||
}
|
||||
else if (IsLog())
|
||||
{
|
||||
var logValue = GetLogValue(value);
|
||||
var logMin = GetLogValue(context.minValue);
|
||||
var logMax = GetLogValue(context.maxValue);
|
||||
return axisLength * (float)((logValue - logMin) / (logMax - logMin));
|
||||
}
|
||||
else
|
||||
{
|
||||
return axisLength * (float)((value - context.minValue) / context.minMaxRange);
|
||||
|
||||
Reference in New Issue
Block a user