LineChart增加stepType实现`阶梯线图

This commit is contained in:
monitor1394
2019-06-01 08:11:43 +08:00
parent 474e2e5325
commit d19679be43
5 changed files with 6021 additions and 39 deletions

View File

@@ -5,13 +5,20 @@ namespace XCharts
[System.Serializable]
public class Line
{
public enum StepType
{
Start,
Middle,
End
}
[SerializeField] private float m_Tickness;
[SerializeField] private bool m_Point;
[SerializeField] private float m_PointWidth;
[SerializeField] private bool m_Smooth;
[SerializeField] [Range(1f, 10f)] private float m_SmoothStyle;
[SerializeField] private bool m_Area;
[SerializeField] private Color m_AreaColor;
[SerializeField] private bool m_Step;
[SerializeField] private StepType m_StepType;
public float tickness { get { return m_Tickness; } set { m_Tickness = value; } }
public bool point { get { return m_Point; } set { m_Point = value; } }
@@ -19,7 +26,8 @@ namespace XCharts
public bool smooth { get { return m_Smooth; } set { m_Smooth = value; } }
public float smoothStyle { get { return m_SmoothStyle; } set { m_SmoothStyle = value; } }
public bool area { get { return m_Area; } set { m_Area = value; } }
public Color areaColor { get { return m_AreaColor; } set { m_AreaColor = value; } }
public bool step { get { return m_Step; } set { m_Step = value; } }
public StepType stepTpe { get { return m_StepType; } set { m_StepType = value; } }
public static Line defaultLine
{
@@ -32,7 +40,9 @@ namespace XCharts
m_PointWidth = 2.5f,
m_Smooth = false,
m_SmoothStyle = 2f,
m_Area = false
m_Area = false,
m_Step = false,
m_StepType = StepType.Middle
};
return line;
}