AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
AxisLine.cs
1 /************************************************/
2 /* */
3 /* Copyright (c) 2018 - 2021 monitor1394 */
4 /* https://github.com/monitor1394 */
5 /* */
6 /************************************************/
7 
8 using UnityEngine;
9 
10 namespace XCharts
11 {
16  [System.Serializable]
17  public class AxisLine : BaseLine
18  {
19  [SerializeField] private bool m_OnZero;
20  [SerializeField] private bool m_ShowArrow;
21  [SerializeField] private Arrow m_Arrow = new Arrow();
22 
27  public bool onZero
28  {
29  get { return m_OnZero; }
30  set { if (PropertyUtil.SetStruct(ref m_OnZero, value)) SetVerticesDirty(); }
31  }
36  public bool showArrow
37  {
38  get { return m_ShowArrow; }
39  set { if (PropertyUtil.SetStruct(ref m_ShowArrow, value)) SetVerticesDirty(); }
40  }
45  public Arrow arrow
46  {
47  get { return m_Arrow; }
48  set { if (PropertyUtil.SetClass(ref m_Arrow, value)) SetVerticesDirty(); }
49  }
50  public static AxisLine defaultAxisLine
51  {
52  get
53  {
54  var axisLine = new AxisLine
55  {
56  m_Show = true,
57  m_OnZero = true,
58  m_ShowArrow = false,
59  m_Arrow = new Arrow(),
60  m_LineStyle = new LineStyle(LineStyle.Type.None),
61  };
62  return axisLine;
63  }
64  }
65 
66  public AxisLine Clone()
67  {
68  var axisLine = new AxisLine();
69  axisLine.show = show;
70  axisLine.onZero = onZero;
71  axisLine.showArrow = showArrow;
72  axisLine.arrow = arrow.Clone();
73  return axisLine;
74  }
75 
76  public void Copy(AxisLine axisLine)
77  {
78  base.Copy(axisLine);
79  onZero = axisLine.onZero;
80  showArrow = axisLine.showArrow;
81  arrow.Copy(axisLine.arrow);
82  }
83  }
84 }
XCharts.AxisLine.onZero
bool onZero
When mutiple axes exists, this option can be used to specify which axis can be "onZero" to....
Definition: AxisLine.cs:28
XCharts.LineStyle.Type
Type
线的类型。
Definition: LineStyle.cs:25
XCharts
Definition: RewardChart.cs:14
XCharts.AxisLine.arrow
Arrow arrow
the arrow of line. 轴线箭头。
Definition: AxisLine.cs:46
XCharts.LineStyle
The style of line. 线条样式。 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle....
Definition: LineStyle.cs:20
XCharts.AxisLine.showArrow
bool showArrow
Whether to show the arrow symbol of axis. 是否显示箭头。
Definition: AxisLine.cs:37
XCharts.Arrow
Definition: Arrow.cs:16
XCharts.BaseLine
Settings related to base line. 线条基础配置。
Definition: BaseLine.cs:17
XCharts.AxisLine
Settings related to axis line. 坐标轴轴线。
Definition: AxisLine.cs:17
XCharts.BaseLine.show
bool show
Set this to false to prevent the axis line from showing. 是否显示坐标轴轴线。
Definition: BaseLine.cs:27