mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 15:00:08 +00:00
3.0 - bar chart
This commit is contained in:
@@ -22,10 +22,19 @@ namespace XCharts
|
||||
tooltip.numericFormatter, null, chart);
|
||||
}
|
||||
}
|
||||
for (int i = tooltip.context.data.param.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var param = tooltip.context.data.param[i];
|
||||
if (TooltipHelper.IsIgnoreItemFormatter(param.itemFormatter))
|
||||
{
|
||||
tooltip.context.data.param.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
foreach (var param in tooltip.context.data.param)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(param.itemFormatter))
|
||||
{
|
||||
param.columns.Clear();
|
||||
var content = param.itemFormatter;
|
||||
FormatterHelper.ReplaceSerieLabelContent(ref content,
|
||||
param.numericFormatter,
|
||||
@@ -35,9 +44,6 @@ namespace XCharts
|
||||
param.category,
|
||||
param.serieData.name,
|
||||
param.color);
|
||||
|
||||
param.columns.Clear();
|
||||
|
||||
foreach (var item in content.Split('|'))
|
||||
{
|
||||
param.columns.Add(item);
|
||||
@@ -46,6 +52,11 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsIgnoreItemFormatter(string itemFormatter)
|
||||
{
|
||||
return "-".Equals(itemFormatter);
|
||||
}
|
||||
|
||||
public static void LimitInRect(Tooltip tooltip, Rect chartRect)
|
||||
{
|
||||
if (tooltip.view == null)
|
||||
|
||||
Reference in New Issue
Block a user