mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
3.0 - tooltip
This commit is contained in:
@@ -238,18 +238,14 @@ namespace XCharts
|
||||
{
|
||||
content = content.Replace(old, dataName);
|
||||
}
|
||||
else if (p == 'c' || p == 'C' || p == 'd' || p == 'D')
|
||||
else if (p == 'd' || p == 'D')
|
||||
{
|
||||
var isPercent = p == 'd' || p == 'D';
|
||||
if (isPercent)
|
||||
{
|
||||
if (total != 0)
|
||||
content = content.Replace(old, ChartCached.FloatToStr(value / total * 100, numericFormatter));
|
||||
}
|
||||
else
|
||||
{
|
||||
content = content.Replace(old, ChartCached.FloatToStr(value, numericFormatter));
|
||||
}
|
||||
var rate = total == 0 ? 0 : value / total * 100;
|
||||
content = content.Replace(old, ChartCached.FloatToStr(rate, numericFormatter));
|
||||
}
|
||||
else if (p == 'c' || p == 'C')
|
||||
{
|
||||
content = content.Replace(old, ChartCached.FloatToStr(value, numericFormatter));
|
||||
}
|
||||
}
|
||||
content = TrimAndReplaceLine(content);
|
||||
|
||||
Reference in New Issue
Block a user