优化图表性能

This commit is contained in:
monitor1394
2026-05-28 23:24:42 +08:00
parent 2688d93f17
commit 12be0ef93b
4 changed files with 19 additions and 50 deletions

View File

@@ -25,6 +25,13 @@ namespace XCharts.Runtime
return !string.IsNullOrEmpty(content) && content.IndexOf('{') >= 0;
}
public static bool NeedTotalContent(string content)
{
if (string.IsNullOrEmpty(content)) return false;
return content.IndexOf("{d", System.StringComparison.OrdinalIgnoreCase) >= 0 ||
content.IndexOf("{f", System.StringComparison.OrdinalIgnoreCase) >= 0;
}
/// <summary>
/// 替换字符串中的通配符,支持的通配符有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}、{h}、{y}。
/// </summary>