mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-15 12:40:12 +00:00
3.0
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace XCharts.Runtime
|
||||
/// the callback function of click bar.
|
||||
/// |点击柱形图柱条回调。参数:eventData, dataIndex
|
||||
/// </summary>
|
||||
public Action<PointerEventData, int> onPointerClickBar { set { m_OnPointerClickBar = value; m_ForceOpenRaycastTarget = true; } }
|
||||
public Action<PointerEventData, int> onPointerClickBar { set { m_OnPointerClickBar = value; m_ForceOpenRaycastTarget = true; } get { return m_OnPointerClickBar; } }
|
||||
/// <summary>
|
||||
/// 坐标轴变更数据索引时回调。参数:axis, dataIndex/dataValue
|
||||
/// </summary>
|
||||
@@ -142,6 +142,8 @@ namespace XCharts.Runtime
|
||||
serie.ResetInteract();
|
||||
m_RefreshChart = true;
|
||||
if (m_Painter) m_Painter.Refresh();
|
||||
foreach (var painter in m_PainterList) painter.Refresh();
|
||||
if (m_PainterTop) m_PainterTop.Refresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -164,7 +166,6 @@ namespace XCharts.Runtime
|
||||
RefreshPainter(serie);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Remove all series and legend data.
|
||||
/// |It just emptying all of serie's data without emptying the list of series.
|
||||
@@ -374,7 +375,7 @@ namespace XCharts.Runtime
|
||||
public bool IsInChart(float x, float y)
|
||||
{
|
||||
if (x < m_ChartX || x > m_ChartX + m_ChartWidth ||
|
||||
y < m_ChartY || y > m_ChartY + m_ChartHeight)
|
||||
y < m_ChartY || y > m_ChartY + m_ChartHeight)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -527,9 +528,9 @@ namespace XCharts.Runtime
|
||||
|
||||
public Color32 GetItemColor(Serie serie, SerieData serieData, bool highlight = false)
|
||||
{
|
||||
var colorIndex = serieData == null || !serie.useDataNameForColor
|
||||
? GetLegendRealShowNameIndex(serie.legendName)
|
||||
: GetLegendRealShowNameIndex(serieData.legendName);
|
||||
var colorIndex = serieData == null || !serie.useDataNameForColor ?
|
||||
GetLegendRealShowNameIndex(serie.legendName) :
|
||||
GetLegendRealShowNameIndex(serieData.legendName);
|
||||
return SerieHelper.GetItemColor(serie, serieData, m_Theme, colorIndex, highlight);
|
||||
}
|
||||
|
||||
@@ -538,4 +539,4 @@ namespace XCharts.Runtime
|
||||
return SerieHelper.GetItemColor(serie, null, m_Theme, serie.context.colorIndex, highlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user