mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 06:50:18 +00:00
优化Tooltip的formatter支持{.1}类型的通配符
This commit is contained in:
@@ -313,11 +313,14 @@ namespace XCharts
|
||||
}
|
||||
if (p == '.')
|
||||
{
|
||||
if (argsCount == 1)
|
||||
var bIndex = targetIndex;
|
||||
if (argsCount >= 2)
|
||||
{
|
||||
content = content.Replace(old, ChartCached.ColorToDotStr(themeInfo.GetColor(targetIndex)));
|
||||
foundDot = true;
|
||||
var args1Str = args[1].ToString();
|
||||
if (s_RegexN.IsMatch(args1Str)) bIndex = int.Parse(args1Str);
|
||||
}
|
||||
content = content.Replace(old, ChartCached.ColorToDotStr(themeInfo.GetColor(bIndex)));
|
||||
foundDot = true;
|
||||
}
|
||||
else if (p == 'a' || p == 'A')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user