修复Chart在动态创建时背景没有自适应的问题 (#323)

This commit is contained in:
monitor1394
2024-07-06 11:33:47 +08:00
parent e2c7779493
commit 94d1398bd3
2 changed files with 3 additions and 0 deletions

View File

@@ -75,6 +75,8 @@ slug: /changelog
## master
* (2024.07.06) 修复`Chart`在动态创建时背景没有自适应的问题 (#323)
## v3.11.1
* (2024.07.01) 发布`v3.11.1`版本

View File

@@ -175,6 +175,7 @@ namespace XCharts.Runtime
m_ChartWidth = m_GraphWidth;
m_ChartHeight = m_GraphHeight;
rectTransform.sizeDelta = new Vector2(m_ChartWidth, m_ChartHeight);
UpdateSize();
}
ChartHelper.HideAllObject(transform);
m_ChartInited = true;