mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
增加SerieData可单独设置SerieSymbol#66
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.06.17) 增加`SerieData`可单独设置`SerieSymbol`#66
|
||||
* (2020.06.17) 修复`Check For Update`在`Unity 2018`部分版本报错的问题#63
|
||||
* (2020.06.16) 增加`Serie`的`avoidLabelOverlap`参数避免饼图标签堆叠的情况#56
|
||||
* (2020.06.15) 修复`SerieLabel`单独控制显示时可能错乱的问题
|
||||
* (2020.06.11) 修复`Check warning`不生效的问题
|
||||
* (2020.06.11) 修复`PieChart`和`RingChart`在数据占比很小时不显示的问题
|
||||
* (2020.06.11) 增加`Tooltip`的`titleFormatter`支持配置占位符`{i}`表示忽略不显示标题
|
||||
* (2020.06.07) 增加`Animation`的`customFadeInDelay`等自定义数据项延时和时长回调函数
|
||||
* (2020.06.07) 优化`PieChart`在数据全为`0`时的显示为等份的效果
|
||||
* (2020.06.07) 增加`Animation`的`customFadeInDelay`等自定义数据项延时和时长回调函数#58
|
||||
* (2020.06.07) 优化`PieChart`在数据全为`0`时的显示为等份的效果#59
|
||||
* (2020.06.04) 增加`SerieLabel`的`autoOffset`参数设置是否自动判断上下偏移
|
||||
* (2020.06.04) 增加`Tooltip`的`alwayShow`参数设置触发后一直显示
|
||||
* (2020.06.04) 优化`Tooltip`的`formatter`支持`{.1}`通配符
|
||||
* (2020.06.04) 优化`Legend`数量过多时自动换行显示
|
||||
* (2020.06.04) 优化`Legend`数量过多时自动换行显示#53
|
||||
* (2020.06.03) 发布`v1.5.1`版本
|
||||
* (2020.06.02) 增加`Radar`的`ceilRate`,设置最大最小值的取整倍率
|
||||
* (2020.06.02) 优化`Tooltip`的`formatter`,支持`{c1:1-1:f1}`格式配置
|
||||
|
||||
@@ -837,12 +837,16 @@
|
||||
* `name`:数据项名称。
|
||||
* `selected`:该数据项是否被选中。
|
||||
* `radius`:自定义半径。可用在饼图中自定义某个数据项的半径。
|
||||
* `showIcon`:是否显示图标。
|
||||
* `iconImage`:图标的图片。
|
||||
* `iconColor`:图标颜色。
|
||||
* `iconWidth`:图标宽。
|
||||
* `iconHeight`:图标高。
|
||||
* `iconOffset`:图标偏移。
|
||||
* `iconStyle`:数据项图标样式。
|
||||
* `enableLabel`:是否启用单个数据项的标签设置。
|
||||
* `label`:单个数据项的标签设置。
|
||||
* `enableItemStyle`:是否启用单个数据项的样式。
|
||||
* `itemStyle`:单个数据项的样式设置。
|
||||
* `enableEmphasis`:是否启用单个数据项的高亮样式。
|
||||
* `emphasis`:单个数据项的高亮样式设置。
|
||||
* `enableSymbol`:是否启用单个数据项的标记设置。
|
||||
* `symbol`:单个数据项的标记设置。
|
||||
* `data`:可指定任意维数的数值列表。对于折线图和柱状图,`data`其实是`size`为`2`的数组,`data[0]`是x的编号,`data[1]`是`y`的数值,默认显示`data[1]`。其他图表看需求而定是长度大于`2`的数组。可通过`Serie`的`showDataDimension`指定数据长度。
|
||||
|
||||
## `SerieLabel`
|
||||
|
||||
@@ -881,6 +885,7 @@
|
||||
|
||||
## `SerieSymbol`
|
||||
|
||||
* `show`:是否显示标记。
|
||||
* `type`:标记类型。支持以下六种类型:
|
||||
* `EmptyCircle`:空心圆。
|
||||
* `Circle`:实心圆。
|
||||
|
||||
@@ -486,8 +486,13 @@ namespace XCharts
|
||||
var m_ItemStyle = serieData.FindPropertyRelative("m_ItemStyle");
|
||||
var m_EnableEmphasis = serieData.FindPropertyRelative("m_EnableEmphasis");
|
||||
var m_Emphasis = serieData.FindPropertyRelative("m_Emphasis");
|
||||
var m_EnableSymbol = serieData.FindPropertyRelative("m_EnableSymbol");
|
||||
var m_Symbol = serieData.FindPropertyRelative("m_Symbol");
|
||||
EditorGUI.PropertyField(drawRect, m_Icon);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Icon);
|
||||
EditorGUI.PropertyField(drawRect, m_Symbol);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableSymbol, 1, "(enable)");
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Symbol);
|
||||
EditorGUI.PropertyField(drawRect, m_Label);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableLabel, 1, "(enable)");
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Label);
|
||||
@@ -497,7 +502,6 @@ namespace XCharts
|
||||
EditorGUI.PropertyField(drawRect, m_Emphasis);
|
||||
ChartEditorHelper.MakeBool(drawRect, m_EnableEmphasis, 1, "(enable)");
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Emphasis);
|
||||
|
||||
EditorGUI.indentLevel -= 2;
|
||||
}
|
||||
}
|
||||
@@ -607,6 +611,7 @@ namespace XCharts
|
||||
{
|
||||
var item = m_Data.GetArrayElementAtIndex(i);
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_IconStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_Symbol"));
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_Label"));
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_ItemStyle"));
|
||||
height += EditorGUI.GetPropertyHeight(item.FindPropertyRelative("m_Emphasis"));
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace XCharts
|
||||
{
|
||||
Rect drawRect = pos;
|
||||
drawRect.height = EditorGUIUtility.singleLineHeight;
|
||||
SerializedProperty m_Show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Type = prop.FindPropertyRelative("m_Type");
|
||||
SerializedProperty m_SizeType = prop.FindPropertyRelative("m_SizeType");
|
||||
SerializedProperty m_Size = prop.FindPropertyRelative("m_Size");
|
||||
@@ -32,12 +33,14 @@ namespace XCharts
|
||||
SerializedProperty m_ForceShowLast = prop.FindPropertyRelative("m_ForceShowLast");
|
||||
SerializedProperty m_Gap = prop.FindPropertyRelative("m_Gap");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieSymbolToggle, prop, null, m_Type, false);
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieSymbolToggle, prop, null, m_Show, false);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
if (ChartEditorHelper.IsToggle(m_SerieSymbolToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Type);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Gap);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_SizeType);
|
||||
@@ -78,16 +81,18 @@ namespace XCharts
|
||||
{
|
||||
SerializedProperty m_SizeType = prop.FindPropertyRelative("m_SizeType");
|
||||
SerieSymbolSizeType sizeType = (SerieSymbolSizeType)m_SizeType.enumValueIndex;
|
||||
var hig = 9 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
|
||||
switch (sizeType)
|
||||
{
|
||||
case SerieSymbolSizeType.Custom:
|
||||
return 8 * EditorGUIUtility.singleLineHeight + 8 * EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case SerieSymbolSizeType.FromData:
|
||||
return 9 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
|
||||
hig += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
case SerieSymbolSizeType.Callback:
|
||||
return 8 * EditorGUIUtility.singleLineHeight + 8 * EditorGUIUtility.standardVerticalSpacing;
|
||||
break;
|
||||
}
|
||||
return 8 * EditorGUIUtility.singleLineHeight + 8 * EditorGUIUtility.standardVerticalSpacing;
|
||||
return hig;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace XCharts.Examples
|
||||
chart.RemoveData();
|
||||
|
||||
var serie = chart.AddSerie(SerieType.Line);
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
serie.symbol.show = false;
|
||||
serie.lineType = LineType.Normal;
|
||||
for (angle = 0; angle < 1080; angle++)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace XCharts.Examples
|
||||
chart = gameObject.GetComponentInChildren<CoordinateChart>();
|
||||
chart.RemoveData();
|
||||
var serie = chart.AddSerie(SerieType.Line);
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
serie.symbol.show = false;
|
||||
serie.maxCache = maxCacheDataNumber;
|
||||
chart.xAxises[0].maxCache = maxCacheDataNumber;
|
||||
timeNow = DateTime.Now;
|
||||
|
||||
@@ -259,19 +259,21 @@ namespace XCharts
|
||||
|
||||
if (type == SerieType.Scatter)
|
||||
{
|
||||
serie.symbol.show = true;
|
||||
serie.symbol.type = SerieSymbolType.Circle;
|
||||
serie.symbol.size = 20f;
|
||||
serie.symbol.selectedSize = 30f;
|
||||
}
|
||||
else if (type == SerieType.Line)
|
||||
{
|
||||
serie.symbol.show = true;
|
||||
serie.symbol.type = SerieSymbolType.EmptyCircle;
|
||||
serie.symbol.size = 2.5f;
|
||||
serie.symbol.selectedSize = 5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
serie.symbol.type = SerieSymbolType.None;
|
||||
serie.symbol.show = false;
|
||||
}
|
||||
serie.animation.Restart();
|
||||
m_Series.Add(serie);
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace XCharts
|
||||
[SerializeField] private ItemStyle m_ItemStyle = new ItemStyle();
|
||||
[SerializeField] private bool m_EnableEmphasis = false;
|
||||
[SerializeField] private Emphasis m_Emphasis = new Emphasis();
|
||||
[SerializeField] private bool m_EnableSymbol = false;
|
||||
[SerializeField] private SerieSymbol m_Symbol = new SerieSymbol();
|
||||
[SerializeField] private List<float> m_Data = new List<float>();
|
||||
|
||||
public LabelObject labelObject { get; set; }
|
||||
@@ -87,6 +89,14 @@ namespace XCharts
|
||||
/// </summary>
|
||||
public Emphasis emphasis { get { return m_Emphasis; } set { m_Emphasis = value; } }
|
||||
/// <summary>
|
||||
/// 是否启用单个数据项的标记设置。
|
||||
/// </summary>
|
||||
public bool enableSymbol { get { return m_EnableSymbol; } set { m_EnableSymbol = value; } }
|
||||
/// <summary>
|
||||
/// 单个数据项的标记设置。
|
||||
/// </summary>
|
||||
public SerieSymbol symbol { get { return m_Symbol; } set { m_Symbol = value; } }
|
||||
/// <summary>
|
||||
/// An arbitrary dimension data list of data item.
|
||||
/// 可指定任意维数的数值列表。
|
||||
/// </summary>
|
||||
@@ -169,6 +179,10 @@ namespace XCharts
|
||||
m_Name = string.Empty;
|
||||
m_Selected = false;
|
||||
m_CanShowLabel = false;
|
||||
m_EnableSymbol = false;
|
||||
m_EnableLabel = false;
|
||||
m_EnableEmphasis = false;
|
||||
m_EnableItemStyle = false;
|
||||
m_Radius = 0;
|
||||
m_Data.Clear();
|
||||
m_PreviousData.Clear();
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace XCharts
|
||||
[System.Serializable]
|
||||
public class SerieSymbol : SubComponent
|
||||
{
|
||||
[SerializeField] private bool m_Show = false;
|
||||
[SerializeField] private SerieSymbolType m_Type = SerieSymbolType.EmptyCircle;
|
||||
[SerializeField] private SerieSymbolSizeType m_SizeType = SerieSymbolSizeType.Custom;
|
||||
[SerializeField] private float m_Size = 6f;
|
||||
@@ -92,6 +93,33 @@ namespace XCharts
|
||||
[SerializeField] private bool m_ForceShowLast = false;
|
||||
[SerializeField] private float m_Gap = 0;
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
m_Show = false;
|
||||
m_Type = SerieSymbolType.EmptyCircle;
|
||||
m_SizeType = SerieSymbolSizeType.Custom;
|
||||
m_Size = 6f;
|
||||
m_SelectedDataScale = 10f;
|
||||
m_DataIndex = 1;
|
||||
m_DataScale = 1;
|
||||
m_SelectedDataScale = 1.5f;
|
||||
m_SizeCallback = null;
|
||||
m_SelectedSizeCallback = null;
|
||||
m_StartIndex = 0;
|
||||
m_Interval = 0;
|
||||
m_ForceShowLast = false;
|
||||
m_Gap = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the symbol is showed.
|
||||
/// 是否显示标记。
|
||||
/// </summary>
|
||||
public bool show
|
||||
{
|
||||
get { return m_Show; }
|
||||
set { if (PropertyUtility.SetStruct(ref m_Show, value)) SetAllDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// the type of symbol.
|
||||
/// 标记类型。
|
||||
@@ -274,7 +302,7 @@ namespace XCharts
|
||||
|
||||
public bool ShowSymbol(int dataIndex, int dataCount)
|
||||
{
|
||||
if (type == SerieSymbolType.None) return false;
|
||||
if (!show) return false;
|
||||
if (dataIndex < startIndex) return false;
|
||||
if (m_Interval <= 0) return true;
|
||||
if (m_ForceShowLast && dataIndex == dataCount - 1) return true;
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace XCharts
|
||||
break;
|
||||
case SerieType.Scatter:
|
||||
case SerieType.EffectScatter:
|
||||
if (serie.symbol.type == SerieSymbolType.None)
|
||||
if (!serie.symbol.show)
|
||||
sb.AppendFormat("warning:serie {0} symbol type is None\n", serie.index);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,8 @@ namespace XCharts
|
||||
var serieData = serie.data[n];
|
||||
var xdata = serieData.GetData(0, xAxis.inverse);
|
||||
var ydata = serieData.GetData(1, yAxis.inverse);
|
||||
var symbolSize = serie.symbol.GetSize(serieData == null ? null : serieData.data);
|
||||
var symbol = SerieHelper.GetSerieSymbol(serie,serieData);
|
||||
var symbolSize = symbol.GetSize(serieData == null ? null : serieData.data);
|
||||
if (Mathf.Abs(xValue - xdata) / xRate < symbolSize
|
||||
&& Mathf.Abs(yValue - ydata) / yRate < symbolSize)
|
||||
{
|
||||
|
||||
@@ -21,31 +21,30 @@ namespace XCharts
|
||||
for (int n = 0; n < m_Series.Count; n++)
|
||||
{
|
||||
var serie = m_Series.GetSerie(n);
|
||||
if (serie.IsPerformanceMode()) continue;
|
||||
if (!serie.show || serie.IsPerformanceMode()) continue;
|
||||
if (serie.type != SerieType.Line) continue;
|
||||
if (!serie.show || serie.symbol.type == SerieSymbolType.None) continue;
|
||||
var count = serie.dataPoints.Count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (!serie.symbol.ShowSymbol(i, count)) continue;
|
||||
var serieData = serie.GetSerieData(i);
|
||||
var symbol = SerieHelper.GetSerieSymbol(serie, serieData);
|
||||
if (!symbol.show || !symbol.ShowSymbol(i, count)) continue;
|
||||
if (serie.lineArrow.show)
|
||||
{
|
||||
if (serie.lineArrow.position == LineArrow.Position.Start && i == 0) continue;
|
||||
if (serie.lineArrow.position == LineArrow.Position.End && i == count - 1) continue;
|
||||
}
|
||||
Vector3 p = serie.dataPoints[i];
|
||||
var serieData = serie.GetSerieData(i);
|
||||
if (ChartHelper.IsIngore(p)) continue;
|
||||
if (ChartHelper.IsIngore(serie.dataPoints[i])) continue;
|
||||
bool highlight = (m_Tooltip.show && m_Tooltip.IsSelected(i))
|
||||
|| serie.data[i].highlighted || serie.highlighted;
|
||||
float symbolSize = highlight ? serie.symbol.selectedSize : serie.symbol.size;
|
||||
float symbolSize = highlight ? symbol.selectedSize : symbol.size;
|
||||
var symbolColor = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, n, highlight);
|
||||
var symbolToColor = SerieHelper.GetItemToColor(serie, serieData, m_ThemeInfo, n, highlight);
|
||||
var symbolBorder = SerieHelper.GetSymbolBorder(serie, serieData, highlight);
|
||||
var cornerRadius = SerieHelper.GetSymbolCornerRadius(serie, serieData, highlight);
|
||||
symbolSize = serie.animation.GetSysmbolSize(symbolSize);
|
||||
CheckClipAndDrawSymbol(vh, serie.symbol.type, symbolSize, symbolBorder, p, symbolColor,
|
||||
symbolToColor, serie.symbol.gap, clip, cornerRadius);
|
||||
CheckClipAndDrawSymbol(vh, symbol.type, symbolSize, symbolBorder, serie.dataPoints[i], symbolColor,
|
||||
symbolToColor, symbol.gap, clip, cornerRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace XCharts
|
||||
for (int n = serie.minShow; n < maxCount; n++)
|
||||
{
|
||||
var serieData = serie.GetDataList(m_DataZoom)[n];
|
||||
var symbol = SerieHelper.GetSerieSymbol(serie, serieData);
|
||||
if (!symbol.ShowSymbol(n, maxCount)) continue;
|
||||
var highlight = serie.highlighted || serieData.highlighted;
|
||||
var color = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, colorIndex, highlight);
|
||||
var toColor = SerieHelper.GetItemToColor(serie, serieData, m_ThemeInfo, colorIndex, highlight);
|
||||
@@ -47,27 +49,27 @@ namespace XCharts
|
||||
float symbolSize = 0;
|
||||
if (serie.highlighted || serieData.highlighted)
|
||||
{
|
||||
symbolSize = serie.symbol.GetSelectedSize(datas);
|
||||
symbolSize = symbol.GetSelectedSize(datas);
|
||||
}
|
||||
else
|
||||
{
|
||||
symbolSize = serie.symbol.GetSize(datas);
|
||||
symbolSize = symbol.GetSize(datas);
|
||||
}
|
||||
symbolSize *= rate;
|
||||
if (symbolSize > 100) symbolSize = 100;
|
||||
if (serie.type == SerieType.EffectScatter)
|
||||
{
|
||||
for (int count = 0; count < serie.symbol.animationSize.Count; count++)
|
||||
for (int count = 0; count < symbol.animationSize.Count; count++)
|
||||
{
|
||||
var nowSize = serie.symbol.animationSize[count];
|
||||
var nowSize = symbol.animationSize[count];
|
||||
color.a = (symbolSize - nowSize) / symbolSize;
|
||||
DrawSymbol(vh, serie.symbol.type, nowSize, symbolBorder, pos, color, toColor, serie.symbol.gap, cornerRadius);
|
||||
DrawSymbol(vh, symbol.type, nowSize, symbolBorder, pos, color, toColor, symbol.gap, cornerRadius);
|
||||
}
|
||||
RefreshChart();
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawSymbol(vh, serie.symbol.type, symbolSize, symbolBorder, pos, color, toColor, serie.symbol.gap, cornerRadius);
|
||||
DrawSymbol(vh, symbol.type, symbolSize, symbolBorder, pos, color, toColor, symbol.gap, cornerRadius);
|
||||
}
|
||||
}
|
||||
if (!serie.animation.IsFinish())
|
||||
|
||||
@@ -171,6 +171,12 @@ namespace XCharts
|
||||
}
|
||||
}
|
||||
|
||||
public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData)
|
||||
{
|
||||
if (!serie.IsPerformanceMode() && serieData.enableSymbol) return serieData.symbol;
|
||||
else return serie.symbol;
|
||||
}
|
||||
|
||||
public static Color GetAreaColor(Serie serie, ThemeInfo theme, int index, bool highlight)
|
||||
{
|
||||
var areaStyle = serie.areaStyle;
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace XCharts
|
||||
m_Title.text = "LineChart";
|
||||
m_Tooltip.type = Tooltip.Type.Line;
|
||||
RemoveData();
|
||||
AddSerie(SerieType.Line, "serie1");
|
||||
var serie = AddSerie(SerieType.Line, "serie1");
|
||||
serie.symbol.show = true;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
AddXAxisData("x" + (i + 1));
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace XCharts
|
||||
m_Radars.Add(Radar.defaultRadar);
|
||||
m_Title.text = "RadarChart";
|
||||
var serie = AddSerie(SerieType.Radar, "serie1");
|
||||
serie.symbol.show = true;
|
||||
serie.symbol.type = SerieSymbolType.EmptyCircle;
|
||||
serie.symbol.size = 4;
|
||||
serie.symbol.selectedSize = 6;
|
||||
@@ -334,7 +335,7 @@ namespace XCharts
|
||||
{
|
||||
ChartDrawer.DrawLineStyle(vh, serie.lineStyle, startPoint, firstPoint, lineColor);
|
||||
}
|
||||
if (serie.symbol.type != SerieSymbolType.None)
|
||||
if (serie.symbol.show && serie.symbol.type != SerieSymbolType.None)
|
||||
{
|
||||
var symbolSize = (isHighlight ? serie.symbol.selectedSize : serie.symbol.size);
|
||||
var symbolColor = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, serieIndex, isHighlight);
|
||||
@@ -468,7 +469,7 @@ namespace XCharts
|
||||
ChartDrawer.DrawLineStyle(vh, serie.lineStyle, startPoint, firstPoint, lineColor);
|
||||
}
|
||||
}
|
||||
if (serie.symbol.type != SerieSymbolType.None)
|
||||
if (serie.symbol.show && serie.symbol.type != SerieSymbolType.None)
|
||||
{
|
||||
for (int j = 0; j < serie.data.Count; j++)
|
||||
{
|
||||
@@ -517,7 +518,7 @@ namespace XCharts
|
||||
private void DrawRadarSymbol(VertexHelper vh, Serie serie, SerieData serieData, int serieIndex, bool isHighlight,
|
||||
List<Vector3> pointList)
|
||||
{
|
||||
if (serie.symbol.type != SerieSymbolType.None)
|
||||
if (serie.symbol.show && serie.symbol.type != SerieSymbolType.None)
|
||||
{
|
||||
var symbolSize = (isHighlight ? serie.symbol.selectedSize : serie.symbol.size);
|
||||
var symbolColor = SerieHelper.GetItemColor(serie, serieData, m_ThemeInfo, serieIndex, isHighlight);
|
||||
|
||||
@@ -75,11 +75,14 @@ namespace XCharts
|
||||
if (!serie.show) continue;
|
||||
if (serie.type != SerieType.Scatter && serie.type != SerieType.EffectScatter) continue;
|
||||
bool refresh = false;
|
||||
var dataCount = serie.data.Count;
|
||||
for (int j = 0; j < serie.data.Count; j++)
|
||||
{
|
||||
var serieData = serie.data[j];
|
||||
var symbol = SerieHelper.GetSerieSymbol(serie, serieData);
|
||||
if (!symbol.ShowSymbol(j, dataCount)) continue;
|
||||
var dist = Vector3.Distance(local, serieData.runtimePosition);
|
||||
if (dist <= serie.symbol.size)
|
||||
if (dist <= symbol.size)
|
||||
{
|
||||
serieData.selected = true;
|
||||
m_Tooltip.AddSerieDataIndex(serie.index, j);
|
||||
|
||||
Reference in New Issue
Block a user