重构Legend图例,改变样式,增加自定义图标等设置

This commit is contained in:
monitor1394
2020-02-26 22:52:57 +08:00
parent 31355b047f
commit ade587a478
20 changed files with 661 additions and 136 deletions

View File

@@ -158,6 +158,7 @@ namespace XCharts
rect.anchorMin = anchorMin;
rect.anchorMax = anchorMax;
rect.pivot = pivot;
rect.anchoredPosition3D = Vector3.zero;
return obj;
}
@@ -269,7 +270,6 @@ namespace XCharts
return labelObj;
}
public static void GetPointList(ref List<Vector3> posList, Vector3 sp, Vector3 ep, float k = 30f)
{
Vector3 dir = (ep - sp).normalized;
@@ -396,11 +396,30 @@ namespace XCharts
if (list1.Count != list2.Count) return false;
for (int i = 0; i < list1.Count; i++)
{
if (!list1[i].Equals(list2[i])) return false;
if (list1[i] == null && list2[i] == null) { }
else
{
if (list1[i] != null)
{
if (!list1[i].Equals(list2[i])) return false;
}
else
{
if (!list2[i].Equals(list1[i])) return false;
}
}
}
return true;
}
public static bool CopyList<T>(List<T> toList, List<T> fromList)
{
if (toList == null || fromList == null) return false;
toList.Clear();
foreach (var item in fromList) toList.Add(item);
return true;
}
public static List<float> ParseFloatFromString(string jsonData)
{
List<float> list = new List<float>();