修复TooltipCross在开启DataZoom时指示位置不准确的问题

This commit is contained in:
monitor1394
2024-06-09 22:13:26 +08:00
parent 8617475808
commit a12c98b1a5
4 changed files with 42 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ namespace XCharts
(!axis.boundaryGap && (local.y > pY - splitWid / 2 && local.y <= pY + splitWid / 2)))
{
axis.context.pointerValue = j;
axis.context.pointerLabelPosition = axis.GetLabelObjectPosition(j);
axis.context.pointerLabelPosition = axis.GetCategoryPosition(j, dataCount);
if (j != lastPointerValue)
{
if (chart.onAxisPointerValueChanged != null)
@@ -78,7 +78,7 @@ namespace XCharts
(!axis.boundaryGap && (local.x > pX - splitWid / 2 && local.x <= pX + splitWid / 2)))
{
axis.context.pointerValue = j;
axis.context.pointerLabelPosition = axis.GetLabelObjectPosition(j);
axis.context.pointerLabelPosition = axis.GetCategoryPosition(j, dataCount);
if (j != lastPointerValue)
{
if (chart.onAxisPointerValueChanged != null)