优化Label显示体验

This commit is contained in:
monitor1394
2024-07-12 21:22:53 +08:00
parent 99d824e3a0
commit b22288eac4
11 changed files with 22 additions and 21 deletions

View File

@@ -34,7 +34,7 @@ namespace XCharts.Runtime
var labelPos = chart.chartPosition + item.location.GetPosition(chart.chartWidth, chart.chartHeight);
var label = ChartHelper.AddChartLabel(s_CommentObjectName + i, commentObj.transform, labelStyle, chart.theme.common,
GetContent(item), Color.clear, TextAnchor.MiddleCenter);
label.SetActive(comment.show && item.show);
label.SetActive(comment.show && item.show, true);
label.SetPosition(labelPos);
label.text.SetLocalPosition(labelStyle.offset);
}