DelegateFunction.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /************************************************/
  2. /* */
  3. /* Copyright (c) 2018 - 2021 monitor1394 */
  4. /* https://github.com/monitor1394 */
  5. /* */
  6. /************************************************/
  7. using UnityEngine;
  8. namespace XCharts
  9. {
  10. /// <summary>
  11. /// The delegate function for AxisLabel's formatter. |
  12. /// AxisLabel的formatter自定义委托函数。
  13. /// </summary>
  14. /// <param name="labelIndex">label索引</param>
  15. /// <param name="value">当前label对应的数值数据,Value轴或Time轴有效</param>
  16. /// <param name="category">当前label对应的类目数据,Category轴有效</param>
  17. /// <returns>最终显示的文本内容</returns>
  18. public delegate string DelegateAxisLabelFormatter(int labelIndex, double value, string category);
  19. /// <summary>
  20. /// The delegate function for SerieLabel‘s formatter.
  21. /// SerieLabel的formatter自定义委托函数。
  22. /// </summary>
  23. /// <param name="dataIndex">数据索引</param>
  24. /// <param name="value">数值</param>
  25. /// <returns>最终显示的文本内容</returns>
  26. public delegate string DelegateSerieLabelFormatter(int dataIndex, double value);
  27. /// <summary>
  28. /// Tooltip的position自定义委托函数。
  29. /// </summary>
  30. /// <param name="pos">Tooltip的当前坐标</param>
  31. /// <returns>Tooltip的最终坐标</returns>
  32. public delegate Vector3 DelegateTooltipPosition(Vector3 pos);
  33. }