优化numericFormatter

This commit is contained in:
monitor1394
2020-05-04 14:25:02 +08:00
parent f6c614e8c4
commit 98f59f45b6
2 changed files with 2 additions and 5 deletions

View File

@@ -264,10 +264,7 @@ namespace XCharts
content = m_Formatter.Replace("{value:f1}", ChartCached.FloatToStr(value, string.Empty, 1));
else if (content.Contains("{value}"))
{
if (value - (int)value == 0)
content = m_Formatter.Replace("{value}", ChartCached.IntToStr((int)value));
else
content = m_Formatter.Replace("{value}", ChartCached.FloatToStr(value, string.Empty, 1));
content = m_Formatter.Replace("{value}", ChartCached.NumberToStr((int)value, numericFormatter));
}
content = content.Replace("\\n", "\n");