Files
XCharts/Runtime/Internal/Interface/DelegateFunction.cs
2021-11-27 22:06:15 +08:00

36 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/************************************************/
using UnityEngine;
namespace XCharts
{
/// <summary>
/// The delegate function for AxisLabel's formatter. |
/// AxisLabel的formatter自定义委托函数。
/// </summary>
/// <param name="labelIndex">label索引</param>
/// <param name="value">当前label对应的数值数据Value轴或Time轴有效</param>
/// <param name="category">当前label对应的类目数据Category轴有效</param>
/// <returns>最终显示的文本内容</returns>
public delegate string DelegateAxisLabelFormatter(int labelIndex, double value, string category);
/// <summary>
/// The delegate function for SerieLabels formatter.
/// SerieLabel的formatter自定义委托函数。
/// </summary>
/// <param name="dataIndex">数据索引</param>
/// <param name="value">数值</param>
/// <returns>最终显示的文本内容</returns>
public delegate string DelegateSerieLabelFormatter(int dataIndex, double value);
/// <summary>
/// Tooltip的position自定义委托函数。
/// </summary>
/// <param name="pos">Tooltip的当前坐标</param>
/// <returns>Tooltip的最终坐标</returns>
public delegate Vector3 DelegateTooltipPosition(Vector3 pos);
}