mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 17:00:08 +00:00
优化DataZoom
This commit is contained in:
@@ -241,6 +241,18 @@ namespace XCharts
|
||||
else return 0;
|
||||
}
|
||||
|
||||
public float GetData(int index, float min, float max)
|
||||
{
|
||||
if (index >= 0 && index < m_Data.Count)
|
||||
{
|
||||
var value = m_Data[index];
|
||||
if (value < min) return min;
|
||||
else if (value > max) return max;
|
||||
else return value;
|
||||
}
|
||||
else return 0;
|
||||
}
|
||||
|
||||
public float GetPreviousData(int index, bool inverse = false)
|
||||
{
|
||||
if (index >= 0 && index < m_PreviousData.Count)
|
||||
|
||||
Reference in New Issue
Block a user