3.0 - scatter chart and candlestick chart

This commit is contained in:
monitor1394
2022-01-16 22:16:33 +08:00
parent c9addaf02c
commit a8b2068029
19 changed files with 195 additions and 226 deletions

View File

@@ -167,6 +167,12 @@ namespace XCharts.Editor
{
m_Series.Add(prop.GetArrayElementAtIndex(i));
}
m_Series.Sort(delegate (SerializedProperty a, SerializedProperty b)
{
var index1 = a.FindPropertyRelative("m_Index").intValue;
var index2 = b.FindPropertyRelative("m_Index").intValue;
return index1.CompareTo(index2);
});
}
private void AddComponent()

View File

@@ -102,8 +102,11 @@ namespace XCharts.Editor
for (int i = 0; i < chart.series.Count; i++)
{
if (chart.series[i] != null)
CreateEditor(chart.series[i], m_SeriesProperty[i]);
var serie = chart.series[i];
if (serie != null)
{
CreateEditor(serie, m_SeriesProperty[i]);
}
}
}
@@ -186,6 +189,7 @@ namespace XCharts.Editor
{
m_SerializedObject.Update();
var serieName = chart.GenerateDefaultSerieName();
UnityEngine.Debug.LogError("AddSerie:" + type);
type.InvokeMember("AddDefaultSerie",
BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.Public, null, null,
new object[] { chart, serieName });