mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-26 02:40:13 +00:00
优化性能,优化折线图和柱状图的大数据绘制,重构代码
This commit is contained in:
@@ -75,6 +75,8 @@ namespace XCharts
|
||||
SerializedProperty m_Ignore = prop.FindPropertyRelative("m_Ignore");
|
||||
SerializedProperty m_IgnoreValue = prop.FindPropertyRelative("m_IgnoreValue");
|
||||
SerializedProperty m_ShowAsPositiveNumber = prop.FindPropertyRelative("m_ShowAsPositiveNumber");
|
||||
SerializedProperty m_Large = prop.FindPropertyRelative("m_Large");
|
||||
SerializedProperty m_LargeThreshold = prop.FindPropertyRelative("m_LargeThreshold");
|
||||
SerializedProperty m_Datas = prop.FindPropertyRelative("m_Data");
|
||||
|
||||
int index = InitToggle(prop);
|
||||
@@ -134,6 +136,10 @@ namespace XCharts
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ShowAsPositiveNumber);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Large);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LargeThreshold);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
|
||||
EditorGUI.PropertyField(drawRect, m_LineStyle);
|
||||
@@ -183,6 +189,10 @@ namespace XCharts
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ShowAsPositiveNumber);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Large);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_LargeThreshold);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_ItemStyle);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_ItemStyle);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
@@ -495,7 +505,7 @@ namespace XCharts
|
||||
switch (serieType)
|
||||
{
|
||||
case SerieType.Line:
|
||||
height += 17 * EditorGUIUtility.singleLineHeight + 16 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += 19 * EditorGUIUtility.singleLineHeight + 18 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Symbol"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_LineArrow"));
|
||||
@@ -506,7 +516,7 @@ namespace XCharts
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Animation"));
|
||||
break;
|
||||
case SerieType.Bar:
|
||||
height += 19 * EditorGUIUtility.singleLineHeight + 18 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += 21 * EditorGUIUtility.singleLineHeight + 20 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Emphasis"));
|
||||
|
||||
Reference in New Issue
Block a user