mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 03:58:49 +00:00
增加Bar的realtimeSort支持实时排序
This commit is contained in:
@@ -464,16 +464,16 @@ namespace XCharts.Runtime
|
||||
indicatorList.Clear();
|
||||
}
|
||||
|
||||
public string GetFormatterIndicatorContent(int indicatorIndex)
|
||||
public string GetFormatterIndicatorContent(int indicatorIndex, int totalIndex)
|
||||
{
|
||||
var indicator = GetIndicator(indicatorIndex);
|
||||
if (indicator == null)
|
||||
return string.Empty;
|
||||
else
|
||||
return GetFormatterIndicatorContent(indicator.name);
|
||||
return GetFormatterIndicatorContent(indicator.name, indicatorIndex, totalIndex);
|
||||
}
|
||||
|
||||
public string GetFormatterIndicatorContent(string indicatorName)
|
||||
public string GetFormatterIndicatorContent(string indicatorName, int index, int totalIndex)
|
||||
{
|
||||
if (string.IsNullOrEmpty(indicatorName))
|
||||
return indicatorName;
|
||||
@@ -485,7 +485,7 @@ namespace XCharts.Runtime
|
||||
else
|
||||
{
|
||||
var content = m_AxisName.labelStyle.formatter;
|
||||
FormatterHelper.ReplaceAxisLabelContent(ref content, indicatorName);
|
||||
FormatterHelper.ReplaceAxisLabelContent(ref content, indicatorName, index, totalIndex);
|
||||
return content;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ namespace XCharts.Runtime
|
||||
var indicator = radar.indicatorList[i];
|
||||
var pos = radar.GetIndicatorPosition(i);
|
||||
var objName = INDICATOR_TEXT + "_" + i;
|
||||
|
||||
var content = radar.GetFormatterIndicatorContent(i, radar.indicatorList.Count);
|
||||
var label = ChartHelper.AddChartLabel(objName, radarObject.transform, radar.axisName.labelStyle,
|
||||
chart.theme.common, radar.GetFormatterIndicatorContent(i), Color.clear, TextAnchor.MiddleCenter);
|
||||
chart.theme.common, content, Color.clear, TextAnchor.MiddleCenter);
|
||||
label.SetActive(radar.axisName.show && radar.indicator && radar.axisName.labelStyle.show, true);
|
||||
AxisHelper.AdjustCircleLabelPos(label, pos, radar.context.center, txtHig, radar.axisName.labelStyle.offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user