mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 07:50:16 +00:00
增加Axis可通过设置IconStyle的color为clear来实现动态图标颜色的支持
This commit is contained in:
@@ -370,12 +370,12 @@ namespace XCharts.Runtime
|
||||
|
||||
public static ChartLabel AddAxisLabelObject(int total, int index, string name, Transform parent,
|
||||
Vector2 sizeDelta, Axis axis, ComponentTheme theme,
|
||||
string content, Color autoColor, TextAnchor autoAlignment = TextAnchor.MiddleCenter)
|
||||
string content, Color autoColor, TextAnchor autoAlignment = TextAnchor.MiddleCenter, Color32 iconDefaultColor = default(Color32))
|
||||
{
|
||||
var textStyle = axis.axisLabel.textStyle;
|
||||
var label = AddChartLabel(name, parent, axis.axisLabel, theme, content, autoColor, autoAlignment);
|
||||
var labelShow = axis.IsNeedShowLabel(index, total);
|
||||
label.UpdateIcon(axis.axisLabel.icon, axis.GetIcon(index));
|
||||
label.UpdateIcon(axis.axisLabel.icon, axis.GetIcon(index), iconDefaultColor);
|
||||
label.text.SetActive(labelShow);
|
||||
return label;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user