mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 23:10:06 +00:00
Fixed markline label refresh when serie hide #178
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
## branch-2.0
|
||||
|
||||
* (2021.12.17) Fixed `MarkLine` does not auto refresh label active when serie hide #178
|
||||
* (2021.12.10) Improved `Radar`'s `AxisLine` and `SplitLine` to be controlled separately
|
||||
* (2021.12.08) Fixed y axis does not refresh when serie hidden
|
||||
* (2021.12.04) Added `Symbol` new types: `EmptyRect`, `EmptyTriangle`, `EmptyDiamond`
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
## branch-2.0
|
||||
|
||||
* (2021.12.17) 修复`MarkLine`在运行时`Label`不自动刷新显示隐藏的问题 #178
|
||||
* (2021.12.10) 完善`Radar`的`AxisLine`和`SplitLine`可单独控制
|
||||
* (2021.12.08) 修复`Serie`隐藏后`Y`轴最大值不刷新的问题
|
||||
* (2021.12.04) 增加`Symbol`新类型:`EmptyRect`,`EmptyTriangle`,`EmptyDiamond`
|
||||
|
||||
@@ -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