mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-29 12:48:47 +00:00
增加Symbol选择Custom类型时的Warning提示
This commit is contained in:
@@ -66,6 +66,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2023.05.04) 增加`Symbol`选择`Custom`类型时的`Warning`提示
|
||||||
* (2023.04.15) 修复`DataZoom`在多个图表时可能异常的问题 (#252)
|
* (2023.04.15) 修复`DataZoom`在多个图表时可能异常的问题 (#252)
|
||||||
* (2023.04.14) 修复`Tooltip`在只有一个数据时可能异常的问题
|
* (2023.04.14) 修复`Tooltip`在只有一个数据时可能异常的问题
|
||||||
* (2023.04.14) 增加`BaseChart`的`TriggerTooltip()`接口尝试触发`ToolTip`
|
* (2023.04.14) 增加`BaseChart`的`TriggerTooltip()`接口尝试触发`ToolTip`
|
||||||
|
|||||||
@@ -73,6 +73,14 @@ namespace XCharts.Editor
|
|||||||
return prop.propertyPath + "_" + index;
|
return prop.propertyPath + "_" + index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void AddHelpBox(string message, MessageType type = MessageType.Warning, int line = 2)
|
||||||
|
{
|
||||||
|
var offset = EditorGUI.indentLevel * ChartEditorHelper.INDENT_WIDTH;
|
||||||
|
EditorGUI.HelpBox(new Rect(m_DrawRect.x + offset, m_DrawRect.y, m_DrawRect.width - offset, EditorGUIUtility.singleLineHeight * line), message, type);
|
||||||
|
for (int i = 0; i < line; i++)
|
||||||
|
AddSingleLineHeight();
|
||||||
|
}
|
||||||
|
|
||||||
protected void AddSingleLineHeight()
|
protected void AddSingleLineHeight()
|
||||||
{
|
{
|
||||||
m_Heights[m_KeyName] += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
m_Heights[m_KeyName] += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace XCharts.Editor
|
|||||||
PropertyField(prop, "m_Type");
|
PropertyField(prop, "m_Type");
|
||||||
if (type == SymbolType.Custom)
|
if (type == SymbolType.Custom)
|
||||||
{
|
{
|
||||||
|
AddHelpBox("Custom symbol only work in PictorialBar serie", MessageType.Warning);
|
||||||
PropertyField(prop, "m_Image");
|
PropertyField(prop, "m_Image");
|
||||||
PropertyField(prop, "m_ImageType");
|
PropertyField(prop, "m_ImageType");
|
||||||
PropertyField(prop, "m_Width");
|
PropertyField(prop, "m_Width");
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ namespace XCharts.Editor
|
|||||||
PropertyField(prop, "m_Type");
|
PropertyField(prop, "m_Type");
|
||||||
if (type == SymbolType.Custom)
|
if (type == SymbolType.Custom)
|
||||||
{
|
{
|
||||||
|
AddHelpBox("Custom Symbol only work in PictorialBar serie", MessageType.Warning);
|
||||||
PropertyField(prop, "m_Image");
|
PropertyField(prop, "m_Image");
|
||||||
PropertyField(prop, "m_ImageType");
|
PropertyField(prop, "m_ImageType");
|
||||||
PropertyField(prop, "m_Width");
|
PropertyField(prop, "m_Width");
|
||||||
|
|||||||
@@ -760,7 +760,6 @@ namespace XCharts.Runtime
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<SerieData> emptyFilter = new List<SerieData>();
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据dataZoom更新数据列表缓存
|
/// 根据dataZoom更新数据列表缓存
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user