修复TooltiptitleFormater设置{b}可能不生效的问题

This commit is contained in:
monitor1394
2023-03-15 13:04:48 +08:00
parent bddbe600ce
commit 3dfa5487ee

View File

@@ -72,7 +72,7 @@ namespace XCharts.Runtime
if (s_RegexN.IsMatch(args1Str)) bIndex = int.Parse(args1Str); if (s_RegexN.IsMatch(args1Str)) bIndex = int.Parse(args1Str);
} }
var color = string.IsNullOrEmpty(colorName) ? var color = string.IsNullOrEmpty(colorName) ?
(Color) chart.GetMarkColor(serie, serie.GetSerieData(bIndex)) : (Color)chart.GetMarkColor(serie, serie.GetSerieData(bIndex)) :
SeriesHelper.GetNameColor(chart, bIndex, colorName); SeriesHelper.GetNameColor(chart, bIndex, colorName);
if (p == '.') if (p == '.')
{ {
@@ -99,7 +99,7 @@ namespace XCharts.Runtime
var args1Str = args[1].ToString(); var args1Str = args[1].ToString();
if (s_RegexN.IsMatch(args1Str)) bIndex = int.Parse(args1Str); if (s_RegexN.IsMatch(args1Str)) bIndex = int.Parse(args1Str);
} }
var needCategory = (p != 'e' && p != 'E') && (serie is Line || serie is Bar); var needCategory = (p != 'e' && p != 'E') && serie.defaultColorBy != SerieColorBy.Data;
if (needCategory) if (needCategory)
{ {
var category = chart.GetTooltipCategory(dataIndex, serie); var category = chart.GetTooltipCategory(dataIndex, serie);