mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-30 13:28:47 +00:00
增加MarkLine的onTop设置是否显示在最上层
This commit is contained in:
@@ -1487,6 +1487,7 @@ Use a line in the chart to illustrate.
|
|||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
|show|true||Whether to display the marking line.
|
|show|true||Whether to display the marking line.
|
||||||
|serieIndex|0||The serie index of markLine.
|
|serieIndex|0||The serie index of markLine.
|
||||||
|
|onTop|true|v3.8.2|whether the markline is on top.
|
||||||
|animation|||The animation of markline. [AnimationStyle](#animationstyle)|
|
|animation|||The animation of markline. [AnimationStyle](#animationstyle)|
|
||||||
|data|||A list of marked data. When the group of data item is 0, each data item represents a line; When the group is not 0, two data items of the same group represent the starting point and the ending point of the line respectively to form a line. In this case, the relevant style parameters of the line are the parameters of the starting point.
|
|data|||A list of marked data. When the group of data item is 0, each data item represents a line; When the group is not 0, two data items of the same group represent the starting point and the ending point of the line respectively to form a line. In this case, the relevant style parameters of the line are the parameters of the starting point.
|
||||||
|
|
||||||
@@ -1498,6 +1499,8 @@ Use a line in the chart to illustrate.
|
|||||||
|
|
||||||
> XCharts.Runtime.MarkLineData : [ChildComponent](#childcomponent)
|
> XCharts.Runtime.MarkLineData : [ChildComponent](#childcomponent)
|
||||||
|
|
||||||
|
> Since `v3.8.2`
|
||||||
|
|
||||||
Data of marking line.
|
Data of marking line.
|
||||||
|
|
||||||
```mdx-code-block
|
```mdx-code-block
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2023.11.01) 增加`MarkLine`的`onTop`设置是否显示在最上层
|
||||||
* (2023.10.21) 修复`Pie`有0数据时`Label`的位置异常的问题
|
* (2023.10.21) 修复`Pie`有0数据时`Label`的位置异常的问题
|
||||||
* (2023.10.21) 增加`Axis`的对数轴支持子刻度
|
* (2023.10.21) 增加`Axis`的对数轴支持子刻度
|
||||||
* (2023.10.19) 修复`Pie`设置玫瑰图时引导线异常的问题
|
* (2023.10.19) 修复`Pie`设置玫瑰图时引导线异常的问题
|
||||||
|
|||||||
@@ -1487,6 +1487,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart
|
|||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
|show|true||是否显示标线。
|
|show|true||是否显示标线。
|
||||||
|serieIndex|0||标线影响的Serie索引。
|
|serieIndex|0||标线影响的Serie索引。
|
||||||
|
|onTop|true|v3.8.2|是否在最上层。
|
||||||
|animation|||标线的动画样式。 [AnimationStyle](#animationstyle)|
|
|animation|||标线的动画样式。 [AnimationStyle](#animationstyle)|
|
||||||
|data|||标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。
|
|data|||标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。
|
||||||
|
|
||||||
@@ -1498,6 +1499,8 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart
|
|||||||
|
|
||||||
> XCharts.Runtime.MarkLineData : [ChildComponent](#childcomponent)
|
> XCharts.Runtime.MarkLineData : [ChildComponent](#childcomponent)
|
||||||
|
|
||||||
|
> 从 `v3.8.2` 开始支持
|
||||||
|
|
||||||
图表标线的数据。
|
图表标线的数据。
|
||||||
|
|
||||||
```mdx-code-block
|
```mdx-code-block
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace XCharts.Editor
|
|||||||
{
|
{
|
||||||
++EditorGUI.indentLevel;
|
++EditorGUI.indentLevel;
|
||||||
PropertyField("m_SerieIndex");
|
PropertyField("m_SerieIndex");
|
||||||
|
PropertyField("m_OnTop");
|
||||||
PropertyField("m_Animation");
|
PropertyField("m_Animation");
|
||||||
PropertyListField("m_Data", true);
|
PropertyListField("m_Data", true);
|
||||||
--EditorGUI.indentLevel;
|
--EditorGUI.indentLevel;
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ namespace XCharts.Runtime
|
|||||||
{
|
{
|
||||||
[SerializeField] private bool m_Show = true;
|
[SerializeField] private bool m_Show = true;
|
||||||
[SerializeField] private int m_SerieIndex = 0;
|
[SerializeField] private int m_SerieIndex = 0;
|
||||||
|
[SerializeField][Since("v3.8.2")] private bool m_OnTop = true;
|
||||||
[SerializeField] private AnimationStyle m_Animation = new AnimationStyle();
|
[SerializeField] private AnimationStyle m_Animation = new AnimationStyle();
|
||||||
[SerializeField] private List<MarkLineData> m_Data = new List<MarkLineData>();
|
[SerializeField] private List<MarkLineData> m_Data = new List<MarkLineData>();
|
||||||
|
|
||||||
@@ -59,6 +60,15 @@ namespace XCharts.Runtime
|
|||||||
set { if (PropertyUtil.SetStruct(ref m_SerieIndex, value)) SetVerticesDirty(); }
|
set { if (PropertyUtil.SetStruct(ref m_SerieIndex, value)) SetVerticesDirty(); }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// whether the markline is on top.
|
||||||
|
/// |是否在最上层。
|
||||||
|
/// </summary>
|
||||||
|
public bool onTop
|
||||||
|
{
|
||||||
|
get { return m_OnTop; }
|
||||||
|
set { if (PropertyUtil.SetStruct(ref m_OnTop, value)) SetVerticesDirty(); }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
/// The animation of markline.
|
/// The animation of markline.
|
||||||
/// |标线的动画样式。
|
/// |标线的动画样式。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -19,8 +19,15 @@ namespace XCharts.Runtime
|
|||||||
InitMarkLine(component);
|
InitMarkLine(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void DrawBase(VertexHelper vh)
|
||||||
|
{
|
||||||
|
if (!component.onTop)
|
||||||
|
DrawMarkLine(vh, component);
|
||||||
|
}
|
||||||
|
|
||||||
public override void DrawUpper(VertexHelper vh)
|
public override void DrawUpper(VertexHelper vh)
|
||||||
{
|
{
|
||||||
|
if (component.onTop)
|
||||||
DrawMarkLine(vh, component);
|
DrawMarkLine(vh, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user