[feature] 增加AxisindicatorLabel,移除TooltipindicatorLabelStyle (#226)

This commit is contained in:
monitor1394
2022-10-30 10:37:10 +08:00
parent c9d554d184
commit d7ebfb1f41
2 changed files with 2 additions and 2 deletions

View File

@@ -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();

View File

@@ -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);
}