mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
[feature] 增加Axis的indicatorLabel,移除Tooltip的indicatorLabelStyle (#226)
This commit is contained in:
@@ -103,7 +103,7 @@ namespace XCharts.Runtime
|
||||
[SerializeField] protected AxisSplitArea m_SplitArea = AxisSplitArea.defaultSplitArea;
|
||||
[SerializeField][Since("v3.2.0")] protected AxisMinorTick m_MinorTick = AxisMinorTick.defaultMinorTick;
|
||||
[SerializeField][Since("v3.2.0")] protected AxisMinorSplitLine m_MinorSplitLine = AxisMinorSplitLine.defaultMinorSplitLine;
|
||||
[SerializeField][Since("v3.4.0")] protected LabelStyle m_IndicatorLabel = new LabelStyle();
|
||||
[SerializeField][Since("v3.4.0")] protected LabelStyle m_IndicatorLabel = new LabelStyle() { numericFormatter = "f2" };
|
||||
|
||||
public AxisContext context = new AxisContext();
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace XCharts.Runtime
|
||||
var timestamp = (int) value;
|
||||
var dateTime = DateTimeUtil.GetDateTime(timestamp);
|
||||
var dateString = string.Empty;
|
||||
if (string.IsNullOrEmpty(numericFormatter))
|
||||
if (string.IsNullOrEmpty(numericFormatter) || numericFormatter.Equals("f2"))
|
||||
{
|
||||
dateString = DateTimeUtil.GetDateTimeFormatString(dateTime, maxValue - minValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user