增加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

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = EnsureChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Shadow;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
Bar.AddDefaultSerie(this, GenerateDefaultSerieName());

View File

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = EnsureChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Shadow;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
var serie = Candlestick.AddDefaultSerie(this, GenerateDefaultSerieName());

View File

@@ -12,10 +12,6 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
var tooltip = GetChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.None;
tooltip.trigger = Tooltip.Trigger.Axis;
var grid = EnsureChartComponent<GridCoord>();
grid.left = 0.12f;

View File

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = EnsureChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Line;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
Line.AddDefaultSerie(this, GenerateDefaultSerieName());

View File

@@ -11,11 +11,11 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<PolarCoord>();
AddChartComponentWhenNoExist<AngleAxis>();
AddChartComponentWhenNoExist<RadiusAxis>();
EnsureChartComponent<PolarCoord>();
EnsureChartComponent<AngleAxis>();
EnsureChartComponent<RadiusAxis>();
var tooltip = GetChartComponent<Tooltip>();
var tooltip = EnsureChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Corss;
tooltip.trigger = Tooltip.Trigger.Axis;

View File

@@ -11,11 +11,7 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
var tooltip = EnsureChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.None;
tooltip.trigger = Tooltip.Trigger.Item;
EnsureChartComponent<GridCoord>();
var xAxis = EnsureChartComponent<XAxis>();
xAxis.type = Axis.AxisType.Value;

View File

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = GetChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Line;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
SimplifiedBar.AddDefaultSerie(this, GenerateDefaultSerieName());

View File

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = GetChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Shadow;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
SimplifiedCandlestick.AddDefaultSerie(this, GenerateDefaultSerieName());

View File

@@ -11,13 +11,9 @@ namespace XCharts.Runtime
{
protected override void DefaultChart()
{
AddChartComponentWhenNoExist<GridCoord>();
AddChartComponentWhenNoExist<XAxis>();
AddChartComponentWhenNoExist<YAxis>();
var tooltip = GetChartComponent<Tooltip>();
tooltip.type = Tooltip.Type.Line;
tooltip.trigger = Tooltip.Trigger.Axis;
EnsureChartComponent<GridCoord>();
EnsureChartComponent<XAxis>();
EnsureChartComponent<YAxis>();
RemoveData();
SimplifiedLine.AddDefaultSerie(this, GenerateDefaultSerieName());

View File

@@ -357,7 +357,7 @@ namespace XCharts.Runtime
if (center.Length < 2) return;
var chartPosition = chart.chartPosition;
var chartWidth = chart.chartWidth;
var chartHeight = chart.chartWidth;
var chartHeight = chart.chartHeight;
if (gridIndex >= 0)
{
var layout = chart.GetChartComponent<GridLayout>(0);

View File

@@ -1,8 +1,6 @@
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
using XUGL;
namespace XCharts.Runtime
{
@@ -39,7 +37,12 @@ namespace XCharts.Runtime
/// crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes.
/// |十字准星指示器。坐标轴显示Label和交叉线。
/// </summary>
Corss
Corss,
/// <summary>
/// Auto select indicator according to serie type.
/// |根据serie的类型自动选择显示指示器。
/// </summary>
Auto
}
/// <summary>
@@ -62,7 +65,12 @@ namespace XCharts.Runtime
/// Trigger nothing.
/// |什么都不触发。
/// </summary>
None
None,
/// <summary>
/// Auto select trigger according to serie type.
/// |根据serie的类型自动选择触发类型。
/// </summary>
Auto
}
/// <summary>
/// Position type.
@@ -92,8 +100,8 @@ namespace XCharts.Runtime
}
[SerializeField] private bool m_Show = true;
[SerializeField] private Type m_Type;
[SerializeField] private Trigger m_Trigger = Trigger.Item;
[SerializeField] private Type m_Type = Type.Auto;
[SerializeField] private Trigger m_Trigger = Trigger.Auto;
[SerializeField][Since("v3.3.0")] private Position m_Position = Position.Auto;
[SerializeField] private string m_ItemFormatter;
[SerializeField] private string m_TitleFormatter;
@@ -429,7 +437,7 @@ namespace XCharts.Runtime
/// |当前提示框所指示的数据项索引。
/// </summary>
public List<int> runtimeDataIndex { get { return m_RuntimeDateIndex; } internal set { m_RuntimeDateIndex = value; } }
private List<int> m_RuntimeDateIndex = new List<int>() {-1, -1 };
private List<int> m_RuntimeDateIndex = new List<int>() { -1, -1 };
/// <summary>
/// Keep Tooltiop displayed at the top.
@@ -569,12 +577,12 @@ namespace XCharts.Runtime
public bool IsTriggerItem()
{
return trigger == Trigger.Item;
return trigger == Trigger.Auto ? context.trigger == Trigger.Item : trigger == Trigger.Item;
}
public bool IsTriggerAxis()
{
return trigger == Trigger.Axis;
return trigger == Trigger.Auto ? context.trigger == Trigger.Axis : trigger == Trigger.Axis;
}
public LabelStyle GetContentLabelStyle(int index)

View File

@@ -19,6 +19,8 @@ namespace XCharts.Runtime
public float width;
public float height;
public float angle;
public Tooltip.Type type;
public Tooltip.Trigger trigger;
public TooltipData data = new TooltipData();
}
}

View File

@@ -113,7 +113,7 @@ namespace XCharts.Runtime
}
}
var containerSeries = ListPool<Serie>.Get();
m_PointerContainer = GetPointerContainerAndSeries(tooltip, containerSeries);
UpdatePointerContainerAndSeriesAndTooltip(tooltip, ref containerSeries);
if (containerSeries.Count > 0)
{
if (SetSerieTooltip(tooltip, containerSeries))
@@ -122,7 +122,7 @@ namespace XCharts.Runtime
ListPool<Serie>.Release(containerSeries);
if (!showTooltip)
{
if (tooltip.type == Tooltip.Type.Corss && m_PointerContainer != null && m_PointerContainer.IsPointerEnter())
if (tooltip.context.type == Tooltip.Type.Corss && m_PointerContainer != null && m_PointerContainer.IsPointerEnter())
{
tooltip.SetActive(true);
tooltip.SetContentActive(false);
@@ -138,13 +138,17 @@ namespace XCharts.Runtime
}
}
private void UpdateTooltipTypeAndTrigger(Tooltip tootip)
{
}
private void UpdateTooltipIndicatorLabelText(Tooltip tooltip)
{
if (!tooltip.show) return;
if (tooltip.type == Tooltip.Type.None) return;
if (tooltip.context.type == Tooltip.Type.None) return;
if (m_PointerContainer != null)
{
if (tooltip.type == Tooltip.Type.Corss)
if (tooltip.context.type == Tooltip.Type.Corss)
{
if (m_PointerContainer is GridCoord)
{
@@ -218,10 +222,11 @@ namespace XCharts.Runtime
label.SetTextColor(axis.indicatorLabel.textStyle.color);
}
private ISerieContainer GetPointerContainerAndSeries(Tooltip tooltip, List<Serie> list)
private void UpdatePointerContainerAndSeriesAndTooltip(Tooltip tooltip, ref List<Serie> list)
{
list.Clear();
ISerieContainer target = null;
m_PointerContainer = null;
var updateTooltipTypeAndTrigger = false;
for (int i = chart.components.Count - 1; i >= 0; i--)
{
var component = chart.components[i];
@@ -236,6 +241,14 @@ namespace XCharts.Runtime
(serie as INeedSerieContainer).containterInstanceId == component.instanceId &&
!serie.placeHolder)
{
if (!updateTooltipTypeAndTrigger)
{
updateTooltipTypeAndTrigger = true;
tooltip.context.type = tooltip.type == Tooltip.Type.Auto ?
serie.context.tooltipType : tooltip.type;
tooltip.context.trigger = tooltip.trigger == Tooltip.Trigger.Auto ?
serie.context.tooltipTrigger : tooltip.trigger;
}
var isTriggerAxis = tooltip.IsTriggerAxis();
if (container is GridCoord)
{
@@ -253,16 +266,16 @@ namespace XCharts.Runtime
chart.RefreshTopPainter();
}
}
target = container;
m_PointerContainer = container;
}
}
}
return target;
}
private void UpdateAxisPointerDataIndex(Serie serie, XAxis xAxis, YAxis yAxis, GridCoord grid, bool isTriggerAxis)
{
serie.context.pointerAxisDataIndexs.Clear();
if (xAxis == null || yAxis == null) return;
if (serie is Heatmap)
{
GetSerieDataByXYAxis(serie, xAxis, yAxis);
@@ -419,9 +432,10 @@ namespace XCharts.Runtime
private bool SetSerieTooltip(Tooltip tooltip, Serie serie)
{
if (tooltip.trigger == Tooltip.Trigger.None) return false;
if (serie.context.pointerItemDataIndex < 0) return false;
tooltip.context.type = tooltip.type == Tooltip.Type.Auto ? serie.context.tooltipType : tooltip.type;
tooltip.context.trigger = tooltip.trigger == Tooltip.Trigger.Auto ? serie.context.tooltipTrigger : tooltip.trigger;
if (tooltip.context.trigger == Tooltip.Trigger.None) return false;
tooltip.context.data.param.Clear();
tooltip.context.data.title = serie.serieName;
tooltip.context.pointer = chart.pointerPos;
@@ -440,7 +454,7 @@ namespace XCharts.Runtime
private bool SetSerieTooltip(Tooltip tooltip, List<Serie> series)
{
if (tooltip.trigger == Tooltip.Trigger.None)
if (tooltip.context.trigger == Tooltip.Trigger.None)
return false;
if (series.Count <= 0)
@@ -456,7 +470,7 @@ namespace XCharts.Runtime
if (m_PointerContainer is GridCoord)
{
GetAxisCategory(m_PointerContainer.index, ref dataIndex, ref category);
if (tooltip.trigger == Tooltip.Trigger.Axis)
if (tooltip.context.trigger == Tooltip.Trigger.Axis)
{
isTriggerByAxis = true;
if (series.Count <= 1)
@@ -467,7 +481,7 @@ namespace XCharts.Runtime
else
tooltip.context.data.title = category;
}
else if (tooltip.trigger == Tooltip.Trigger.Item)
else if (tooltip.context.trigger == Tooltip.Trigger.Item)
{
isTriggerByItem = true;
showCategory = series.Count <= 1;
@@ -523,7 +537,7 @@ namespace XCharts.Runtime
private void DrawTooltipIndicator(VertexHelper vh, Tooltip tooltip)
{
if (!tooltip.show) return;
if (tooltip.type == Tooltip.Type.None) return;
if (tooltip.context.type == Tooltip.Type.None) return;
if (!IsAnySerieNeedTooltip()) return;
if (m_PointerContainer is GridCoord)
{
@@ -566,7 +580,7 @@ namespace XCharts.Runtime
var dataZoom = chart.GetDataZoomOfAxis(xAxis);
int dataCount = chart.series.Count > 0 ? chart.series[0].GetDataList(dataZoom).Count : 0;
float splitWidth = AxisHelper.GetDataWidth(xAxis, grid.context.width, dataCount, dataZoom);
switch (tooltip.type)
switch (tooltip.context.type)
{
case Tooltip.Type.Corss:
case Tooltip.Type.Line:
@@ -580,7 +594,7 @@ namespace XCharts.Runtime
Vector2 ep = new Vector2(pX, grid.context.y + grid.context.height);
var lineColor = TooltipHelper.GetLineColor(tooltip, chart.theme.tooltip.lineColor);
ChartDrawer.DrawLineStyle(vh, lineType, lineWidth, sp, ep, lineColor);
if (tooltip.type == Tooltip.Type.Corss)
if (tooltip.context.type == Tooltip.Type.Corss)
{
sp = new Vector2(grid.context.x, chart.pointerPos.y);
ep = new Vector2(grid.context.x + grid.context.width, chart.pointerPos.y);
@@ -632,7 +646,7 @@ namespace XCharts.Runtime
var dataZoom = chart.GetDataZoomOfAxis(yAxis);
int dataCount = chart.series.Count > 0 ? chart.series[0].GetDataList(dataZoom).Count : 0;
float splitWidth = AxisHelper.GetDataWidth(yAxis, grid.context.height, dataCount, dataZoom);
switch (tooltip.type)
switch (tooltip.context.type)
{
case Tooltip.Type.Corss:
case Tooltip.Type.Line:
@@ -644,7 +658,7 @@ namespace XCharts.Runtime
Vector2 ep = new Vector2(grid.context.x + grid.context.width, pY);
var lineColor = TooltipHelper.GetLineColor(tooltip, chart.theme.tooltip.lineColor);
ChartDrawer.DrawLineStyle(vh, lineType, lineWidth, sp, ep, lineColor);
if (tooltip.type == Tooltip.Type.Corss)
if (tooltip.context.type == Tooltip.Type.Corss)
{
sp = new Vector2(chart.pointerPos.x, grid.context.y);
ep = new Vector2(chart.pointerPos.x, grid.context.y + grid.context.height);
@@ -687,7 +701,7 @@ namespace XCharts.Runtime
var sp = ChartHelper.GetPos(m_Polar.context.center, m_Polar.context.insideRadius, tooltipAngle, true);
var ep = ChartHelper.GetPos(m_Polar.context.center, m_Polar.context.outsideRadius, tooltipAngle, true);
switch (tooltip.type)
switch (tooltip.context.type)
{
case Tooltip.Type.Corss:
ChartDrawer.DrawLineStyle(vh, lineType, lineWidth, sp, ep, lineColor);

View File

@@ -0,0 +1,17 @@
using System;
namespace XCharts.Runtime
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class DefaultTooltipAttribute : Attribute
{
public readonly Tooltip.Type type;
public readonly Tooltip.Trigger trigger;
public DefaultTooltipAttribute(Tooltip.Type type, Tooltip.Trigger trigger)
{
this.type = type;
this.trigger = trigger;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a994dc47021bb4031ba6cf23eaf82e7e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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());

View File

@@ -146,10 +146,9 @@ namespace XCharts.Runtime
{
RemoveAllChartComponent();
OnBeforeSerialize();
AddChartComponentWhenNoExist<Title>();
AddChartComponentWhenNoExist<Tooltip>();
GetChartComponent<Title>().text = GetType().Name;
EnsureChartComponent<Title>();
EnsureChartComponent<Tooltip>();
EnsureChartComponent<Title>().text = GetType().Name;
if (m_Theme.sharedTheme != null)
m_Theme.sharedTheme.CopyTheme(ThemeType.Default);

View File

@@ -5,6 +5,7 @@ namespace XCharts.Runtime
[SerieConvert(typeof(Line), typeof(Pie))]
[CoordOptions(typeof(GridCoord), typeof(PolarCoord))]
[DefaultAnimation(AnimationType.BottomToTop)]
[DefaultTooltip(Tooltip.Type.Shadow, Tooltip.Trigger.Axis)]
[SerieComponent(typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataExtraField("m_Ignore")]

View File

@@ -8,6 +8,7 @@ namespace XCharts.Runtime
[SerieConvert(typeof(SimplifiedLine), typeof(Bar))]
[CoordOptions(typeof(GridCoord))]
[DefaultAnimation(AnimationType.LeftToRight, false)]
[DefaultTooltip(Tooltip.Type.Shadow, Tooltip.Trigger.Axis)]
[SerieComponent()]
[SerieDataComponent()]
[SerieDataExtraField()]

View File

@@ -5,6 +5,7 @@ namespace XCharts.Runtime
[System.Serializable]
[SerieHandler(typeof(CandlestickHandler), true)]
[DefaultAnimation(AnimationType.LeftToRight, false)]
[DefaultTooltip(Tooltip.Type.Shadow, Tooltip.Trigger.Axis)]
[SerieComponent()]
[SerieDataComponent(typeof(ItemStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataExtraField()]

View File

@@ -5,6 +5,7 @@ namespace XCharts.Runtime
[System.Serializable]
[SerieHandler(typeof(SimplifiedCandlestickHandler), true)]
[DefaultAnimation(AnimationType.LeftToRight, false)]
[DefaultTooltip(Tooltip.Type.Shadow, Tooltip.Trigger.Axis)]
[SerieComponent()]
[SerieDataComponent()]
[SerieDataExtraField()]

View File

@@ -23,6 +23,7 @@ namespace XCharts.Runtime
[System.Serializable]
[SerieHandler(typeof(HeatmapHandler), true)]
[DefaultAnimation(AnimationType.LeftToRight, false)]
[DefaultTooltip(Tooltip.Type.None, Tooltip.Trigger.Axis)]
[RequireChartComponent(typeof(VisualMap))]
[CoordOptions(typeof(GridCoord), typeof(PolarCoord))]
[SerieComponent(typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]

View File

@@ -7,22 +7,10 @@ namespace XCharts.Runtime
[SerieConvert(typeof(Bar), typeof(Pie))]
[CoordOptions(typeof(GridCoord), typeof(PolarCoord))]
[DefaultAnimation(AnimationType.LeftToRight, false)]
[SerieComponent(
typeof(LabelStyle),
typeof(EndLabelStyle),
typeof(LineArrow),
typeof(AreaStyle),
typeof(EmphasisStyle),
typeof(BlurStyle),
typeof(SelectStyle))]
[SerieDataComponent(
typeof(ItemStyle),
typeof(LabelStyle),
typeof(SerieSymbol),
typeof(EmphasisStyle),
typeof(BlurStyle),
typeof(SelectStyle))]
[DefaultTooltip(Tooltip.Type.Line, Tooltip.Trigger.Axis)]
[SerieDataExtraField("m_State", "m_Ignore")]
[SerieComponent(typeof(LabelStyle), typeof(EndLabelStyle), typeof(LineArrow), typeof(AreaStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(SerieSymbol), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
public class Line : Serie, INeedSerieContainer
{
public int containerIndex { get; internal set; }

View File

@@ -8,6 +8,7 @@ namespace XCharts.Runtime
[SerieConvert(typeof(SimplifiedBar), typeof(Line))]
[CoordOptions(typeof(GridCoord))]
[DefaultAnimation(AnimationType.LeftToRight, false)]
[DefaultTooltip(Tooltip.Type.Line, Tooltip.Trigger.Axis)]
[SerieComponent(typeof(AreaStyle))]
[SerieDataComponent()]
[SerieDataExtraField()]

View File

@@ -30,7 +30,7 @@ namespace XCharts.Runtime
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
{
chart.AddChartComponentWhenNoExist<RadarCoord>();
chart.EnsureChartComponent<RadarCoord>();
var serie = chart.AddSerie<Radar>(serieName);
serie.symbol.show = true;
serie.symbol.type = SymbolType.Circle;

View File

@@ -5,6 +5,7 @@ namespace XCharts.Runtime
[System.Serializable]
[SerieHandler(typeof(EffectScatterHandler), true)]
[CoordOptions(typeof(GridCoord), typeof(SingleAxisCoord))]
[DefaultTooltip(Tooltip.Type.None, Tooltip.Trigger.Item)]
[SerieComponent(typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataExtraField("m_Radius")]

View File

@@ -5,6 +5,7 @@ namespace XCharts.Runtime
[System.Serializable]
[SerieHandler(typeof(ScatterHandler), true)]
[CoordOptions(typeof(GridCoord), typeof(SingleAxisCoord))]
[DefaultTooltip(Tooltip.Type.None, Tooltip.Trigger.Item)]
[SerieComponent(typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataComponent(typeof(ItemStyle), typeof(LabelStyle), typeof(EmphasisStyle), typeof(BlurStyle), typeof(SelectStyle))]
[SerieDataExtraField("m_Radius")]

View File

@@ -115,5 +115,8 @@ namespace XCharts.Runtime
public List<PointInfo> drawPoints = new List<PointInfo>();
public SerieParams param = new SerieParams();
public ChartLabel titleObject { get; set; }
public Tooltip.Type tooltipType;
public Tooltip.Trigger tooltipTrigger;
}
}