AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
AxisTick.cs
1 /************************************************/
2 /* */
3 /* Copyright (c) 2018 - 2021 monitor1394 */
4 /* https://github.com/monitor1394 */
5 /* */
6 /************************************************/
7 
8 
9 using UnityEngine;
10 
11 namespace XCharts
12 {
17  [System.Serializable]
18  public class AxisTick : BaseLine
19  {
20  [SerializeField] private bool m_AlignWithLabel;
21  [SerializeField] private bool m_Inside;
22  [SerializeField] private bool m_ShowStartTick;
23  [SerializeField] private bool m_ShowEndTick;
24 
29  public bool alignWithLabel
30  {
31  get { return m_AlignWithLabel; }
32  set { if (PropertyUtil.SetStruct(ref m_AlignWithLabel, value)) SetVerticesDirty(); }
33  }
38  public bool inside
39  {
40  get { return m_Inside; }
41  set { if (PropertyUtil.SetStruct(ref m_Inside, value)) SetVerticesDirty(); }
42  }
47  public bool showStartTick
48  {
49  get { return m_ShowStartTick; }
50  set { if (PropertyUtil.SetStruct(ref m_ShowStartTick, value)) SetVerticesDirty(); }
51  }
56  public bool showEndTick
57  {
58  get { return m_ShowEndTick; }
59  set { if (PropertyUtil.SetStruct(ref m_ShowEndTick, value)) SetVerticesDirty(); }
60  }
61 
62  public static AxisTick defaultTick
63  {
64  get
65  {
66  var tick = new AxisTick
67  {
68  m_Show = true,
69  m_AlignWithLabel = false,
70  m_Inside = false,
71  m_ShowStartTick = false,
72  m_ShowEndTick = true
73  };
74  return tick;
75  }
76  }
77 
78  public AxisTick Clone()
79  {
80  var axisTick = new AxisTick();
81  axisTick.show = show;
82  axisTick.alignWithLabel = alignWithLabel;
83  axisTick.inside = inside;
84  axisTick.showStartTick = showStartTick;
85  axisTick.showEndTick = showEndTick;
86  axisTick.lineStyle = lineStyle.Clone();
87  return axisTick;
88  }
89 
90  public void Copy(AxisTick axisTick)
91  {
92  show = axisTick.show;
93  alignWithLabel = axisTick.alignWithLabel;
94  inside = axisTick.inside;
95  showStartTick = axisTick.showStartTick;
96  showEndTick = axisTick.showEndTick;
97  }
98  }
99 }
XCharts.AxisTick.alignWithLabel
bool alignWithLabel
Align axis tick with label, which is available only when boundaryGap is set to be true in category ax...
Definition: AxisTick.cs:30
XCharts.AxisTick
Settings related to axis tick. 坐标轴刻度相关设置。
Definition: AxisTick.cs:18
XCharts
Definition: RewardChart.cs:14
XCharts.AxisTick.inside
bool inside
Set this to true so the axis labels face the inside direction. 坐标轴刻度是否朝内,默认朝外。
Definition: AxisTick.cs:39
XCharts.BaseLine.lineStyle
LineStyle lineStyle
线条样式
Definition: BaseLine.cs:35
XCharts.AxisTick.showEndTick
bool showEndTick
Whether to display the last tick. 是否显示最后一个刻度。
Definition: AxisTick.cs:57
XCharts.AxisTick.showStartTick
bool showStartTick
Whether to display the first tick. 是否显示第一个刻度。
Definition: AxisTick.cs:48
XCharts.BaseLine
Settings related to base line. 线条基础配置。
Definition: BaseLine.cs:17
XCharts.BaseLine.show
bool show
Set this to false to prevent the axis line from showing. 是否显示坐标轴轴线。
Definition: BaseLine.cs:27