mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 01:40:06 +00:00
增加Chart的onSerieClick,onSerieDown,onSerieEnter和onSerieExit回调
This commit is contained in:
46
Runtime/Internal/Misc/SerieEventData.cs
Normal file
46
Runtime/Internal/Misc/SerieEventData.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// the data of serie event.
|
||||
/// |serie事件的数据。
|
||||
/// </summary>
|
||||
public class SerieEventData
|
||||
{
|
||||
/// <summary>
|
||||
/// the position of pointer in chart.
|
||||
/// |鼠标在chart中的位置。
|
||||
/// </summary>
|
||||
public Vector3 pointerPos { get; set; }
|
||||
/// <summary>
|
||||
/// the index of serie in chart.series.
|
||||
/// |在chart.series中的索引。
|
||||
/// </summary>
|
||||
public int serieIndex { get; set; }
|
||||
/// <summary>
|
||||
/// the index of data in serie.data.
|
||||
/// |在serie.data中的索引。
|
||||
/// </summary>
|
||||
public int dataIndex { get; set; }
|
||||
/// <summary>
|
||||
/// the dimension of data.
|
||||
/// |数据的维度。
|
||||
/// </summary>
|
||||
public int dimension { get; set; }
|
||||
/// <summary>
|
||||
/// the value of data.
|
||||
/// |数据的值。
|
||||
/// </summary>
|
||||
public double value { get; set; }
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
serieIndex = -1;
|
||||
dataIndex = -1;
|
||||
dimension = -1;
|
||||
value = 0;
|
||||
pointerPos = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Internal/Misc/SerieEventData.cs.meta
Normal file
11
Runtime/Internal/Misc/SerieEventData.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdfaa773d93294d78b2fb4b8f42708a3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user