mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 01:10:08 +00:00
增加Tooltip的Auto自动设置显示类型和触发类型
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user