mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
support standard c# string formatters on axis labels
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user