增加SerieData的自定义图标相关配置支持

This commit is contained in:
monitor1394
2019-09-24 18:47:43 +08:00
parent 32b7dd7516
commit e3ab20bcd2
6 changed files with 218 additions and 10 deletions

View File

@@ -191,6 +191,16 @@ namespace XCharts
return tooltipObj;
}
public static GameObject AddIcon(string name,Transform parent,float width,float height){
var anchorMax = new Vector2(0.5f, 0.5f);
var anchorMin = new Vector2(0.5f, 0.5f);
var pivot = new Vector2(0.5f, 0.5f);
var sizeDelta = new Vector2(width, height);
GameObject iconObj = AddObject(name, parent, anchorMin, anchorMax, pivot, sizeDelta);
GetOrAddComponent<Image>(iconObj);
return iconObj;
}
public static GameObject AddSerieLabel(string name, Transform parent, Font font, Color textColor, Color backgroundColor,
int fontSize, FontStyle fontStyle, float rotate, float width, float height)
{