SerieDataLink.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using UnityEngine;
  2. namespace XCharts.Runtime
  3. {
  4. /// <summary>
  5. /// the link of serie data. Used for sankey chart. Sankey chart only supports directed acyclic graph. make sure the data link is directed acyclic graph.
  6. /// ||数据节点之间的连线。可用于桑基图等,桑基图只支持有向无环图,请保证数据的连线是有向无环图。
  7. /// </summary>
  8. [System.Serializable]
  9. [Since("v3.10.0")]
  10. public class SerieDataLink : ChildComponent
  11. {
  12. [SerializeField] private string m_Source;
  13. [SerializeField] private string m_Target;
  14. [SerializeField] private double m_Value;
  15. /// <summary>
  16. /// the source node name.
  17. /// ||边的源节点名称。
  18. /// </summary>
  19. public string source
  20. {
  21. get { return m_Source; }
  22. set { m_Source = value; }
  23. }
  24. /// <summary>
  25. /// the target node name.
  26. /// ||边的目标节点名称。
  27. /// </summary>
  28. public string target
  29. {
  30. get { return m_Target; }
  31. set { m_Target = value; }
  32. }
  33. /// <summary>
  34. /// the value of link. decide the width of link.
  35. /// ||边的值。决定边的宽度。
  36. /// </summary>
  37. public double value
  38. {
  39. get { return m_Value; }
  40. set { m_Value = value; }
  41. }
  42. }
  43. }