mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
修复Tooltip的titleFormatter设置为{b}后显示不准确的问题
This commit is contained in:
@@ -419,7 +419,7 @@ namespace XCharts.Runtime
|
||||
else
|
||||
{
|
||||
content = titleStyle.formatter;
|
||||
FormatterHelper.ReplaceContent(ref content, 0, titleStyle.numericFormatter, serie, chart);
|
||||
FormatterHelper.ReplaceContent(ref content, -1, titleStyle.numericFormatter, serie, chart);
|
||||
}
|
||||
var label = ChartHelper.AddChartLabel("title_" + 0, serieTitleRoot.transform, titleStyle, chart.theme.common,
|
||||
content, color, TextAnchor.MiddleCenter);
|
||||
@@ -446,9 +446,8 @@ namespace XCharts.Runtime
|
||||
else
|
||||
{
|
||||
content = titleStyle.formatter;
|
||||
FormatterHelper.ReplaceContent(ref content, 0, titleStyle.numericFormatter, serie, chart);
|
||||
FormatterHelper.ReplaceContent(ref content, i, titleStyle.numericFormatter, serie, chart);
|
||||
}
|
||||
FormatterHelper.ReplaceContent(ref content, i, titleStyle.numericFormatter, serie, chart);
|
||||
var label = ChartHelper.AddChartLabel("title_" + i, serieTitleRoot.transform, titleStyle, chart.theme.common,
|
||||
content, color, TextAnchor.MiddleCenter);
|
||||
serieData.titleObject = label;
|
||||
|
||||
Reference in New Issue
Block a user