13 [CustomPropertyDrawer(typeof(Axis),
true)]
16 public override string ClassName {
get {
return "Axis"; } }
18 public override void OnGUI(
Rect pos, SerializedProperty prop, GUIContent label)
20 base.OnGUI(pos, prop, label);
21 if (MakeFoldout(prop,
"m_Show"))
23 SerializedProperty m_Type = prop.FindPropertyRelative(
"m_Type");
24 SerializedProperty m_LogBase = prop.FindPropertyRelative(
"m_LogBase");
25 SerializedProperty m_MinMaxType = prop.FindPropertyRelative(
"m_MinMaxType");
27 var chart = prop.serializedObject.targetObject as
BaseChart;
29 EditorGUI.indentLevel++;
30 PropertyField(prop, isPolar ?
"m_PolarIndex" :
"m_GridIndex");
31 PropertyField(prop,
"m_Type");
34 var chartTypeName = prop.serializedObject.targetObject.GetType().Name;
35 if (!chartTypeName.Equals(
"GanttChart"))
36 EditorGUILayout.HelpBox(
"The Time axis is currently only supported in GanttChart.", MessageType.Warning);
38 PropertyField(prop,
"m_Position");
39 PropertyField(prop,
"m_Offset");
42 PropertyField(prop,
"m_LogBaseE");
43 EditorGUI.BeginChangeCheck();
44 PropertyField(prop,
"m_LogBase");
45 if (m_LogBase.floatValue <= 0 || m_LogBase.floatValue == 1)
47 m_LogBase.floatValue = 10;
49 EditorGUI.EndChangeCheck();
53 PropertyField(prop,
"m_MinMaxType");
62 EditorGUI.indentLevel++;
63 PropertyField(prop,
"m_Min");
64 PropertyField(prop,
"m_Max");
65 EditorGUI.indentLevel--;
68 PropertyField(prop,
"m_CeilRate");
71 PropertyField(prop,
"m_Inverse");
74 PropertyField(prop,
"m_SplitNumber");
77 PropertyField(prop,
"m_InsertDataToHead");
78 PropertyField(prop,
"m_MaxCache");
79 PropertyField(prop,
"m_BoundaryGap");
83 PropertyField(prop,
"m_Interval");
86 PropertyField(prop,
"m_AxisLine");
87 PropertyField(prop,
"m_AxisName");
88 PropertyField(prop,
"m_AxisTick");
89 PropertyField(prop,
"m_AxisLabel");
90 PropertyField(prop,
"m_SplitLine");
91 PropertyField(prop,
"m_SplitArea");
92 PropertyField(prop,
"m_IconStyle");
93 PropertyListField(prop,
"m_Icons",
true);
96 PropertyListField(prop,
"m_Data",
true);
98 EditorGUI.indentLevel--;
103 [CustomPropertyDrawer(typeof(
XAxis),
true)]
106 public override string ClassName {
get {
return "XAxis"; } }
109 [CustomPropertyDrawer(typeof(
YAxis),
true)]
112 public override string ClassName {
get {
return "YAxis"; } }
115 [CustomPropertyDrawer(typeof(
AngleAxis),
true)]
118 public override string ClassName {
get {
return "AngleAxis"; } }
119 protected override void DrawExtendeds(SerializedProperty prop)
121 base.DrawExtendeds(prop);
122 PropertyField(prop,
"m_StartAngle");
123 PropertyField(prop,
"m_Clockwise");
127 [CustomPropertyDrawer(typeof(
RadiusAxis),
true)]
130 public override string ClassName {
get {
return "RadiusAxis"; } }
133 [CustomPropertyDrawer(typeof(
AxisLabel),
true)]
136 public override string ClassName {
get {
return "AxisLabel"; } }
137 public override void OnGUI(
Rect pos, SerializedProperty prop, GUIContent label)
139 base.OnGUI(pos, prop, label);
140 if (MakeFoldout(prop,
"m_Show"))
142 ++EditorGUI.indentLevel;
143 PropertyField(prop,
"m_Inside");
144 PropertyField(prop,
"m_Interval");
145 PropertyField(prop,
"m_Margin");
146 PropertyField(prop,
"m_Width");
147 PropertyField(prop,
"m_Height");
148 PropertyField(prop,
"m_Formatter");
149 PropertyField(prop,
"m_NumericFormatter");
150 PropertyField(prop,
"m_ShowAsPositiveNumber");
151 PropertyField(prop,
"m_OnZero");
152 PropertyField(prop,
"m_ShowStartLabel");
153 PropertyField(prop,
"m_ShowEndLabel");
154 PropertyField(prop,
"m_TextLimit");
155 PropertyField(prop,
"m_TextStyle");
156 --EditorGUI.indentLevel;
161 [CustomPropertyDrawer(typeof(
AxisName),
true)]
164 public override string ClassName {
get {
return "AxisName"; } }
165 public override void OnGUI(
Rect pos, SerializedProperty prop, GUIContent label)
167 base.OnGUI(pos, prop, label);
168 if (MakeFoldout(prop,
"m_Show"))
170 ++EditorGUI.indentLevel;
171 PropertyField(prop,
"m_Name");
172 PropertyField(prop,
"m_Location");
173 PropertyField(prop,
"m_TextStyle");
174 --EditorGUI.indentLevel;
182 public override string ClassName {
get {
return "SplitArea"; } }
183 public override void OnGUI(
Rect pos, SerializedProperty prop, GUIContent label)
185 base.OnGUI(pos, prop, label);
186 if (MakeFoldout(prop,
"m_Show"))
188 ++EditorGUI.indentLevel;
189 PropertyField(prop,
"m_Color");
190 --EditorGUI.indentLevel;