mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 20:28:46 +00:00
增加DataZoom的startEndFunction委托
This commit is contained in:
@@ -65,6 +65,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2023.02.26) 增加`DataZoom`的`startEndFunction`委托
|
||||||
* (2023.02.12) 重构`Component`相关代码,调整API接口
|
* (2023.02.12) 重构`Component`相关代码,调整API接口
|
||||||
* (2023.02.10) 修复`Axis`在`Log`轴时某些情况下最小值不正确的问题
|
* (2023.02.10) 修复`Axis`在`Log`轴时某些情况下最小值不正确的问题
|
||||||
* (2023.02.10) 优化`Axis`的数值`Label`的默认显示格式
|
* (2023.02.10) 优化`Axis`的数值`Label`的默认显示格式
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ namespace XCharts.Runtime
|
|||||||
[SerializeField][Since("v3.6.0")] private bool m_EndLock;
|
[SerializeField][Since("v3.6.0")] private bool m_EndLock;
|
||||||
|
|
||||||
public DataZoomContext context = new DataZoomContext();
|
public DataZoomContext context = new DataZoomContext();
|
||||||
|
private CustomDataZoomStartEndFunction m_StartEndFunction;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to show dataZoom.
|
/// Whether to show dataZoom.
|
||||||
@@ -393,6 +394,10 @@ namespace XCharts.Runtime
|
|||||||
get { return m_MarqueeStyle; }
|
get { return m_MarqueeStyle; }
|
||||||
set { if (PropertyUtil.SetClass(ref m_MarqueeStyle, value)) SetAllDirty(); }
|
set { if (PropertyUtil.SetClass(ref m_MarqueeStyle, value)) SetAllDirty(); }
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// start和end变更委托。
|
||||||
|
/// </summary>
|
||||||
|
public CustomDataZoomStartEndFunction startEndFunction { get { return m_StartEndFunction; } set { m_StartEndFunction = value; } }
|
||||||
|
|
||||||
class AxisIndexValueInfo
|
class AxisIndexValueInfo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -397,6 +397,8 @@ namespace XCharts.Runtime
|
|||||||
|
|
||||||
if (end < start)
|
if (end < start)
|
||||||
end = start;
|
end = start;
|
||||||
|
if (dataZoom.startEndFunction != null)
|
||||||
|
dataZoom.startEndFunction(ref start, ref end);
|
||||||
|
|
||||||
if (!dataZoom.startLock)
|
if (!dataZoom.startLock)
|
||||||
dataZoom.start = start;
|
dataZoom.start = start;
|
||||||
|
|||||||
@@ -22,4 +22,10 @@ namespace XCharts.Runtime
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public delegate float SymbolSizeFunction(List<double> data);
|
public delegate float SymbolSizeFunction(List<double> data);
|
||||||
public delegate void CustomDrawGaugePointerFunction(VertexHelper vh, int serieIndex, int dataIndex, float currentAngle);
|
public delegate void CustomDrawGaugePointerFunction(VertexHelper vh, int serieIndex, int dataIndex, float currentAngle);
|
||||||
|
/// <summary>
|
||||||
|
/// DataZoom的start和end变更时的委托方法。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="start"></param>
|
||||||
|
/// <param name="end"></param>
|
||||||
|
public delegate void CustomDataZoomStartEndFunction(ref float start, ref float end);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user