修复TooltipCrossAxisIndicatorLabel可能不显示的问题 (#315)

This commit is contained in:
monitor1394
2024-06-11 08:11:27 +08:00
parent 3b9af0f8ec
commit 549ee43a37
4 changed files with 19 additions and 2 deletions

View File

@@ -73,7 +73,8 @@ slug: /changelog
## master
* (2024.06.09) 调整`Tooltip``Corss`重命名为`Cross`
* (2024.06.11) 修复`Tooltip``Cross``Axis``IndicatorLabel`可能不显示的问题 (#315)
* (2024.06.10) 调整`Tooltip``Corss`重命名为`Cross`
* (2024.06.09) 增加`Axis``minCategorySpacing`设置类目轴默认的最小类目间距
* (2024.06.09) 修复`Tooltip``Cross``Axis`是类目轴并且开启`DataZoom`的情况下指示位置不准确的问题
* (2024.06.06) 修复`Serie``Clone`时动画异常问题 (#320)

View File

@@ -124,9 +124,15 @@ namespace XCharts.Runtime
base.InitComponent();
SeriesHelper.UpdateSerieNameList(this, ref m_LegendRealShowName);
foreach (var handler in m_ComponentHandlers)
{
handler.InitComponent();
handler.inited = true;
}
foreach (var handler in m_SerieHandlers)
{
handler.InitComponent();
handler.inited = true;
}
m_DebugInfo.Init(this);
}
@@ -216,7 +222,15 @@ namespace XCharts.Runtime
foreach (var handler in m_SerieHandlers) handler.BeforeUpdate();
foreach (var handler in m_ComponentHandlers) handler.BeforceSerieUpdate();
foreach (var handler in m_SerieHandlers) handler.Update();
foreach (var handler in m_ComponentHandlers) handler.Update();
foreach (var handler in m_ComponentHandlers)
{
if (!handler.inited)
{
handler.InitComponent();
handler.inited = true;
}
handler.Update();
}
foreach (var handler in m_SerieHandlers) handler.AfterUpdate();
m_DebugInfo.Update();

View File

@@ -93,6 +93,7 @@ namespace XCharts.Runtime
public int order { get; internal set; }
public BaseChart chart { get; internal set; }
public ComponentHandlerAttribute attribute { get; internal set; }
public bool inited { get; internal set; }
public virtual void InitComponent() { }
public virtual void RemoveComponent() { }

View File

@@ -10,6 +10,7 @@ namespace XCharts.Runtime
{
public BaseChart chart { get; internal set; }
public SerieHandlerAttribute attribute { get; internal set; }
public bool inited { get; internal set; }
public virtual int defaultDimension { get; internal set; }
public virtual void InitComponent() { }