增加LineChart的普通折线图可通过设置ingore参数过滤数据的支持

This commit is contained in:
monitor1394
2020-03-10 09:12:47 +08:00
parent d010c9d986
commit 705652d50c
9 changed files with 147 additions and 30 deletions

View File

@@ -71,6 +71,8 @@ namespace XCharts
SerializedProperty m_GaugePointer = prop.FindPropertyRelative("m_GaugePointer");
SerializedProperty m_TitleStyle = prop.FindPropertyRelative("m_TitleStyle");
SerializedProperty m_Clip = prop.FindPropertyRelative("m_Clip");
SerializedProperty m_Ingore = prop.FindPropertyRelative("m_Ingore");
SerializedProperty m_IngoreValue = prop.FindPropertyRelative("m_IngoreValue");
SerializedProperty m_Datas = prop.FindPropertyRelative("m_Data");
int index = InitToggle(prop);
@@ -122,6 +124,10 @@ namespace XCharts
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_Clip);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_Ingore);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_IngoreValue);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_Symbol);
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
EditorGUI.PropertyField(drawRect, m_LineStyle);
@@ -441,15 +447,12 @@ namespace XCharts
}
else
{
SerializedProperty type = prop.FindPropertyRelative("m_Type");
var serieType = (SerieType)type.enumValueIndex;
switch (serieType)
{
case SerieType.Line:
height += 14 * EditorGUIUtility.singleLineHeight + 13 * EditorGUIUtility.standardVerticalSpacing;
height += 16 * EditorGUIUtility.singleLineHeight + 15 * EditorGUIUtility.standardVerticalSpacing;
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Symbol"));
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineArrow"));