96 [SerializeField]
private bool m_Show =
false;
98 [SerializeField]
private Vector3 m_Offset;
99 [SerializeField]
private float m_Margin;
100 [SerializeField]
private string m_Formatter;
101 [SerializeField]
private float m_PaddingLeftRight = 2f;
102 [SerializeField]
private float m_PaddingTopBottom = 2f;
103 [SerializeField]
private float m_BackgroundWidth = 0;
104 [SerializeField]
private float m_BackgroundHeight = 0;
105 [SerializeField]
private bool m_Line =
true;
107 [SerializeField]
private Color32 m_LineColor = ChartConst.clearColor32;
108 [SerializeField]
private float m_LineWidth = 1.0f;
109 [SerializeField]
private float m_LineGap = 1.0f;
110 [SerializeField]
private float m_LineLength1 = 25f;
111 [SerializeField]
private float m_LineLength2 = 15f;
112 [SerializeField]
private bool m_Border =
false;
113 [SerializeField]
private float m_BorderWidth = 0.5f;
114 [SerializeField]
private Color32 m_BorderColor = ChartConst.greyColor32;
115 [SerializeField]
private string m_NumericFormatter =
"";
116 [SerializeField]
private bool m_AutoOffset =
false;
124 m_Offset = Vector3.zero;
126 m_PaddingLeftRight = 2f;
127 m_PaddingTopBottom = 2f;
128 m_BackgroundWidth = 0;
129 m_BackgroundHeight = 0;
132 m_LineColor = Color.clear;
138 m_BorderWidth = 0.5f;
139 m_BorderColor = Color.grey;
140 m_NumericFormatter =
"";
141 m_AutoOffset =
false;
150 get {
return m_Show; }
151 set {
if (PropertyUtil.SetStruct(ref m_Show, value)) SetAllDirty(); }
159 get {
return m_Position; }
160 set {
if (PropertyUtil.SetStruct(ref m_Position, value)) SetVerticesDirty(); }
177 get {
return m_Formatter; }
178 set {
if (PropertyUtil.SetClass(ref m_Formatter, value)) SetVerticesDirty(); }
186 get {
return m_Offset; }
187 set {
if (PropertyUtil.SetStruct(ref m_Offset, value)) SetVerticesDirty(); }
194 get {
return m_Margin; }
195 set {
if (PropertyUtil.SetStruct(ref m_Margin, value)) SetVerticesDirty(); }
204 get {
return m_BackgroundWidth; }
205 set {
if (PropertyUtil.SetStruct(ref m_BackgroundWidth, value)) SetComponentDirty(); }
214 get {
return m_BackgroundHeight; }
215 set {
if (PropertyUtil.SetStruct(ref m_BackgroundHeight, value)) SetComponentDirty(); }
223 get {
return m_PaddingLeftRight; }
224 set {
if (PropertyUtil.SetStruct(ref m_PaddingLeftRight, value)) SetComponentDirty(); }
232 get {
return m_PaddingTopBottom; }
233 set {
if (PropertyUtil.SetStruct(ref m_PaddingTopBottom, value)) SetComponentDirty(); }
241 get {
return m_Line; }
242 set {
if (PropertyUtil.SetStruct(ref m_Line, value)) SetComponentDirty(); }
250 get {
return m_LineType; }
251 set {
if (PropertyUtil.SetStruct(ref m_LineType, value)) SetVerticesDirty(); }
259 get {
return m_LineColor; }
260 set {
if (PropertyUtil.SetStruct(ref m_LineColor, value)) SetVerticesDirty(); }
268 get {
return m_LineWidth; }
269 set {
if (PropertyUtil.SetStruct(ref m_LineWidth, value)) SetVerticesDirty(); }
277 get {
return m_LineGap; }
278 set {
if (PropertyUtil.SetStruct(ref m_LineGap, value)) SetVerticesDirty(); }
286 get {
return m_LineLength1; }
287 set {
if (PropertyUtil.SetStruct(ref m_LineLength1, value)) SetVerticesDirty(); }
295 get {
return m_LineLength2; }
296 set {
if (PropertyUtil.SetStruct(ref m_LineLength2, value)) SetVerticesDirty(); }
304 get {
return m_Border; }
305 set {
if (PropertyUtil.SetStruct(ref m_Border, value)) SetVerticesDirty(); }
313 get {
return m_BorderWidth; }
314 set {
if (PropertyUtil.SetStruct(ref m_BorderWidth, value)) SetVerticesDirty(); }
322 get {
return m_BorderColor; }
323 set {
if (PropertyUtil.SetStruct(ref m_BorderColor, value)) SetVerticesDirty(); }
334 get {
return m_NumericFormatter; }
335 set {
if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); }
342 get {
return m_AutoOffset; }
343 set {
if (PropertyUtil.SetStruct(ref m_AutoOffset, value)) SetAllDirty(); }
352 get {
return m_TextStyle; }
353 set {
if (PropertyUtil.SetClass(ref m_TextStyle, value)) SetAllDirty(); }
358 get {
return m_FormatterFunction; }
359 set { m_FormatterFunction = value; }
362 public bool IsInside()
367 public Color GetColor(Color defaultColor)
371 return IsInside() ? Color.black : defaultColor;
379 public TextAnchor GetAutoAlignment()
386 case SerieLabel.Position.Inside:
387 case SerieLabel.Position.Center:
388 case SerieLabel.Position.Top:
389 case SerieLabel.Position.Bottom:
390 return TextAnchor.MiddleCenter;
391 case SerieLabel.Position.Outside:
392 case SerieLabel.Position.Right:
393 return TextAnchor.MiddleLeft;
394 case SerieLabel.Position.Left:
395 return TextAnchor.MiddleRight;
397 return TextAnchor.MiddleCenter;