[bug] fix multipe grid error (#210)

This commit is contained in:
monitor1394
2022-07-05 21:43:09 +08:00
parent a499002426
commit 9aa8431432
11 changed files with 33 additions and 73 deletions

View File

@@ -199,6 +199,7 @@ namespace XCharts.Runtime
private ISerieContainer GetPointerContainerAndSeries(Tooltip tooltip, List<Serie> list)
{
list.Clear();
ISerieContainer target = null;
for (int i = chart.components.Count - 1; i >= 0; i--)
{
var component = chart.components[i];
@@ -230,11 +231,11 @@ namespace XCharts.Runtime
chart.RefreshTopPainter();
}
}
return container;
target = container;
}
}
}
return null;
return target;
}
private void UpdateAxisPointerDataIndex(Serie serie, XAxis xAxis, YAxis yAxis, GridCoord grid, bool isTriggerAxis)

View File

@@ -58,6 +58,11 @@ namespace XCharts.Runtime
{
m_Active = flag && tooltip.showContent;
ChartHelper.SetActive(gameObject, m_Active);
if (!flag)
{
foreach (var item in m_Items)
item.gameObject.SetActive(false);
}
}
public void Refresh()