mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 07:50:16 +00:00
Fixed markline label refresh when serie hide #178
This commit is contained in:
@@ -309,15 +309,16 @@ namespace XCharts
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (m_RefreshLabel)
|
||||
foreach (var serie in chart.series.list)
|
||||
{
|
||||
m_RefreshLabel = false;
|
||||
foreach (var serie in chart.series.list)
|
||||
var show = serie.show && serie.markLine.show;
|
||||
foreach (var data in serie.markLine.data)
|
||||
{
|
||||
if (!serie.show || !serie.markLine.show) continue;
|
||||
foreach (var data in serie.markLine.data)
|
||||
if (data.runtimeLabel != null)
|
||||
{
|
||||
if (data.runtimeLabel != null)
|
||||
if (data.runtimeLabel.gameObject.activeSelf != show)
|
||||
data.runtimeLabel.gameObject.SetActive(show);
|
||||
if (show)
|
||||
{
|
||||
data.runtimeLabel.SetPosition(MarkLineHelper.GetLabelPosition(data));
|
||||
data.runtimeLabel.SetText(MarkLineHelper.GetFormatterContent(serie, data));
|
||||
|
||||
Reference in New Issue
Block a user