mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
增加XChartsSettings的editorShowAllListData参数配置是否在Inspector中显示列表的所有数据
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2021.01.19) Add `XChartsSettings` `editorShowAllListData` parameter to configure whether to display all the list's data in Inspector
|
||||
* (2021.01.19) Release `v2.0.0-preview.1` version
|
||||
* (2021.01.02) Release `v1.6.3` version
|
||||
* (2020.12.18) fixed an issue where updating data when `Animation` was not enabled caused the chart to keep refreshing
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2021.01.19) 增加`XChartsSettings`的`editorShowAllListData`参数配置是否在`Inspector`中显示列表的所有数据
|
||||
* (2021.01.19) 发布`v2.0.0-preview.1`版本
|
||||
* (2021.01.02) 发布`v1.6.3`版本
|
||||
* (2020.12.18) 修复`Animation`不启用时更新数据会导致图表一直刷新的问题
|
||||
|
||||
@@ -427,7 +427,7 @@ namespace XCharts
|
||||
while (listSize > m_Datas.arraySize) m_Datas.arraySize++;
|
||||
while (listSize < m_Datas.arraySize) m_Datas.arraySize--;
|
||||
}
|
||||
if (listSize > 30)
|
||||
if (listSize > 30 && !XChartsSettings.editorShowAllListData)
|
||||
{
|
||||
int num = listSize > 10 ? 10 : listSize;
|
||||
for (int i = 0; i < num; i++)
|
||||
|
||||
@@ -328,7 +328,7 @@ public class ChartEditorHelper
|
||||
while (listSize < listProp.arraySize) listProp.arraySize--;
|
||||
}
|
||||
}
|
||||
if (listSize > 30)
|
||||
if (listSize > 30 && !XChartsSettings.editorShowAllListData)
|
||||
{
|
||||
SerializedProperty element;
|
||||
int num = listSize > 10 ? 10 : listSize;
|
||||
@@ -360,8 +360,8 @@ public class ChartEditorHelper
|
||||
|
||||
var temp = INDENT_WIDTH + GAP_WIDTH + iconGap;
|
||||
var isSerie = "Serie".Equals(element.type);
|
||||
var elementRect = isSerie
|
||||
? new Rect(drawRect.x, drawRect.y, drawRect.width + INDENT_WIDTH, drawRect.height)
|
||||
var elementRect = isSerie
|
||||
? new Rect(drawRect.x, drawRect.y, drawRect.width + INDENT_WIDTH, drawRect.height)
|
||||
: new Rect(drawRect.x, drawRect.y, drawRect.width - 3 * iconWidth, drawRect.height);
|
||||
EditorGUI.PropertyField(elementRect, element, new GUIContent("Element " + i));
|
||||
var iconRect = new Rect(drawRect.width - 3 * iconWidth + temp, drawRect.y, iconWidth, drawRect.height);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace XCharts
|
||||
[ExcludeFromPresetAttribute]
|
||||
public class XChartsSettings : ScriptableObject
|
||||
{
|
||||
|
||||
|
||||
[SerializeField] private Font m_Font;
|
||||
#if dUI_TextMeshPro
|
||||
[SerializeField] private TMP_FontAsset m_TMPFont;
|
||||
@@ -49,6 +49,7 @@ namespace XCharts
|
||||
[SerializeField] [Range(0, 200)] private float m_SerieScatterSymbolSelectedSize = 30f;
|
||||
|
||||
[SerializeField] private bool m_EditorBlockEnable = true;
|
||||
[SerializeField] private bool m_EditorShowAllListData = false;
|
||||
|
||||
[SerializeField] [Range(1, 20)] protected int m_MaxPainter = 10;
|
||||
[SerializeField] [Range(1, 10)] protected float m_LineSmoothStyle = 3f;
|
||||
@@ -97,6 +98,7 @@ namespace XCharts
|
||||
|
||||
#region editor
|
||||
public static bool editorBlockEnable { get { return Instance.m_EditorBlockEnable; } }
|
||||
public static bool editorShowAllListData { get { return Instance.m_EditorShowAllListData; } }
|
||||
#endregion
|
||||
|
||||
#region graphic
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# XCharts
|
||||
|
||||

|
||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
||||

|
||||

|
||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
||||

|
||||
|
||||
A powerful, easy-to-use, configurable charting and data visualization library for Unity.
|
||||
|
||||
Reference in New Issue
Block a user