[optimize] optimize interact and performance

This commit is contained in:
monitor1394
2022-04-13 13:26:46 +08:00
parent 7ca4ddcb88
commit a3d2d3f1d5
15 changed files with 156 additions and 168 deletions

View File

@@ -179,6 +179,7 @@ namespace XCharts.Runtime
private void SetTooltipIndicatorLabel(Axis axis, ChartLabel label)
{
if (label == null) return;
if (double.IsPositiveInfinity(axis.context.pointerValue)) return;
label.SetActive(true);
label.SetLabelActive(true);
label.SetPosition(axis.context.pointerLabelPosition);
@@ -234,7 +235,6 @@ namespace XCharts.Runtime
private void UpdateAxisPointerDataIndex(Serie serie, XAxis xAxis, YAxis yAxis, GridCoord grid, bool isTriggerAxis)
{
serie.context.pointerAxisDataIndexs.Clear();
if (yAxis.IsCategory())
{