完善Pyramid的Tooltip检测

This commit is contained in:
monitor1394
2023-03-21 08:12:20 +08:00
parent d196551756
commit 5757049e74
2 changed files with 8 additions and 1 deletions

View File

@@ -34,7 +34,6 @@ namespace XCharts.Runtime
{
if (m_SerieGrid == null)
return;
var lineWidth = serie.lineStyle.GetWidth(chart.theme.serie.lineWidth);
var needCheck = (chart.isPointerInChart && m_SerieGrid.IsPointerEnter()) || m_LegendEnter;
if (!needCheck)
{
@@ -55,6 +54,7 @@ namespace XCharts.Runtime
return;
}
m_LastCheckContextFlag = needCheck;
var lineWidth = serie.lineStyle.GetWidth(chart.theme.serie.lineWidth);
var themeSymbolSize = chart.theme.serie.lineSymbolSize;
var needInteract = false;
serie.ResetDataIndex();

View File

@@ -668,6 +668,12 @@ namespace XCharts.Runtime
if (labelObject != null) labelObject.SetActive(flag);
}
public void SetPolygon(params Vector2[] points)
{
m_PolygonPoints.Clear();
m_PolygonPoints.AddRange(points);
}
public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)
{
m_PolygonPoints.Clear();
@@ -676,6 +682,7 @@ namespace XCharts.Runtime
m_PolygonPoints.Add(p3);
m_PolygonPoints.Add(p4);
}
public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5)
{
SetPolygon(p1, p2, p3, p4);