修复CoordinateChart的tooltip报错

This commit is contained in:
monitor1394
2021-05-18 08:34:11 +08:00
parent f93b30d239
commit ccb010fee3
6 changed files with 17 additions and 5 deletions

View File

@@ -79,6 +79,7 @@ namespace XCharts
public bool CheckTootipArea(Vector2 local)
{
if (chart.series.Contains(SerieType.Gauge)) return false;
var serie = GetPointerInSerieIndex(chart.series, local);
if (serie != null)
{

View File

@@ -75,6 +75,7 @@ namespace XCharts
public bool CheckTootipArea(Vector2 local)
{
if (chart.series.Contains(SerieType.Pie)) return false;
bool selected = false;
chart.tooltip.runtimeDataIndex.Clear();
foreach (var serie in chart.series.list)
@@ -102,7 +103,7 @@ namespace XCharts
chart.tooltip.SetActive(false);
chart.RefreshChart();
}
return true;
return selected;
}
public bool OnLegendButtonClick(int index, string legendName, bool show)

View File

@@ -119,6 +119,7 @@ namespace XCharts
public bool CheckTootipArea(Vector2 local)
{
if (chart.series.Contains(SerieType.Radar)) return false;
if (m_IsEnterLegendButtom) return false;
if (!IsInRadar(local)) return false;
bool highlight = false;

View File

@@ -127,6 +127,7 @@ namespace XCharts
public bool CheckTootipArea(Vector2 local)
{
if (chart.series.Contains(SerieType.Ring)) return false;
if (!PointerIsInRingSerie(chart.series, local)) return false;
if (m_IsEnterLegendButtom) return false;
bool selected = false;