增加RadarChartTooltipformatter支持#77

This commit is contained in:
monitor1394
2020-07-25 14:09:57 +08:00
parent 9a5532724c
commit 5df8f2d3fe
9 changed files with 133 additions and 138 deletions

View File

@@ -93,7 +93,8 @@ namespace XCharts
[SerializeField] private bool m_Indicator = true;
[SerializeField] private PositionType m_PositionType = PositionType.Vertice;
[SerializeField] private float m_IndicatorGap = 10;
[SerializeField] protected int m_CeilRate = 0;
[SerializeField] private int m_CeilRate = 0;
[SerializeField] private bool m_IsAxisTooltip;
[SerializeField] private List<Indicator> m_IndicatorList = new List<Indicator>();
/// <summary>
/// Radar render type, in which 'Polygon' and 'Circle' are supported.
@@ -179,6 +180,14 @@ namespace XCharts
set { if (PropertyUtility.SetStruct(ref m_CeilRate, value < 0 ? 0 : value)) SetAllDirty(); }
}
/// <summary>
/// 是否Tooltip显示轴线上的所有数据。
/// </summary>
public bool isAxisTooltip
{
get { return m_IsAxisTooltip; }
set { if (PropertyUtility.SetStruct(ref m_IsAxisTooltip, value)) SetAllDirty(); }
}
/// <summary>
/// The position type of indicator.
/// 显示位置类型。
/// </summary>

View File

@@ -189,22 +189,28 @@ namespace XCharts
public enum SampleType
{
/// <summary>
/// Take a peak. When the average value of the filter point is greater than or equal to 'sampleAverage',
/// take the maximum value; If you do it the other way around, you get the minimum.
/// 取峰值。
/// </summary>
Peak,
/// <summary>
/// Take the average of the filter points.
/// 取过滤点的平均值。
/// </summary>
Average,
/// <summary>
/// Take the maximum value of the filter point.
/// 取过滤点的最大值。
/// </summary>
Max,
/// <summary>
/// Take the minimum value of the filter point.
/// 取过滤点的最小值。
/// </summary>
Min,
/// <summary>
/// Take the sum of the filter points.
/// 取过滤点的和。
/// </summary>
Sum
@@ -325,6 +331,7 @@ namespace XCharts
set { if (PropertyUtility.SetClass(ref m_Name, value)) { SetVerticesDirty(); SetNameDirty(); } }
}
/// <summary>
/// Legend name. When the serie name is not empty, the legend name is the series name; Otherwise, it is index.
/// 图例名称。当系列名称不为空时图例名称即为系列名称反之则为索引index。
/// </summary>
public string legendName { get { return string.IsNullOrEmpty(name) ? ChartCached.IntToStr(index) : name; } }