mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
v3.0.1
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v3.0.1](#v3.0.1)
|
||||
[v3.0.0](#v3.0.0)
|
||||
[v3.0.0-preivew9](#v3.0.0-preivew9)
|
||||
[v3.0.0-preivew8](#v3.0.0-preivew8)
|
||||
@@ -53,8 +54,14 @@
|
||||
|
||||
## master
|
||||
|
||||
## v3.0.1
|
||||
|
||||
* (2022.06.16) 发布`v3.0.1`版本
|
||||
* (2022.06.16) 修复`Inspector`上部分`foldout`箭头点击无法展开的问题
|
||||
* (2022.06.16) 修复`Inspector`上部分`foldout`箭头点击无法展开的问题
|
||||
* (2022.06.15) 优化`Doc`自动生成,完善代码注释和配置项手册文档
|
||||
* (2022.06.14) 优化`SerieLabelStyle`,支持动态调整`Icon`
|
||||
* (2022.06.13) 优化`Background`,参数`hideThemeBackgroundColor`重命名为`autoColor`
|
||||
* (2022.06.13) 优化`Background`背景设置
|
||||
* (2022.06.10) 增加`Legend`的`AxisLabel`支持`autoColor`
|
||||
* (2022.06.08) 修复`Axis`的`AxisLabel`在设置不显示时还显示首尾两个`label`的问题
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# 更新日志
|
||||
|
||||
[master](#master)
|
||||
[v3.0.1](#v3.0.1)
|
||||
[v3.0.0](#v3.0.0)
|
||||
[v2.3.0](#v2.3.0)
|
||||
[v2.2.3](#v2.2.3)
|
||||
@@ -38,6 +39,16 @@
|
||||
[v0.5.0](#v0.5.0)
|
||||
[v0.1.0](#v0.1.0)
|
||||
|
||||
## v3.0.1
|
||||
|
||||
* (2022.06.16) Release `v3.0.1` version
|
||||
* (2022.06.16) Fixed an issue where the `foldout` arrow on `Inspector` could not be expanded
|
||||
* (2022.06.15) Optimized `Doc` auto-generation, improved code comments and configuration item manual documentation
|
||||
* (2022.06.14) Optimized `SerieLabelStyle` to support dynamic adjustment of `Icon`
|
||||
* (2022.06.13) Optimized `Background` setting
|
||||
* (2022.06.10) Added `Legend` AxisLabel support for `autoColor`
|
||||
* (2022.06.08) Fixed issue where `Axis` `AxisLabel` still shows the first and last two labels when not displayed
|
||||
|
||||
## v3.0.0
|
||||
|
||||
* More robust underlying framework.
|
||||
|
||||
@@ -1361,8 +1361,8 @@ Tooltip component.
|
||||
| `show` |true | Whether to show the tooltip component. |
|
||||
| `type` | | Indicator type.</br>`Painter.Type`:</br>- `Base`: </br>- `Serie`: </br>- `Top`: </br>|
|
||||
| `trigger` | | Type of triggering.</br>`Tooltip.Trigger`:</br>- `Item`: Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts.</br>- `Axis`: Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts.</br>- `None`: Trigger nothing.</br>|
|
||||
| `itemFormatter` | | a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. When formatter is not null, use formatter first, otherwise use itemFormatter. |
|
||||
| `titleFormatter` | | The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. Template variables are {.}, {a}, {b}, {c}, {d}.</br> {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.</br> {a} is the series name of the serie that is currently indicated or whose index is 0.</br> {b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart).</br> {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0.</br> {d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign.</br> {e} is the name of the data item serieData that is currently indicated or whose index is 0.</br> {f} is sum of data.</br> {.1} represents a dot from serie corresponding color that specifies index as 1.</br> 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1.</br> {c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data).</br> {c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify).</br> {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).</br> {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).</br> Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"</br> |
|
||||
| `itemFormatter` | | a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. Template variables are {.}, {a}, {b}, {c}, {d}.</br> {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.</br> {a} is the series name of the serie that is currently indicated or whose index is 0.</br> {b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart).</br> {c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0.</br> {d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign.</br> {e} is the name of the data item serieData that is currently indicated or whose index is 0.</br> {f} is sum of data.</br> {.1} represents a dot from serie corresponding color that specifies index as 1.</br> 1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1.</br> {c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data).</br> {c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify).</br> {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).</br> {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).</br> Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"</br> |
|
||||
| `titleFormatter` | | The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. Template see itemFormatter. |
|
||||
| `marker` | | the marker of serie. |
|
||||
| `fixedWidth` |0 | Fixed width. Higher priority than minWidth. |
|
||||
| `fixedHeight` |0 | Fixed height. Higher priority than minHeight. |
|
||||
|
||||
@@ -445,7 +445,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent)
|
||||
|field|default|comment|
|
||||
|--|--|--|
|
||||
| `show` |true | 是否显示当前注解项。 |
|
||||
| `content` | | 注解的文本内容。 |
|
||||
| `content` | | 注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。 |
|
||||
| `position` | | 注解项的位置坐标。 |
|
||||
| `markRect` | | 注解区域。 |
|
||||
| `markStyle` | | 注解标记区域样式。 [CommentMarkStyle](CommentMarkStyle)|
|
||||
@@ -771,7 +771,7 @@ Inherits or Implemented: [MainComponent](#MainComponent),[IPropertyChanged](#IPr
|
||||
| `itemGap` |10f | 图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 [default:10f] |
|
||||
| `itemAutoColor` |true | 图例标记的图形是否自动匹配颜色。 [default:true] |
|
||||
| `itemOpacity` |1 | 图例标记的图形的颜色透明度。 |
|
||||
| `formatter` | | 图例内容字符串模版格式器。支持用 \n 换行。 模板变量为图例名称 {value}。 [default:null] |
|
||||
| `formatter` | | 图例内容字符串模版格式器。支持用 \n 换行。 模板变量为图例名称 {value}。其他模板变量参考Toolip的itemFormatter。 |
|
||||
| `numericFormatter` | | 标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings |
|
||||
| `labelStyle` | | 文本样式。 [LabelStyle](LabelStyle)|
|
||||
| `data` | | If data is not specified, it will be auto collected from series. |
|
||||
@@ -1361,8 +1361,8 @@ Inherits or Implemented: [MainComponent](#MainComponent)
|
||||
| `show` |true | 是否显示提示框组件。 |
|
||||
| `type` | | 提示框指示器类型。</br>`Painter.Type`:</br>- `Base`: </br>- `Serie`: </br>- `Top`: </br>|
|
||||
| `trigger` | | 触发类型。</br>`Tooltip.Trigger`:</br>- `Item`: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。</br>- `Axis`: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。</br>- `None`: 什么都不触发。</br>|
|
||||
| `itemFormatter` | | 提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。 |
|
||||
| `titleFormatter` | | 提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。</br> 模板变量有{.}、{a}、{b}、{c}、{d}、{e}。</br> {.}为当前所指示或index为0的serie的对应颜色的圆点。</br> {a}为当前所指示或index为0的serie的系列名name。</br> {b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。</br> {c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。</br> {d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带%号。</br> {e}为当前所指示或index为0的serie的数据项serieData的name。</br> {f}为数据总和。</br> {.1}表示指定index为1的serie对应颜色的圆点。</br> {a1}、{b1}、{c1}中的1表示指定index为1的serie。</br> {c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。</br> {c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。</br> {d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。</br> {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。</br> 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}" |
|
||||
| `itemFormatter` | | 提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。 模板变量有{.}、{a}、{b}、{c}、{d}、{e}。</br> {.}为当前所指示或index为0的serie的对应颜色的圆点。</br> {a}为当前所指示或index为0的serie的系列名name。</br> {b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。</br> {c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。</br> {d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带%号。</br> {e}为当前所指示或index为0的serie的数据项serieData的name。</br> {f}为数据总和。</br> {.1}表示指定index为1的serie对应颜色的圆点。</br> {a1}、{b1}、{c1}中的1表示指定index为1的serie。</br> {c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。</br> {c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。</br> {d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。</br> {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。</br> 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}" |
|
||||
| `titleFormatter` | | 提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。 模板变量参考Toolip的itemFormatter。 |
|
||||
| `marker` | | serie的符号标志。 |
|
||||
| `fixedWidth` |0 | 固定宽度。比 minWidth 优先。 |
|
||||
| `fixedHeight` |0 | 固定高度。比 minHeight 优先。 |
|
||||
|
||||
@@ -11,17 +11,14 @@ namespace XCharts.Editor
|
||||
PropertyField("m_Gap");
|
||||
PropertyTwoFiled("m_Center");
|
||||
PropertyTwoFiled("m_Radius");
|
||||
//PropertyField("m_StartAngle");
|
||||
|
||||
PropertyField("m_AvoidLabelOverlap");
|
||||
PropertyFiledMore(() =>
|
||||
{
|
||||
PropertyField("m_MinAngle");
|
||||
PropertyField("m_RoundCap");
|
||||
PropertyField("m_Ignore");
|
||||
PropertyField("m_IgnoreValue");
|
||||
PropertyField("m_AvoidLabelOverlap");
|
||||
});
|
||||
|
||||
PropertyField("m_ItemStyle");
|
||||
PropertyField("m_Animation");
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ namespace XCharts.Editor
|
||||
Action<Rect> drawCallback, params HeaderMenuInfo[] menus)
|
||||
{
|
||||
var rect = GUILayoutUtility.GetRect(1f, HEADER_HEIGHT);
|
||||
var labelRect = DrawHeaderInternal(rect, title, state, drawBackground, activeField);
|
||||
var labelRect = DrawHeaderInternal(rect, title, ref state, drawBackground, activeField);
|
||||
DrawMenu(rect, menus);
|
||||
if (drawCallback != null)
|
||||
{
|
||||
@@ -568,7 +568,7 @@ namespace XCharts.Editor
|
||||
Action<Rect> drawCallback, List<HeaderMenuInfo> menus)
|
||||
{
|
||||
var rect = GUILayoutUtility.GetRect(1f, HEADER_HEIGHT);
|
||||
var labelRect = DrawHeaderInternal(rect, title, state, drawBackground, activeField);
|
||||
var labelRect = DrawHeaderInternal(rect, title, ref state, drawBackground, activeField);
|
||||
DrawMenu(rect, menus);
|
||||
if (drawCallback != null)
|
||||
{
|
||||
@@ -589,7 +589,7 @@ namespace XCharts.Editor
|
||||
return state;
|
||||
}
|
||||
|
||||
private static Rect DrawHeaderInternal(Rect rect, string title, bool state, bool drawBackground, SerializedProperty activeField)
|
||||
private static Rect DrawHeaderInternal(Rect rect, string title, ref bool state, bool drawBackground, SerializedProperty activeField)
|
||||
{
|
||||
var splitRect = rect;
|
||||
splitRect.x = EditorGUI.indentLevel * INDENT_WIDTH + 4;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace XCharts.Runtime
|
||||
public Vector3 position { get { return m_Position; } set { if (PropertyUtil.SetStruct(ref m_Position, value)) SetComponentDirty(); } }
|
||||
/// <summary>
|
||||
/// content of comment.
|
||||
/// |注解的文本内容。
|
||||
/// |注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。
|
||||
/// </summary>
|
||||
public string content { get { return m_Content; } set { if (PropertyUtil.SetClass(ref m_Content, value)) SetComponentDirty(); } }
|
||||
/// <summary>
|
||||
|
||||
@@ -196,8 +196,7 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// Legend content string template formatter. Support for wrapping lines with \n. Template:{value}.
|
||||
/// |图例内容字符串模版格式器。支持用 \n 换行。
|
||||
/// 模板变量为图例名称 {value}。
|
||||
/// [default:null]
|
||||
/// 模板变量为图例名称 {value}。其他模板变量参考Toolip的itemFormatter。
|
||||
/// </summary>
|
||||
public string formatter
|
||||
{
|
||||
|
||||
@@ -138,6 +138,13 @@ namespace XCharts.Runtime
|
||||
/// <summary>
|
||||
/// The string template formatter for the tooltip title content. Support for wrapping lines with \n.
|
||||
/// The placeholder {I} can be set separately to indicate that the title is ignored and not displayed.
|
||||
/// Template see itemFormatter.
|
||||
/// |提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。
|
||||
/// 模板变量参考Toolip的itemFormatter。
|
||||
/// </summary>
|
||||
public string titleFormatter { get { return m_TitleFormatter; } set { m_TitleFormatter = value; } }
|
||||
/// <summary>
|
||||
/// a string template formatter for a single Serie or data item content. Support for wrapping lines with \n.
|
||||
/// Template variables are {.}, {a}, {b}, {c}, {d}.</br>
|
||||
/// {.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.</br>
|
||||
/// {a} is the series name of the serie that is currently indicated or whose index is 0.</br>
|
||||
@@ -153,7 +160,7 @@ namespace XCharts.Runtime
|
||||
/// {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).</br>
|
||||
/// {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).</br>
|
||||
/// Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"</br>
|
||||
/// |提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。</br>
|
||||
/// |提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。
|
||||
/// 模板变量有{.}、{a}、{b}、{c}、{d}、{e}。</br>
|
||||
/// {.}为当前所指示或index为0的serie的对应颜色的圆点。</br>
|
||||
/// {a}为当前所指示或index为0的serie的系列名name。</br>
|
||||
@@ -170,12 +177,6 @@ namespace XCharts.Runtime
|
||||
/// {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。</br>
|
||||
/// 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}"
|
||||
/// </summary>
|
||||
public string titleFormatter { get { return m_TitleFormatter; } set { m_TitleFormatter = value; } }
|
||||
/// <summary>
|
||||
/// a string template formatter for a single Serie or data item content. Support for wrapping lines with \n.
|
||||
/// When formatter is not null, use formatter first, otherwise use itemFormatter.
|
||||
/// |提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。当formatter不为空时,优先使用formatter,否则使用itemFormatter。
|
||||
/// </summary>
|
||||
public string itemFormatter { get { return m_ItemFormatter; } set { m_ItemFormatter = value; } }
|
||||
/// <summary>
|
||||
/// the marker of serie.
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace XCharts.Runtime
|
||||
[ExecuteInEditMode]
|
||||
public static class XChartsMgr
|
||||
{
|
||||
public static readonly string version = "3.0.0";
|
||||
public static readonly int versionDate = 20220601;
|
||||
public static readonly string version = "3.0.1";
|
||||
public static readonly int versionDate = 20220616;
|
||||
public static string fullVersion { get { return version + "-" + versionDate; } }
|
||||
|
||||
internal static List<BaseChart> chartList = new List<BaseChart>();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "com.monitor1394.xcharts",
|
||||
"displayName": "XCharts",
|
||||
"version": "3.0.0",
|
||||
"date": "20220601",
|
||||
"checkdate": "20220601",
|
||||
"version": "3.0.1",
|
||||
"date": "20220616",
|
||||
"checkdate": "20220616",
|
||||
"desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!",
|
||||
"unity": "2018.3",
|
||||
"description": "A charting and data visualization library for Unity.",
|
||||
|
||||
Reference in New Issue
Block a user