mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 16:00:24 +00:00
增加LineChart的普通折线图可通过设置ingore参数过滤数据的支持
This commit is contained in:
@@ -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"));
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace XCharts
|
||||
SerializedProperty m_PaddingLeftRight = prop.FindPropertyRelative("m_PaddingLeftRight");
|
||||
SerializedProperty m_PaddingTopBottom = prop.FindPropertyRelative("m_PaddingTopBottom");
|
||||
SerializedProperty m_BackgroundImage = prop.FindPropertyRelative("m_BackgroundImage");
|
||||
SerializedProperty m_IngoreDataDefaultContent = prop.FindPropertyRelative("m_IngoreDataDefaultContent");
|
||||
SerializedProperty m_LineStyle = prop.FindPropertyRelative("m_LineStyle");
|
||||
SerializedProperty m_TextStyle = prop.FindPropertyRelative("m_TextStyle");
|
||||
|
||||
@@ -64,6 +65,8 @@ namespace XCharts
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ForceENotation);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_IngoreDataDefaultContent);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_TextStyle);
|
||||
@@ -75,7 +78,7 @@ namespace XCharts
|
||||
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
if (m_TooltipModuleToggle)
|
||||
return 13 * EditorGUIUtility.singleLineHeight + 12 * EditorGUIUtility.standardVerticalSpacing +
|
||||
return 14 * EditorGUIUtility.singleLineHeight + 13 * EditorGUIUtility.standardVerticalSpacing +
|
||||
EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle")) +
|
||||
EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TextStyle"));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user