support standard c# string formatters on axis labels

This commit is contained in:
Jacob Rapoport
2019-11-11 18:21:30 -08:00
parent de6d3ed187
commit 1b5f3d9fc1

View File

@@ -162,7 +162,7 @@ namespace XCharts
else
return ChartCached.FloatToStr(value, 1);
}
else
else if (m_Formatter.Contains("{value"))
{
var content = m_Formatter;
if (content.Contains("{value:f2}"))
@@ -181,6 +181,8 @@ namespace XCharts
content = content.Replace("\\n", "\n");
content = content.Replace("<br/>", "\n");
return content;
} else {
return value.ToString(m_Formatter);
}
}
}