增加TooltipAuto自动设置显示类型和触发类型

This commit is contained in:
monitor1394
2023-09-01 08:01:27 +08:00
parent 9deb120446
commit a6ba17ee00
33 changed files with 154 additions and 108 deletions

View File

@@ -976,6 +976,15 @@ namespace XCharts.Runtime
if (serie == null)
throw new ArgumentNullException("serie is null");
if (serie.GetType().IsDefined(typeof(DefaultTooltipAttribute), false))
{
var attribute1 = serie.GetType().GetAttribute<DefaultTooltipAttribute>();
if (attribute1 != null)
{
serie.context.tooltipTrigger = attribute1.trigger;
serie.context.tooltipType = attribute1.type;
}
}
if (!serie.GetType().IsDefined(typeof(SerieHandlerAttribute), false))
{
Debug.LogError("Serie no Handler:" + serie.GetType());